// JavaScript Document
var oldDiv;

	function insertPromo() {
		//expressinstall_url = false; 
		//params = { title: 'Promo', quality: 'high', wmode: 'transparent', allowScriptAccess: 'always', menu: 'false' };
		//flashvars = { oldTitle: window.document.title };  
       // attributes = { id: 'Promo' }; 
		//swfobject.embedSWF('flash/Promo.swf', 'promo', '150', '170', '8.0.0', expressinstall_url, flashvars, params, attributes);
	}
		
	function insertflash() {
		expressinstall_url = false; 
		params = { title: 'DeeSign', quality: 'high', wmode: 'transparent', allowScriptAccess: 'always', menu: 'false' };
		flashvars = { oldTitle: window.document.title };  
        attributes = { id: 'riderDemo' }; 
		swfobject.embedSWF('flash/riderDemo.swf', 'customriders', '400', '232', '8.0.0', expressinstall_url, flashvars, params, attributes);
		
	}
	
	function insertSubImg(d, img) {
		document.getElementById(d).innerHTML = '<img src="images/layout/'+img+'"  />';
	
	}
	function insertSubPage(d, c) {
		document.getElementById(d).innerHTML = document.getElementById(c).innerHTML;
	
	}
	
function showHideFlash(fmDivSwitch) {
		var fmDiv = window.document.getElementById('plasma');
		
			if (fmDivSwitch == "on") {
				var wcenter = window.document.body.clientWidth / 2;
				var flashcode = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="700" id="FlashID" tabindex="27" title="Design, Proof & Order Online">';
                flashcode += '<param name="movie" value="flash/Plasma-TV.swf" />';
    			flashcode += '<param name="quality" value="high" />';
    			flashcode += '<param name="wmode" value="transparent" />';
    			flashcode += '<param name="swfversion" value="6.0.65.0" />';
				flashcode += '<param name="allowScriptAccess" value="always" />';
    			flashcode += '<param name="expressinstall" value="Scripts/expressInstall.swf" />';
    			flashcode += '<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->';
    			flashcode += '<!--[if !IE]>-->';
    			flashcode += '<object type="application/x-shockwave-flash" data="flash/Plasma-TV.swf" width="661" height="563">';
    			flashcode += '  <!--<![endif]-->';
    			flashcode += '  <param name="quality" value="high" />';
    			flashcode += '  <param name="wmode" value="transparent" />';
				flashcode += '<param name="allowScriptAccess" value="always" />';
    			flashcode += '  <param name="swfversion" value="6.0.65.0" />';
    			flashcode += '  <param name="expressinstall" value="Scripts/expressInstall.swf" />';
    			flashcode += '  <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->';
    			flashcode += '  <div>';
    			flashcode += '    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>';
    			flashcode += '    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>';
    			flashcode += ' </div>';
    			flashcode += ' <!--[if !IE]>-->';
    			flashcode += ' </object>';
    			flashcode += '<!--<![endif]-->';
    			flashcode += '</object>';
				//alert(flashcode);
				
				
				fmDiv.innerHTML = '<div id="plasmaXY" style="position:relative; z-index:99; left:-250px; top: 0px; ">'+ flashcode +' </div>';
				
				//expressinstall_url = false; 
				//flashvars = { oldTitle: window.document.title };  
        		//params = { title: 'DeeSign', quality: 'high', wmode: 'transparent', allowScriptAccess: 'always', menu: 'false' }; 
		        //attributes = { id: 'plasmaXY' }; 
				//swfobject.embedSWF('flash/Plasma-TV.swf', 'plasmaXY', '900', '700', '8.0.0', expressinstall_url, flashvars, params, attributes);  //1200x900
			    
			} else {
				fmDiv.innerHTML = "";
				
			}
	}

// Dreamweaver Rollover/Image pre-load code
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_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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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];}
}
// end dreamweaver code

function popupWindow(winname,  w, h, menu, resize, scroll) {
	if (winname == null) winname = "newWindow";
	if (w == null) w = 600;
	if (h == null) h = 600;
	if (resize == null) resize = 1;
	
	menutype   = "nomenubar";
	resizetype = "noresizable";
	scrolltype = "noscrollbars";
	if (menu) menutype = "menubar";
	if (resize) resizetype = "resizable";
	if (scroll) scrolltype = "scrollbars";
	
	cwin=window.open("", winname,
		"status," + menutype + "," + scrolltype + "," + resizetype + ",width=" + w + ",height=" + h);
		if(window.focus){
		cwin.focus();
		}
return true;
}
function openNewWindow(newPageURL)
{
    window.open(newPageURL, "_blank","height=420px, width=520px " + "resizable=no scrollbars=no menubar=no location=no status=no");
}

	function offscreen() {
		var wcenter = (window.document.body.clientWidth / 2) - 80;
		document.getElementById("iewrap").style.left= wcenter - 447 +"px";   // 447
		//document.getElementById("rightBorder").style.left= wcenter + 630 +"px";
		//document.getElementById("leftBorder").style.left= wcenter - 525 +"px";
		document.getElementById("plasma").style.left= wcenter - 525 +"px";
		
	}
	
	function reveal() {
		//document.getElementById("iewrap").style.top= 0 + "px";
		//document.getElementById("rightBorder").style.top= -1 + "px";
		//document.getElementById("leftBorder").style.top= -1 + "px";
		
	}
	
	function SwapInDiv(div) {
		//document.getElementById('spotXY').innerHTML = "";
		
		if (oldDiv) document.getElementById(oldDiv).style.visibility = "hidden";
		// Disabled the Attractions Flash movie until approved and content created
		//if (oldDiv) document.getElementById(oldDiv).style.visibility = "none";
		//if (div == "AboutDeeSign" || div == "ContactUs" || div == "CustomRiders" || div == "CustomArtwork" || div == "DigitalImaging") HideSpot();
	
		//if (div == "GuaranteedShipment") ShowSpot(3);
		//if (div == "NeedRushShipment") ShowSpot(5);
		//if (div == "DigitalPhotoRiders") ShowSpot(5);
		//alert("attempting to show div");
		document.getElementById(div).style.visibility = "visible";
		
		//document.getElementById(div).style.display = 'block';
		oldDiv = div;
	}

	function ShowSpot(c) {
		// Disabled the Attractions Flash movie until approved and content created
		if (c) {
		//var s = document.getElementById('spot');
		//document.getElementById('spot').style.top = -450+ 'px';
		//document.getElementById('spot').style.background = '#000000';
		//alert("attempting to show spot:"+ s);
		//s.innerHTML = '<div id="spotXY"></div>';
		//expressinstall_url = false; 
		//params = { title: 'DeeSign Attractions', quality: 'high', wmode: 'transparent', allowScriptAccess: 'always', menu: 'true' };
		//flashvars = { oldTitle: window.document.title, showContent: c };  
        //attributes = { id: 'Attractions' }; 
		//swfobject.embedSWF('flash/AttractionsAtDee.swf', 'spotXY', '450', '300', '8.0.0', expressinstall_url, flashvars, params, attributes);
		}
		
	}
	
	function HideSpot() {
		//document.getElementById('spot').innerHTML = "";
		//alert("Spot Hidden");
	}
	
	function BasicLayout() {
		offscreen();
		document.getElementById("Dee_Column2").style.borderColor="#FFFFFF white"
		//alert ("Hello, I am now attempting to modify the css for your browser");	
		reveal();
		// attractions
		//ShowSpot();

	}
	
	// Dynamically changes Password from textfield to password field on focus
	function passit(ip){
		if(ip.type=='text'){
			var np=ip.cloneNode(true);
			np.type='password';
			np.value='';
			ip.parentNode.replaceChild(np,ip);
			setTimeout("document.getElementById('pw_id').focus()",0);
			} 
	}
	
	function init() {
		MM_preloadImages('images/clients/Buttons_01_hover.png','images/clients/Buttons_03_hover.png','images/clients/Buttons_04_hover.png','images/clients/Buttons_06_hover.png','images/clients/Buttons_07_hover.png','images/clients/Buttons_08_hover.png','images/clients/Buttons_09_hover.png','images/clients/Buttons_10_hover.png','images/clients/Buttons_11_hover.png','images/clients/Buttons_12_hover.png','images/layout/Col3_04b_hover.gif','images/layout/Col3_05b_hover.gif','images/layout/Col3_06b_hover.gif','images/layout/PhotoRiders_hover.gif','images/layout/Col4_18_hover.png','images/layout/screen_hover.gif','images/layout/Col4_01_hover.gif','images/layout/Col4_02_hover.gif','images/layout/Col4_03_hover.gif','images/layout/Col4_05_hover.gif','images/layout/Col4_06c_hover.gif');
		BasicLayout();
		//insertPromo();
	
	}