﻿function toggleFlash(containerId, objId, width, height, src) {
    flashHolder= document.getElementById(containerId);
    if(flashHolder.style.display=='none') {
        window[objId] = new Object();
        setTimeout(function() {
          writeSWFObj(flashHolder, objId, width, height, src);
        },1000);
    } else {
						flashObj= document.getElementById(objId);
						flashObj.style.display = "none";
						setTimeout(function(){flashHolder.innerHTML='';},1);  
    }
    Effect.toggle(containerId,'blind');
}
function writeSWFObj(containerId, objId, width, height, src) {
  var so = new SWFObject(src, objId, width, height, "8.0.0", "#314441");  
  so.useExpressInstall('/Flash/expressinstall.swf');
  so.addParam("allowScriptAccess", "sameDomain");  
  so.addParam("quality", "high");  
  so.addParam("wmode", "transparent");
  so.write(containerId);
  containerId.innerHTML = "<br/>"+containerId.innerHTML;
  SWFFormFixAuto();
}
function genObjTag(objId, width, height, src)
{
  var objTag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';
  objTag += ' width="'+width+'" height="'+height+'" id="'+objId+'" name="'+objId+'"/>\r\n<param name="quality" value="high" />\r\n<param name="movie" value="'+src+'" />\r\n';
  objTag += '<param name="allowScriptAccess" value="always" />\r\n<param name="wmode" value="opaque" />\r\n<param name="bgcolor" value="#314441" />\r\n ';
  objTag += '<embed src="'+src+'" bgcolor="#314441" quality="high" width="'+width+'" height="'+height+'" name="'+objId+'" id="'+objId+'" wmode="opaque" type="application/x-shockwave-flash" ';
  objTag += 'allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" />\r\n</object>';
  return objTag;
}
function ShowBoundaryMap()
{
  window.open("images/Mine Boundary Full Screen.jpg", "Boundary","location=0,status=0,width=1132,height=856,menubar=0" );
}

function autoOpen() {
    if( document.URL.indexOf('#views') != -1) {
        toggleFlash('flashboxSequencing','sequencing',550,500,'Flash/sequence_views.swf');
    }
}
function toggleFlash2(containerId, objId, width, height, src) {
    var flashHolder= document.getElementById(containerId);

        window[objId] = new Object();
        setTimeout(function() {
          writeSWFObj2(flashHolder, objId, width, height, src);
        },1000);

}
function writeSWFObj2(containerId, objId, width, height, src) {
  var so = new SWFObject(src, objId, width, height, "8.0.0", "#314441");  
  so.useExpressInstall('http://www.mauryislandmine.com/Flash/expressinstall.swf');
  so.addParam("allowScriptAccess", "always");  
  so.addParam("quality", "high");  
  so.addParam("wmode", "transparent");
  so.write(containerId);
  SWFFormFixAuto();
}