/**
** Saat Takvim Scripti
*/
var dayarray=new Array("Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi")
var montharray=new Array("Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık")
function getthedate() {
	var mydate=new Date()
	var year=mydate.getYear()
	if (year < 1000)
		year+=1900
	var day=mydate.getDay()
	var month=mydate.getMonth()
	var daym=mydate.getDate()
	if (daym<10)
		daym="0"+daym
	var hours=mydate.getHours()
	var minutes=mydate.getMinutes()
	var seconds=mydate.getSeconds()
	var dn="AM"
	if (hours>=12)
		dn="PM"
	if (hours==0)
		hours=12
	if (minutes<=9)
		minutes="0"+minutes
	if (seconds<=9)
		seconds="0"+seconds

	var cdate="<small><font color='000000' face='Arial'>  "+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" Saat: "+hours+":"+minutes+":"+seconds+" </font></small>"
	if (document.all){
		document.all.clock1.innerHTML=cdate
		//document.all.clock2.innerHTML=cdate
		//document.all.clock3.innerHTML=cdate
	}
	else if (document.getElementById){
		document.getElementById('clock1').innerHTML=cdate
		//document.getElementById('clock2').innerHTML=cdate
		//document.getElementById('clock3').innerHTML=cdate
	}
}
function goforit() {
	if (document.all||document.getElementById)
		setInterval("getthedate()",1000)
}



/*
Hotkey Scripti
*/
var hotkey=36
var destination="/yonetim/"
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function backhome(e){
if (document.layers){
if (e.which==hotkey)
window.location=destination
}
else if (document.all){
if (event.keyCode==hotkey)
window.location=destination
}
}
document.onkeypress=backhome


function SelectCount(select,maxSelected)
{
	if (!select.storeSelections){
		select.storeSelections = new Array(select.options.length);
		select.selectedOptions = 0;
	}
	for (var i = 0; i < select.options.length; i++){
		if (select.options[i].selected && !select.storeSelections[i]){
			if (select.selectedOptions < maxSelected){
				select.storeSelections[i] = true;
				select.selectedOptions++;
			}
			else{
				alert('Maksimum 5 Tane Seçim Yapabilirsiniz!');
				select.options[i].selected = false;
			}
		}
		else if (!select.options[i].selected && select.storeSelections[i]){
			select.storeSelections[i] = false;
			select.selectedOptions--;
		}
	}
}

// maximum karakter uzunuk sinirlama
function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

// goster kapat fonksiyonu
function showhide(idx){
	if (document.getElementById){
		obj = document.getElementById(idx);
		if (obj.style.display == "none"){
			obj.style.display = "";
		}
		else if (obj.style.display == ""){
			obj.style.display = "none";
		}
	}
}