function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function setInitialPositions()
    {	
	  if (GetCookie("tab")==null)
	  {
	       SetCookie("tab",0); 
	       ShowFull("demolition.htm");       
	  }
	 
    }

function ShowFull(strURL)
{
	 
	var winAtts ="";
	//alert(strURL);
	winAtts += "left=0,"
	winAtts += "top=0,"

	winAtts += "height=300,"
	winAtts += "width=800"
	
	//winAtts += "height=750,"
	//winAtts += "width=2015"
	var winMM = window.open(strURL, "MMWIN", winAtts);	
	winMM.focus();
}
function SetCookie(name,value)
    {
      document.cookie = name + "=" + escape(value);
    }
    function GetCookie(name) 
	{
		var result = null;
		var myCookie = " " + document.cookie + ";";
		var searchName = " " + name + "=";
		var startOfCookie = myCookie.indexOf(searchName);
		var endOfCookie;
		if (startOfCookie != -1) 
		{
			startOfCookie += searchName.length; 
			// skip past cookie name
			endOfCookie = myCookie.indexOf(";", startOfCookie);
			result = unescape(myCookie.substring(startOfCookie,endOfCookie));
		}

		return result;
		
	}
	
	function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// PopUp
function ShowPopUp(location,left,top,width,height)
{
	var strURL = location; 
	var pos = 'left=' + left + ',top=' + top + ',height=' + height + ',width=' + width + ',status=no,toolbar=no,menubar=no,location=no,resizeable=no,alwaysRaised=yes'
		
	var winAtts ="";
	winAtts += "toolbar=0,"
	winAtts += "menubarbar=0,"
	winAtts += "left=" + left + ","
	winAtts += "top=" + top + ","
	
	winAtts += "height=" + height + ","
	winAtts += "width=" + width + ","
	winAtts += "status=0,"
	winAtts += "toolbar=0,"
	winAtts += "menubar=0,"
	winAtts += "location=0,"
	winAtts += "resizeable=0,"
	winAtts += "dependent=1,"
	
	winAtts += "alwaysRaised=1"
	var winPop = window.open(strURL, "MMWIN", winAtts);


	winPop.focus();
}
// Full
function ShowFull(location,left,top,width,height)
{
	var strURL = location; 
	var pos = 'left=' + left + ',top=' + top + ',height=' + height + ',width=' + width + ',status=no,toolbar=no,menubar=no,location=no,resizeable=no,alwaysRaised=yes'
		
	var winAtts ="";
	winAtts += "toolbar=1,"
	winAtts += "menubarbar=1,"
	winAtts += "left=" + left + ","
	winAtts += "top=" + top + ","
	
	winAtts += "height=" + height + ","
	winAtts += "width=" + width + ","
	winAtts += "status=1,"
	winAtts += "toolbar=1,"
	winAtts += "menubar=1,"
	winAtts += "location=1,"
	winAtts += "resizeable=1,"
	winAtts += "dependent=1,"
	
	winAtts += "alwaysRaised=1"
	var winPop = window.open(strURL, "MMWIN");//, winAtts);


	winPop.focus();
}

