function grayOut(show) {
        var vis = (show == false) ? false : true;
        var zindex = 192;
        var opacity = 50;
        var opaque = (opacity / 100);
        var bgcolor = '#000000';
        var dark=document.getElementById('darkenScreenObject');
        if (!dark) {
          var tbody = document.getElementsByTagName("body")[0];
          var tnode = document.createElement('div');
              tnode.style.position='absolute';
              tnode.style.top='0px';
              tnode.style.left='0px';
              tnode.style.overflow='hidden';
              tnode.style.display='none';
              tnode.id='darkenScreenObject';
          tbody.appendChild(tnode);
          dark=document.getElementById('darkenScreenObject');
        }
        if (vis) {
           // Calculate the page width and height
         if(navigator.appName.indexOf("Explorer") == -1) {
						 //firefox & safari
	           var pageWidth='100%';
             var pageHeight='100%';
             dark.style.position='fixed';
          } else if( document.body && ( document.body.scrollWidth || document.body.scrollHeight ) ) {
              var pageWidth = document.body.scrollWidth+20+'px';
              var pageHeight = document.body.scrollHeight+30+'px'; //24 for IE7
          } else if( document.body.offsetWidth ) {
            var pageWidth = document.body.offsetWidth+20+'px';
            var pageHeight = document.body.offsetHeight+30+'px';
          } else {
             var pageWidth='100%';
             var pageHeight='100%';
          }
          //set the shader to cover the entire page and make it visible.
          dark.style.opacity=opaque;
          dark.style.MozOpacity=opaque;
          dark.style.filter='alpha(opacity='+opacity+')';
          dark.style.zIndex=zindex;
          dark.style.backgroundColor=bgcolor;
          dark.style.width= pageWidth;
          dark.style.height= pageHeight;
          dark.style.display='block';
        } else {
          dark.style.display='none';
        }
        var flashmov = document.getElementById('dhtml_popup');
        flashmov.innerHTML=
        "<object classid=\"CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"850\" height=\"550\"" +
	          "codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\">\n"+
				    "<param name=\"movie\" value=\"Mag.swf\">\n" +
				    "<param name=\"quality\" value=\"high\">\n" +
				    "<param name=\"scale\" value=\"exactfit\">\n" +
				    "<param name=\"menu\" value=\"true\">\n" +
				    "<param name=\"bgcolor\" value=\"#000040\">\n" +
				    "<embed src=\"Mag.swf\" quality=\"high\" scale=\"exactfit\" menu=\"false\""+
				           "bgcolor=\"#000000\" width=\"850\" height=\"550\" swLiveConnect=\"false\""+
				           "type=\"application/x-shockwave-flash\""+
				           "pluginspage=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\">\n" +
				    "</embed>"+
        "</object>";
}



function grayIn(){
grayOut(false);
var flashmov = document.getElementById("dhtml_popup");
flashmov.innerHTML='';

var docGrey = document.getElementById("darkenstyle");
docGrey.style.display="none";
}

