   var http_request = false;
   function makePOSTRequest(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
            http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      
      http_request.onreadystatechange = alertContents;
      http_request.open('POST', url, true);
      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http_request.setRequestHeader("Content-length", parameters.length);
      http_request.setRequestHeader("Connection", "close");
      http_request.send(parameters);
   }

   function alertContents() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById('myspan').innerHTML = result;            
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   
   function get(obj) {
      var poststr = "mytextarea1=" + encodeURI( document.getElementById("mytextarea1").value ) +
                    "&mytextarea2=" + encodeURI( document.getElementById("mytextarea2").value );
      makePOSTRequest('post.php', poststr);
   }

function addBookmark() {
	url=window.location;
	title=document.title;
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}

//***************  SAAT  *************** //
var menucontrol=false;
window.setTimeout ("redirect()",100);

function hidemenu(){
	if (menucontrol){
		usermenu.style.display='none';
		menucontrol=false;}
}

function redirect(){
	if (typeof(saat)=='undefined')
		return;
	var time=new Date;
	var zaman=setTwoChar(time.getHours())+':'+setTwoChar(time.getMinutes())+':'+setTwoChar(time.getSeconds ());
	saat.innerHTML =zaman;
	hidemenu();
	window.setTimeout ("redirect()",1000);
}

function setTwoChar(str){
	var a=new String;
	a=str.toString();
	if (a.length==1){return '0'+a;}
	else{return a;}
}
//***************  SAAT *************** //
<!--
function clock(){
 var Doit=new Date();
 var time=Doit.getHours();
 var minutt=Doit.getMinutes();
 var sekund=Doit.getSeconds();
 if (minutt<=9) minutt="0"+minutt ;
 if (sekund<=9) sekund="0"+sekund;

klokkami=time+":"+minutt+":"+sekund;
document.getElementById("saat").innerHTML = klokkami;
setTimeout("clock()",1000);
}
//-->
//***************  SAAT BITIS  *************** //

//////////////GERI SAYIM
function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}

cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}

cdtime.prototype.showresults=function(){
var thisobj=this
var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds
	if (timediff<0){ //if time is up
	this.timesup=true
	this.container.innerHTML=this.formatresults()
	return
	}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
	if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level
	hourfield=dayfield*24+hourfield
	dayfield="n/a"
	}else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level
	minutefield=dayfield*24*60+hourfield*60+minutefield
	dayfield=hourfield="n/a"
	}else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level
	var secondfield=timediff
	dayfield=hourfield=minutefield="n/a"
	}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
}

function formatresults(){
	if (this.timesup==false){//if target date/time not yet met
	var displaystring=arguments[0]+" gün "+arguments[1]+" saat "+arguments[2]+" dakika "+arguments[3]+" saniye kaldi.."
	}else{ //else if target date/time met
	var displaystring=""
	}
	return displaystring
}

function formatresults2(){
	if (this.timesup==false){ //if target date/time not yet met
		var displaystring="<span class='lcdstyle'>"+arguments[0]+" <sup>gün</sup> "+arguments[1]+" <sup>saat</sup> "+arguments[2]+" <sup>dakika</sup> "+arguments[3]+" <sup>saniye</sup></span> "
	}else{ //else if target date/time met
	var displaystring="" //Don't display any text
	//alert(" ") //Instead, perform a custom alert
	}
return displaystring
}
//geri sayim bitti

//***************  Mail Başlangıç  *************** //
function BosDegerKontrolu(Kontrolismi){
	if (Kontrolismi.value!=''){
		return false;
	}else{
		return true;
	}
}

function DegerKontrolu(Kontrolismi){
	if (Kontrolismi.value!='0')
	{return false;	}
	else
	{return true;}
}

function CheckedKontrolu(Kontrolismi){
	var fromLen = Kontrolismi.length;
	var isFromChecked = false;
	for(var i = 0; i<fromLen;i++){
		var from = Kontrolismi[i].checked;
			if(from != ""){
				isFromChecked = true;
				from = Kontrolismi[i].value;
//				break;
				return false;
			}
	}
	    if(from == "" || !from){
			return true;	
		}
}

function UzunlukKontrolu(Kontrolismi){
	var a =new String;
	a=Kontrolismi.value;
	if (a.length<10)
	{return true;	}
	else
	{return false;}
}

function UzunlukKontrolu2(Kontrolismi){
	var a =new String;
	a=Kontrolismi.value;
	if (a.length<5)
	{return true;	}
	else
	{return false;}
}

function IcerikKontrolu(Kontrolismi,varChar){
	var a = new String;
	a=Kontrolismi.value;
	if (a.length<=5)
	{return true;}

	for (var i=2;i<=a.length+1;i++)	{
		if (a.substr(i,1)==varChar)
		{return false;}
	}
	return true;

}

function CaptchaKontrolu(Kontrolismi){
	var a = new String;
	a=Kontrolismi.value;
 var url = 'http://www.izmirdeyasam.com/captcha/check.php?captcha=';
        var captchaOK = 2;  // 2 - kontrol edilmedi, 1 - doğru, 0 - yanlış
        function getHTTPObject() {
        try {
        req = new XMLHttpRequest();
          } catch (err1)
          {
          try {
          req = new ActiveXObject("Msxml12.XMLHTTP");
          } catch (err2)
          {
          try {
            req = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (err3)
            {
	req = false;
            }
          }
	}
        return req;
	}
        var http = getHTTPObject(); // HTTP objesini yarattık        
        function handleHttpResponse() {
        if (http.readyState == 4) {
            captchaOK = http.responseText;
			 if(captchaOK != 1) {
				frmadi.captcha.value='';
				frmadi.captcha.focus();
				MesajGoruntule("Güvenlik Kodunu Yanlış Yazdınız!..."); 
              return false;
              }
              return true;
           }
		   
        }
		
        function checkcaptcha(a) {
        http.open("GET", url + escape(a), true);
        http.onreadystatechange = handleHttpResponse;
        http.send(null);
        }

// Ajax captcha doğrulaması
          checkcaptcha(a);
}

function Tarihbuyuklugu(Tarih){
	
	day=Tarih.substring(0,2);
	month=Tarih.substring(3,5);
	year=Tarih.substring(6,10);
	var otarih = year+"."+month+"."+day;
	
	var bugun=new Date();
	var yil=bugun.getYear();
	var ay =bugun.getMonth()+1;
	var gun=bugun.getDate();

	if (ay<10){
		ay="0"+ay;
	}
	if (gun<10){
		gun="0"+gun;
	}

   var bugunyaz=yil+"."+ay+"."+gun;

	 if(otarih>bugunyaz) { 
	  alert("Tarih bugünden büyük olamaz");
	  return true;
  	}
}

function TarihKontrolu(Tarih){
	day=Tarih.substring(0,2);
	month=Tarih.substring(3,5);
	year=Tarih.substring(6,10);
  
	  if((month==04 || month==06 || month==09 || month==11) && day==31) { 
	  alert("Seçtiginiz ay 30 gün çekmektedir, lütfen düzeltiniz.");
	  return true;
	  }
  if (month==02){
    if(Math.floor(year/400)*400==year) { subat=29;}
    else if(Math.floor(year/100)*100==year){ subat=28;}
    else if(Math.floor(year/4)*4==year){ subat=29;}
    else { subat=28;}
    if(day>subat) { 
	alert("Subat ayi "+ year +" yilinda 28 gün çekmektedir!");
	return true;
	}
  }
}

function MesajGoruntule(Mesaj){
	mesaj.style.color="red";
	mesaj.innerHTML +='<font color=blue>*</font><b> ' + Mesaj+ '</b><br>';
}
//***************  Mail Bitiş  *************** //

// alan kontrol
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.lengtd) {
    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.lengtd;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.lengtd;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.lengtd-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.lengtd-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+duzelt(nm)+' Alani Gerekli.\n'; }
  } if (errors) alert('Asagidaki hata(lar) olustu:\n\n'+errors);
  document.MM_returnValue = (errors == '');
}
// resim boyutlari

function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#e6e6e6" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<table width="'+imageWidth+'" Height="'+imageHeight+'" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle">'); 
	newWindow.document.write('<img src='+imageName+' alt='+alt+' align="absmiddle">'); 
	newWindow.document.write('</td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
}



function popimage(imagesrc,winwidth,winheight,yazi){
var look='width='+winwidth+',height='+winheight+',scrollbars=yes'
popwin=window.open("","",look)
popwin.document.open()
popwin.document.write('<title>Donat Colletion Etkinlikler</title><body leftmargin="0" topmargin="0"><p align="center"><img src="'+imagesrc+'"><p align="center"><font face="Times New Roman"><strong><font color="#008000"> '+yazi+' </font></strong></font> </body>')
popwin.moveTo(0,0)
popwin.document.close()
}

function ValidateForm(fm){
var msgtext="";

if (fm.ara.value=="") msgtext+=" " ;
	if (msgtext.length>0){
	msgtext= "Aradiginiz ürünün kodu yada açiklamasini yazmadiniz » »\n\n" + msgtext+"\n"
	alert (msgtext);
	return false
	}
return true
}

function popUp(url,id,wdt,hei) {
window.open(url,id,'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+wdt+',height='+hei+',left = 190,top = 130');
}

////iframe boyutu
var iframeids=["aktif"]
var iframeids2=["aktif2"]
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 0 : 0 

function resizeCaller() {
var dyniframe=new Array()
	for (i=0; i<iframeids.length; i++){
	if (document.getElementById)
	resizeIframe(iframeids[i])
	if ((document.all || document.getElementById) && iframehide=="no"){
	var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
	tempobj.style.display="block"
	}
	}
/// ikinicisi
	for (i=0; i<iframeids2.length; i++){
	if (document.getElementById)
	resizeIframe(iframeids2[i])
	if ((document.all || document.getElementById) && iframehide=="no"){
	var tempobj=document.all? document.all[iframeids2[i]] : document.getElementById(iframeids2[i])
	tempobj.style.display="block"
	}
	}


}
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe)
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function rc(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

///////////////////
function kucuk_harf_yap() {

	if(navigator.appName.indexOf('Explorer')==-1){

		var girilen = e.keyCode;
		
		if (girilen == 73) {
		e.keyCode  = 305;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 199) {
		e.keyCode  = 231;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 214) {
		e.keyCode  = 246;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 220) {
		e.keyCode  = 252;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 286) {
		e.keyCode  = 287;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 304) {
		e.keyCode  = 105;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 350) {
		e.keyCode  = 351;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen >= 65 && girilen <= 90) {
		e.keyCode  = girilen + 32;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
	} else {
		var girilen = window.event.keyCode;
		if (girilen == 73) {
		window.event.keyCode = 305;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 199) {
		window.event.keyCode = 231;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 214) {
		window.event.keyCode = 246;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 220) {
		window.event.keyCode = 252;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 286) {
		window.event.keyCode = 287;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 304) {
		window.event.keyCode = 105;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen == 350) {
		window.event.keyCode = 351;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
		else if (girilen >= 65 && girilen <= 90) {
		window.event.keyCode = girilen + 32;
		//window.alert('Lütfen BÜYÜK HARF Kullanmayiniz');
		}
}

return;
};
