// JavaScript Document

// pop up begin
function openWin(windowURL, windowName, windowFeatures) {
	window.open(windowURL, windowName, windowFeatures);
}
// pop up ende

// Manschette begin
function zeigen(anzahl,andern){   
   for(var i = 1; i <= anzahl; i++){     
     titelid = 'titel'+ i;
     document.getElementById(titelid).style.display = 'none';
     bildid = 'bild'+ i;
     document.getElementById(bildid).style.display = 'none';
   }
   titelid = 'titel'+ andern;
   document.getElementById(titelid).style.display = 'block';
   bildid = 'bild'+ andern;
   document.getElementById(bildid).style.display = 'block';
}
//  Manschette ende

// Wetter begin
function havadurumu(){
	var sehir= $("select").serialize();
	$('#durum').html("<img src='images2/ajax-loader.gif' alt='' />")
	$.ajax({
		   type:'POST',
		   url:'isle.php',
		   data:sehir,
		   success:function durum(msg){
			   $('#durum').html(msg);
			   }
			});
	}
// Wetter ende	

// Form begin
function SubmitForm(){
	if(document.form.isim.value==""){
		alert("Lütfen İsminizi Giriniz!");
		document.form.isim.focus();
		return false;
		}
	if(document.form.email.value==""){
		alert("Lütfen Elektronik Posta Adresinizi Giriniz!");
		document.form.email.focus();
		return false;
		}
	if(document.form.baslik.value==""){
		alert("Lutfen Başlığı Giriniz!");
		document.form.baslik.focus();
		return false;
		}
	if(document.form.yorum.value==""){
		alert("Lütfen Yorumunuzu Giriniz!");
		document.form.yorum.focus();
		return false;
		}
	if(document.form.aemail.value==""){
		alert("Lütfen Göndereceğiniz Elektronik Posta Adresinizi Giriniz!");
		document.form.aemail.focus();
		return false;
		}
	if(document.form.web.value==""){
		alert("Lütfen Web Adresinizi Giriniz!");
		document.form.web.focus();
		return false;
		}
	if(document.form.yer.value==""){
		alert("Lütfen Reklam Yerini Giriniz!");
		document.form.yer.focus();
		return false;
		}
	if(document.form.sure.value==""){
		alert("Lütfen Reklam Süresini Giriniz!");
		document.form.sure.focus();
		return false;
        }
	if(document.form.mesaj.value==""){
		alert("Lütfen İletişim Mesajınız Giriniz!");
		document.form.mesaj.focus();
		return false;
        }
	if(document.form.konu.value==""){
		alert("Lütfen İletişim Konusunu Giriniz!");
		document.form.konu.focus();
		return false;
        }
}
// Form ende

// Artikel begin
function selectURL(nexturl) {
 	if (nexturl != "") {
		  //window.top.location.href = 'makale.php.mn='+nexturl;
		  window.top.location.href = 'makale'+nexturl+'.html';
	 }
}
// Artikel ende


//Artikel Kontrolle begin
var min=8;
var max=18;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}
//Artikel Kontrolle ende