function embedFlash(unit)
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="640" height="800" id="button1" align="middle">\n');
   document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
   document.write('<param name="movie" value="' + unit + '" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<embed src="' + unit + '" quality="high" width="640" height="800" name="button1" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
   document.write('</object>\n');
}

function CADConfigWindow() {

    var url = document.getElementById("ctl00_CPHMainContent_urlHidden").value;
    maxHeight = 660;
    winHeight = screen.height - 100;
			
    if (winHeight > maxHeight) {
	    winHeight = maxHeight;
	    alertOn = false;
    }
    else {
	    alertOn = true;
    }

    winStats='toolbar=no,location=0,directories=no,menubar=no,';
    winStats+='scrollbars=yes, resizable=no,';

    if (navigator.appName.indexOf("Microsoft")>=0) {
	    winStats+=',left=50,top=10,width=730,height=' + winHeight;
    }

    else {
	    winStats+=',screenX=50,screenY=150,width=780,height=620';
    }

    CADConfig=window.open(url,"CAD",winStats);
    CADConfig.focus();
	
    if (alertOn) {
	    alert("The CAD Configurator is designed to run at resolutions of 1024 by 768 pixels and above.  At your current resolution, you will experience some inconvenience with the vertical scroll bar that may not exist at higher resolutions.");
    }		
}
 