// JavaScript Document

function doBePatient()
{
	var str = "<td id='loading' width='100%' valign='middle' align='center' style='font-size: 12px; font-weight: bold; color: blue;'>L&nbsp;&nbsp;O&nbsp;&nbsp;A&nbsp;&nbsp;D&nbsp;&nbsp;I&nbsp;&nbsp;N&nbsp;&nbsp;G&nbsp;&nbsp;.&nbsp;&nbsp;.&nbsp;&nbsp;. ";
	
	if(String(location.href).indexOf("index.htm") != -1)	
		str += "<span style='font-weight: normal;'>P l e a s e&nbsp;&nbsp;w a i t.</span>";
	
	str += "</td>";
	
	document.writeln(str);
}

function insertMovie(w,h,moviePath,altImgPath,altImgText,bkImgPath,isHidden)
{
	var isVisible = arguments.length > 6 && isHidden ? false : true;

	if(arguments.length > 5 && isFlashEnabled){
		
		var style = isVisible ?  "'position: relative; visibility: visible; display: block;'" : "'position: relative; visibility: hidden; display: none;'";
		document.writeln("<table cellspacing='0' cellpadding='0' border='0' width='" + w + "' height='" + h + "' background='" +  bkImgPath + "'><tr><td id='movie' class='nav6fix' style=" + style + ">");
	}
	
	if(isFlashEnabled){			
		document.writeln("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='" + w + "' height='" + h + "' hspace='0' vspace='0' align='left' id='flick'>");
		document.writeln("<param name='allowScriptAccess' value='sameDomain' />");
		document.writeln("<param name='movie' value='" +  moviePath + "' />");
		document.writeln("<param name='loop' value='false' />");
		document.writeln("<param name='menu' value='false' />");
		document.writeln("<param name='quality' value='best' />");
		document.writeln("<param name='scale' value='exactfit' />");
		document.writeln("<param name='salign' value='lt' />");
		if(arguments.length > 5){
			document.writeln("<param name='wmode' value='transparent'>");
			document.writeln("<embed src='" +  moviePath + "' width='" + w + "' height='" + h + "' hspace='0' vspace='0' loop='false' align='left' wmode='transparent' menu='false' quality='high' scale='exactfit' salign='lt' name='movie' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
		}
		else
			document.writeln("<embed src='" +  moviePath + "' width='" + w + "' height='" + h + "' hspace='0' vspace='0' loop='false' align='left' menu='false' quality='high' scale='exactfit' salign='lt' name='movie' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");

		document.writeln("</object>");
		
		if(!isVisible)
			doBePatient();
	}
	else
		document.writeln("<img alt='" + altImgText + "' src='" +  altImgPath + "' width='" + w + "' height='" + h + "' />");

	if(arguments.length > 5 && isFlashEnabled)
		document.writeln("</td></tr></table>");
}

function showMovie()
{
	var oStyle = getObjectStyle('loading');
	if(oStyle)
		oStyle.display = "none";
		
	oStyle = getObjectStyle('movie');
	if(oStyle){
		oStyle.display = "block";
		oStyle.visibility = "visible";	
	}
}

var isFlashEnabled = 0;

if(isPlatform("win")){
	if(IE){
	   	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	   	document.write('on error resume next \n');
	   	document.write('plugin3 = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
	   	document.write('plugin4 = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	   	document.write('plugin5 = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
		document.write('plugin6 = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
		document.write('plugin7 = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');
	   	document.write('</SCRIPT\> \n');
   
		isFlashEnabled = plugin6 || plugin7;
	}
}

//Safe to assume literate Gecko users will have the plugin
//If not they will be invited to install it
//NB NN4, NN6 and Opera do not support transparent swfs	
					