function setItem(item) {

	for(i=1;i<7;i++) {
		if (document.getElementById('u' + i))
			document.getElementById('u' + i).className= '';
	}

	item.className = 'hover';
}


/* for selects */
function setValue(obj,val) {
	if ( val == "") return false;
	for (i=0;i<obj.options.length;i++)
		if (obj.options[i].value == val) {
			obj.selectedIndex=i;
			return true;
		}
	return false;
}


function setDisabled(btn) {
	btn.disabled = true;
	btn.value = 'Lütfen bekleyiniz...'
}

function displayMessage(url)
{
	messageObj.setSource(url);
	messageObj.setCssClassMessageBox(false);
	messageObj.setSize(400,275);
	messageObj.setShadowDivVisible(true);	// Enable shadow for these boxes
	messageObj.display();
}

function closeMessage()
{
	messageObj.close();
}


function displayEdit(url)
{
	messageObj.setSource(url);
	messageObj.setCssClassMessageBox(false);
	messageObj.setSize(350,350);
	messageObj.setShadowDivVisible(true);	// Enable shadow for these boxes
	messageObj.display();
}


///////////////////////////
/// takvim nesnesi icin
///////////////////////////
var calendarObjForForm = new DHTMLSuite.calendar({minuteDropDownInterval:10,numberOfRowsInHourDropDown:5,callbackFunctionOnDayClick:'getDateFromCalendar',isDragable:true});
//calendarObjForForm.setLanguageCode('sw');

function pickDate(buttonObj,inputObject) {
		calendarObjForForm.setCalendarPositionByHTMLElement(inputObject,10,inputObject.offsetHeight+2);	// Position the calendar right below the form input
		calendarObjForForm.setInitialDateFromInput(inputObject,'yyyy-mm-dd');	// Specify that the calendar should set it's initial date from the value of the input field.
		calendarObjForForm.addHtmlElementReference('myDate',inputObject);	// Adding a reference to this element so that I can pick it up in the getDateFromCalendar below(myInput is a unique key)
		if(calendarObjForForm.isVisible()){
			calendarObjForForm.hide();
		}else{
			calendarObjForForm.resetViewDisplayedMonth();	// This line resets the view back to the inital display, i.e. it displays the inital month and not the month it displayed the last time it was open.
			calendarObjForForm.display();
		}
}

function getDateFromCalendar(inputArray) {
		var references = calendarObjForForm.getHtmlElementReferences(); // Get back reference to form field.
		references.myDate.value = inputArray.year + '-' + inputArray.month + '-' + inputArray.day;
		calendarObjForForm.hide();
}

function changeFocus(selected, deselected) {
	selected.style.backgroundColor="#ffff99";
	deselected.style.backgroundColor="#EFEBDE";
	deselected.value='';
	
}