var ie=document.all;var ns6=document.getElementById&&!document.all;var isMenu=false;var menuSelObj=null;var overpopupmenu=false;function ItemSelMenu(myControl){if(document.getElementById('spyMap')){/*document.getElementById('spyMap').style.marginTop="53px";*/}d=getAnchorPosition(myControl);if (document.all){divwidth= document.getElementById('menudiv').style.width;left = d.x-200;width = document.body.clientWidth;if (left + 252 > width){left = width - 252;}document.getElementById('menudiv').style.pixelLeft = left;document.getElementById('menudiv').style.pixelTop = d.y+10;}else{divwidth = document.getElementById('menudiv').style.width;left = d.x-200;width = document.body.clientWidth;if (left + 247 > width){left = width - 247;}document.getElementById('menudiv').style.left = left + "px";document.getElementById('menudiv').style.top = d.y + 10 + "px";}document.getElementById('menudiv').style.height = 350;document.getElementById('menudiv').style.display = "";return false ;}
function getAnchorPosition(anchorname) {var useWindow=false;var coordinates=new Object();var x=0,y=0;var use_gebi=false, use_css=false, use_layers=false;if (document.getElementById) { use_gebi=true; }else if (document.all) { use_css=true; }else if (document.layers) { use_layers=true; }if (use_gebi && document.all) {x=AnchorPosition_getPageOffsetLeft(anchorname);y=AnchorPosition_getPageOffsetTop(anchorname);}else if (use_gebi) {var o=anchorname;x=AnchorPosition_getPageOffsetLeft(o);y=AnchorPosition_getPageOffsetTop(o);}else if (use_css) {x=AnchorPosition_getPageOffsetLeft(anchorname);y=AnchorPosition_getPageOffsetTop(anchorname);}else if (use_layers) {x=anchorname.x;y=anchorname.y;}else {coordinates.x=0; coordinates.y=0; return coordinates;}coordinates.x=x;coordinates.y=y;return coordinates;}function AnchorPosition_getPageOffsetLeft (el) {var ol=el.offsetLeft;while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }return ol;}function AnchorPosition_getWindowOffsetLeft (el) {return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;}function AnchorPosition_getPageOffsetTop (el) {var ot=el.offsetTop;while((el=el.offsetParent) != null) { ot += el.offsetTop; }return ot;}function AnchorPosition_getWindowOffsetTop (el) {return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;}

function centerProgressBar(myControl,divID)
{
	//myControl = '192.168.1.10/SpyroutesAjax/index.html#';
    d = getAnchorPosition(myControl);
    if (document.all)
    {
        divwidth= document.getElementById(divID).style.width;
        if(divID=='activityCage')
        	left = d.x+165;
		else
			left = d.x+185;
        width = document.body.clientWidth;
        if (left + 292 > width) 
	        left = width - 292;
        document.getElementById(divID).style.pixelLeft = left; //d.x;
		if(divID=='activityCage')
			document.getElementById(divID).style.top = d.y + 200 + "px";
		else
			document.getElementById(divID).style.top = d.y + 175 + "px";
	}
	else
    {
        divwidth = document.getElementById(divID).style.width;
		if(divID=='activityCage')
        	left = d.x+165;
		else
			left = d.x+185;
        width = document.body.clientWidth;		
        if (left + 287 > width)
	        left = width - 287;		
        document.getElementById(divID).style.left = left + "px";
		if(divID=='activityCage')
			document.getElementById(divID).style.top = d.y + 200 + "px";
		else
			document.getElementById(divID).style.top = d.y + 175 + "px";
    }
	//document.getElementById('activityCage').style.height = 350;
	document.getElementById(divID).style.display = "";
	return false ;
}

function smsOpen(myControl,divID)
{
	//myControl = '192.168.1.10/SpyroutesAjax/index.html#';
    d = getAnchorPosition(myControl);	
	width = document.body.clientWidth;
    if (document.all)
    {
        divwidth= document.getElementById(divID).style.width;
       	left = d.x+55;        
        if (left + 292 > width) 
	        left = width - 52;
        document.getElementById(divID).style.pixelLeft = left; //d.x;
		document.getElementById(divID).style.top = d.y + "px";
	}
	else
    {
        divwidth = document.getElementById(divID).style.width;
		left = d.x+55;       
        if (left + 287 > width)
	        left = width - 57;		
        document.getElementById(divID).style.left = left + "px";
		document.getElementById(divID).style.top = d.y + "px";
    }	
	//document.getElementById('activityCage').style.height = 350;
	document.getElementById(divID).style.display = "";
	return false ;
}

function catgOpen(myControl,divID)
{
    d = getAnchorPosition(myControl);	
	width = document.body.clientWidth;
    if (document.all)
    {
        divwidth= document.getElementById(divID).style.width;
       	left = d.x+10;        
        if (left + 200 > width) 
	        left = width - 312;
        document.getElementById(divID).style.pixelLeft = left; //d.x;
		document.getElementById(divID).style.top = d.y+10 + "px";
	}
	else
    {
        divwidth = document.getElementById(divID).style.width;
		left = d.x+10;
        if (left + 187 > width)
	        left = width - 300;
        document.getElementById(divID).style.left = left + "px";
		document.getElementById(divID).style.top = d.y+10+"px";
    }	
	document.getElementById(divID).style.display = "";
	return false ;
}


function showHideSID2(val)
{
	if (document.all)
    {
		//document.getElementById('SID2').style.visibility=val;
	}
}