﻿function doldurx(ax)
	{
	var i=ax.length;
	var hata=0;
	//alert(i);
		for (j=0;j<=i-1;j++)
			{
			if (ax[j].type=="text" || ax[j].type=="password")
				{
					if (ax[j].value=="")
						{
						hata=5;
						ax[j].style.backgroundColor="#DDDDDD";
						}else
							{
							ax[j].style.backgroundColor="#FFFFFF";
							}
				}
			}
		if (hata!=0)
			{
			alert (metin_script4);
			}else {ax.submit();}
	}

function oyverkoyver(tur,id)
{
	//alert(tur+id);
	doldur(tur,id);
}
function yorum_kontrol(gel)
{
 if (gel==1)
	{
	divim(4);
	document.getElementById('yrm_frm').style.display='';
	document.getElementById('yrm_frm_msj').style.display='none';
	}
		else
		{
		divim(4);
		document.getElementById('yrm_frm_msj').style.display='';
		document.getElementById('yrm_frm').style.display='none';
		}
}
function yorumu_al(qx)
{
	metx=document.getElementById('yorumz').value;
	if (metx=="")
		{
		alert(metin_script5);
		}else
			{
			yazkatip(metx,qx);
			}
}
function openline(qa)
{
//alert(qa);
document.getElementById("tamekran").style.display='';
document.getElementById("form").style.display='';
}
function closeline(qa)
{
//alert(qa);
document.getElementById("tamekran").style.display='none';
document.getElementById("form").style.display='none';
}
function TestMail(mail)
{
	var reg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
	return reg.test(mail);
}
var mail_Adet=0;
function add_posta(posta_gln)
{
if (mail_Adet<=4)
{
	if (!TestMail(posta_gln))
		{
		alert(metin_script6);
		return;
		}
	alan=document.getElementById('mail_list');
	asill=document.getElementById('asil');
	alan.innerHTML+="<li>"+posta_gln+"</li>";
	asill.value+=posta_gln+";";
	document.getElementById('mail_add').value='';
	mail_Adet++;
	} 

}
function blue_me(kafa)
{
id=kafa;
asill=document.getElementById('asil').value;
ad=document.getElementById('ad_uye').value;
window.location.href="anlik_gonderi.php?id="+id+"&mails="+asill+"&ad="+ad;
}
function buyut(gelen_Ad,kuls,tarih,acikla)
{

mekan=document.getElementById('b_foto');
foto_label=document.getElementById('foto_data');
foto_yok_msj=document.getElementById('no_foto');
foto_yok_msj.style.display='none';
mekan.style.display='';
mekan.src='urun_foto/orji/'+gelen_Ad;
foto_label.innerHTML="<div align='left' style='margin-left:120px;'><strong>"+kuls+"</strong> | "+tarih+"<br>"+acikla+"</div>";

}
function hop(gel)
	{
	gel.style.backgroundColor = '#dddddd';
	}
function ba(gel)
	{
	gel.style.backgroundColor = '#ffffff';
	}
function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum)
		limitField.value = limitField.value.substring(0, limitNum);
	else
		limitCount.value = limitNum - limitField.value.length;
}	
function arasor(gelen)
{
//alert(gelen);
window.location.href='www.esit.com.tr/tr/ara/'+gelen;
}
function dillendir(gelen)
{
gelen.submit();
}
function yonetim_forum(adx,asx)
{
if (asx==1)
	{
	document.getElementById(adx).style.display='';
	}else
		{
		document.getElementById(adx).style.display='none';
		}
}
var temel="";
function ekrandagor(gelen)
{
document.getElementById("tamekran").style.display='';
document.getElementById("ortaresim").style.display='';
if (temel==""){temel=document.getElementById("ortaresim").innerHTML;}
document.getElementById("ortaresim").innerHTML+="<div><img src='" + gelen + "' alt=''/></div>";
}
function resKapa()
{document.getElementById("tamekran").style.display='none';
document.getElementById("ortaresim").style.display='none';
document.getElementById("ortaresim").innerHTML=temel;
}
function postup(ad,yon)
{
window.open("resim_gor.php?yolx="+ ad +"&dir="+ yon,"_blank","height=800,width=900,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no");
}
function fotospantos(kod,id,dil,tablo)
{
document.getElementById('foto_sec_div').style.display='';
document.getElementById('trdisi').src='tr/yonetim/trdisifotosec.php?k='+kod+'&i='+id+'&d='+dil+'&t='+tablo;
}