// JavaScript Document
        var leftInt = 2;
		var topInt = 36;
		var clockTimeoutID = 0;
		function menu_over( spanId ){
			var arrSpan = spanId.split('_');
			var whichDivId = arrSpan[(arrSpan.length)-1];
			var currentMenuPositionLeft = findControlPosLeft(document.getElementById(spanId));
			var currentMenuPositionTop  = findControlPosTop(document.getElementById(spanId));
			var nextSpanId = "span_" + (parseInt(whichDivId) + 1);
			//alert(nextSpanId);
			var menu_over_top_content_WIDTH = 0;
			var nextMenuPositionLeft = 0;
			if(document.getElementById(nextSpanId)){
				nextMenuPositionLeft = findControlPosLeft(document.getElementById(nextSpanId));
				menu_over_top_content_WIDTH = (nextMenuPositionLeft - currentMenuPositionLeft);
			}
			else{
				nextSpanId = "span_" + (parseInt(whichDivId) - 1);
				nextMenuPositionLeft = findControlPosLeft(document.getElementById(nextSpanId));
				menu_over_top_content_WIDTH = (currentMenuPositionLeft - nextMenuPositionLeft);
			}
			//alert(menu_over_top_content_WIDTH);
			//alert(currentMenuPositionLeft);
			//alert(nextMenuPositionLeft);
			
			
			//alert(whichDivId);
			var submenuDivObjId = "submenu_div_" + whichDivId;
			var menuTopDivObjId = "span_top_" + whichDivId;
			var menuMiddleDivObjId = "span_middle_" + whichDivId;
			var menuBottomDivObjId = "span_bottom_" + whichDivId;
			var aTagObjId = "aTag_" + whichDivId;
			var spanDividerId = "span_divider_" + whichDivId;
			var prevSpanDividerId = "span_divider_" + (parseInt(whichDivId) - 1);
			if(document.getElementById(submenuDivObjId)){
				//alert(submenuDivObjId);
				//alert(document.getElementById(submenuDivObjId).style.display);
				
				document.getElementById(submenuDivObjId).style.display = 'block';				
				document.getElementById(aTagObjId).style.color = '#990000';
				document.getElementById(submenuDivObjId).style.left = currentMenuPositionLeft - leftInt +"px";
				document.getElementById(submenuDivObjId).style.top  = currentMenuPositionTop + topInt +"px";
				
				document.getElementById('menu_over_top').style.display = 'block';
				document.getElementById('menu_over_top_content').style.width = (menu_over_top_content_WIDTH-2) +'px';
				document.getElementById('white_line_'+whichDivId).style.width = (menu_over_top_content_WIDTH-2) +'px';
//				//document.getElementById('white_line_'+whichDivId).style.left = currentMenuPositionLeft - 180 +"px";
				document.getElementById('menu_over_top').style.left = currentMenuPositionLeft - 1 +"px";
				document.getElementById('menu_over_top').style.top  = currentMenuPositionTop - 2 +"px";
				document.getElementById(menuTopDivObjId).style.background = 'url(images/1_top.png) repeat-y';
				document.getElementById(menuMiddleDivObjId).style.background = "url(images/2_top.png) repeat-x";
				document.getElementById(menuMiddleDivObjId).style._filter = "alpha(opacity=130)";
				//document.getElementById(menuMiddleDivObjId).style.width = nextMenuPositionLeft +'px';
				document.getElementById(menuBottomDivObjId).style.background = 'url(images/1_top.png) repeat-y';
				if(document.getElementById(spanDividerId)){
					document.getElementById(spanDividerId).style.visibility = 'hidden';
				}
				//document.getElementById(spanId).style.border = "solid 1px #FF0000";
			}
			else{
				document.getElementById(menuMiddleDivObjId).style.background = "url(images/white_vertical_line.png) repeat-x";
				if(document.getElementById(spanDividerId)){
					document.getElementById(spanDividerId).style.visibility = 'hidden';
				}
				if(document.getElementById(prevSpanDividerId)){
					document.getElementById(prevSpanDividerId).style.visibility = 'hidden';
				}
			}
			/*else{
				alert('');
			}*/
		}
		function findControlPosLeft(Controlobj){
			var curleftPos =  0;
			//var curtopPos = 0;
			if(Controlobj.offsetParent){
				do{
					curleftPos += Controlobj.offsetLeft;
					//curtopPos += Controlobj.offsetTop;
				} while (Controlobj = Controlobj.offsetParent);
			}
			return curleftPos;
		}
		function findControlPosTop(Controlobj){
			//var curleftPos =  0;
			var curtopPos = 0;
			if(Controlobj.offsetParent){
			 	do{

					//curleftPos += Controlobj.offsetLeft;
					curtopPos += Controlobj.offsetTop;
			  	} while (Controlobj = Controlobj.offsetParent);
			}
			return curtopPos;		
		}
		function menu_out(){			
			for(var i=0; i<100; i++){
				var spanObjId = "span_" + i;
				if(document.getElementById(spanObjId)){
					var submenuDivObjId = "submenu_div_" + i;
					//alert(submenuDivObjId);
					var menuTopDivObjId = "span_top_" + i;
					var menuMiddleDivObjId = "span_middle_" + i;
					var menuBottomDivObjId = "span_bottom_" + i;
					var aTagObjId = "aTag_" + i;
					var spanDividerId = "span_divider_" + i;
					var prevSpanDividerId = "span_divider_" + (parseInt(i) - 1);
					if(document.getElementById(submenuDivObjId)){
						//clockTimeoutID = setTimeout("hidemenu('"+aTagObjId+"','"+submenuDivObjId+"','"+menuTopDivObjId+"','"+menuMiddleDivObjId+"','"+menuBottomDivObjId+"','"+spanDividerId+"')",10);
						document.getElementById(aTagObjId).style.color = '#777562';
						document.getElementById(submenuDivObjId).style.display = 'none';
						document.getElementById(menuTopDivObjId).style.background = 'none';
						document.getElementById(menuMiddleDivObjId).style.background = "none";
						document.getElementById(menuBottomDivObjId).style.background = 'none';
						document.getElementById('menu_over_top').style.display = 'none';
						if(document.getElementById(spanDividerId)){
							document.getElementById(spanDividerId).style.visibility = 'visible';
						}
						//document.getElementById(spanObjId).style.border = "none";
					}
					else{
						document.getElementById(menuMiddleDivObjId).style.background = "none";
						if(document.getElementById(spanDividerId)){
							document.getElementById(spanDividerId).style.visibility = 'visible';
						}
						if(document.getElementById(prevSpanDividerId)){
							document.getElementById(prevSpanDividerId).style.visibility = 'visible';
						}
					}
					
				}
			}
		}
		function hidemenu(aTagObjId, submenuDivObjId, menuTopDivObjId, menuMiddleDivObjId, menuBottomDivObjId, spanDividerId){
			alert(clockTimeoutID);
			for(var i=0; i<10; i++){
				if(i>10){
					clearTimeout(clockTimeoutID);					
				}
				if(clockTimeoutID==0 || clockTimeoutID == null){				
					document.getElementById(aTagObjId).style.color = '#777562';
					document.getElementById(submenuDivObjId).style.display = 'none';
					document.getElementById(menuTopDivObjId).style.background = 'none';
					document.getElementById(menuMiddleDivObjId).style.background = "none";
					document.getElementById(menuBottomDivObjId).style.background = 'none';
					document.getElementById('menu_over_top').style.display = 'none';
					if(document.getElementById(spanDividerId)){
						document.getElementById(spanDividerId).style.visibility = 'visible';
					}
				}
			}
		}
		function submenu_over( divId ){
			var arrDiv = divId.split('_');
			var whichSpanId = arrDiv[(arrDiv.length)-1];
			var menuSpanObjId = "span_" + whichSpanId;
			var currentMenuPositionLeft = findControlPosLeft(document.getElementById(menuSpanObjId));
			var currentMenuPositionTop  = findControlPosTop(document.getElementById(menuSpanObjId));
			var menuTopDivObjId = "span_top_" + whichSpanId;
			var menuMiddleDivObjId = "span_middle_" + whichSpanId;
			var menuBottomDivObjId = "span_bottom_" + whichSpanId;
			var aTagObjId = "aTag_" + whichSpanId;
			var spanDividerId = "span_divider_" + whichSpanId;
			var nextSpanId = "span_" + (parseInt(whichSpanId) + 1);
			//alert(nextSpanId);
			var menu_over_top_content_WIDTH = 0;
			var nextMenuPositionLeft = 0;
			if(document.getElementById(nextSpanId)){
				nextMenuPositionLeft = findControlPosLeft(document.getElementById(nextSpanId));
				menu_over_top_content_WIDTH = (nextMenuPositionLeft - currentMenuPositionLeft);
			}
			else{
				nextSpanId = "span_" + (parseInt(whichDivId) - 1);
				nextMenuPositionLeft = findControlPosLeft(document.getElementById(nextSpanId));
				menu_over_top_content_WIDTH = (currentMenuPositionLeft - nextMenuPositionLeft);
			}
			
			//alert(whichDivId);
			var submenuDivObjId = divId;
			if(document.getElementById(submenuDivObjId)){
				//alert(submenuDivObjId);
				//alert(document.getElementById(submenuDivObjId).style.display);
				document.getElementById(aTagObjId).style.color = '#990000';
				document.getElementById(submenuDivObjId).style.display = 'block';
				document.getElementById(submenuDivObjId).style.left = currentMenuPositionLeft - leftInt +"px";
				document.getElementById(submenuDivObjId).style.top  = currentMenuPositionTop + topInt +"px";
				
				document.getElementById('menu_over_top').style.display = 'block';
				document.getElementById('menu_over_top_content').style.width = (menu_over_top_content_WIDTH-2) +'px';
				document.getElementById('menu_over_top').style.left = currentMenuPositionLeft - 1 +"px";
				document.getElementById('menu_over_top').style.top  = currentMenuPositionTop - 2 +"px";
				
				document.getElementById(menuTopDivObjId).style.background = 'url(images/1_top.png) repeat-y';
				document.getElementById(menuMiddleDivObjId).style.background = "url(images/2_top.png) repeat-x";				
				document.getElementById(menuBottomDivObjId).style.background = 'url(images/1_top.png) repeat-y';
				if(document.getElementById(spanDividerId)){
					document.getElementById(spanDividerId).style.visibility = 'hidden';
				}
			}
			
			/*else{
				alert('');
			}*/
		}
		function submenu_out( divId ){			
			//alert(submenuDivObjId);
			var arrDiv = divId.split('_');
			var whichSpanId = arrDiv[(arrDiv.length)-1];
			var menuSpanObjId = "span_" + whichSpanId;
			var aTagObjId = "aTag_" + whichSpanId;
			var menuTopDivObjId = "span_top_" + whichSpanId;
			var menuMiddleDivObjId = "span_middle_" + whichSpanId;
			var menuBottomDivObjId = "span_bottom_" + whichSpanId;
			var spanDividerId = "span_divider_" + whichSpanId;
			if(document.getElementById(divId)){
				document.getElementById(aTagObjId).style.color = '#777562';
				document.getElementById(divId).style.display = 'none';
				document.getElementById(menuTopDivObjId).style.background = 'none';
				document.getElementById(menuMiddleDivObjId).style.background = "none";
				document.getElementById(menuBottomDivObjId).style.background = 'none';
				document.getElementById('menu_over_top').style.display = 'none';
				if(document.getElementById(spanDividerId)){
					document.getElementById(spanDividerId).style.visibility = 'visible';
				}
			}
		}