//setInterval(arkaplandegistir, 10000);
//bg1 = new Image(); bg1.src = "../images/bg/2.jpg"
function initMenu(){
	var hoverPics=new Array()
	for (i=1;i<15;i++){
		p=$("m"+i)
		if (p){
			hoverPics[i] = new Image()
			hoverPics[i].src = "../images-"+lang+"/m"+i+"b.png"
			p.xid=i
			p.acik=0
			p.onmouseover=function(){
				if (this.xid>10&&this.xid<14) {new Effect.Opacity(this, {duration:0.4, from:0.6, to:1.0})}
				this.src="../images-"+lang+"/m"+this.xid+"b.png"
			}
			p.onmouseout =function(){this.src="../images-"+lang+"/m"+this.xid+".png";}
			p.onclick=function(){
				return true; //gerisine bakmaz
				if (!$('d'+this.xid)) return true;
				if (this.acik!=1) {
					if ($('d'+this.xid) && $('m'+this.xid).acik !=1 ){fotoAc(this.xid);}
					return false;
				}
			}

		}		
	}
	if (typeof(node0) != "undefined") {
		aktif=$('m'+node0)
		if (aktif){
			aktif.onmouseover()
			aktif.onmouseout=""
			aktif.onclick()
		}
	}
	if ($('isim1')) initcv()
}


function fotoAc(kac){
	for (i=6;i<10;i++){
		if (i==kac){ new Effect.SlideDown('d'+kac, {duration:0.3}); $('m'+kac).acik=1; }
		else {fotoKapa(i)}
	}
}

function fotoKapa(kac){
	if ($('d'+kac) && $('m'+kac).acik==1 ){ new Effect.SlideUp('d'+kac, {duration:0.3}); $('m'+kac).acik=0; }
}


function yasal() {
	var help=window.open('yasal.php', 'yasal', 'width=490,height=270,status=no,toolbar=no,scrollbars=yes,menubar=no,top=50,left=50,resizable=no,location=no');
}


function initcv(){
	for (i=1;i<15;i++){
		secenek=$("isim"+i)
		if (!secenek) continue
		secenek.xid=i
		//secenek.onclick=function(){$("cv"+this.xid).toggle()}
		secenek.onclick=function(){
			new Effect.toggle('cv'+this.xid, 'blind')
		}
	}
	//new Effect.toggle('cv1', 'blind', {scaleX: 'false', scaleY: 'true;', scaleContent: false});
}

function sozluk(what,num){
	$('sonuc').style.display='none'
	harfdiv=$('sozluk'+num)
	harfdiv.appear()
	harfdiv.style.position='relative'
	aktifdiv=$('sozluk'+aktifharf)
	aktifdiv.fade()
	aktifdiv.style.position='absolute'
	aktifharf=num
}

function sozcukAra(kelime, sirasi){
	if (!kelime) kelime=$('sozcuk').value
	if (!sirasi) sirasi=$('sozcuk_hidden').value
	//alert (kelime +' '+ sirasi)
	//$('sonuc').appear();
	$('sonuc').src='ajax-sozluk.php?action=show&sid='+sirasi+'&kelime='+kelime;
}
