




var windowHandle;
var vidString="";

function openWindow(page,w,h,vidInt)
{
vidString=vidInt;
 if ((window.windowHandle) && (!window.windowHandle.closed) && (popuploaded==page))
  {
   window.windowHandle.focus();
   }
   else
   {
  if(window.windowHandle) window.windowHandle.close();
   windowHandle = window.open(page,'windowName',"scrollbars=yes,width=" + w +",height=" + h + ",toolbar=no,resizable=yes");
   }
    window.windowHandle.focus();
    popuploaded=page;

 }
 
 
 function closeWindow(){
	 windowHandle.close();
 }
 
 
 
function rollover(obj,state)
{

tmpstr=obj.src.substring(obj.src.lastIndexOf('/')+1, obj.src.lastIndexOf('.'));

if(state){
	obj.src="images/nav/"+ tmpstr +"~.gif"; 
	}
	else
	{
	tmpstr=tmpstr.substring(0,tmpstr.length-1);
	obj.src="images/nav/"+ tmpstr +".gif"; 
	}

}

function getFlash(fileSTR){
	document.getElementById('flashcontent').innerHTML=flashSTR;
	document.getElementById('flashcontent').style.height="100%";
	document.getElementById('flashcontent').style.width="100%";
}



//Flash detection routines DTW


var agt=navigator.userAgent.toLowerCase();
var ns4 = (document.layers)? true:false;				
var ie4 = (document.all && !document.getElementById) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var n6 = (document.getElementById && !document.all) ? true : false;
var is_mac = (agt.indexOf("mac")!=-1);
var loaded=0;
var flashStr="";
var flashFile="";
var noFlashStr="";
var imagesLoaded=false;
if(ns4)window.location="http://webstandards.org/upgrade/";
var flashStr="";
var gifStr=""
var flash4Installed = false;
var flash5Installed = false;
var flash6Installed = false;
var flash7Installed = false;
var flash8Installed = false;
var flash9Installed = false;
var flash10Installed = false;
var minFlash=8;
var verNo=0;
var flashInstalled = false;

var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;		
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

if(isIE && isWin){ 
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
	document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
	document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
	document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
	document.write('flash9Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');
	document.write('flash10Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.10"))) \n');
	document.write('</SCR' + 'IPT\> \n');
}

var allowFlash=false;
function detectFlash(fileSTR)
{
flashStr="";
if (navigator.plugins)
{								
	if (navigator.plugins["Shockwave Flash"])
	{
	var flashDescription = navigator.plugins["Shockwave Flash"].description;
	var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
	if(flashVersion==0)flashVersion= parseInt(flashDescription.substring(flashDescription.indexOf(".") - 2,flashDescription.indexOf(".")));
	verNo=flashVersion;
	flashInstalled=true;
	if (verNo>=minFlash)allowFlash=true;
	}
}

if (flash4Installed == true) {verNo=4; flashInstalled=true;}
if (flash5Installed == true) {verNo=5; flashInstalled=true;}
if (flash6Installed == true) {verNo=6; flashInstalled=true;}
if (flash7Installed == true) {verNo=7; flashInstalled=true;}
if (flash8Installed == true) {verNo=8; flashInstalled=true;}
if (flash9Installed == true) {verNo=9; flashInstalled=true;}
if (flash10Installed == true) {verNo=10; flashInstalled=true;}

if (verNo>=minFlash  && flashInstalled) allowFlash=true;
//window.status="Flash installed=: " + flashInstalled + " <--> Version: " + verNo;
if(allowFlash){
	flashSTR="<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='100%' height='100%' id='labs' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+ fileSTR +".swf' /><param name='quality' value='high' /><param name='bgcolor' value='#427fb0' /><embed src='"+fileSTR+".swf' quality='high' bgcolor='#427fb0' width='100%' height='100%' name='labs' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>"
	document.getElementById('flashcontent').innerHTML=flashSTR;
	document.getElementById('flashcontent').style.height="100%";
	document.getElementById('flashcontent').style.width="100%";
	}
}





