//JavaScript Document
// :::::::::::::::::::::::::::::
// :|«««««««««««««««««««««««««|:
// :|«« coded by cøder³² «««««|:
// :|««   2006 \/ ANK.   «««««|:
// :|«««««««««««««««««««««««««|:
// :::::::::::::::::::::::::::::

function TAVSIYE(strBaslik){
	open("Tavsiye.asp?Adres="+escape(document.URL)+"&Baslik="+strBaslik,"TavsiyePencerem","width=470, height=265, toolbar=no, location=no, status=no, scrollbars=yes, menubar=no")
}
function YAZDIR(IcerikID){
	open("Printer.asp?Icerik="+IcerikID+"&URL="+escape(document.URL),"PrintPencerem","width=650, height=500, toolbar=no, location=no, status=no, scrollbars=yes, menubar=yes")
}
function DosyaIcerikYukle(IcerikID){
	open("Yukle.ASP?Tur=Icerik&ID="+IcerikID,"YuklePencerem","width=270, height=200, toolbar=no, location=no, status=no, scrollbars=yes, menubar=no")
}
function DosyaYukle(DosyaID){
	open("Yukle.ASP?Tur=Dosya&ID="+DosyaID,"YuklePencerem","width=270, height=200, toolbar=no, location=no, status=no, scrollbars=yes, menubar=no")
}
function DosyaYayinYukle(YayinID){
	open("Yukle.ASP?Tur=Yayin&ID="+YayinID,"YuklePencerem","width=270, height=200, toolbar=no, location=no, status=no, scrollbars=yes, menubar=no")
}

function PopDuyuru(){
	open("DuyuruPOP.ASP","PopDuyuru","width=303, height=570, toolbar=no, location=no, status=no, scrollbars=no, menubar=no")
}
function PopDuyuruAyrinti(HaberID){
	opener.document.location='Duyuru_Detay.ASP?Duyuru='+HaberID
	window.close()
}

function UyeGiris(){
if(document.all.Username.value=="" || document.all.Password.value==""){
	alert('Kullanici adi ve sifrenizi girmelisiniz!')
} else{
	FrmGiris.KullaniciAdi.value = document.all.Username.value
	FrmGiris.Sifre.value = document.all.Password.value
	FrmGiris.submit()
	}
}

// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/*
Form field Limiter script- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/

var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}

function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}


function displaylimit(thename, theid, thelimit){
var theform=theid!=""? document.getElementById(theid) : thename
var limit_text='<b><span id="'+theform.toString()+'">'+thelimit+'</span></b> karakter daha yazabilirsiniz.'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
}
}

// MAIL LIST FORMU KODLARI ____________________________________________________________________________________
	function openTarget (form, features, windowName) { 
	  if (!windowName) 
		windowName = 'formTarget' + (new Date().getTime()); 
	  form.target = windowName; 
	  open ('', windowName, features); 
	} 
	
	function MailList1On()	{ if(FRMMailList.Isim.value=='Isminiz'){FRMMailList.Isim.value=''} }
	function MailList1Off()	{ if(FRMMailList.Isim.value==''){FRMMailList.Isim.value='Isminiz'} }
	function MailList2On()	{ if(FRMMailList.EPosta.value=='e-posta@adresiniz.com'){FRMMailList.EPosta.value=''} }
	function MailList2Off()	{ if(FRMMailList.EPosta.value==''){FRMMailList.EPosta.value='e-posta@adresiniz.com'} }
		
	function MailFormKontrol(strForm){		
		if(strForm.Isim.value=='Isminiz' || strForm.EPosta.value=='e-posta@adresiniz.com'){
			alert('Lütfen formdaki alanlari bos birakmayin!');
			return false;
		}
		
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(strForm.EPosta.value)){
		}
		else { alert("E-Posta adresiniz dogru görünmüyor! Lütfen tekrar kontrol edin.");
		strForm.EPosta.focus()
		return false;
		}
	return true;
	}
	
// MAIL LIST FORMU KODLARI ____________________________________________________________________________________


// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

