//FILTRE
function detekteEt(){
	this.ver=navigator.appVersion;
	this.agent=navigator.userAgent;
	this.dom=document.getElementById?true:false;
	this.mac=this.agent.indexOf("Mac">-1);
	this.op5=this.agent.indexOf("Opera 5">-1);
	this.ie4=(document.all && !this.dom && !this.op5)?1:0;
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.op5)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.op5)?1:0;
	this.ie=this.ie4 || this.ie5 || this.ie6;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.ns5_6=(this.dom && parseInt(this.ver)>=5)?1:0;
	this.ns=this.ns4 || this.ns5_6 ;
	this.tarayici=(this.ie4 || this.ie5 || this.ie6 || this.ns4 || this.ns5_6 || this.op5);
	return this;
	
	}
	
	var tarayici=new detekteEt();
	
	//yönlendirme komutları
	var buTarayici=( (document.layers || document.all || document.getElementById) && parseInt(navigator.appVersion)>=4)
		if (!buTarayici) location.href="alternatifsayfa.html";																				 
	
	//NS4 pencere boyutlandırma sorun giderici
	function pencereYeniden(){
		if(pencereGenisligi!=innerWidth || pencereYuksekligi!=innerHeight){
			location.reload();
			}
		}
		if(document.layers){
			penvereGenisligi=innerWidth;
			pencereYuksekligi=innerHeight;
			window.onresize=pencereYeniden;
			}
			
	//ROLOVER FONKSİYONLARI
	/*
	if (document.images){
		resim1on=new image();
		resim1on.src="on.gif";
		resim1off=new image();
		resim1off.src="off.gif";
		}
	*/	
	
	
	//GLOBAL FONKSİYONLAR
	function kaybol(katman){
		if(document.all){
		document.all[katman].style.visibility="hidden";
		}
		else if (document.layers){
			document.layers[katman].visibility="hide";
			}
		else {
			document.getElementById(katman).style.visibility="hidden";
			}
	}
	
	function gorun(katman){
		if(document.all){
		document.all[katman].style.visibility="visible";
		}
		else if (document.layers){
			document.layers[katman].visibility="show";
			}
		else {
			document.getElementById(katman).style.visibility="visible";
			}
	}
	
	function gorunurlukOku(katman){
		if(document.all){
		gorunurluk=document.all[katman].style.visibility;
		}
		else if (document.layers){
		gorunurluk=document.layers[katman].visibility;
			}
		else {
		gorunurluk=document.getElementById(katman).style.visibility;
			}
			
		if (gorunurluk=="" || gorunurluk==null){
			return "görünür";
			}
		if (gorunurluk=="visible" || gorunurluk=="show" || gorunurluk=="VISIBLE"){
			return "görünür";
			}
		else {
			return "gizli";
			}	
			
	}
	
	function git(katman,x,y){
		if(document.all){
		document.all[katman].style.pixelLeft=x;
		document.all[katman].style.pixelTop=y;
		}
		else if (document.layers){
			document.layers[katman].moveTo(x,y);
			}
		else {
			document.getElementById(katman).style.left=x+"px";
			document.getElementById(katman).style.top=y+"px";
			}
	}
	
	function kay(katman,kadarX,kadarY){
		var sol=solOku(katman);
		var ust=ustOku(katman);
		
		if(document.all){
		document.all[katman].style.pixelLeft=sol+kadarX;
		document.all[katman].style.pixelTop=ust+kadarY;
		}
		else if (document.layers){
			document.layers[katman].moveTo(sol+kadarX,ust+kadarY);
			}
		else {
			document.getElementById(katman).style.left=sol+kadarX+"px";
			document.getElementById(katman).style.top=ust+kadarY+"px";
			}
	}
	
	function katmanYuksekliginiOku(katman){
		var yukseklik;
				
		if(document.all){
		yukseklik=document.all[katman].offsetHeight;
		}
		else if (document.layers){
		yukseklik=document.layers[katman].document.height;
			}
		else {
		yukseklik=document.getElementById(katman).offsetHeight;
			}
			
		return 	yukseklik;
	}
	
	function zindexOku(katman){
		var zindex;
				
		if(document.all){
		zindex=document.all[katman].style.zIndex;
		}
		else if (document.layers){
		zindex=document.layers[katman].xIndex;
			}
		else {
		zindex=document.getElementById(katman).style.zIndex;
			}
			
		return 	zindex;
	}
	
	function zindexAta(katman,z){
				
		if(document.all){
		document.all[katman].style.zIndex=z;
		}
		else if (document.layers){
		document.layers[katman].xIndex=z;
			}
		else {
		document.getElementById(katman).style.zIndex=z;
			}
			
	}
	
	//
	
	function solOku(katman){
				
		if(document.all){
		return document.all[katman].style.pixelLeft;
		}
		else if (document.layers){
		return document.layers[katman].left;
			}
		else {
		return parseInt(document.getElementById(katman).style.left);
			}
			
	}
	
	function ustOku(katman){
				
		if(document.all){
		return document.all[katman].style.pixelTop;
		}
		else if (document.layers){
		return document.layers[katman].top;
			}
		else {
		return parseInt(document.getElementById(katman).style.top);
			}
			
	}
	
	function fonRengiOku(katman){
		var fonRengi;
		
		if(document.all){
		fonRengi=document.all[katman].style.backgroundColor;
		}
		else if (document.layers){
		fonRengi=document.layers[katman].bgColor;
			}
		else {
		fonRengi=document.getElementById(katman).style.backgroundColor;
			}
		return fonRengi;	
	}
	
	function fonRengiAta(katman,renk){
		
		if(document.all){
		document.all[katman].style.backgroundColor=renk;
		}
		else if (document.layers){
		document.layers[katman].bgColor=renk;
			}
		else {
		document.getElementById(katman).style.backgroundColor=renk;
			}
			
	}
	
	//
	
	function sinirRengiOku(katman){
		var sinirRengi;
		
		if(document.all){
		sinirRengi=document.all[katman].style.borderColor;
		}
		else if (document.layers){
		sinirRengi=document.layers[katman].borderColor;
			}
		else {
		sinirRengi=document.getElementById(katman).style.borderColor;
			}
		return sinirRengi;	
	}
	
	function sinirRengiAta(katman,renk){
		
		if(document.all){
		document.all[katman].style.borderColor=renk;
		}
		else if (document.layers){
		document.layers[katman].borderColor=renk;
			}
		else {
		document.getElementById(katman).style.borderColor=renk;
			}
			
	}
	
	function pencereGenisliginiOku(){
				
		if(document.all){
		return document.body.offsetWidth;
		}
		else {
		return window.innerWidth;
			}
	}
	
	function pencereYuksekliginiOku(){
				
		if(document.all){
		return document.body.offsetHeight;
		}
		else {
		return window.innerHeight;
			}
	}
	
	function ekranGenisliginiOku(){
	return screen.width;
	}
	
	function ekranYuksekliginiOku(){
	return screen.height;
	}