//flash detect
var flashVersion = 0;function getFlashVersion(){var latestFlashVersion=8;var agent=navigator.userAgent.toLowerCase();if(navigator.plugins!=null&&navigator.plugins.length>0){var flashPlugin=navigator.plugins['Shockwave Flash'];if (typeof flashPlugin=='object'){for(var i=latestFlashVersion;i>=3;i--){if (flashPlugin.description.indexOf(i+'.')!=-1){flashVersion=i;break;}}}}else if(agent.indexOf("msie")!=-1&&parseInt(navigator.appVersion)>=4&&agent.indexOf("win")!=-1&&agent.indexOf("16bit")==-1){var doc='<scr'+'ipt language="VBScript"\>\n';doc+='On Error Resume Next \n';doc+='Dim obFlash \n';doc+='For i='+latestFlashVersion+' To 3 Step -1 \n';doc+='Set obFlash=CreateObject("ShockwaveFlash.ShockwaveFlash."&i)\n';doc+='If IsObject(obFlash) Then \n';doc+='flashVersion=i \n';doc+='Exit For \n';doc+='End If \n';doc+='Next \n';doc+='</script>\n';document.write(doc);} else{flashVersion=flashVersion_DONTKNOW;}return flashVersion;}flashVersion_DONTKNOW=-1;function flasher(flashfile,statik,minver,height,width,alt){var flashVersion=getFlashVersion();if(flashVersion>=minver){document.write('<object type="application/x-shockwave-flash" data="' + flashfile + '" width="' + width + '" height="' + height + '">');document.write('<param name="movie" value="' + flashfile + '" /><param name="wmode" value="transparent" />');document.write('<img src="' + statik + '" width="' + width + '" height="' + height + '" alt="' + alt + '" title="" />');document.write(' </object>');}else{document.write('<img src="' + statik + '" width="' + width + '" height="' + height + '" alt="' + alt + '" title="" />');}}


//Handle hiding or showing the current id
function ShowOrHideTable(sTheID,iStep) {

	if ( document.getElementById(sTheID).style.display == "" )  {
		document.getElementById(sTheID).style.display = "none";
	}
	else {
		HideAll("Location_");
		document.getElementById(sTheID).style.display = "";
	}
}

function HideAll(sPrefix) {

	var oTags = document.getElementsByTagName("*");
	var iPrefixLength = sPrefix.length;

	//Loop through the entire document looking at each tag
	for (var i = 0; i < oTags.length; i++) {
		//If the current tag supports having an ID, continue
		if ( oTags[i].id ) {
			//If the current tag has an ID, continue
			if ( oTags[i].id.length > iPrefixLength ) {
				//Check to see if the current ID is prefixed with what we are trying to hide
				if ( oTags[i].id.substring(0,iPrefixLength) == sPrefix ) {
					document.getElementById(oTags[i].id).style.display = "none";
				}
			}
		}
	}
}

//image popup script
var newwindow;
var wheight = 0, wwidth = 0;

function popup(url, title, iwidth, iheight, colour) {
var pwidth, pheight;

if ( !newwindow || newwindow.closed ) {
pwidth=iwidth+30;
pheight=iheight+65;
newwindow=window.open('','htmlname','width=' + pwidth +',height=' + pheight + ',resizable=0,top=50,left=10');
wheight=iheight;
wwidth=iwidth;
}

if (wheight!=iheight || wwidth!=iwidth ) {
pwidth=iwidth+30;
pheight=iheight+90;
newwindow.resizeTo(pwidth, pheight);
wheight=iheight;
wwidth=iwidth;
}

newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
newwindow.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" >');
newwindow.document.writeln('<\/center> ');
newwindow.document.writeln('<br /><a href="javascript:window.close()">Close this window</a><\/body> <\/html>');
newwindow.document.close();
newwindow.focus();
}

//html popup script
var newwindow;
var wheight = 0, wwidth = 0;

function popitup6(url, title, iwidth, iheight, colour) {
var pwidth, pheight;

if ( !newwindow || newwindow.closed ) {
pwidth=iwidth+30;
pheight=iheight+30;
newwindow=window.open(url,'htmlname','width=' + pwidth +',height=' + pheight + ',resizable=0,top=50,left=10');
wheight=iheight;
wwidth=iwidth;
}

if (wheight!=iheight || wwidth!=iwidth ) {
pwidth=iwidth+30;
pheight=iheight+90;
newwindow.resizeTo(pwidth, pheight);
wheight=iheight;
wwidth=iwidth;
}

newwindow.document.clear();
newwindow.focus();
newwindow.document.close();
newwindow.focus();
}