function menu1Over(satir){ 
		satir.style.background = 'url(resimler/menu_item3.gif)';
}
function menu1Out(satir){ 
		satir.style.background = 'url(resimler/menu_item1.gif)';
}
function menu2Over(satir){ 
		satir.style.background = 'url(resimler/menu_item3.gif)';
}
function menu2Out(satir){ 
		satir.style.background = 'url(resimler/menu_item2.gif)';
}
function menu3Over(satir){ 
		satir.style.background = 'url(resimler/menu_item2.gif)';
}
function menu3Out(satir){ 
		satir.style.background = 'url(resimler/menu_item3.gif)';
}
function menu4Over(satir){ 
		satir.style.background = 'url(resimler/menu_item2.gif)';
}
function menu4Out(satir){ 
		satir.style.background = 'url(resimler/menu_item4.gif)';
}
function menuAdayOver(satir){ 
		satir.style.backgroundColor = '#A7B9C8';
}
function menuAdayOut(satir){ 
		satir.style.backgroundColor = '';
}
function listeOver(satir){ 
		satir.style.backgroundColor = '#F2F6FA';
}
function listeOut(satir){ 
		satir.style.backgroundColor = '';
}
function Trim(value)
{
	value = value.match(/^\s*(\S+(\s+\S+)*)\s*$/);
	return (value == null) ? "" : value[1];
}
function Only_LetterANDDigit(e) {	
	//alert(window.event.srcElement.value);
	var whichCode = (window.Event) ? e.which : e.keyCode; 
	
	
	if (whichCode > 47 && whichCode < 58){
	return true;}
	if (whichCode > 96 && whichCode < 123){
	return true;}
	if (whichCode > 64 && whichCode < 91){
	return true;}

	var validChars="üÜğĞışŞİçÇöÖ ";

	for (i=0; i<validChars.length; i++)
	{
		if (whichCode==validChars.charCodeAt(i)) {
			return true;
		}
	}
	
	return false;

}
function Only_Digit(e) {	
	//alert(window.event.srcElement.value);
	var whichCode = (window.Event) ? e.which : e.keyCode;
	
	if (whichCode == 13) return true;  // Enter
	if (whichCode > 57 ){
	return false;}
	if (whichCode < 48 && whichCode > 13){ 
	return false;}
}
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}
function getCookieVal (offset) {  
var endstr = document.cookie.indexOf (";", offset);  
if (endstr == -1)    
endstr = document.cookie.length;  
return unescape(document.cookie.substring(offset, endstr));
}


function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}

function saatigoster() {
 var d, saat_,dakika_,saniye_,x1,x2,s;
 d = new Date();
 saat_ = d.getHours(); if (saat_.toString(10).length==1) { saat_="0"+saat_; }
 dakika_= d.getMinutes();if (dakika_.toString(10).length==1) { dakika_="0"+dakika_; }
 saniye_= d.getSeconds();if (saniye_.toString(10).length==1) { saniye_="0"+saniye_; }
 s = saat_ + ":" + dakika_ + ":" + saniye_;
 saat.innerText = s; 
}

function OpenPopup(url, width, height)
{
	params = "toolbar=0,status=1,menubar=0,scrollbars=0, resizable=0,height="+height+",width="+width;
	window.open(url, '', params);
	return false;
}
function Tillah(chemin)
	{
	i1 = new Image;
	i1.src = chemin;
	html = '<HTML><HEAD><TITLE>Kapatmak İçin Resime Tıklayın...</TITLE></HEAD><BODY bgcolor="#F9FAF7" LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0  RIGHTMARGIN=0 BOTTOMMARGIN=0 MARGINHEIGHT=0><a href="javascript:window.close()"><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+15,document.imageTest.height+35)"></a></BODY></HTML>';
	popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	};

function replace2(s, from1, to1) {
	var p,str;
	str=s;
	p = str.indexOf(from1);
	while (p > -1) {
		str=str.substring(0, p) + to1 + str.substring(p+from1.length);
		p = str.indexOf(from1);
	}
	return str;
}

function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}

   function Accordian(target) {
   	typeof target == "object" ? this.element = target : this.element = document.getElementById(target); if (!this.element) return false;  
   	this.ul = this.element.getElementsByTagName("ul")[0]; 
   	this.tabs = this.ul.getElementsByTagName("li");
   	this.tabContent = this.getTabContent();
   	this.bind();
   }
   Accordian.prototype.getTabContent = function() {
   	tabContent= new Array();    
   	this.divs = this.element.getElementsByTagName("div");
   	for(var i = 0; i < this.divs.length; i++) {
           if (/tabContent/i.test(this.divs[i].className)) {
           tabContent.push(this.divs[i]);                        
   		}
   	}
   	return tabContent;
   }
   Accordian.prototype.bind = function() {    
   	var o = this;
   	for(var i = 0; i < this.tabs.length; i++) {
   		this.tabs[i].onclick = function() { 
   		   if (this.className != 'selected') {
   		      o.open(this); return false;
   		      var a = this.getElementsByTagName("a")[0];
   		      if (a) a.onclick = function() { 
                    return false; 
               }
   		   }
   		} 
   	}
   }
   Accordian.prototype.open = function(caller) {    
   	for(var i = 0; i < this.tabs.length; i++) {
   		var tab = this.tabs[i]; 
   		if (tab == caller) {  
   			this.collapse();
   			tab.className = "selected"
   			this.tabContent[i].style.display = "block";
   		}
   	}
   }
   Accordian.prototype.collapse = function() {
   	for(var i = 0; i < this.tabs.length; i++) {    
   		this.tabs[i].className = "";
   		this.tabContent[i].style.display = "none";                 
   	}                                                                
   }
