// image swapper
function changeImages() 
{
  if (document.getElementById) {
    for (var i = 0; i < changeImages.arguments.length; i += 2) { 
  		document.getElementById(changeImages.arguments[i]).src = eval(changeImages.arguments[i + 1] + ".src"); 
	}
  }
}

// preload level 1 buttons
var aBtn = new Array();
aBtn = ["","client-login","about-us","partners","news-events","contact-us","solutions","customers","global-regulations","support"];
for (i = 1; i < aBtn.length; i++) {
	eval("menu" + i + "on = new Image();");	eval("menu" + i + "off = new Image();");
	eval("menu" + (i) + "on.src = \"" + sFolderLevel + "/" + aBtn[i] + "-r.gif\";");
	eval("menu" + (i) + "off.src = \"" + sFolderLevel + "/" + aBtn[i] + "-0.gif\";");
	if (sSelectedButton == aBtn[i]) {
		eval("menu" + (i) + "off.src = \"" + sFolderLevel + "/" + aBtn[i] + "-r.gif\";");
	}
}

// Homepage Messages DHTML
function changeDisplayState(sBoxId)
{
	if (document.getElementById) {
		for (i = 1; i < 6; i++) {
			sBox = "message" + i;
			oBox = document.getElementById(sBox).style;
			oBox.display = "none";
		}
		oBox = document.getElementById(sBoxId).style;
		oBox.display = "block";
	}
}

/* This function is used when you want to have browsers that do not 
have flash player installed write an image file instead */

function writeFlashOrImage(FlashName,ImageName,Width,Height,Alt,FlashVersion) {
	// first, write the opening object tag

	strObjectTag = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
	strObjectTag = strObjectTag + ' width="' + Width + '" height="' + Height + '" ';
	strObjectTag = strObjectTag + 'codebase="http://active.macromedia.com/flash5/cabs/swflash.cab#version=';
	strObjectTag = strObjectTag + FlashVersion + '">';
	strMovieParam = '<param name="movie" value="' + FlashName + '">';
	document.write(strObjectTag);
	document.write(strMovieParam);
	document.write('<param name=\"play\" value=\"true\">');
	document.write('<param name=\"loop\" value=\"true\">');
	document.write('<param name=\"quality\" value=\"high\">');
	document.write('<param name=\"wmode\" value=\"transparent\">');

	// if the Flash Plug-in is installed and a browser than user plug-ins is the browser, write an embed tag
	plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		strImageTag = '<image src="' + ImageName + '" width="' + Width + '" height="' + Height + '" ';
		strImageTag = strImageTag + ' border="0" alt="' + Alt + '">';
	if ( plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 4 )
		{
		strEmbedTag = '<embed src="' + FlashName + '" width="' + Width + '" height="' + Height + '" ';
		strEmbedTag = strEmbedTag + 'play="true" loop="true" quality="high" ';
		strEmbedTag = strEmbedTag + 'wmode="transparent"';
		strEmbedTag = strEmbedTag + 'pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
		document.write(strEmbedTag);
		document.write('</embed>');
		}
	// otherwise, then write an image tag.
	else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write(strImageTag);
		}
	
	//finally, write the closing object tag
	document.write('</object>');
}
	
// image-swapping functions
function changeImage(imageName,newImageSource) {
		if (document.images) {
			document.images[imageName].src = newImageSource;
		}
	}

// quicklinks
function selectOffering() {
	var offering = document.offeringForm.offering.value;
	if (offering != "") {
		url = offering;
		location.href = url;
	}
}						
