<!--//--><![CDATA[//><!--

/*
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";														
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");									
				}
			}
		}
	}
}
window.onload=startList;
*/


//--><!]]>
// Sets default buttons.
// Originally created by Janus Kamp Hansen - http://www.kamp-hansen.dk
// Extended by Darrell Norton - http://dotnetjunkies.com/weblog/darrell.norton/ 
//   -- added Mozilla support, fixed a few issues, improved performance
//
//TGP - Extended to simulate __doPostBack
function fnTrapKD(btnID, event){
	btn = findObj(btnID);
	
	if (document.all){
		if (event.keyCode == 13){
			event.returnValue=false;
			event.cancel = true;
			//btn.click();
			eval("__doPostBack(\'" + btnID.replace(/_/g, "$") + "\',\'\');");
		}
	}
	else if (document.getElementById){
		if (event.which == 13){
			event.returnValue=false;
			event.cancel = true;
			//btn.focus();
			//btn.click();
			eval("__doPostBack(\'" + btnID.replace(/_/g, "$") + "\',\'\');");
		}
	}
	else if(document.layers){
		if(event.which == 13){
			event.returnValue=false;
			event.cancel = true;
			//btn.focus();
			//btn.click();
			eval("__doPostBack(\'" + btnID.replace(/_/g, "$") + "\',\'\');");
		}
	}
}

function findObj(n, d) { 
	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 leftNavMouseOver(parentID) {
	var linkArray = document.getElementById(parentID).getElementsByTagName("a");
	
	for (var i=0; i<linkArray.length; i++) {
		linkArray[i].className = linkArray[i].className + "_Over";
	}
}

function leftNavMouseOut(parentID) {
	var linkArray = document.getElementById(parentID).getElementsByTagName("a");
	for (var i=0; i<linkArray.length; i++) {
		var newClass = linkArray[i].className.split("_");
		linkArray[i].className = newClass[0];
	}
}


function LoadFlash(_Id, _FlashPath, _width, _height, _align, _WMode, _BGColor)
{
	var FlashMode=0;
		// check for flash 5, netscape compatible browsers and mac both 		
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		if (plugin) {
		// find version
			plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 9;
			FlashMode=1;			
		}
		// windows IE
		else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
		   && (navigator.platform == "Win95" || navigator.platform == "Win98" || navigator.platform == "WinNT" || navigator.platform == "Win32")) {
			
			document.writeln('<script language="VBScript"\> \n');
			document.writeln('on error resume next \n');
			document.writeln('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9")))\n');
			document.writeln('</script\> \n');
			FlashMode=1;
		}
		
		if(FlashMode != 0)
		{
			GetFlash(_Id, _FlashPath, _width, _height, _align, _WMode, _BGColor);
		}
		else
		{						
			document.writeln('Flash is required to view portions of this website. <br>Please click <a href="http://www.adobe.com/products/flashplayer/" class="white" target="_blank">here</a> to download the latest version of Flash Media player.');
		}
}


function GetFlash(_Id, _FlashPath, _width, _height, _align, _WMode, _BGColor)
{	
	document.write('<OBJECT id="'+_Id+'" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" type="application/x-shockwave-flash" height="'+_height+'" width="'+_width+'" align="'+_align+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>');
	document.write('<PARAM NAME="_cx" VALUE="4022">' + 
		'<PARAM NAME="_cy" VALUE="12674">' + 
		'<PARAM NAME="FlashVars" VALUE="">' + 
		'<PARAM NAME="Movie" VALUE="'+_FlashPath+'">' +
		'<PARAM NAME="Src" VALUE="'+_FlashPath+'">' +
		'<PARAM NAME="WMode" VALUE="'+_WMode+'">' + 
		'<PARAM NAME="Play" VALUE="-1">' +
		'<PARAM NAME="Loop" VALUE="-1">' + 
		'<PARAM NAME="Quality" VALUE="High">' + 
		'<PARAM NAME="SAlign" VALUE="">' + 
		'<PARAM NAME="Menu" VALUE="-1">' + 
		'<PARAM NAME="Base" VALUE="">' + 
		'<PARAM NAME="AllowScriptAccess" VALUE="always">' + 
		'<PARAM NAME="Scale" VALUE="ShowAll">' +
		'<PARAM NAME="DeviceFont" VALUE="0">' + 
		'<PARAM NAME="EmbedMovie" VALUE="0">' + 
		'<PARAM NAME="BGColor" VALUE="'+_BGColor+'">' + 
		'<PARAM NAME="SWRemote" VALUE="">' + 
		'<PARAM NAME="MovieData" VALUE="">' + 
		'<PARAM NAME="SeamlessTabbing" VALUE="1">' + 
		'<PARAM NAME="Profile" VALUE="0">' + 
		'<PARAM NAME="ProfileAddress" VALUE="">' + 
		'<PARAM NAME="ProfilePort" VALUE="0">' + 
	'<EMBED src="'+_FlashPath+'" Movie="'+_FlashPath+'" quality="high" bgcolor="'+_BGColor+'" WIDTH="'+_width+'" HEIGHT="'+_height+'" NAME="'+_Id+'" mode="'+_WMode+'" ALIGN="'+_align+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>');
	
}
