Event.observe(window,"load",flushPageViews,false);Event.observe(window,"load",flushDownloads,false);var hdDownloads=new Array();var hdPageViews=new Array();var msftXml=false;var sOpenMenuID="";var layerobject;var allobject;var dom;var activeMenu;var NavCount;var currentSection=null;var TopNavOnSrc=new Array();var TopNavOffSrc=new Array();var flashloaded=false;var timerId;var displayFlashArray=new Array();var displayFlashArrayNames=new Array();var flashMovieWithLinksArray=new Array();var itemWidth=139;var itemHeight=51;Event.observe(window,"load",preLoadNavImages,false);Event.observe(window.document,"mousemove",MMove,false);(document.layers)?layerobject=true:layerobject=false;(document.all)?allobject=true:allobject=false;(document.getElementById)?dom=true:dom=false;var objXML=null;try{objXML=new ActiveXObject("Msxml2.DOMDocument");objXML.validateOnParse=true;objXML.loadXML("<xml><test>TEST</test></xml>");if(objXML.parseError.errorCode==0){msftXml=true;}}catch(exc){objXML=null;}window.onerror=null;function preLoadNavImages(){if(getElement("globalnav_0_container",null)!=null&&getElement("globalnav_0_container",null).firstChild!=null){for(ctr=0;ctr<NavCount;ctr++){setTopNavPosition("navImg"+ctr,"globalnav_"+ctr+"_container");}enableGlobalMenus();}};function MMove(e){var theLayer;if(activeMenu!=null){theLayer=getElement(activeMenu,null);if(theLayer){if((window.event.x<theLayer.offsetLeft)||(window.event.x>(theLayer.offsetLeft+theLayer.offsetWidth))||(window.event.y<(theLayer.offsetTop-28))||(window.event.y>(theLayer.offsetTop+theLayer.offsetHeight))){HideAllMenus();}}}};function changeImages(){if(document.images){for(var i=0;i<changeImages.arguments.length;i+=2){document[changeImages.arguments[i]].src=eval(changeImages.arguments[i+1]+".src");}}};function enableGlobalMenus(){var status=true;for(var ctr=0;ctr<NavCount;ctr++){var navObj=getElement("globalnav_"+ctr+"_container",null);if(navObj&&navObj.firstChild){navObj=navObj.firstChild;}else{navObj=null;}if(navObj){if(navObj.readystate!=4){status=false;}}}if(status==false){setTimeout("enableGlobalMenus()",500);}else{flashloaded=true;}};function doMenu(menuID){timerId=window.setTimeout("doMenuAfterTimeOut('"+menuID+"')",500);};function clearDelay(){window.clearTimeout(timerId);};function doMenuAfterTimeOut(menuID){if(flashloaded&&getElement("globalnav_"+menuID+"_container",null)!=null&&getElement("globalnav_"+menuID+"_container",null).firstChild!=null){var thisMenu="globalnav_"+menuID+"_container";if((sOpenMenuID!="")&&(sOpenMenuID!=thisMenu)){getElement(sOpenMenuID,null).style.display="none";sOpenMenuID="";}var menuObj=getElement(thisMenu,null);if(menuObj){menuObj.style.display="block";sOpenMenuID=thisMenu;}activeMenu=sOpenMenuID;}};function getElement(layerName,parentLayer){var dString;if(layerobject){parentLayer=(parentLayer)?parentLayer:self;layerCollection=parentLayer.document.layers;if(layerCollection[layerName]){return(layerCollection[layerName]);}for(i=0;i<layerCollection.length;){return(getElement(layerName,layerCollection[i++]));}}if(allobject){return document.all.item(layerName);}if(dom){return($(layerName));}return null;};function HideAllMenus(){var ctr;for(ctr=0;ctr<NavCount;ctr++){lName="globalnav_"+ctr+"_container";layerHide(lName);}activeMenu=null;};function layerHide(layerName){var theLayer=getElement(layerName,null);if(theLayer){if(layerobject){theLayer.visibility='hide';}else{theLayer.style.display="none";}}};function sizeMenu(section,size){var thisMenu="globalnav_"+section+"_container";var menuObj;var openMenuObj;if((sOpenMenuID!="")&&(sOpenMenuID!=thisMenu)){openMenuObj=getElement(sOpenMenuID,null);if(openMenuObj){openMenuObj.style.display="none";}sOpenMenuID="";}else{menuObj=getElement(thisMenu,null);if(menuObj){var clipString="rect(0px 213px "+size+"px 0px)";menuObj.style.clip=clipString;sOpenMenuID=thisMenu;}}};function setTopNavImages(onUrl,offUrl,index){TopNavOnSrc[index]=onUrl;TopNavOffSrc[index]=offUrl;};function setNavCount(count,current){NavCount=count;currentSection=current;};function setTopNavPosition(baseId,navId){var buttonObj;var navObj;navObj=getElement(navId,null);buttonObj=getElement(baseId,null);if(navObj&&buttonObj){var y=findPosY(buttonObj);var x=findPosX(buttonObj);setLayerY(navObj,eval(y+26));if(eval(x+211)>($('hd_page_container_table').width+0)){x=$('hd_page_container_table').width-210;}if(eval(x-4)<0){setLayerX(navObj,x);}else{setLayerX(navObj,eval(x-4));}}};function setLayerX(theLayer,x){if(theLayer){if(layerobject){theLayer.left=x;}else{theLayer.style.left=x+"px";}}};function setLayerY(theLayer,y){if(theLayer){if(layerobject){theLayer.top=y;}else{theLayer.style.top=y+"px";}}};function setLayerZ(theLayerElement,zIndex){var theLayer=getElement(layerName,null);if(theLayer){if(layerobject){theLayer.zIndex=zIndex;}else{theLayer.style.zIndex=zIndex;}}};function findPosX(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}else if(obj.x){curleft+=obj.x;}return curleft;};function findPosY(obj){var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}else if(obj.y){curtop+=obj.y;}return curtop;};function printPage(){if(window.print){window.print();}else{alert("Printing Instructions:\n\n - If you are using a Macintosh, please select \"Print\" from the \"File\" menu.\n - If you are using Windows, right click the page and select \"Print\" from the pop-up menu.");}};function flashMovieWithLinks(movieName,swfWidth,swfHeight){this .movieName=movieName;this .width=swfWidth;this .height=swfHeight;this .linkArray=new Array();};function flashLink(linkId,linkUrl,linkType,popupSettings,parentWindow){this .linkId=linkId;this .linkUrl=linkUrl;this .linkType=linkType;this .popupSettings=popupSettings;this .parentWindow=parentWindow;};function findPosXByName(nm){return findPosX($(nm));};function findPosYByName(nm){return findPosY($(nm));};function navigateFromFlash(name,index,queryparams){var fmwl;for(var i=0;i<flashMovieWithLinksArray.length;i++){if(flashMovieWithLinksArray[i].movieName==name){fmwl=flashMovieWithLinksArray[i];break;}}var fmLink=fmwl.linkArray[index];if(this .hbx!=null){var swfXpos=findPosXByName(name);var swfYpos=findPosYByName(name);var swfHeight=fmwl.height;var swfWidth=fmwl.width;var rows=swfHeight/itemHeight;var columns=swfWidth/itemWidth;var xpos=swfXpos+((index%columns)*itemWidth);var ypos=swfYpos+((index%rows)*itemHeight);_hbLink(fmLink.linkId,'',xpos+","+ypos+","+itemWidth+","+itemHeight);}var formattedQueryParams;if(queryparams!=null&&queryparams.length>0){if(queryparams.charAt(0)=='?'||queryparams.charAt(0)=='&'){formattedQueryParams=queryparams.substring(1);}else{formattedQueryParams=queryparams;}}var foundUrl=fmLink.linkUrl;var fullUrl;if(formattedQueryParams!=null){if(foundUrl.indexOf("?")>-1){fullUrl=foundUrl+'&'+formattedQueryParams;}else{fullUrl=foundUrl+'?'+formattedQueryParams;}}else{fullUrl=foundUrl;}if(fmLink.linkType==2){window.open(fullUrl);}else if(fmLink.linkType==1){window.open(fullUrl,'newwindo',fmLink.popupSettings);}else{if(fmLink.parentWindow){window.opener.location.href=fullUrl;}else{window.location=fullUrl;}}};function cleanVersion(version){version=version+'';if(version.indexOf('WIN')>-1){tempArray=version.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");return versionArray[0]+"."+versionArray[1]+"."+versionArray[2];}else{return version;}};function postDetectionResults(swfObj){var queryParam='flashVersion='+cleanVersion(swfObj.GetSwfVer())+'&flashOK=true&jsOK=true&hasVB='+hasVB+'&msftXml='+msftXml;new Ajax.Request(getControllerPath(),{asynchronous:true,method:'post',postBody:queryParam,onSuccess:function(request){}});};function hdPageView(p,m){this .p=p;this .m=m;};function _hbPageView(p,m){hdPageViews.push(new hdPageView(p,m));};function _hdPageView(p,m){hdPageViews.push(new hdPageView(p,m));};function flushPageViews(){_hdPageView=_hbPageView;for(var i=0;i<hdPageViews.length;i++){_hbPageView(hdPageViews[i].p,hdPageViews[i].m);}};function _hbDownload(n){hdDownloads.push(n);};function _hdDownload(n){hdDownloads.push(n);};function flushDownloads(){_hdDownload=_hbDownload;for(var i=0;i<hdDownloads.length;i++){_hbDownload(hdDownloads[i]);}};

function globalNavLink(goURL){	
	
	//Set local parameters
	var loc = goURL;
	var queryStringParms = getStandardQueryParams();
	
	//Check if the url contains a list of queryParams 
	if(loc.indexOf("?") == -1){
		loc = loc + "?" + queryStringParms;		
	}
	else{			
		//Get the index location of the '?' sign
		var indexValue = goURL.indexOf("?");	
		
		//Split the URL into two strings the front and the end,
		//the index of the '?' will be the divider	
		var front = loc.substring(0,indexValue + 1);
		var end   = loc.substring(indexValue + 1);
		
		//Prepare the new location string
		loc = front + queryStringParms; 
		
		//Check if 'end' is empty, if empty we don't need to append
		//the '&' along with the variable 'end' to the location string
		//This will only occur when the '?' is present but nothing is
		//after it
		if(end != '')		
			loc = loc + "&" + end;			
	}
	
	window.location = loc;
}


function globalPopLink(goURL,features){
	
	//Set local parameters
	var loc = goURL;
	var queryStringParms = getStandardQueryParams();
	
	//Check if the url contains a list of queryParams 
	if(loc.indexOf("?") == -1){
		loc = loc + "?" + queryStringParms;		
	}
	else{			
		//Get the index location of the '?' sign
		var indexValue = goURL.indexOf("?");	
		
		//Split the URL into two strings the front and the end,
		//the index of the '?' will be the divider	
		var front = loc.substring(0,indexValue + 1);
		var end   = loc.substring(indexValue + 1);
		
		//Prepare the new location string
		loc = front + queryStringParms; 
		
		//Check if 'end' is empty, if empty we don't need to append
		//the '&' along with the variable 'end' to the location string
		//This will only occur when the '?' is present but nothing is
		//after it
		if(end != '')		
			loc = loc + "&" + end;			
	}
	
	window.open(loc,"popup",features);

}




