function loadEPSdemo() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="441" height="344">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="../epsdemo/process_animated.swf" />\n');
	document.write('<param name="LOOP" value="false" />\n');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="#000000" />\n');
	document.write('<param name="scale" value="showall" />\n');
	document.write('<embed id="process_animated" src="../epsdemo/process_animated.swf" width="440" height="343" loop="False" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>\n');
	document.write('</object>\n');
}

function loadEPSdemo_fullSize() {
	scrollbars(false);
	var vpWidth = document.documentElement.offsetWidth;
	var vpHeight = document.documentElement.offsetHeight;
	var bgLeft = ((vpWidth - 2266) / 2) + "px";
	var bgTop = 0; //((vpHeight - 1300) / 2) + "px";
	document.body.style.backgroundPosition = bgLeft + " " + bgTop;
	document.getElementById('EPSdemo_fSDiv').style.cssText = 'display:none; width:100%; position:fixed; top:0px; left:0px; z-index:99;';
	document.write('<div id="EPSdemo_fS_bgDiv" class="opaqueNess80" style="background-color:#111; z-index:-1; position:absolute; top:0px; left:0px; width:' + vpWidth + 'px; height:' + vpHeight + 'px;"></div>\n');
	document.write('<div id="EPSdemo_fS_titleDiv" class="threeSix aRight darkTxt divContainer" style="width:790px; background-color:#000000;"><a class="forceLink" onclick="closeEPSdemo_fullSize(); scrollbars(true);">close presentation <span class="boldTxt bigTxt">X</span></a></div>\n');
	document.write('<div class="divContainer noFreeSpace">\n');
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="625">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="../epsdemo/process_animated.swf" />\n');
	document.write('<param name="loop" value="false" />\n');
	document.write('<param name="bgcolor" value="#000000" />\n');
	document.write('<param name="scale" value="showall" />\n');
	document.write('<embed id="process_animated" src="../epsdemo/process_animated.swf" width="800" height="625" loop="False" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>\n');
	document.write('</object>\n');
	document.write('</div>\n');
	document.write('<div id="EPSdemo_fS_bottomDiv" class="threeSix aRight darkTxt" style="width:788px; background-color:#000000;"><a class="forceLink" onclick="closeEPSdemo_fullSize(); scrollbars(true);">close presentation <span class="boldTxt bigTxt">X</span></a></div>\n');
	scrollbars(true);
}

function showEPSdemo_fullSize() {
	var vpWidth = document.documentElement.offsetWidth;
	var vpHeight = document.documentElement.offsetHeight;
	document.getElementById("EPSdemo_fS_bgDiv").style.width = vpWidth + "px";
	document.getElementById("EPSdemo_fS_bgDiv").style.height = vpHeight + "px";
	document.getElementById("EPSdemo_fSDiv").style.display = "block";
}

function closeEPSdemo_fullSize() {
	document.getElementById("EPSdemo_fSDiv").style.display = "none";
}

function createNewViewport(vpID) {
	var vpWidth = 800;
	var body_cH = document.body.clientHeight;
	
	var newQVieport = document.createElement("<div id='" + vpID + "'>");
	var got_QvpID = document.getElementById(vpID);
	got_QvpID.style.cssText = "display:none; width:100%; position:fixed; top:0px; left:0px; z-index:99;";
	
	var Qvp_bg = document.createElement("<div id='" + vpID + "_Qvp_bg'>");
	got_QvpID.appendChild(Qvp_bg);
	var got_bgID = document.getElementById(vpID + "_Qvp_bg");
	got_bgID.style.cssText = "height:" + body_cH + "px; width:100%; background-color:#111; z-index:-1; position:absolute; top:0px; left:0px; filter:alpha(opacity=80); -moz-opacity:0.80; opacity:0.8;";
	
	var Qvp_holder = document.createElement("<div id='" + vpID + "_Qvp_holder'>");
	got_QvpID.appendChild(Qvp_holder);
	var got_holderID = document.getElementById(vpID + "_Qvp_holder");
	got_holderID.style.cssText = "display:block; width:" + vpWidth + "px; margin-top:29px; border:1px solid #000;";
	
	var Qvp_titlebar = document.createElement("<div id='" + vpID + "_Qvp_titlebar'>");
	got_holderID.appendChild(Qvp_titlebar);
	var got_titleID = document.getElementById(vpID + "_Qvp_titlebar");
	got_titleID.style.cssText = "width:100%; background-color:#000; text-align:right;";
}

function openViewport(vpID, type, src) {
	document.body.style.overflow = 'hidden';
}

function closeViewport(vpID) {
	document.body.style.overflow = 'auto';
}

function scrollbars(show) {
	if (!show) {
		document.body.setAttribute("scroll", "no");
		document.body.style.overflow = "hidden";
	} else {
		document.body.setAttribute("scroll", "auto");
		document.body.style.overflow = "auto";
	}
}
