﻿function bgMask(DTitle,Url,Width,Height){
		var MMBox=document.getElementById("MMBox");
		MMBox.style.height="540px";
		MMBox.style.width="455px";
		MMBox.id="MMBox"
		MMBox.className="flowdiv";
		//MBox.style.left=(screen.width)/2-(Width/2)+"px";
		//MBox.style.top=(screen.height)/2-(Height/2)-50+scrollHeight+"px";
		MMBox.innerHTML="<iframe id='Shim' src='area.html' scrolling='no' frameborder='0' style='width:455px;height:540px;;position:absolute;left:0;top:0;z-index:99;background:#FFF'></iframe>";
		//document.body.appendChild(MBox);
		//alert(document.getElementById("workLocusPanel").innerHTML);
		
		document.getElementById("MMBox").innerHTML=MMBox.innerHTML;
		document.getElementById("MMBox").style.left="50%";
		document.getElementById("MMBox").style.top="95px";
		//document.getElementById("MMBox").style.top="350px";//top="110px!important
		document.getElementById("MMBox").style.visibility="visible";
		//document.getElementById("Shim").style.width="620px";
		//document.getElementById("Shim").style.height="550px";
		document.getElementById("MMBox").style.display="";
        document.getElementById("ifFromLoad").style.visibility="visible";
        document.getElementById("ifFromLoad").style.width = window.screen.availWidth + "px";
        document.getElementById("ifFromLoad").style.height = window.screen.availHeight + 220 + "px";
        document.getElementById("ifFromLoad").style.filter = "alpha(opacity=80)";
        hiddenselect();
}
function bgMasku(DTitle,Url,Width,Height){

		//var MMBox=document.createElement("div");
		var MMBox=document.getElementById("MMBox");
		
		MMBox.id="MMBox"
		MMBox.style.height="540px";
		MMBox.style.width="455px";
		MMBox.className="flowdiv";
		//MBox.style.left=(screen.width)/2-(Width/2)+"px";
		//MBox.style.top=(screen.height)/2-(Height/2)-50+scrollHeight+"px";
		MMBox.innerHTML="<iframe id='Shim' src='areau.html' scrolling='no' frameborder='0' style='width:455px;height:540px;position:absolute;left:0;top:0;z-index:99;background:#FFF'></iframe>";
		//document.body.appendChild(MBox);
		//alert(document.getElementById("workLocusPanel").innerHTML);
		document.getElementById("MMBox").innerHTML=MMBox.innerHTML;
		document.getElementById("MMBox").style.left="50%";
		document.getElementById("MMBox").style.top="95px";
		//document.getElementById("MMBox").style.top="110px";
		document.getElementById("MMBox").style.visibility="visible";
		//document.getElementById("Shim").style.width=1020;
		//document.getElementById("Shim").style.height=550;
		document.getElementById("MMBox").style.display="";
		document.getElementById("ifFromLoad").style.visibility="visible";
    document.getElementById("ifFromLoad").style.width = window.screen.availWidth + "px";
    document.getElementById("ifFromLoad").style.height = window.screen.availHeight + 220 + "px";
    document.getElementById("ifFromLoad").style.filter = "alpha(opacity=80)";
    hiddenselect();
}
function changeClass(obj,type){
	if( type == 1)
		obj.className = "closeBoxF";
	else{
		obj.className = "closeBox";
	   }
}

function closeDivShow(){
var d=document.getElementById("mask");
var m=document.getElementById("maskIframe");
var f=document.getElementById("MBox");
if(m != null){
	m.src = "";
	}
	if(d != null && f != null){
	 document.body.removeChild(d);  
	 document.body.removeChild(f); 
	}
	
}

window.onresize=function(){
  var d=document.getElementById("mask");
  //var yScroll = document.body.scrollTop;
  if(d){
	d.style.width=document.body.offsetWidth;
	//d.style.height=window.screen.availHeight-126+yScroll;
  }
}

function getOs(){
	
   var OsObject = ""; 
   if(navigator.userAgent.indexOf("MSIE")>0) { 
        return "MSIE"; 
   } 
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ 
        return "Firefox"; 
   } 
   if(isSafari=navigator.userAgent.indexOf("Safari")>0) { 
        return "Safari"; 
   } 
   if(isCamino=navigator.userAgent.indexOf("Camino")>0){ 
        return "Camino"; 
   } 
   if(isMozilla=navigator.userAgent.indexOf("Gecko")>0){ 
        return "Gecko"; 
   } 
   
}