
//get browser height
function getBrowserHeight() {
   var myHeight;
   if( typeof( window.innerWidth ) == 'number' ) { myHeight = window.innerHeight; }
   else if( document.documentElement && ( document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) { myHeight = document.documentElement.clientHeight; }
   else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { myHeight = document.body.clientHeight; }
   return myHeight;
}

//get container height
function boxHeight() {
   var cenvertpage	= ( parseInt( getBrowserHeight() ) / 2 );
   var cenvertbox		= ( parseInt( document.getElementById( 'container' ).offsetHeight ) / 2 + 25 );
   var cenverted		= cenvertpage - cenvertbox;
   document.getElementById( 'container' ).style.top = cenverted + 'px';
}

//delay container display - eliminates visual 'bouncing' glitch
function delayBox() { document.getElementById( 'container' ).style.visibility = 'visible'; }

//page-resize container
//get container height and center vertically on page
function resizeBox() { boxHeight(); }

//page-load container
function loadBox() {
   boxHeight();
   if( document.getElementById( 'container' ).style.visibility != 'visible' ) { setTimeout( "delayBox()", 10 ); }
}

//placement onLoad();
//window.onload = loadBox;

//placement onResize();
window.onresize = resizeBox;

//place site Flash object on page
function initFlash() {
	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="850" height="655" id="index" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="index.swf" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#333333" />');
	document.write('<embed src="index.swf" quality="best" wmode="transparent" bgcolor="#333333" width="850" height="655" name="index" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

//place registration Flash object on page
function initRegFlash() {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="233" height="256" id="registration" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="registration.swf" /><param name="quality" value="best" /><param name="bgcolor" value="#797670" />');
	document.write('<embed src="registration.swf" quality="best" bgcolor="#797670" width="233" height="256" name="registration" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
	document.write('</object>');
}
