// JavaScript Document by senerr@windowslive.com 2008

		
		function FucSener_Null(str)
		{
		var strChar=document.getElementById(str)
		if (strChar.value=="")
		
		{
		alert("Lütfen arama alanını boş bırakmayınız !");
		strChar.focus();
		return false
		}
		
		else return true

		
		}
		
		
		
		function KrediKart(anaform)
		{
	
	
	with (anaform)
	{


		   
		if (g_name.value=="" )
		   {
		   alert("Lütfen Kredi Kartı üzerindeki ismi yazınız");
		   g_name.focus(); return false; 
		   }
		   
		else if (g_name.value.length < 5 )
		   {
		   alert("Kredi Kartı ismi 5 harften oluşamaz!");
		   g_name.focus(); return false; 
		   }
		   
		else if (g_no.value.length < 16 )
		   {
		   alert("Kart Numarası en az 16 rakam olmalı!");
		   g_no.focus(); return false; 
		   }
		   
		else if (IsNumeric(g_no.value)==false )
		   {
		   alert("Kart Numarası rakam olmalı!");
		   g_no.focus(); return false; 
		   }
		   
		else if (g_date1.value=="")
		   {
		   alert("Son Kullanma ayını seçiniz");
		   g_date1.focus(); return false; 
		   }
		   
		else if (g_date2.value=="")
		   {
		   alert("Son Kullanma yılını seçiniz");
		   g_date2.focus(); return false; 
		   }

		   
		else if (g_code.value < 3 )
		   {
		   alert("Güvenlik Kodu  en az 3 karakter olmalı!");
		   g_code.focus(); return false; 
		   }
		   
		   else
		   {
			 return true;  
			   }

	}
		
		}
		
	
		function IsNumeric(num){
			if (num >=0)
				return true;
				return false;
				} 
	
		
		
//********************** register validation


function RegisterValidation(anaform)
{

var pass=document.getElementById('gNumber').value


	with (anaform)
	{


		   
		if (adi.value=="" )
		   {
		   alert("Lütfen adınızı yazınız");
		   adi.focus(); return false; 
		   }
		   
		else if (mailDogrula(mail)==false)
		   {
		   alert("Lütfen geçerli bir e-posta adresi giriniz"); 
		   mail.focus(); return false;
		   } 
		else if (sifre.value=="")
		   {
		   alert("Lütfen şifenizi yazınız");
		   sifre.focus(); return false; 
		   }
		   
		else if (sifre.value.length < 6)
		   {
		   alert("Şifreniz en az 6 karekter olmalı!");
		   sifre.focus(); return false; 
		   }
		   
		else if (sifre.value != sifreRepeat.value)
		   {
		   alert("Şifre doğrulaması başarısız! Lütfen şifrenizi ya da şifre doğrulama alanına girdiğiniz bilgiyi kontrol ediniz.");
		   sifreRepeat.focus(); return false; 
		   }
		   
		else if (g_number.value != pass)
		   {
		   alert("Lütfen Güvenlik numarasını kontrol edin.Güvenlik numarası yanlış! ");
		   g_number.focus(); return false; 
		   }
		   
		   
	
		else if (confirm("Girdiğiniz bilgiler gönderilecektir.\nDevam edilsin mi ?")==true) return true;
	else return false;
	}
	
	
}



function mailDogrula(alani_gecir)
{
	with (alani_gecir)
	{

	if ( value.indexOf("@") < 1 || value.lastIndexOf(".") < 2 ) 
 		 {return false;}
	else 
		 {return true;}
	}
}





//**********************
		


// ***********************

function Iletisim_dogrula(anaform)
{
	with (anaform)
	{
	
		   
		if (ad.value=="")
		   {
		   alert("Lütfen adınızı yazınız");
		   ad.focus(); return false; 
		   }
		   
		else if (mailDogrula(mail)==false)
		   {
		   alert("Lütfen geçerli bir e-posta adresi giriniz"); 
		   mail.focus(); return false;
		   } 
  
		else if (konu.value=="")
		   {
		   alert("Lütfen konuyu yazınız");
		   konu.focus(); return false; 
		   }
		   
		else if (mesaj.value=="")
		   {
		   alert("Lütfen mesaj içeriğini yazınız");
		   mesaj.focus(); return false; 
		   }
	
	}
	
			
}

// ************************


		
//  dropinslideshow Reklam banneri için

var _dropinslideshowcount=0

function dropinslideshow(imgarray, w, h, delay){
	this.id="_dropslide"+(++_dropinslideshowcount) //Generate unique ID for this slideshow instance (automated)
	this.createcontainer(parseInt(w), parseInt(h))
	this.delay=delay
	this.imgarray=imgarray
	var preloadimages=[]
	for (var i=0; i<imgarray.length; i++){
		preloadimages[i]=new Image()
		preloadimages[i].src=imgarray[i][0]
	}
	this.animatestartpos=parseInt(h)*(-1) //Starting "top" position of an image before it drops in
	this.slidedegree=10 //Slide degree (> is faster)
	this.slidedelay=30 //Delay between slide animation (< is faster)
	this.activecanvasindex=0 //Current "active" canvas- Two canvas DIVs in total
	this.curimageindex=0
	this.zindex=100
	this.isMouseover=0
	this.init()
}


dropinslideshow.prototype.createcontainer=function(w, h){
 document.write('<div id="'+this.id+'" style="width:'+w+'px; height:'+h+'px; overflow:hidden">')
	document.write('<div style="position:absolute; width:'+w+'px; height:'+h+'px; top:0;"></div>')
	document.write('<div style="position:absolute; width:'+w+'px; height:'+h+'px; top:-'+h+'px;"></div>')
	document.write('</div>')
	this.slideshowref=document.getElementById(this.id)
	this.canvases=[]
	this.canvases[0]=this.slideshowref.childNodes[0]
	this.canvases[1]=this.slideshowref.childNodes[1]
}

dropinslideshow.prototype.populatecanvas=function(canvas, imageindex){
	var imageHTML='<img src="'+this.imgarray[imageindex][0]+'" style="border: 0" />'
	if (this.imgarray[imageindex][1]!="")
		imageHTML='<a href="'+this.imgarray[imageindex][1]+'" target="'+this.imgarray[imageindex][2]+'">'+imageHTML+'</a>'
	canvas.innerHTML=imageHTML
}


dropinslideshow.prototype.animateslide=function(){
	if (this.curimagepos<0){ //if image hasn't fully dropped in yet
		this.curimagepos=this.curimagepos+this.slidedegree
		this.activecanvas.style.top=this.curimagepos+"px"
	}
	else{
		clearInterval(this.animatetimer)
		this.activecanvas.style.top=0
		this.setupnextslide()
		var slideshow=this
		setTimeout(function(){slideshow.rotateslide()}, this.delay)
	}
}


dropinslideshow.prototype.setupnextslide=function(){
	this.activecanvasindex=(this.activecanvasindex==0)? 1 : 0
	this.activecanvas=this.canvases[this.activecanvasindex]
	this.activecanvas.style.top=this.animatestartpos+"px"
	this.curimagepos=this.animatestartpos
	this.activecanvas.style.zIndex=(++this.zindex)
	this.curimageindex=(this.curimageindex<this.imgarray.length-1)? this.curimageindex+1 : 0
	this.populatecanvas(this.activecanvas, this.curimageindex)
}

dropinslideshow.prototype.rotateslide=function(){
	var slideshow=this
	if (this.isMouseover)
		setTimeout(function(){slideshow.rotateslide()}, 50)
	else
		this.animatetimer=setInterval(function(){slideshow.animateslide()}, this.slidedelay)
}

dropinslideshow.prototype.init=function(){
	var slideshow=this
	this.populatecanvas(this.canvases[this.activecanvasindex], 0)
	this.setupnextslide()
	this.slideshowref.onmouseover=function(){slideshow.isMouseover=1}
	this.slideshowref.onmouseout=function(){slideshow.isMouseover=0}
	setTimeout(function(){slideshow.rotateslide()}, this.delay)
}

//----------------------------------------------------------------------------------------------------




// Dinamik menü içinnnnnn
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)
var horizontaloffset=1 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie5=document.all
var ns6=document.getElementById&&!document.all

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth+(horizontaloffset*2) //no space to the right of page? Move menu over to the left
}
else{
var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function dropdownmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}
return clickreturnvalue()
}

function clickreturnvalue(){
if ((ie5||ns6) && !enableanchorlink) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

//----------------------------------------------------------------------------------------------------




// soldaki reklammm içinnnnnnnnnnnn
ie4 = ((navigator.appVersion.indexOf("MSIE")>0) && (parseInt(navigator.appVersion) >= 4))
var count=0, count2=0, add1 = 3, add2 = 10, timerID

function show()
{
 if (ie4) {
	count	+=add1
	count2+=add2
	delay=30

	if(count2>100) count2=100
	if(count>100) {
		count=100
		add1 =-10
		add2 =-3
		delay=350
	}
	
	if(count<0) count=0
	if(count2<0) {
		count2=0
		add1 =3
		add2 =10
		delay=200
	}
	
	napis.style.filter="Alpha(Opacity="+count2+",FinishOpacity="+count+",style=2)"
	timerID=setTimeout("show()",delay);
 }
}

//----------------------------------------------------------------------------------------------------

