var showtimer="",hidetimer="",showdelay=100,hidedelay=200,currentshowid="";
function menuitemover(div){
	if(currentshowid==""){//
		showtimer=window.setTimeout("document.getElementById('"+div+"').style.display='block';currentshowid='"+div+"';",showdelay);}
	else{//
		cancelhidetimer();
		if(currentshowid!=div){//menuitem to another one
			document.getElementById(currentshowid).style.display="none";
			document.getElementById(div).style.display="block";
			currentshowid=div;
			}
		};
}
function cancelhidetimer(){
	if(hidetimer!=""){window.clearTimeout(hidetimer);hidetimer="";}
}

function settimerhide(){
	if(showtimer!=""){window.clearTimeout(showtimer);showtimer="";};if(currentshowid!=""){hidetimer=window.setTimeout("document.getElementById('"+currentshowid+"').style.display='none';currentshowid='';",hidedelay);}
}

document.getElementById("mapregarea").onmouseover=function(){menuitemover("regpopoutterdiv");}
document.getElementById("mapregarea").onmouseout=function(){settimerhide();}

document.getElementById("regpopoutterdiv").onmouseover=function(){cancelhidetimer();}
document.getElementById("regpopoutterdiv").onmouseout=function(){settimerhide();}

function createshowhidemenu(omain,omenu){
            posTipdiv(omain,omenu);
			omain.onmouseover=function(){menuitemover(omenu.id);}
			omain.onmouseout=function(){settimerhide();}
			omenu.onmouseover=function(){cancelhidetimer();}
			omenu.onmouseout=function(){settimerhide();}
}
