﻿ var h;
 var w;
 var l;
 var t;
 var topMar = 2;
 var leftMar = -10;
 var space = 2;
 var isvisible;
 var MENU_SHADOW_COLOR='#999999';
 var mouseX,mouseY;
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array
    
	document.onmousemove = netscapeMouseMove;

function netscapeMouseMove(e){
    mouseX=window.event.x;
    mouseY=window.event.y;
    
}

function hideDiv(){
var vDiv = document.getElementById("menuDiv");
vDiv.style.visibility = "hidden";
}

function HideMenu() 
{
 var mX;
 var mY;
 var vDiv;
 var mDiv;
	if (isvisible == true)
{
		vDiv = document.getElementById("menuDiv");
		
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+100) || (mY < parseInt(vDiv.style.top)-10) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight-3)){
			vDiv.style.visibility = "hidden";
			isvisible = false;
		}
		
		
}
}

function hideByLink(){
    if(menuDiv.syle.visibility=="visible"){
        var y=mY = window.event.clientY + document.body.scrollTop;
        if(y<parseInt(menuDiv.style.top)-20){
            
        }
    }
}

function ShowMenu(vMnuCode,tWidth) {
    vMnuCode=document.getElementById(vMnuCode).innerHTML;
	vSrc = window.event.srcElement;
	vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=1 style='width:"+1+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=tablebody1>" + vMnuCode + "</td></tr></table>";
    
	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+4;
	t = vSrc.offsetTop + topMar + h + space-2;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menuDiv.innerHTML = vMnuCode;
	menuDiv.style.top = t;
	menuDiv.style.left = l;
	menuDiv.style.visibility = "visible";
	isvisible = true;
	
	
    //makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}

function makeRectangularDropShadow(el, color, size)
{
	var i;
	for (i=size; i>0; i--)
	{
		var rect = document.createElement('div');
		var rs = rect.style
		rs.position = 'absolute';
		rs.left = (el.style.posLeft + i) + 'px';
		rs.top = (el.style.posTop + i) + 'px';
		rs.width = el.offsetWidth + 'px';
		rs.height = el.offsetHeight + 'px';
		rs.zIndex = el.style.zIndex - i;
		rs.backgroundColor = color;
		var opacity = 1 - i / (i + 1);
		rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
		el.insertAdjacentElement('afterEnd', rect);
		global.fo_shadows[global.fo_shadows.length] = rect;
	}
}


function popShow(pageurl,w,h) {
        popwin=window.open(pageurl,"popWin","scrollbars=no,toolbar=no,location=auto,directories=no,status=no,menubar=no,resizable=no,width="+w+",height="+h);
        return false;
    }
    var TopName="ctl00_ContentPlaceHolder1_";
    function getvalue(control){
        var c=document.getElementById(TopName+control);
        if(c!=null)
        {
            return c.value;
        }
        else{
            return '';
        }
    }
    
function modTD(td){
    HideMenu();
	td.style.background="#d0f8f3";
	td.style.border="#82cac1 1px solid";
	
}

function modTDno(td){
    HideMenu();
	td.style.background="#ffffff";
	td.style.border="#ffffff 1px solid";
	
    }
    
    var n=0;
function ShowStr(div){
    if(strAr.length==0)
    {
    return;
    }
    var d=document.getElementById(div);
    d.innerHTML=strAr[n];
   if(n>=strAr.length-1){
        n=0;
    }
        else
    {
        n++;
    }
    window.setTimeout("ShowStr('"+div+"')",4000);
}
    
    

