// JavaScript Document
function ge(id){
	return document.getElementById(id);
}
function gotox(location){
    window.location.href=location;
}
function showdiv(id){
//alert(ge(id).style.display);
ge(id).style.display='block';
}
function hidediv(id){
ge(id).style.display='none';
}
function createFloat(parinte,idu,isSub){
	var theDiv= document.createElement("DIV");
    document.body.appendChild(theDiv);
	theDiv.id=idu;
    if(isSub){
		theDiv.className='sub';				
	}else{
		theDiv.className='main';
		theDiv.style.left=(findPosX(ge(parinte))-15)+"px";
		theDiv.style.top=(findPosY(ge(parinte))+ge(parinte).offsetHeight)+"px";
}
	
    theDiv.onmouseover=function (){
       eval("showdiv('"+idu+"')");
   }
     theDiv.onmouseout=function (){
       eval("hidediv('"+idu+"')");
   } 

   ge(parinte).onmouseover=function (){
       eval("showdiv('"+idu+"')");
   }
   ge(parinte).onmouseout=function (){
       eval("hidediv('"+idu+"')");
   }       
}
function attach_submenus(parinte,text,linku,idu){
	var div=document.createElement('div');
	div.innerHTML=text;
	div.className="lines";
	 div.onmouseover=function (){
	   eval("this.style.backgroundColor='#F4f4f4'");
   }
	 div.onmouseout=function (){
	 eval("this.style.backgroundColor='#FFFFFF'");
   }
   
   div.onclick=function (){
	  eval("window.location.href='"+linku+"'");
   }
	ge(parinte).appendChild(div);
				
 
}

