<!--//

var currentPopup = false;

function showLayer(id) {
	if (currentPopup) hideLayer(currentPopup);
	var o = document.all.item(id);
	o.style.visibility = "visible";
	currentPopup = id;
}

function hideLayer(id) {
	var o = document.all.item(id);
	o.style.visibility = "hidden";
}

// Returns html for text in a pop-up box
function textPopBox(text) {
	var returnString = "<table border=0 cellspacing=0 cellpadding=0 width=325>" +
		"<tr align=left valign=top>" +
		"<td><img src=/_img/corner_sm_top-left_gray.gif width=8 height=8></td>" +
		"<td background=images/expandable_top_gray.gif><img src=/_img/expandable_top_gray.gif width=325 height=8></td>" +
		"<td><img src=/_img/corner_sm_top-right_gray.gif width=8 height=8></td>" +
		"</tr>" +
		"<tr align=left valign=top>" +
		"<td background=/_img/expandable_left_gray.gif height=100%><img src=/_img/expandable_left_gray.gif width=8 height=29 height=100%></td>" +
		"<td valign=middle bgcolor=#CCCCCC>" +
		"<table border=0 width=100% cellspacing=0 cellpadding=0 valign=top><tr><td align=right colspan=3 valign=top>" +
		"<img src='/_img/gray-close-box.gif' border=0  onclick=if(currentPopup)hideLayer(currentPopup) onmouseover=\"this.src='/_img/gray-close-box-over.gif'\" onmouseout=\"this.src='/_img/gray-close-box.gif'\" style=cursor:hand></td></tr>" +
		"<tr><td width=8>&nbsp;</td><td style=font-size:8pt;font-weight:bold;color:000000;font-family:Arial,Helvetica,sans-serif>";
	returnString += text;
	returnString += "</td><td width=8>&nbsp;</td></tr><tr><td colspan=3>&nbsp;</td></tr></table></td>" +
		"<td background=/_img/expandable_right_gray.gif height=100%><img src=/_img/expandable_right_gray.gif width=8 height=29 height=100%></td>" +
		"</tr>" +
		"<tr align=left valign=top>" +
		"<td><img src=/_img/corner_sm_bottom-left_gray.gif width=8 height=8></td>" +
		"<td background=/_img/expandable_bottom_gray.gif><img src=/_img/expandable_bottom_gray.gif height=8></td>" +
		"<td><img src=/_img/corner_sm_bottom-right_gray.gif width=8 height=8></td>" +
		"</tr>" +
		"</table>";
	return returnString;
}

//Change text 
function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function setTextOfPopUp(objName,newText) { //v4.01
  if ((obj=findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(textPopBox(newText))); document.close();}
    else innerHTML = unescape(textPopBox(newText));
}

function buildFlash(swfFile){
	var flash = "";
	flash += "<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=\"785\" height=\"95\" id=\"flashObject\" align=\"middle\">";
	flash += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
	flash += "<param name=\"movie\" value=\""+swfFile+"\" />";
	flash += "<param name=\"quality\" value=\"high\" />";
	flash += "<param name=\"bgcolor\" value=\"#ffffff\" />";
	flash += "<embed src=\""+swfFile+"\" quality=\"high\" bgcolor=\"#ffffff\" width=\"785\" height=\"95\" name=\"flashObject\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
	flash += "</object>";
	document.write(flash);
}


function writeFlash(movieLocation,width,height){
  document.write('<object id="flashmast" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+movieLocation+'" /><param name="quality" value="high" /><param name="wmode" value="transparent"><embed id="flashembed" src="'+movieLocation+'" quality="high" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'"></embed></object>');
}


function importXMLTOC(file)
{
	if (document.implementation && document.implementation.createDocument)
	{
		xmlDoc = document.implementation.createDocument("", "", null);
		xmlDoc.onload = createTable;
	}
	else if (window.ActiveXObject)
	{
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.onreadystatechange = function () {
			if (xmlDoc.readyState == 4) createTable()
		};
 	}
	else
	{
		alert('Your browser can\'t handle this script');
		return;
	}
	xmlDoc.load(file);
}

function createLinkForward(thisPage)
{
}
/*
{
	var x = xmlDoc.getElementsByTagName('screens');
	
	// Find the current page
	for (i=0;i<x.length;i++)
	{
		document.write x
		for (j=0;j<x[i].childNodes.length;j++)
		{
			if (x[i].childNodes[j].nodeType != 1) continue;
			//var container = document.createElement('TD');
			var theData = document.createTextNode(x[i].childNodes[j].firstChild.nodeValue);
		}
		tmp.appendChild(row);
	}
	//document.getElementById('writeroot').appendChild(newEl);
}
*/


//-->
