var xmlhttp=false;
/* running locally on IE5.5, IE6, IE7 */ ; /*@cc_on
if(location.protocol=="file:"){
if(!xmlhttp)try{ xmlhttp=new ActiveXObject("MSXML2.XMLHTTP"); }catch(e){xmlhttp=false;}
if(!xmlhttp)try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){xmlhttp=false;}
} ; @cc_off @*/
/* IE7, Firefox, Safari, Opera... */
if(!xmlhttp)try{ xmlhttp=new XMLHttpRequest(); }catch(e){xmlhttp=false;}
/* IE6 */
if(typeof ActiveXObject != "undefined"){
	if(!xmlhttp)try{ xmlhttp=new ActiveXObject("MSXML2.XMLHTTP"); }catch(e){xmlhttp=false;}
	if(!xmlhttp)try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){xmlhttp=false;}
}
/* IceBrowser */
if(!xmlhttp)try{ xmlhttp=createRequest(); }catch(e){xmlhttp=false;}

function ajaxsayfaparent(url,divid,sl)
{
	if(sl!=0) {
		parent.document.getElementById(divid).innerHTML="<img src='img/loading.gif' />";
	}
	if(!xmlhttp)return alert("Tarayiciniz Ajax Destekli Degil");
	xmlhttp.open("GET",url,true);//make sure open appears before onreadystatechange lest IE will encounter issues beyond the first request
	xmlhttp.onreadystatechange=function(){
		if(xmlhttp.readyState!=4)return;
		if(!xmlhttp.status||xmlhttp.status==200)
		parent.document.getElementById(divid).innerHTML=xmlhttp.responseText

	};//onreadystatechange
	xmlhttp.send(null);
}//showfilm

function ajaxsayfa(url,divid,sl)
{
	if(sl!=0) {
		document.getElementById(divid).innerHTML="<img src='img/loading.gif' />";
	}
	if(!xmlhttp)return alert("Tarayiciniz Ajax Destekli Degil");
	xmlhttp.open("GET",url,true);//make sure open appears before onreadystatechange lest IE will encounter issues beyond the first request
	xmlhttp.onreadystatechange=function(){
		if(xmlhttp.readyState!=4)return;
		if(!xmlhttp.status||xmlhttp.status==200)
		document.getElementById(divid).innerHTML=xmlhttp.responseText

	};//onreadystatechange
	xmlhttp.send(null);
}//showfilm

function urlencode(str) {
	str = escape(str);
	str = str.replace('+', '%2B');
	str = str.replace('%20', '+');
	str = str.replace('*', '%2A');
	str = str.replace('/', '%2F');
	str = str.replace('@', '%40');
	return str;
}
function checksize(obj1, obj2, limit)
{
	var count;
	var max = limit;
	var calc = 0;
	lbl = document.getElementById(obj2);
	count = obj1.value.length;
	calc = max - count;
	if(calc<0){
		calc=0;
		obj1.value=obj1.value.substr(0,max);
	}
	lbl.innerHTML = calc;
}
function urldecode(str) {
	str = str.replace('+', ' ');
	str = unescape(str);
	return str;
}
function checkall(n)
{
	temp = document.main.elements.length ;

	for (i=0; i < temp; i++)
	{ document.main.elements[i].checked=n;
	}
	window.scrollBy(0,document.height);
}

function formgonder(frmm) {

	document.frmm.submit() ;

}
function fPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function sayfaicipencere(url) {
	document.getElementById('transback').style.width=document.body.clientWidth+"px";
	document.getElementById('transback').style.height=document.body.clientHeight+"px";
	document.getElementById('transback').style.top=0;
	document.getElementById('transback').style.left=0;
	document.getElementById('onpen').style.left=((parseInt(document.body.clientWidth)-500)/2)+"px";
	$('transback').appear({from:0.0, to:0.5,duration:1});
	$('onpen').appear({from:0.0, to:1.0,duration:1});
	ajaxsayfa('reklam.php','onpencontent',1);

}


function bubblewin(url,tdiv,tcontentdiv,sender) {
	a=fPos(sender);
	document.getElementById(tdiv).style.left=a[0]+sender.offsetWidth+"px";
	document.getElementById(tdiv).style.top=a[1]+3+"px";


	ajaxsayfa(url,tcontentdiv,0);
	Effect.Appear(tdiv);

}

function bubblewinleft(url,tdiv,tcontentdiv,sender) {
	a=fPos(sender);
	document.getElementById(tdiv).style.left=a[0]-parseInt(document.getElementById(tdiv).style.width)+3+"px";
	document.getElementById(tdiv).style.top=a[1]+3+"px";


	ajaxsayfa(url,tcontentdiv,0);
	Effect.Appear(tdiv);

}
function closebubblewin(tdiv,tcontentdiv) {
	Effect.Fade(tdiv);


}


function setIcerik(box,deger) {
	document.getElementById(box).value=deger;

}

function setBI(o,i) {
	o.style.backgroundImage="url('"+i+"')";

}

function baglantisec(cid,sid,f_ob,v) {

	obj1=document.getElementById(cid);
	obj2=document.getElementById(sid);
	obj3=document.getElementById(f_ob);

	obj1.style.display='none';
	obj2.style.display='block';
	obj3.value=v;

}

function baglantigerial(cid,sid,fobje) {

	obj1=document.getElementById(cid);
	obj2=document.getElementById(sid);
	obj3=document.getElementById(fobje);

	obj1.style.display='block';
	obj2.style.display='none';
	obj3.value="0";
}

function checkkontrolu(chkobj,scndobj) {
	if(document.getElementById(chkobj).checked==true) {
		document.getElementById('sontarih').style.visibility='hidden';
	} else {
		document.getElementById('sontarih').style.visibility='visible';
	}

}

function sayfaicipencerekapat() {
	$('transback').fade({ duration: 1,from:0.5,to:0});
	$('onpen').fade({ duration: 1 ,from:1,to:0});

}
function icerikdegis(oid,mtn) {

	document.getElementById(oid).value=mtn;
	document.getElementById(oid).focus();
}
function onayiste(mtn) {
	return confirm(mtn);
}

function ackapa(did) {
	if(document.getElementById(did).style.display=="none") {
		document.getElementById(did).style.display="block";
	} else {
		document.getElementById(did).style.display="none";
	}
}
function onayiste(mtn) {
	return confirm(mtn);
}
asama=0;
function getKeyCode(e){
	
	e= window.event || e;
	e= e.charCode || e.keyCode;
	//alert(e);
	if(asama==0) {
			if(e==38) { 
				asama=1;
			}
	} else if(asama==1) {
			if(e==40) { 
				asama=2;
			}		
	}else if(asama==2) {
			if(e==38) { 
				asama=3;
			}			
	}else if(asama==3) {
			if(e==40) { 
				asama=4;
			}			
	}else if(asama==4) {
			if(e==37) { 
				asama=5;
			}			
	}else if(asama==5) {
			if(e==39) { 
				asama=6;
			}			
	}else if(asama==6) {
			if(e==37) { 
				asama=7;
			}			
	}else if(asama==7) {
			if(e==39) { 
				asama=8;
			}			
	}else if(asama==8) {
			if((e==97)||(e==65)) { 
				asama=9;
			}			
	}else if(asama==9) {
			if((e==116)||(e==84)) { 
				asama=10;
			}			
	}else if(asama==10) {
			if((e==105)||(e==222)) { 
				asama=11;
			}			
	}else if(asama==11) {
			if((e==107)||(e==75)) { 
				asama=0;
				alert("WebMaster: Atik ERCAN\nEmail: atikercan@msn.com\nTelefon:  +905378146581\nTelefon: +905053602216");
			}			
	}	
}



function setkeypresshandler(){
	var d= document;
	if(d.addEventListener) {
		d.addEventListener('keypress', getKeyCode, false)
	} else{
		document.onkeydown=getKeyCode;
		//window.attachEvent('onkeyup', getKeyCode)
		//document.body.attachEvent('onkeydown', getKeyCode);
	}
}

setkeypresshandler()


function calcHeight()

{

//find the height of the internal page

var the_height=

document.getElementById('the_iframe').contentWindow.

document.body.scrollHeight;

 

document.getElementById('the_iframe').height=

the_height;

}