function GetUrlParam(name) {
	// http://www.11tmr.com/11tmr.nsf/D6Plinks/MWHE-695L9Z
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if ( results == null )
		return ( null );
	else
		return ( results[1] );
} // end GetUrlParam

function ListLeftPanelLinks(lang) {
	var szSelected = " style=\"background:url(dnfiles/scImages/bullet_gold.gif) no-repeat -1px 4px;\"";
	var url = document.location.href;
	var szHome = "Home";
	var szAbout = "About Us";
	var szServices = "Services";
	var szContact = "Contact Us";
	var szDownload = "Download Delta";
	if ( lang == 'spanish' ) {
		szHome = "Hogar";
		szAbout = "Sobre Nosotros";
		szServices = "Servicios";
		szContact = "Contacto";
		szDownload = "Transferencia Directa";
	} // end if
	if ( !url ) url = ""; else url = url.toLowerCase();
	if ( url.indexOf("loc=home") > 0 ) sel = szSelected; else sel = "";
	document.write("<LI"+sel+"><A href=\"index.php?loc=home\">"+szHome+"</A>&nbsp; &nbsp</LI>"); // the &nbsp; is necessary for PutLeftNavOnTop() to work.
	if ( url.indexOf("loc=about") > 0 ) sel = szSelected; else sel = "";
	document.write("<LI"+sel+"><A href=\"index.php?loc=about\">"+szAbout+"</A>&nbsp; &nbsp</LI>");
	if ( url.indexOf("loc=service") > 0 ) sel = szSelected; else sel = "";
	document.write("<LI"+sel+"><A href=\"index.php?loc=service\">"+szServices+"</A>&nbsp; &nbsp</LI>");
	if ( url.indexOf("loc=contact") > 0 ) sel = szSelected; else sel = "";
	document.write("<LI"+sel+"><A href=\"index.php?loc=contact\">"+szContact+"</A>&nbsp; &nbsp</LI>");
	document.write("<LI><A href=\"javascript:ShowDownloadPopup();\">"+szDownload+"</A>&nbsp; &nbsp</LI>");
} // end ListMainLinks()

function PutLeftNavOnTop(bOnTop) {
	// This is used by the golf drop down to keep the navigation clickable over the swf.
	var subnav = document.getElementById('leftnav');
	if ( !subnav ) return;
	subnav = subnav.getElementsByTagName('LI');
	if ( !subnav ) return;
	for ( var idx = 0; idx < subnav.length; idx++ ) {
		var alink = subnav[idx].getElementsByTagName('A');
		if ( alink ) {
			if ( bOnTop ) {
				alink[0].style.position = 'absolute';
				alink[0].style.zIndex = '9999';
				alink[0].style.paddingTop = '1pt'; // fixes an alignment prob with firefox (doesn't effect ie.)
			} else {
				alink[0].style.position = 'static';
				alink[0].style.zIndex = '2';
				//alink[0].style.paddingTop = '0px';
			} // end else
		} // end if
	} // end for idx
	// MUST return nothing since this is called from swf with getURL()!
	return;
} // end PutLeftNavOnTop()

function SayHello(maxtimes) {
	// This function must be called from the <HEAD> in order to work.
	// If 'maxtimes' is >=0 then the sound will only be played if the user has visited the site less than 'maxtimes' times.
	// If 'maxtimes' is 0, nothing will be done.
	// If -1, the sound will always be played.
	// This is tracked using a cookie.
	var iNumVisits = ParseIntAlways(GetCookie('NumVisits'), 10);
	if ( !maxtimes ) maxtimes = 0;
	if ( iNumVisits < maxtimes || maxtimes < 0 )
		document.write("<bgsound src=\"dnfiles/hello.wav\" loop=1>");
	iNumVisits++;
	SetCookie('NumVisits', iNumVisits.toString(), 'never');
} // end SayHello()

// Move the reporting eyeball when the cursor is moved over it.
var g_EyePos = 0;
var g_EyeTimer = null;
var g_bWasEyeClicked = false;
var g_bStraightenEye = false;
function MoveEye(bStraighten) {
	var oImgEye = document.getElementById('ReporterEye');
	if ( !oImgEye ) return;
	if ( g_EyeTimer ) clearTimeout(g_EyeTimer);
	g_bStraightenEye = bStraighten;
	if ( bStraighten || g_bWasEyeClicked ) {
		if ( g_EyePos < 3 ) {
			g_EyePos++;
			oImgEye.style.backgroundPosition = (g_EyePos * -24).toString() + "px" + " 0px";
			g_EyeTimer = setTimeout(function(){MoveEye(g_bStraightenEye);}, 72);
		} // end if
	} else {
		if ( g_EyePos > 0 ) {
			g_EyePos--;
			oImgEye.style.backgroundPosition = (g_EyePos * -24).toString() + "px" + " 0px";
			g_EyeTimer = setTimeout(function(){MoveEye(g_bStraightenEye);}, 72);
		} // end if
	} // end else
} // end MoveEye()
function EyeClicked() {
	g_bWasEyeClicked = true;
} // end EyeClicked();


// Validate the session id when one is entered.  Also allow enter to be pressed rather than having to press GO.
function trimStr(str) {
	if ( !str )
		return ( null );
	return str.replace(/^\s+|\s+$/g,"");
} // end trimStr()
function DoSessionId() {
	k = document.getElementById("sessionidinput").value;
	k = trimStr(k);
	if ( !k || k.length <= 1 || k.match(/(\s)/gi) ) // The session id must be more than 1 character and cannot contain any white space characters.
		alert("Please enter a valid Session Id.");
	else
		window.location = "http://www.paula2.com/LiveDemo/?SessionId="+k+"&unq="+TimeGetTime();
	return;
} // end DoSessionId()
// enter key handler
function handleEnterKey(evt) {
	evt = (evt) ? evt : window.event;
	var charCode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);
	if ( charCode == 13 ) { // <ENTER> key
		DoSessionId();
		return false;
	} // end if
} // end handleEnterKey()

function CreateShade(bCreate) {
	// This function creates the shadow at the bottom of the page.
	var border = RUZEE.ShadedBorder.create({ shadow:9 });
	if ( border ) {
		if ( typeof(bCreate) != "undefined" && (bCreate == 0 || bCreate == false || bCreate == "false") ) {
			// Remove the shadow.
			border.render('ftcap', true);
		} else {
			// Create the shadow.
			border.render('ftcap');
		} // end else
	} // end if
	border = null;
} // end CreateShade()

var g_bAllowDownloadPopupHomePage = false;
var g_bAllowDownloadPopup = false;
var g_bIsHomePage = false;
var g_dwStartWaitTimeForDownloadPopup = 0;

function SetHomePageFlag() {
	g_bIsHomePage = true;
} // end SetHomePageFlag()

function AllowDownloadPopup() {
	// This function is called after the page is fully loaded, only after which may the download popup be displayed.
	g_bAllowDownloadPopup = true;
} // end AllowDownloadPopup()

function AllowDownloadPopupHomePage() {
	g_bAllowDownloadPopupHomePage = true;
} // end AllowDownloadPopupHomePage()

// These functions are for dimming the main screen when the Downloads popup is displayed.
function ShowDownloadPopup(bGotoCreateLogin) {
	// Is the page entirely loaded?
	if ( (g_bAllowDownloadPopup && (!g_bIsHomePage || g_bAllowDownloadPopupHomePage)) || (g_dwStartWaitTimeForDownloadPopup && TimeGetTime() - g_dwStartWaitTimeForDownloadPopup > 7777) ) {
		g_dwStartWaitTimeForDownloadPopup = 0;
		ShowDownloadPopupSub(bGotoCreateLogin);
		return;
	} // end if
	// Don't wait too long.
	if ( !g_dwStartWaitTimeForDownloadPopup )
		g_dwStartWaitTimeForDownloadPopup = TimeGetTime();
	// Keep waiting for all required components to load.
	setTimeout(function(){ShowDownloadPopup(bGotoCreateLogin);}, 777);
} // end ShowDownloadPopup()
function ShowDownloadPopupSub(bGotoCreateLogin) {
	if ( typeof(HideAllBalloonTips) == 'function' ) HideAllBalloonTips();
	if ( typeof(hideDialog) == 'function' ) hideDialog();
	if ( typeof(bGotoCreateLogin) == 'undefined' ) bGotoCreateLogin = false;
	ActivateDownloadPopup(true, bGotoCreateLogin);
} // end ShowDownloadPopupSub()
function ClearDownloadPopup() {
	ActivateDownloadPopup(false, 0);
} // end ClearDownloadPopup()
function ActivateDownloadPopup(bShow, bGotoCreateLogin) {
	if ( bShow ) {
		DimBackgroundPage(true);
		DisplayDownloadPopup(true, 1200, bGotoCreateLogin, 0);
	} else {
		DisplayDownloadPopup(false, 0, bGotoCreateLogin, 0);
		setTimeout(function(){DimBackgroundPage(false);}, 777);
	} // end else
} // end ActivateDownloadPopup()
function DimBackgroundPage(bDim) {
	// Darkens the whole web page.
try {
	var szDimmedBackgroundColor = "#222222"; // NOTE: there is a place in core.css where this will need to be changed too if modified here.
	popupDiv = document.getElementById('DownloadPopup');
	popupFrame = document.getElementById('DownloadPopupIframe');
	mainDiv = document.getElementById('AllContent');
	backDiv = document.getElementById('gradient-background');

	// Darken the main screen.
	if ( bDim ) {
		// Set the background to a dark grey.
		this.szOldBackColor = backDiv.style.backgroundColor;
		backDiv.style.backgroundColor = szDimmedBackgroundColor;
		// Remove the background gradient image.
		this.szInnerBackingHTML = backDiv.innerHTML; // <img src="dnfiles/Background.png" width="100%" height="100%">
		backDiv.innerHTML = "";
	} else {
		// Restore the original background color.
		backDiv.style.backgroundColor = this.szOldBackColor;
		// Restore the background gradient image.
		backDiv.innerHTML = this.szInnerBackingHTML; // <img src="dnfiles/Background.png" width="100%" height="100%">
	} // end else

	if ( mainDiv ) {
		// http://www.w3schools.com/Css/css_image_transparency.asp
		//mainDiv.style.opacity=0.22;
		//mainDiv.filters.alpha.opacity=22; //"alpha(opacity=22)";
		//mainDiv.style.MozOpacity=0.22;
		// http://www.dynamicdrive.com/forums/showthread.php?t=6380
		if ( bDim )
			var degree = 22;
		else
			var degree = 100;
		if ( mainDiv.filters && mainDiv.filters.alpha ) {
			mainDiv.filters.alpha.opacity=degree;
			if ( bDim )
				CreateShade(false); // The shadow must be removed for opacity to work correctly with IE.
			else
				CreateShade(true); // Restore the shadow.
			// In IE, the footer and header need to be dimmed seperately because of "relative" positioning and also because of the shadow.
			try {
				// Footer
				upperFooterDiv = document.getElementById('ftwrap');
				lowerFooterDiv = document.getElementById('ftcapForOpacity');
				upperFooterDiv.filters.alpha.opacity=degree;
				lowerFooterDiv.filters.alpha.opacity=degree;
				// Header
				titleBarDiv = document.getElementById('masthead');
				globalNavDiv = document.getElementById('globalnav');
				globalNavDiv.filters.alpha.opacity=degree;
				titleBarDiv.filters.alpha.opacity=degree;
			} catch(e) {}
		} // end if
		if (mainDiv.style.MozOpacity)
			mainDiv.style.MozOpacity=degree/101;
		if (mainDiv.style.KhtmlOpacity)
			mainDiv.style.KhtmlOpacity=degree/100;
		if (mainDiv.style.opacity)
			mainDiv.style.opacity=degree/101;

		// Hide all flash objects that are not opaque or transparent: window type will not fade!
		var szVisibleState = 'visible';
		if ( degree < 80 )
			szVisibleState = 'hidden';
		for ( var objId in g_AllOpaqueSwf ) {
			var obj = document.getElementById(objId);
			if ( obj && g_AllOpaqueSwf[objId] )
				obj.style.visibility = szVisibleState;
		} // end for
	} // end if
} catch (e) { }
} // end DimBackgroundPage()
function DisplayDownloadPopup(bShow, bDelay, bGotoCreateLogin, bIsRecursiveCall) {
	// Shows the download popup.
	popupDiv = document.getElementById('DownloadPopup');
	popupFadeDiv = document.getElementById('DownloadPopupForFade');
	popupFrame = document.getElementById('DownloadPopupIframe');
/*
	if ( bIsRecursiveCall ) {
		try {
			if ( this.iCurOpacity < 100 ) {
				// function TimedMovementMaxInc(iStart, iDest, iInTimeMs, iTimeElapsed, iMaxInc, iPrevPos)
				this.iCurOpacity = TimedMovementMaxInc(1, 100, bDelay, TimeGetTime() - this.dwOpacityStartTime, 67, this.iCurOpacity);
			} // end if
		} catch (e) { this.iCurOpacity = 100; }
		if ( this.iCurOpacity >= 99 ) this.iCurOpacity = 100;
	} else {
		this.iCurOpacity = 1;
		this.dwOpacityStartTime = TimeGetTime();
	} // end else

	if ( bShow )
		var degree = this.iCurOpacity;
	else
		var degree = 22;

	if ( popupFadeDiv.filters && popupFadeDiv.filters.alpha )
		popupFadeDiv.filters.alpha.opacity=degree;
	//if (popupFadeDiv.style.MozOpacity)
		popupFadeDiv.style.MozOpacity=degree/101;
	//if (popupFadeDiv.style.KhtmlOpacity)
		popupFadeDiv.style.KhtmlOpacity=degree/100;
	//if (popupFadeDiv.style.opacity)
		popupFadeDiv.style.opacity=degree/101;

	if ( this.iCurOpacity < 100 )
		setTimeout(function(){DisplayDownloadPopup(bShow, bDelay, bGotoCreateLogin, true);}, 22);
*/
	// Fading is too slow so I just show or hide instead.
	if ( bIsRecursiveCall ) {
		// Now that the delay has elapsed, completely show or hide the popup.
		if ( bShow ) {
			FadeObj(popupFrame, 100);
			FadeObj(popupFadeDiv, 100);
			CloseIframeWhenFlagged();
			// Hide drop down boxes that do not dim in IE6.
			HideNonFadersIE6(true);
		} else {
			FadeObj(popupFadeDiv, 0);
			//popupDiv.style.display = "none";
			popupDiv.style.visibility = "hidden";
			HideNonFadersIE6(false);
		} // end else
	} else {
		if ( bShow ) {
			// Visibility must be set to visible for the iframe page to work correctly.
			// So initially set it to visible with complete transparency.
			popupFrame.setAttribute("allowtransparency", "true");
			popupFadeDiv.setAttribute("allowtransparency", "true");
			//popupDiv.style.display = "block";
			FadeObj(popupFrame, 0);
			FadeObj(popupFadeDiv, 0);
			popupDiv.style.visibility = "visible";
			if ( bGotoCreateLogin )
				szSrc = "/download/login2.php5?createlogin=1&popup=true";
			else
				szSrc = "/download/login2.php5?popup=true";
			// 2009-06-29: This must be set every time since I cannot figure out any other way to clear the ghost "InvalidLogin=true" that results in "INVALID LOGIN" never going away.
			//             This was also causing a prob in IE where sometimes the popup would not appear.
			//// Prevent the popup from needlessly refreshing and blinking by setting the src only if it hasn't already been set.
			//if ( !popupFrame.src || popupFrame.src.length <= 2 || popupFrame.src.indexOf(szSrc) < 0 || popupFrame.src.indexOf("InvalidLogin") > 0 || popupFrame.src.indexOf("closethisiframe") > 0 )
				popupFrame.src = szSrc;
		} // end if
		setTimeout(function(){DisplayDownloadPopup(bShow, bDelay, bGotoCreateLogin, true);}, bDelay);
	} // end else
} // end DisplayDownloadPopup()
function FadeObj(obj, degree) {
	if ( obj.filters && obj.filters.alpha )
		obj.filters.alpha.opacity=degree;
	obj.style.MozOpacity=degree/101;
	obj.style.KhtmlOpacity=degree/100;
	obj.style.opacity=degree/101;
} // end FadeDiv()
function CloseIframeWhenFlagged() {
	// If the DownloadPopupIframe url ever contains the string "closethisiframe", then the iframe will be closed and the searching stopped.
	try {
		if ( typeof(this.iFrameIdx) == 'undefined' ) {
			// Find the download popup iframe index.
			this.iFrameIdx = 0;
			try {
				while ( 1 ) {
					// Don't search too far.
					if ( this.iFrameIdx > 22 || typeof(window.frames[this.iFrameIdx]) == 'undefined' ) {
						this.iFrameIdx = 0;
						break;
					} // end if
					if ( window.frames[this.iFrameIdx].name == 'DownloadPopupIframe' || window.frames[this.iFrameIdx].id == 'DownloadPopupIframe' ) {
						// the iframe has been found.
						break;
					} // end if
					this.iFrameIdx++;
				} // end while
			} catch (e) { this.iFrameIdx = 0; }
		} // end if
		var szURL = window.frames[this.iFrameIdx].location.href.toLowerCase();
		var dwCurTime = TimeGetTime();
		if ( szURL.indexOf('closethisiframe') > 0 || // login2.php5 sets "#closethisiframe215463174" (with the number being TimeGetTime()) in the iframe's url when it needs to be closed.
		     szURL.indexOf('blank') > 0 ) { // FireFox sets the location to "about:blank" when browser back is pressed.
			// However, this (especially 'blank') will also exist until the page begins to load.
			// Therefore, make sure the page has existed recently before accepting this 'blank' which could be the page preloading.
			if ( (this.dwLastTimeNotBlank && dwCurTime - this.dwLastTimeNotBlank > 2000 && dwCurTime - this.dwLastTimeNotBlank < 10000) || (this.szFirstCloseThisFrame && szURL != this.szFirstCloseThisFrame) ) {
				// The page URL is currently 'about:blank', but was not just a few seconds ago.
				this.dwLastTimeNotBlank = 0;
				this.szFirstCloseThisFrame = null;
				window.frames[this.iFrameIdx].location.href = window.frames[this.iFrameIdx].location.href.substring(0, szURL.lastIndexOf("#closethisiframe"));
				if ( window.frames[this.iFrameIdx].location.href.indexOf("#closethisiframe") > 0 )
					window.frames[this.iFrameIdx].location.href = window.frames[this.iFrameIdx].location.href.substring(0, szURL.indexOf("#closethisiframe"));
				ClearDownloadPopup();
				return;
			} // end if
		} /*else {
			// Test: I need to see how location changes when back is pressed from various browsers.
			if ( !this.lasttime || TimeGetTime() - this.lasttime > 4000 ) {
				var szStr = new String();
				szStr = window.frames[this.iFrameIdx].location.href;
				alert(szStr);
				this.lasttime = TimeGetTime();
			} // end if
		} // end else*/
		// Keep track of the previously caught URL so that 'about:blank' can accurately be detected.
		if ( szURL && szURL.length > 7 && szURL.indexOf('blank') < 0 && szURL.indexOf('closethisiframe') < 0 && (szURL.indexOf('download') > 0 || szURL.indexOf('login') > 0) ) {
			// Don't reset the last time stamp unless it needs to be.
			// This way it is always close to the 2 second age mark so that the detection condition above will immediately close the window if possible rather than waiting up to 2 seconds for the URL to age.
			if ( this.dwLastTimeNotBlank && dwCurTime - this.dwLastTimeNotBlank < 7000 )
				this.dwLastTimeNotBlank = dwCurTime - 2000;
			else
				this.dwLastTimeNotBlank = dwCurTime;
		} else if ( szURL.indexOf('closethisiframe') > 0 ) {
			// The current time is appended to closethisiframe everytime close is pressed.
			// This is necessary so that if close is pressed before a non blank url can be detected, the window will still close.
			if ( !this.szFirstCloseThisFrame )
				this.szFirstCloseThisFrame = szURL;
		} // end else if
	} catch (e) { this.dwLastTimeNotBlank = 0; }
	// Keep in mind that this increment should not be incresed to more than a 3rd of a second because of the browser back hack in login2.php5
	setTimeout(CloseIframeWhenFlagged, 222);
} // end CloseIframeWhenFlagged()

function AddEvent(obj,evt,fn) {
	// EXAMPLE: AddEvent(window, 'resize', HandleResizing);
	if ( document.addEventListener )
		obj.addEventListener(evt,fn,false);
	else if ( document.attachEvent )
		obj.attachEvent('on'+evt,fn);
} // end AddEvent()

var g_AllOpaqueSwf = new Array();

function EmbedSWF(szID, szUrl, szBGColor, bTransparent, iWidth, iHeight, iVer) {
	// szID and szUrl are required parameters.
	// Use szBGColor == "PreloadHidden" for preloading an swf into a hidden container.
	try {
	var szBaseUrl = szUrl.substring(0,szUrl.lastIndexOf("/") + 1);

	// 2009-04-21: Allow szBGColor to be set to "PreloadHidden" in order to setup for a hidden div preload.
	if ( szBGColor && szBGColor.toLowerCase() == "preloadhidden" ) {
		szBGColor = "222222"; // IE must have a BG color for an swf to load into a hidden div.
		bTransparent = 0; // Must be a windowed swf too.
		iWidth = '22'; // dimensions don't matter.
		iHeight = '22';
		iVer = 8;
	} // end if

	if ( !iVer ) iVer = 9;
	if ( !szBGColor ) szBGColor = 'none';

	// IE does some sort of wierd scaling with flash to keep them on even pixel boundaries. Increase the banner widths by a pixel since a pixel over looks much better than a pixel short.
	DetectBrowserVersion();
	if ( g_BrowserName == "IE" && g_BrowserVersion >= 7 && szID.toLowerCase().indexOf('banner') >= 0 )
		iWidth++;

	if ( !iWidth )
		szWidth = 'auto';
	else
		szWidth = iWidth.toString()+"px";

	if ( !iHeight )
		szHeight = 'auto';
	else
		szHeight = iHeight.toString()+"px";

	if ( bTransparent )
		wMode = GetSwfWMode('transparent');
	else
		wMode = GetSwfWMode('Window');

	// Keep track of all opaque swf for special processing during screen fading.
	var swfobj = document.getElementById(szID);
	if ( g_BrowserName == "IE" && g_BrowserVersion <= 6 && swfobj && (swfobj.style.position == 'relative' || swfobj.style.position == 'absolute' || swfobj.parentNode.style.position == 'relative' || swfobj.parentNode.style.position == 'absolute') ) {
		// IE6 does not dim swf divs even if they are transparent if they are not inline.
		g_AllOpaqueSwf[szID] = true;
	} else if ( bTransparent ) {
		// This swf is transparent so no special processing will be needed.
		g_AllOpaqueSwf[szID] = false;
	} else {
		// This sef is opaque so flag it as needing special processing.
		g_AllOpaqueSwf[szID] = true;
	} // end else

	// Parameters Reference: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701&sliceId=2
	// Parameters Reference Adobe: http://livedocs.adobe.com/flex/3/html/help.html?content=wrapper_13.html
	// Note: http://www.html4.com/mime/markup/php/accessibility_en/other_alternates_en/other_alternates_3.php
	// JavaScript Method: http://www.jeroenwijering.com/?item=Embedding_Flash
	var flashvars_EmbedSWF = { g_language: g_language };
	var params_EmbedSWF = {
		quality: 'high',
		Base: szBaseUrl,
		Scale: 'exactfit',
		bgcolor: szBGColor,
		WMode: wMode,
		Play: 'true',
		Loop: 'true',
		Menu: 'false',
		AllowFullScreen: 'false',
		AllowScriptAccess: 'always',
		DeviceFont: 'false',
		EmbedMovie: 'false',
		standby: 'Loading...',
		classid: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
		pluginspage: 'http://www.macromedia.com/go/getflashplayer'
	};
	var attributes_EmbedSWF = {
	  id: szID,
	  name: szID
	};
	swfobject.embedSWF(szUrl, szID, szWidth, szHeight, iVer.toString()+".0.0", "/report/js/swfobject2.swf", flashvars_EmbedSWF, params_EmbedSWF, attributes_EmbedSWF);
	} catch (e) { alert("ERROR: Failed to add " + szUrl.substr(szUrl.lastIndexOf("/") + 1) + "!"); }
} // end EmbedSWF()

function HideNonFadersIE6(bHide) {
	// IE 6 doesn't z-order drop down boxes correctly, so they will need to be toggled so they don't show through the dialog box.
	var iCount = 0;
	if ( g_BrowserName == "IE" && g_BrowserVersion <= 6 ) {
		var allDrops = document.getElementsByTagName('select');
		if ( !allDrops ) return ( 0 );
		for ( var idx = 0; idx < allDrops.length; idx++ ) {
			obj = allDrops[idx];
			if ( bHide )
				obj.style.visibility = 'hidden';
			else
				obj.style.visibility = 'visible';
			iCount++;
		} // end for idx
	} // end if
	return ( iCount );
} // end HideNonFadersIE6()

function GetSwfWMode(szModeRequested) {
	DetectBrowserVersion();
	if ( szModeRequested == "Window" ) {
		if ( g_BrowserName == "FF" && g_BrowserVersion <= 2 )
			return ( "transparent" );
	} else if ( szModeRequested == "transparent" ) {
	} // end else if
	return ( szModeRequested );
} // end GetSwfWMode()

var g_BrowserName = "N/A"; // IE, FF, Opera, or Safari
var g_BrowserVersion = 0;
function DetectBrowserVersion() {
	// http://www.javascriptkit.com/javatutors/navigator.shtml
	if ( !this.bHasBrowserBeenDetected ) {
		if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) { //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
			var ffversion=new Number(RegExp.$1); // capture x.x portion and store as a number
			// Should be 1, 2, or 3
			g_BrowserVersion = ffversion;
			g_BrowserName = "FF";
			this.bHasBrowserBeenDetected = true;
		} else if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;
			var ieversion=new Number(RegExp.$1); // capture x.x portion and store as a number
			// Should be 5, 6, 7, or 8
			g_BrowserVersion = ieversion;
			g_BrowserName = "IE";
			this.bHasBrowserBeenDetected = true;
		} else if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)) { //test for Opera/x.x or Opera x.x (ignoring remaining decimal places);
			var oprversion=new Number(RegExp.$1); // capture x.x portion and store as a number
			// Should be 7, 8, 9, or 10
			g_BrowserVersion = oprversion;
			g_BrowserName = "Opera";
			this.bHasBrowserBeenDetected = true;
		} else if (/Safari[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
			var safariversion=new Number(RegExp.$1); // THIS HAS NOT BEEN TESTED!
			g_BrowserVersion = safariversion;
			g_BrowserName = "Safari";
			this.bHasBrowserBeenDetected = true;
		} else {
			if ( !this.bHasWarnedBadBrowser ) {
				this.bHasWarnedBadBrowser = true;
				alert("Warning: Browser version could not be detected!");
			} // end if
			g_BrowserVersion = 0;
			g_BrowserName = "N/A";
		} // end else
	} // end if
} // end DetectBrowserVersion()

function RequestDownload() {
	// This is called by Golf.swf and who knows who else.
	ShowDownloadPopup();
} // end RequestDownload()

function RemovePX(str) {
	// This was copied from RemoveAppendedPX() in balloontip.js
	// Removes the "px" from "22px" and returns the result as a number.
	var idx = str.toLowerCase().indexOf('px');
	if ( idx == 0 )
		return ( 0 );
	else if ( idx > 0 )
		return ( -(0 - str.substring(0, idx)) );
	return ( -(0 - str) );
} // end RemoveAppendedPX()





/////////////////////////////////////////////////////////////
// Menu stuff
function getposOffset(what, offsettype) {
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	} // end while
	return totaloffset;
} // end getposOffset()

function showhide(obj, e, visible, hidden, menuwidth) {
	if (ie4||ns6) dropmenuobj.style.left=dropmenuobj.style.top="-500px";

	if ( menuwidth!="" ) {
		dropmenuobj.widthobj=dropmenuobj.style
		dropmenuobj.widthobj.width=menuwidth
	} // end if

	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
		obj.visibility=visible
	else if (e.type=="click")
		obj.visibility=hidden
} // end showhide()

function iecompattest() {
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
} // end iecompattest()

function clearbrowseredge(obj, whichedge) {
	var edgeoffset=0
	if (whichedge=="rightedge") {
		var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15;
		dropmenuobj.contentmeasure = dropmenuobj.offsetWidth;
		if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
			edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth;
	} else {
		var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset;
		var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;

		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) { //move up?
			edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
			if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
				edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
		} // end if
	} // else
	return edgeoffset
} // end clearbrowseredge()

function populatemenu(what) {
	if (ie4||ns6) dropmenuobj.innerHTML = what.join("");
} // end populatemenu()

function dropdownmenu(obj, e, menucontents, menuwidth) {
	if (window.event)
		event.cancelBubble=true;
	else if (e.stopPropagation)
		e.stopPropagation();

	clearhidemenu();

	dropmenuobj = document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv

	populatemenu(menucontents);

	if (ie4||ns6) {
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth);
		dropmenuobj.x = getposOffset(obj, "left");
		dropmenuobj.y = getposOffset(obj, "top");
		dropmenuobj.style.left = dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px";
		dropmenuobj.style.top = dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px";
	} // end if

	return clickreturnvalue()
} // end dropdownmenu

function clickreturnvalue() {
	if (ie4||ns6)
		return false
	else
		return true
} // end clickreturnvalue()

function contains_ns6(a, b) {
	while (b.parentNode)
		if ((b = b.parentNode) == a)
			return true;
	return false;
} // end contains_ns6()

function dynamichide(e) {
	if (ie4&&!dropmenuobj.contains(e.toElement))
		delayhidemenu()
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhidemenu()
} // end dynamichide()

function hidemenu(e){
	if (typeof dropmenuobj!="undefined") {
		if (ie4||ns6)
			dropmenuobj.style.visibility = "hidden";
	} // end if
} // end hidemenu()

function delayhidemenu(){
	if (ie4||ns6)
		delayhide = setTimeout("hidemenu()",disappeardelay);
} // end delayhidemenu()

function clearhidemenu(){
	if (typeof delayhide!="undefined")
		clearTimeout(delayhide);
} // end clearhidemenu()

function SelectUSA() {
	document.getElementById("LanguageSelected").innerHTML = "<a class='MenuItemLinkSelected' href='#' style='text-decoration:none' ><IMG width='17' SRC='dnfiles/USD_flag.gif' class='Flag' border='0'/>  <span style='color:#000'>American English</span></a> ";
	SetCookie('country', 'USA', '1day');
	location.reload(true);
}
function SelectCAD() {
	document.getElementById("LanguageSelected").innerHTML = "<a class='MenuItemLinkSelected' href='#' style='text-decoration:none' ><IMG width='17' SRC='dnfiles/CAD_flag.gif' class='Flag' border='0'/>  <span style='color:#000'>Canadian English</span></a> ";
	SetCookie('country', 'CAD', '1day');
	location.reload(true);
}
function SelectMEX() {
	document.getElementById("LanguageSelected").innerHTML = "<a class='MenuItemLinkSelected' href='#' style='text-decoration:none' ><IMG width='17' SRC='dnfiles/MEX_flag.gif' class='Flag' border='0'/>  <span style='color:#000'>Spanish</span></a> ";
	SetCookie('country', 'MEX', '1day');
	location.reload(true);
}
// End Menu Stuff
////////////////////////////////////////////////////////////////////////
