<!-- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" /> -->
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function katman(id){	
	var x=document.getElementById(id).style;
	if(x.display=='none'){
	x.display='block';
	}
	else{
	x.display='none';
	}
}
/*
function gizle(id,id2){	
	var x=document.getElementById(id).style;
	var y=document.getElementById(id2).innerHTML;
	if(x.display=='none'){
	x.display='block';
	y="Konuyu Daralt";
	}
	else{
	x.display='none';
	y="Konuyu Genişlet";
	}
}
*/

function sakla(id,id2,id3){	
	var x=document.getElementById(id).style;
	var y=document.getElementById(id2).style;
	var z=document.getElementById(id3).style;
	if(y.display=='none'){
	y.display='block';
	z.display='block';
	x.display='none';
	}
	else{
	y.display='none';
	z.display='none';
	x.display='block';
	}
}

function pencere(w,h,k){
var boyut='status=no, top=20, left=200, width='+w+' , height='+h;
yeniPencere = window.open("", "yaman", boyut)
yeniPencere.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\" />")
yeniPencere.document.write("<div style=\"position:absolute;top:0px;left:0px;\"><img alt=\"\" align=\"top\" src=\"images/"+k+"\" />")
/*yeniPencere.document.write("<script language=\"javascript\">window.resizeTo("+w+","+h+")</script>")*/
yeniPencere.document.close()
}


function fitWindowSize(){
var isNav4, isIE4;
	if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
	isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
	isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
	}
	if (isNav4) {
	window.innerWidth = document.layers[0].document.images[0].width;
	window.innerHeight = document.layers[0].document.images[0].height;
	}
	if (isIE4) {
	window.resizeTo(500, 500);
	width = 500 - (document.body.clientWidth - document.images[0].width);
	height = 500 - (document.body.clientHeight - document.images[0].height);
	window.resizeTo(width, height);
	}
}


function pencere2(k){
yeniPencere = window.open("resim.htm","yaman", "status=no, menubar=no, scrollbars=no, top=20, left=200");
yeniPencere.document.write('<html>\r\n<head>\r\n');
yeniPencere.document.write('<script language="javascript" type="text/javascript" src="yaman.js"></script>\r\n');
yeniPencere.document.write('</head\r\n');
yeniPencere.document.write('<body onload="fitWindowSize()">\r\n');
yeniPencere.document.write('<div style="position:absolute;left:0px;top:0px">\r\n');
yeniPencere.document.write('<img alt="" src="images/'+k+'" /></div>\r\n</body>\r\n</html>');
yeniPencere.document.close();
}



function atla(elmnt,boy,git)

{
if (boy.length==elmnt.maxLength)
	{	
	document.getElementById(git).focus()	
	}
}

function yardim(id,x,event) 
{
var stil = document.getElementById(id).style

if(x== 0 ){
stil.display = "none"
}
else{
stil.display = "block"
}
}

function checkForm(f) {
	var ss=f.sayfa_sayisi.value;
	var sb=f.sayfa_boyutu.value;
	var gs=f.gosterim_sayisi.value;
	onay = new RegExp ("[^0-9]")
	var hata='Lütfen sadece rakam yaziniz';
	if(onay.test(ss)){
		alert (hata);		
		f.sayfa_sayisi.focus();
		return false;
	}
	if(onay.test(sb)){
		alert (hata);	
		f.sayfa_boyutu.focus();
		return false;
	}
	if(onay.test(gs)){
		alert (hata);		
		f.gosterim_sayisi.focus();
		return false;
	}
	if (ss == null || ss == ""){			 			 
            alert("Lütfen \" Sayfa Sayısını \" yazınız.");
			f.sayfa_sayisi.focus();
			return false;
		}
	if (sb== null || sb == ""){			 			 
            alert("Lütfen \" Sayfa Boyutunu \" yazınız.");
			f.sayfa_boyutu.focus();
			return false;
		}
	if (gs == null || gs == ""){			 			 
            alert("Lütfen \" Gösterim Sayısını \" yazınız.");
			f.gosterim_sayisi.focus();
			return false;
		}		
		return true;
}
function sayi_mi(){
serbest = {
    BACKSPACE   : 8,
    TAB         : 9,
    SHIFT_KEY   : 16,
    END_KEY     : 35,
    HOME_KEY    : 36,
    LEFT_ARROW  : 37,
    RIGHT_ARROW : 39,
    DELETE_KEY  : 46,
    INS_KEY     : 96
  };
  
    c = document.all ? event.keyCode : document.captureEvents(Event.KEYPRESS);
    for(i in serbest) if (b = (c == serbest[i])) break;
    if((/[\WA-Zojmk]/.test(String.fromCharCode(c)) || event.shiftKey) && !b) event.returnValue = false;

  }
  
  function gizle(id,y,z){
	x=id.selectedIndex;
	var s=document.getElementById('secim')
	var w=document.getElementById('w_hizmet').style;
	var p=document.getElementById('p_hizmet').style;
	var g=document.getElementById('g_hizmet').style;
	var b=document.getElementById('b_site').style;
	var o=document.getElementById('o_hizmet').style;
	var oz=document.getElementById('is_ozel').style;
		
	if(y==1){
		s.selectedIndex=0;
		b.display='none';	
		oz.display='none';
		o.display='none';	
		switch(x){
		case 1:
		w.display='block';	
		s.focus();
		p.display='none';
		g.display='none';
		break;
		
		case 2:
		g.display='none';
		w.display='none';
		z.style.display='none';		
		p.display='block';
		oz.display='block';	
		break;
		
		case 3:
		p.display='none';
		w.display='none';
		z.style.display='none';
		g.display='block';	
		oz.display='block';	
		break;
		
		case 4:
		p.display='none';
		w.display='none';
		z.style.display='none';
		g.display='none';	
		oz.display='block';	
		break;
		
		default:
		p.display='none';	
		w.display='none';
		z.style.display='none';
		g.display='none';
		break
		}
	}
	if(y==2){
		g.display='none';
		switch(x){
		case 1:
		b.display='block';
		oz.display='block';		
		p.display='none';
		z.style.display='none';
		o.display='none';	
		break;
		
		case 2:
		b.display='block';
		oz.display='block';
		z.style.display='block';		
		p.display='none';
		o.display='none';	
		break;
		
		case 3:		
		oz.display='block';
		z.style.display='block';
		b.display='none';			
		p.display='none';
		o.display='block';	
		break;
		
		case 4:		
		p.display='block';
		z.style.display='block';	
		b.display='none';	
		oz.display='none';
		o.display='none';	
		break;
	
		default:
		b.display='none';	
		oz.display='none';
		p.display='none';
		z.style.display='none';
		o.display='none';	
		break;
	  }
		
	}
}
function gizle2(x){
	if(x.style.visibility=='hidden'){
	x.style.visibility='visible';
	}
	else{
	x.style.visibility='hidden';	
	}
}

function sil(x){
if (x.defaultValue == x.value)
x.value=""
}

function formOnay(f) {
var id=document.getElementById;
    if ((f.ad.value == null ||
			f.ad.value == "")){			 
      alert("Lütfen Adınızı yazınız.");
			f.ad.focus();
			return false;
		}
		if ((f.email.value == null ||
			f.email.value == "")){			 
			alert("Lütfen E-mail adresinizi yazınız.");
			f.email.focus();
			return false;
		}
		if (f.konu.selectedIndex == 0){			 
			alert("Lütfen Ne konuda Bilgi istediğinizi seçiniz.");
			f.konu.focus();
			return false;
		}
		if (f.konu.selectedIndex == 1 && f.secim.selectedIndex == 0){			 
			alert("Lütfen Ne konuda Bilgi istediğinizi seçiniz.");
			f.secim.focus();
			return false;
		}
		if((f.secim.selectedIndex > 1) && (f.site.value=="" || f.site.value==null)){			 
		alert("Lütfen sitenizin adresini yazın.");
		f.site.focus();
		return false;
		}		
		if (f.secim.selectedIndex ==3){			
		var say=0;			
				for( i=1; i<= 5; i++){
					var d='o'+i;
						if( id(d).checked){
						say+=1;
						}
				 }
				if(say==0){			 
				alert("Lütfen seçeneğinizi belirtin.");			
				return false;
				}
				if(document.getElementById('o5').checked && ( document.getElementById('diger_op').value==null || document.getElementById('diger_op').value=="")){
				alert("Lütfen İstediğiniz konuyu yazınız")
				document.getElementById('diger_op').focus();
				return false;
				}			
		}
		if (f.konu.selectedIndex ==3){							
			var say=0;			
				for( i=1; i<= 5; i++){
					var d='g'+i;
						if( document.getElementById(d).checked){
						say+=1;
						}
				}
				if(say==0){			 
				alert("Lütfen seçeneğinizi belirtin.");			
				return false;
				}
				if(document.getElementById('g5').checked && ( document.getElementById('diger_gr').value==null || document.getElementById('diger_gr').value=="")){
				alert("Lütfen İstediğiniz konuyu yazınız.")
				document.getElementById('diger_gr').focus();
				return false;
				}
		}
		if (f.konu.selectedIndex ==2){			
			var say=0;			
				for( i=1; i<= 8; i++){
					var d='p'+i;
						if( id(d).checked){
						say+=1;
						}
				}
				if(say==0){			 
				alert("Lütfen seçeneğinizi belirtin.");			
				return false;
				}
				if(document.getElementById('p8').checked && ( document.getElementById('diger_pr').value==null || document.getElementById('diger_pr').value=="")){
				alert("Lütfen İstediğiniz konuyu yazınız.")
				document.getElementById('diger_pr').focus();
				return false;
				}
		 }
		 if(f.ozellikler.value==f.ozellikler.defaultValue){
			 f.ozellikler.value='';
		 }
		 if(f.b_siteler.value==f.b_siteler.defaultValue){
			 f.b_siteler.value='';
		 }
return true;
}