function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie8=(this.ver.indexOf("MSIE 8")>-1 && this.dom)?1:0;
	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie8 || this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()
//With nested layers for netscape, this function hides the layer if it's visible and visa versa
function shlay(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	if(obj.visibility=='visible' || obj.visibility=='show') obj.visibility='hidden'
	else obj.visibility='visible'
}
//Shows the div
function slay(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	obj.visibility='visible'
}
//Hides the div
function hlay(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	obj.visibility='hidden'
}

function rans(){
return (Math.round(Math.random() * 100000));
}

//login box focus
var DEFAULT_EPOSTA_BOX_VALUE = 'e-posta';
var DEFAULT_SIFRE_BOX_VALUE = 'şifre';

function eposta_focus(objBox){
	    login_box_focus(objBox, DEFAULT_EPOSTA_BOX_VALUE)
}
function eposta_blur(objBox){
	    login_box_blur(objBox, DEFAULT_EPOSTA_BOX_VALUE)
}
function sifre_focus(objBox){
	    try{
		    objBox.style.backgroundImage='none';
		    objBox.style.backgroundColor='#FFFFFF';
    }
    catch(e){}
}
function sifre_blur(objBox){
	    if (objBox.style.backgroundImage=='none'){
		    if (objBox.value.toString().length == 0){
			    try{
				    objBox.style.backgroundImage='url(../images/password.gif)';
				    objBox.style.backgroundColor='#FFFFFF';
				    }
			    catch(e){}
		    }
	    }
}
function login_box_focus(objBox, strDefaultBoxValue){
	    var strValue
	    strValue = objBox.value;
	    strValue = strValue.replace(' ','');
	    if(strValue==strDefaultBoxValue){
		    objBox.value='';
	    }
}
function login_box_blur(objBox, strDefaultBoxValue){
	    var strValue
	    strValue = objBox.value;
	    strValue = strValue.replace(' ','');
	    if(strValue==''){
		    objBox.value=' '+strDefaultBoxValue;
	    }
}
function aramaknt(){
		if (document.arama.SearchTerm.value == ""){
		alert ("Lütfen arayacağınız kelimeyi giriniz.");
		document.arama.SearchTerm.focus();
		return false;  
		}
		if (document.arama.SearchTerm.value.length<2 || document.arama.SearchTerm.value.length>100){
		alert ("Arayacağınız kelime en az 2 harfden oluşmalı.");
		document.arama.SearchTerm.focus();
		return false;  
		}
		var yzma='<>{}!%$';
		var tt=document.arama.SearchTerm.value;
		for (var i=0;i<tt.length;i++){
			if (yzma.indexOf (tt.substr(i,1),0) >-1){
	        alert ("Lütfen aramanızda özel karakterler kullanmayınız.");
	       	document.arama.SearchTerm.focus();
	        return false;
			}	
		}
}
//popup func
function popupscr(url, name, gen, yuk){
eval(window.open(url,name,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=" + gen + ",height=" + yuk + ",screenX=5,screenY=5,top=5,left=5"));
}
function popsat(url, name, gen, yuk, scr, rsz){
eval(window.open(url,name,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars="+ scr +",resizable="+ rsz +",width=" + gen + ",height=" + yuk + ",screenX=1,screenY=1,top=1,left=1"));
}
function ns4resize(){
if (bw.ns4){window.location.href=window.location.href;}
	return;
}
//onresize=ns4resize;
function init(){
		init2();
		}
onload=init;