var t,i=0,acik=0,x,x1,x2,hazir=true,son='';
var menu=[],mw=[],mx=[];

function Obj(o){
	return document.getElementById(o);
}

function Flash(dosya,width,height,id,wmode){
	if (wmode){
		wmode1="<PARAM NAME=wmode VALUE="+wmode+">";
		wmode2="wmode="+wmode;
	}else wmode1=wmode2='';

	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" id="'+id+'">'+wmode1+'<PARAM NAME=movie VALUE="'+dosya+'"><PARAM NAME=wmode VALUE=transparent><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="'+dosya+'"'+wmode2+' quality=high bgcolor=#FFFFFF WIDTH="'+width+'" HEIGHT="'+height+'" NAME="'+id+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" wmode="transparent"></EMBED></OBJECT>');
}

function S(d,o){
	clearTimeout(window['tm'+o]);
	if (son) Obj(son).style.display='none';
	Obj(o).style.display='block';
	d.style.cursor='pointer';
}

function H(o){
	son=o;
	window['tm'+o]=setTimeout(function(){Obj(o).style.display='none'},1000);
}

function Yerlestir(){
	for (i=x1; i<=x2; i++){
		Obj('ml'+i).style.position='absolute';
		Obj('ml'+i).style.display='none';
		Obj('ml'+i).style.left=mx[i]+10+'px';
		Obj('ml'+i).style.width=mw[i]+'px';
	}
}

function Yuvarla(){
	if (x<=x2){
		t=setInterval('Kaydir()',10);
	}else hazir=true;
}

function Kaydir(){
	Obj('ml'+x).style.display='block';
	Obj('ml'+x).style.filter='alpha(opacity:'+(i*10)+')';
	Obj('ml'+x).style.left=mx[x]-i+'px';
	i++;
	if (i==10){
		clearInterval(t);
		x++;
		i=0;
		Yuvarla();
	}
}

function Menu(menu_id){
	if ((menu_id && acik==menu_id) || !hazir) return;
	Kapat();
	if (!menu_id) return;
	hazir=false;
	x1=menu[menu_id][0];
	x2=menu[menu_id][1];
	x=x1;
	Yerlestir();
	i=0;
	acik=menu_id;
	Yuvarla();
}

function Kapat(){
	if (!acik) return;
	x1=menu[acik][0];
	x2=menu[acik][1];
	for (i=x1; i<=x2; i++) Obj('ml'+i).style.display='none';
	hazir=true;
	acik=0;
}


$(document).ready(function(){
	$('#modal').jqm();
});


menu[1]=[11,13];
menu[2]=[21,24];
menu[3]=[31,34];

mw[11]=150;
mw[12]=140;
mw[13]=70;

mx[11]=340;
mx[12]=500;
mx[13]=650;

mw[21]=80;
mw[22]=70;
mw[23]=160;
mw[24]=170;

mx[21]=210;
mx[22]=300;
mx[23]=380;
mx[24]=550;

mw[31]=90;
mw[32]=120;
mw[33]=90;
mw[34]=120;

mx[31]=210;
mx[32]=310;
mx[33]=440;
mx[34]=540;

