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 ajaxsayfaappend(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=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 winleft(uri,wid,sndr) {
	var pos=fPos(sndr);
	document.getElementById('winleft_div').style.display='none';
	document.getElementById('winleft_div').style.width=wid;
	document.getElementById('winleft_div').style.left=(pos[0]-wid)+"px";
	document.getElementById('winleft_div').style.top=(pos[1]+5)+"px";
ajaxsayfa(uri,'winleft_icerik',1);
	Effect.toggle('winleft_div', 'appear');
}

function closewinleft() {
Effect.toggle('winleft_div', 'appear');
}

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

	
}

function bubblewin(url,tdiv,tcontentdiv,sender) {
	a=fPos(sender);
	document.getElementById(tdiv).style.left=a[0]+sender.offsetWidth-5+"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 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 onayiste(mtn) {
	return confirm(mtn);
}

function icerikdegis(obj1,obj2) {
	if(obj1.checked==true) {
		document.getElementById(obj2).style.display='none';
	} else {
		document.getElementById(obj2).style.display='block';
	}

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

}
