// JavaScript Document

// JScript source code
var bolgeArr = new Array('01','02','03') ;
var bolgeDivMaxLength = new Array(100,100,100) ;
var bolgeDivCurrentHeight = new Array(0,0,0) ;
var bolgeDivState = new Array(0,0,0) ;
var bolgeDivTimeOut = new Array(null,null,null) ;
function resizeIframe()
{
frame.style.height=window.body.offsetHeight+50;
}
function bolgeAc(bolge)
{
	if (document.all(bolgeArr[bolge]).style.display=="none")
	{
		document.all(bolgeArr[bolge]).style.display="inline";
		slowOpen(bolge);
		closeOthers(bolge);
	//	alert(bolge);
	}
	else
	{
	/*	if (bolgeDivState[bolge]==1)
		{
			bolgeDivState[bolge]=0
			slowOpen(bolge);	
		}
	*/	//else 
			//yavasKapat(bolge);
	}
}
function slowOpen(bolge)
{
	var x= bolgeDivCurrentHeight[bolge];
	if (x < bolgeDivMaxLength[bolge]+50 ) {
		document.all(bolgeArr[bolge]).style.clip="rect(0px 200px "+x+"px 0px)";
		x+=5;
		bolgeDivCurrentHeight[bolge] +=5;
		bolgeDivTimeOut[bolge]=setTimeout("slowOpen('"+bolge+"')",1);
	}
}
function closeOthers(bolge)
{
	for (var frmcnt=0; frmcnt < bolgeArr.length; frmcnt++ )
	{		
		if (frmcnt!=bolge)
		{
			if (bolgeDivTimeOut[bolge]!=null)
			{
						//clearTimeOut( bolgeDivTimeOut[bolge] );
			}

			slowClose(frmcnt)	
		}	
	}

}

function slowClose(frmcnt)
{
		if (frmcnt==0)
		{
			if ( event.clientY >  123 & event.clientY < 200 & event.clientX > 7 & event.clientX < 151)
				return;
		}
		if (frmcnt==1)
		{
			if ( event.clientY >  123 & event.clientY <234 & event.clientX > 149 & event.clientX < 293)
				return;
		}
		if (frmcnt==2)
		{
			if ( event.clientY >  123 & event.clientY < 184 & event.clientX > 573 & event.clientX < 716)
				return;
		}

		document.all(bolgeArr[frmcnt]).style.display="none";
		bolgeDivCurrentHeight[frmcnt] = 0 ;
		if (event.target)
		{
			alert(event.clientY);
		}
		
	//  alert(event.clientY);
		
		
/*		var x = bolgeDivCurrentHeight[frmcnt];
		if (x>0)
		{
			x-=7;
			bolgeDivCurrentHeight[frmcnt] -=7;
			document.all( bolgeArr[frmcnt] ).style.clip="rect(0px 300px "+x+"px 0px)";
			setTimeout("slowClose('"+frmcnt+"')",2);
		}
		else
		{
			document.all( bolgeArr[frmcnt] ).style.display="none";
		}*/
}

/*
function out()
{
yavasKapat();
}
function bolgeAc(bolge)
{
		//alert(bolge);
	if (document.all(bolge).style.display=="none")
	{
		document.all(bolge).style.display="inline"
	//	fastFindUstTablo.style.border="1px solid #a4afca";
		yavasAc(bolge);		
//		fastfindustresim.src="/sourcedesign/images/sincan01/fastsagdown.gif" 
	//	fastFindUstTablo.border="1";
	}
	else 
	{	
		if (bolge=="01" )
		{
			if (kapaniyor01=="true") 
			{
				kapaniyor01="false"
				yavasAc(bolge);
			}
			else 
				yavasKapat(bolge);
		}
		if (bolge=="02" )
		{
			if (kapaniyor02=="true") 
			{
				kapaniyor02="false"
				yavasAc(bolge);
			}
			else 
				yavasKapat(bolge);
		}
	}
}

function yavasAc(bolge)
{		
	if (yavasKapatInterval!="null") clearInterval(yavasKapatInterval);
	if (x <300) {
		document.all(bolge).style.clip="rect(0px 300px "+x+"px 0px)";
		x+=10;
		yavasAcInterval=setTimeout("yavasAc('"+bolge+"')",1);
	}
	else 
	{
		clearInterval(yavasAcInterval);
		yavasAcInterval="null";
		x=0;
	}
}
function yavasKapat(bolge)
{		
	
	if (yavasAcInterval!="null") clearInterval(yavasAcInterval);
	if (x > 0) {
		kapaniyor="true";
		x-=7;
		document.all(bolge).style.clip="rect(0px 300px "+x+"px 0px)";
		yavasKapatInterval=setTimeout("yavasKapat('"+bolge+"')",1)
	}
	else 
	{
		clearInterval(yavasKapatInterval);
		yavasKapatInterval="null";
		document.all(bolge).style.display="none";
	//	fastFindUstTablo.style.border="";
		kapaniyor="false";
	}
}
*/