// JavaScript Document

function setTab0dSyn(i,classnamebef,idbef,idall,tabtabbef)
{
	var waitInterval;
	
	var MouseDelayTime=150;//鼠标感应延迟300毫秒
//
	
					_gObj(idbef+i).onmouseout=function(aEvent)
					{					
					      
						  clearTimeout(waitInterval);
				    }
			    	clearTimeout(waitInterval);
					
					var str="setTab0dSyn1("+i+",'"+classnamebef+"','"+idbef+"',"+idall+",'"+tabtabbef+"')";
					
					waitInterval=setTimeout(str,MouseDelayTime);
	
}
function aa(i)
{
	alert("aa is run"+i);
}
//----------------------------------------------------------------------------------
function setTab0dSyn1(i,classnamebef,idbef,idall,tabtabbef)
{
//alert("aa");
changDivClass(idbef,idall,i,classnamebef)
selectTab0dSyn(tabtabbef,idall,i);
}
function selectTab0dSyn(div_id,allnum,now){
for(var i= 1; i<= allnum;i++)
{
	if(i==now)
	{
		_gObj(div_id+i).style.display="block";
	}else
	{
		_gObj(div_id+i).style.display="none";
	}
}

//		document.getElementById("tabtabd1").style.display="block";
//	document.getElementById("tabtabd2").style.display="none";

}	


function _gObj(id)
{
return document.getElementById(id);
}
function changDivClass(div_id,all,now,classnamebef)
{
for(var i= 1; i<= all;i++)
{
if(i==now)
{
_gObj(div_id+i).className = classnamebef+"_0"+i;
}else
{
//_gObj(div_id+i).className = "dj4_"+i;
_gObj(div_id+i).className = classnamebef+"_"+i;
}
}
}

function selectTabsearch(J,allcount,idnamebef,stabid,fzname)
{

	//
		_gObj("fzn").innerHTML=fzname;
	//
	var xjwaitInterval;
	
	var MouseDelayTime1=150;//鼠标感应延迟300毫秒
//
					var idstr=stabid;
					//alert (idstr);
					_gObj(idstr).onmouseout=function(aEvent)
					{	  				
					      //alert(idstr);
						  clearTimeout(xjwaitInterval);
						  //alert(xjwaitInterval);
				    }
			    	clearTimeout(xjwaitInterval);
					
					var str="selectTabsearch1("+J+","+allcount+",'"+idnamebef+"')";
					//alert(str);					
					xjwaitInterval=setTimeout(str,MouseDelayTime1);
	
	
}

function selectTabsearch1(J,allcount,idnamebef)
{
		selectTabsearch2(J,allcount,idnamebef)
}

function selectTabsearch2(J,allcount,idnamebef)
{
	//alert(J);
	for(var i=1;i<=allcount;i++)
	{
		if(J==i)
		{
			_gObj(idnamebef+i).style.display="block";
		}
		else
		{
			_gObj(idnamebef+i).style.display="none";
		}
		
	}
	
}
