	function setMask()
	{   var omask;
			var obj;
	    var i;
	//		<div id=ME_SS_BG style="position:absolute;filter:alpha(opacity=60);-moz-opacity:0.6;opacity:0.6;background:black;left:0;top:0;width:100%;height:100%;visibility:hidden;overflow:hidden;z-index:50000;"></div>
		   if ((omask=document.getElementById("ME_SS_BG")))
           document.body.removeChild(omask);
        omask = document.createElement("DIV");
		    omask.id="ME_SS_BG";
//		omask.setAttribute("style", "position:absolute;filter:alpha(opacity=60);-moz-opacity:0.6;opacity:0.6;background:black;left:0;top:0;width:100%;height:100%;visibility:hidden;overflow:hidden;z-index:50000;");
        omask.style.position = "absolute";
        omask.style.background = "black";
        omask.style.left = "0";
        omask.style.top = "0";
        omask.style.width = "100%";
        omask.style.width = parseInt(screen.availWidth,10);
        obj = document.getElementById("end_of_page");
        omask.style.height = (findPosY(obj)<screen.availHeight?screen.availHeight:findPosY(obj));
        omask.style.overflow = "hidden";
        omask.style.opacity = "0.6";
        omask.style.filter = "alpha(opacity=60)";

        omask.style.visibility = "visible";
        omask.style.zIndex = 5000;
        document.body.appendChild(omask);
    }

function ClosePopup(refresh)
{ var obj;
  obj = document.getElementById("popup_container");
  obj.style.visibility = "hidden";
  obj = document.getElementById("ME_SS_BG");
  if (obj)
     document.body.removeChild(obj);

  if (refresh)
  {	if (s_action.substring(0,1)=="5")
  		Refresh();
  	else
  		ActivateMenu(s_action);
  }
}

function SetPopupDimension(w, h)
    { var obj;
      var obj1;
      if (this.name!="")
      {  obj = parent.document.getElementById("popup");
         obj.style.width = w;
         obj.style.height = h;
         obj1 = parent.document.getElementById("popup_container");
         obj1.style.top = ((parent.document.body.clientHeight-parseInt(obj.style.height,10))/2)-50+document.body.scrollTop;
         obj1.style.left = (parent.document.body.clientWidth-parseInt(obj.style.width,10))/2;
         obj1.style.display = "inline";
         obj1.style.visibility = "visible";
      }
      else
      {  obj = document.getElementById("popup");
         obj.style.width = w;
         obj.style.height = h;
         obj1 = document.getElementById("popup_container");
         obj1.style.top = ((document.body.clientHeight-parseInt(obj.style.height,10))/2)-50+document.body.scrollTop;
         obj1.style.left = (document.body.clientWidth-parseInt(obj.style.width,10))/2;
         obj1.style.display = "inline";
         obj1.style.visibility = "visible";
      }
    }

	function findPosY(obj)
	{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
	}

function findPosX(obj)
  {
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
	}