		var cellOverColor='#896F4B';
		var cellOutColor='#2B1111';

		if (document.layers) document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove=hide;
		
		var current_sub='';	
		var current_img='';
		var current_imgX=0;
		var current_imgY=0;
		var current_cell='';
		var NS4 = document.all || document.getElementById?false:true;
		var x=0;
		var y=0;
		var img_height=17;
		var img_width=186;
		var mouseIsOut=false;

		function cellOver(cid,selimg,selsubmenu){
			mouseIsOut=false;
			if (document.layers){
				cid.bgColor=cellOverColor;
	    }else if(document.all || document.getElementById){
				cid.style.backgroundColor=cellOverColor;
		   	}
		  
			if(current_sub!='' && current_sub!=selsubmenu){
			  if (document.layers){
					document.layers[current_sub].visibility="hide";
					current_cell.bgColor=cellOutColor;
				}else if(document.all){ 
					document.all[current_sub].style.visibility = "hidden";		
					current_cell.style.backgroundColor=cellOutColor;
				}else{ 
					document.getElementById(current_sub).style.visibility = "hidden";
					current_cell.style.backgroundColor=cellOutColor;
				}
			}
					  
		  if(selimg!=null){
		  		show(selimg,selsubmenu,cid);
		  	}
		}
		
		function cellOut(cid,doIt){
			mouseIsOut=true;
			if(doIt!=null){
				if (document.layers){
					cid.bgColor=cellOutColor;
		    }else if(document.all || document.getElementById){
					cid.style.backgroundColor=cellOutColor;
			   	}
				}
		}	

		function show(imgID,sub_menu,cellId){
			current_sub=sub_menu;
			current_cell=cellId;
			current_imgX=getCoorX(imgID);
			current_imgY=getCoorY(imgID);			
		
			if (document.all) {
				document.all[sub_menu].style.left=current_imgX;
				document.all[sub_menu].style.top=current_imgY-18;
				document.all[sub_menu].style.visibility = "visible";
    	}else if (document.layers) {
		   	document.layers[sub_menu].left=current_imgX;
				document.layers[sub_menu].top=current_imgY-18;   			
    		document.layers[sub_menu].visibility="show";				
    	}else if (document.getElementById) {
		   	document.getElementById(sub_menu).style.left=current_imgX;
				document.getElementById(sub_menu).style.top=current_imgY-18; 		
    		document.getElementById(sub_menu).style.visibility="visible";				
    	}
		}

		function hide(e) {
			if(current_sub!=''){
				var img_x=current_imgX-img_width;
				var img_y=current_imgY-img_height;
				var xarea1=img_x+img_width;
				var yarea1=img_y;		
				var xmouse;
				var ymouse;	
				var xarea2;
				var yarea2;
						
			  if (document.layers){
					xmouse=e.pageX;
					ymouse=e.pageY;			  
			  	xarea2=xarea1+document.layers[current_sub].clip.width;
			  	yarea2=yarea1+document.layers[current_sub].clip.height;
			  	
			  	if(!(xmouse>(xarea1-2) && xmouse<xarea2 && ymouse>(yarea1-3) && ymouse<yarea2)  && mouseIsOut){
			  		document.layers[current_sub].visibility="hide";
			  		current_sub='';
						current_cell.bgColor=cellOutColor;
			  	}
			  	
			  }else if(document.all){ 
					xmouse=event.x;
					ymouse=event.y+document.body.scrollTop;
			  	xarea2=xarea1+parseInt(document.all[current_sub].style.width);
			  	yarea2=yarea1+parseInt(document.all[current_sub].style.height);
			  			  
			  	if(!(xmouse>(xarea1-2) && xmouse<xarea2 && ymouse>(yarea1-3) && ymouse<yarea2) && mouseIsOut){
			  		document.all[current_sub].style.visibility = "hidden";
			  		current_sub='';
			  		current_cell.style.backgroundColor=cellOutColor;
			  	}
			  	
				}else{ 
					xmouse=e.pageX;
					ymouse=e.pageY;						
			  	xarea2=xarea1+parseInt(document.getElementById(current_sub).style.width);
			  	yarea2=yarea1+parseInt(document.getElementById(current_sub).style.height);		
			  	
			  	if(!(xmouse>(xarea1-1) && xmouse<xarea2 && ymouse>(yarea1-0) && ymouse<yarea2)  && mouseIsOut){
			  		document.getElementById(current_sub).style.visibility = "hidden";
			  		current_sub='';
			  		current_cell.style.backgroundColor=cellOutColor;
			  	}
				}
			}
		}
	
	
		function getCoorX(imgID) {
		  if (NS4) return eval(imgID).x
		  else return docjslib_getRealLeft(imgID);
		}
		
		function getCoorY(imgID) {  
		  if (NS4) return eval(imgID).y
		  else return docjslib_getRealTop(imgID);
		}
				
		
		function docjslib_getRealLeft(imgElem) {
			xPos = eval(imgElem).offsetLeft;
			tempEl = eval(imgElem).offsetParent;
		  	while (tempEl != null) {
		  		xPos += tempEl.offsetLeft;
		  		tempEl = tempEl.offsetParent;
		  	}
			return xPos;
		}
		
		function docjslib_getRealTop(imgElem) {
			yPos = eval(imgElem).offsetTop;
			tempEl = eval(imgElem).offsetParent;
			while (tempEl != null) {
		  		yPos += tempEl.offsetTop;
		  		tempEl = tempEl.offsetParent;
		  	}
			return yPos;
		}