/*Description: JS Functions for COMMON BOTOX/OUTLOOK TOP NAV*/
function editMode(linkID)
{
    var appendClass;
    appendClass = document.getElementById(linkID);
    appendClass.className = "edit-mode-container";
}

function liveMode(linkID)
{
    var appendClass;
    appendClass = document.getElementById(linkID);
    appendClass.className = "home-page";
}
/*End of JS Functions for COMMON BOTOX/OUTLOOK TOP NAV */

/* Description: JS for Outlook Top Navigation */

function OutlookMenuOnMouseOver(id)
{
	var dropDownName = "outlook-menu" + id;
	var appendClass = document.getElementById(dropDownName);
	appendClass.className = dropDownName + "-hover";
	
	/*
	 * MRVA 09/01/09
	 * Handles the overlapping of the submenu for the top navigation.
	var divMenu = "outlook-drop-menu" + id;
	var divMenuObject = document.getElementById(divMenu);
	if (divMenuObject)
	{
		// Gets the width of the image
		var imageWidth = parseInt(document.getElementById('outlook-top-nav').offsetWidth);
		
		// Gets the width of the previous images
		var preWidth = 0;
		if (id > 1)
		{
			for (var ctr = (id - 1); ctr > 0; ctr--)
			{ preWidth += parseInt(document.getElementById('outlook-menu' + ctr).offsetWidth); }
		}
		
		// Gets the width of the visible sub menu
		var currWidth = parseInt(divMenuObject.offsetWidth);
		
		var totalWidth = parseInt((preWidth + currWidth) - imageWidth);
		if (totalWidth > 0)
			divMenuObject.style.marginLeft = -(currWidth);
	}
	*/
}

function OutlookMenuOnMouseOut(id)
{
	var dropDownName = "outlook-menu" + id;
	var appendClass = document.getElementById(dropDownName);
	appendClass.className = dropDownName;
}

/* End of JS for Outlook Top Navigation */

/*Description: JS Function for Common Botox/Outlook TopNav*/
function navOnMouseOver(linkID)
{
            var appendClass;
            appendClass = document.getElementById(linkID);
            appendClass.className = linkID+"-hover";
}

function navOnMouseOut(linkID)
{
            var appendClass;
            appendClass = document.getElementById(linkID);
            appendClass.className = linkID;
}
/*End of JS Function for Common Botox/Outlook TopNav*/

/* Description: JS Functions for BOTOX HOMEPAGE - FLASH*/
function showFlashContainer()
{
	document.getElementById("flash-container").style.display="block";
}

function hideFlashContainer()
{
	document.getElementById("flash-container").style.display="none";
}
/*End of JS Functions for COMMON  BOTOX HOMEPAGE - FLASH*/

/* Description: JS Functions for BOTOX NAV PAGE*/
function divOnMouseOver(linkID)
{
	var appendClass;
	appendClass = document.getElementById(linkID);
	appendClass.className = "content-txt-hover";
}

function divOnMouseOut(linkID)
{
	var appendClass;
	appendClass = document.getElementById(linkID);
	appendClass.className = "content-txt";	
}

function rightHandOnMouseOver(linkID)
{
	var appendClass;
	appendClass = document.getElementById(linkID);
	appendClass.className = "connect-box-hover";
}

function rightHandOnMouseOut(linkID)
{
	var appendClass;
	appendClass = document.getElementById(linkID);
	appendClass.className = "connect-box";
}

function leftHandOnMouseOver(linkID)
{
	var appendClass;
	appendClass = document.getElementById(linkID);
	appendClass.className = "box-list-content-hover";
}

function leftHandOnMouseOut(linkID)
{
	var appendClass;
	appendClass = document.getElementById(linkID);
	appendClass.className = "box-list-content";
}

/*End of BOTOX NAV JS*/

/*Description: Outlook Homepage JS*/

function randomizeBuzzWords(buzzWordContent)
{
	var buzzWordContentCount;
	var randomBuzzWordID = new String();
	buzzWordContentCount  = buzzWordContent;
	
	var randomnumber = Math.floor(Math.random()*buzzWordContentCount)+1;
	if(randomnumber > 0)
	{
		randomBuzzWordID = "buzzword" + randomnumber;
		document.getElementById(randomBuzzWordID).className = "";
	}
	
}

function showDivImage(divID,imagePath,totalDiv) 
{

var el=document.getElementById('slideCollection');
var divs =  totalDiv;
var subDIV;

var divChange = new String();
 
var imgPath = new String();

  for (var i=1; i<=totalDiv;i++) {
 
		subDIV = "slide" + i;
		divChange = document.getElementById(subDIV);
		if(subDIV != '' || subDIV != null)
		{
			divChange.className = "contents-container-hidden";
		}
	}

	var currentDIV = document.getElementById(divID);
	currentDIV.className = "contents-container"; 
		 
	if(document.getElementById(imagePath)!=null){
		imgPath =  document.getElementById(imagePath).src;
			
		 document.getElementById("slideCollection").style.backgroundImage = "url(" + imgPath + ")";

	  }//end FOR
	
	if(document.getElementById("link-number")!=null){	
		var childLinkNodes = document.getElementById("link-number").childNodes
		
		//gray out all the page numbers
		for(var c=0; c < childLinkNodes.length; c++) {
			if (childLinkNodes[c].nodeName=="A"){
				childLinkNodes[c].className = "link-page-notselected"
			}
		}
		
		if(document.getElementById("link-page" + divID.substr(5))!=null){
			document.getElementById("link-page" + divID.substr(5)).className = "link-page-selected"
		}
	}
}
/*End of Outlook Homepage JS*/

/*Description : Outlook Navigation JS*/

function showHideDescription(totalArticles,article,imageID)
{

	var subDIV;

	var divChange = new String();
	

	var classChange = new String();
	
	var imgPath1 = "../images/HideDescription.jpg";
	var imgPath2 = "../images/ShowDescription.jpg";
	
	divChange = document.getElementById(article);
	classChange = document.getElementById(article).className;
	
	
	if(classChange.toLowerCase()=="hide-desc" || classChange.toLowerCase()=="hide-info")
	{
		divChange = document.getElementById(article);
		divChange.className = "show-desc";
		
		document.getElementById(imageID).style.backgroundImage = "url(" + imgPath1 + ")";
	}
	else
	{
		divChange = document.getElementById(article);
		divChange.className = "hide-desc";
		
		document.getElementById(imageID).style.backgroundImage = "url(" + imgPath2 + ")";
	}
	
	
	
}//End Function Show Content

function showHideArticleIndexes(totalArticles,article,imageID1,imageID2)
{
	
	var divChange = new String();
	
	var hideDescImage = new String();
	var classChange = new String();
	
	var imgPath1 = "../images/plus.jpg";
	var imgPath2 = "../images/minus.jpg";
	var imgPath3 = "../images/HideDescription.jpg";
	var imgPath4 = "../images/ShowDescription.jpg";
	
	divChange = document.getElementById(article);
	classChange = document.getElementById(article).className;
	//hideDescImage = document.getElementById(imageID2);

	
	var childLinkNodes = document.getElementById(article).childNodes;

	for(var c=0; c < childLinkNodes.length; c++)
	{
		if (childLinkNodes[c].nodeName=="DIV")
		{
		
			try
			{
				if(classChange.toLowerCase()=="hide-desc" || classChange.toLowerCase()=="show-desc") 
				{
					divChange = document.getElementById(article);
					divChange.className = "hide-info";
					document.getElementById(imageID1).style.backgroundImage = "url(" + imgPath1 + ")";
					document.getElementById(imageID2).style.display = "none";
				}
				else
				{
					divChange = document.getElementById(article);
					divChange.className = "hide-desc";
					
					document.getElementById(imageID1).style.backgroundImage = "url(" + imgPath2 + ")";
					document.getElementById(imageID2).style.backgroundImage = "url(" + imgPath4 + ")";		
					document.getElementById(imageID2).style.display = "block";
				}
			}
			catch(err){}
		}//end if
		else
		{	
			try
			{
				if(classChange.toLowerCase()=="hide-desc" || classChange.toLowerCase()=="show-desc") 
				{
					divChange = document.getElementById(article);
					divChange.className = "hide-info";
					document.getElementById(imageID1).style.backgroundImage = "url(" + imgPath1 + ")";
		
				}
				else
				{
					divChange = document.getElementById(article);
					divChange.className = "hide-desc";
					
					document.getElementById(imageID1).style.backgroundImage = "url(" + imgPath2 + ")";
					
				}
			}
			catch(err){}
	
		}
	
			
	}//end for

}//End Function Show Content

function showAllArticles(totalArticles)
{
	
	var articleCount = totalArticles;


	var divChange = new String();
	var imageChange = new String();
	var classTest = new String();
	var imgPath = "../images/HideDescription.jpg";
	var imgPathDesc = "../images/minus.jpg";

	for (var i=1; i<=articleCount;i++) {
	
	var subDIV = "article" + i;
	divChange = document.getElementById(subDIV);
	//classTest = document.getElementById(subDIV).style.display;
	
		if(subDIV != '' || subDIV != null)
		{
				divChange.className = "show-desc";
			
		}
		
	}//end FOR hide Content
	
	   
	for (var i=1; i<=articleCount;i++) {
		
		var subDIV = "iconOnly" + i;
		//var classTest = document.getElementById(subDIV).style.display;

			if(subDIV != '' || subDIV !=null)
			{
						document.getElementById(subDIV).style.backgroundImage = "url(" + 
			imgPathDesc + ")";
						document.getElementById(subDIV).style.display = "block";

			}
		
	
	}//End	
	
	for (var i=1; i<=articleCount;i++) {

		var subDIV = "descIcon" + i;

		try
		{
			if(subDIV != '' || subDIV !=null)
			{
						document.getElementById(subDIV).style.backgroundImage = "url(" + 
			imgPath + ")";
						document.getElementById(subDIV).style.display = "block";			
			}
	
		}
		catch(err)
		{
	
		}
	}//End	
	
}

function hideAllArticles(totalArticles)
{
	var articleCount = totalArticles;
	var subDIV;

	var divChange = new String();
	var imageChange = new String();
	var classTest = new String();
	var imgPath = "../images/ShowDescription.jpg";
	var imgPathDesc = "../images/plus.jpg";
	var imgPathDesc1 = "../images/minus.jpg";

	for (var i=1; i<=articleCount;i++) {
	
	subDIV = "article" + i;
	divChange = document.getElementById(subDIV);
	classTest = document.getElementById(subDIV).style.display;
	
		if(subDIV != '' || subDIV != null)
		{
				divChange.className = "hide-info";
		}
		
		
	}//end FOR hide Content
	   
	for (var i=1; i<=articleCount;i++) {

		subDIV = "iconOnly" + i;
		//classTest = document.getElementById(subDIV).style.display;
		
		try
		{
			if(subDIV != '' || subDIV != null)
			{
				document.getElementById(subDIV).style.backgroundImage = "url(" + 

	imgPathDesc + ")";
				document.getElementById(subDIV).style.display = "block";	
			}
		}
		catch(err)
		{
		}
	
	}//End	
	
	for (var i=1; i<=articleCount;i++) {

		subDIV = "descIcon" + i;
		
		//classTest = document.getElementById(subDIV).style.display;

		try
		{
			if(subDIV != '' || subDIV != null)
			{
				document.getElementById(subDIV).style.backgroundImage = "url(" + 

	imgPath + ")";
				document.getElementById(subDIV).style.display = "none";		
			}
		}
		catch(error)
		{
		}

	}//End	
	
}
/*End of Outlook Navigation JS*/

/*Start of  AJAX.JS*/

function makeHttpRequest(url, callback_function, return_xml, requestType) 
{ 
    
    var http_request = false; 

	if (window.XMLHttpRequest) 
   
	{   
		//Mozilla, Safari,...	
		// Instantiate the XML Http Request object    
		http_request = new XMLHttpRequest(); 
		
		if (http_request.overrideMimeType) 
		{ 
			http_request.overrideMimeType('text/xml'); 
		}
	} 
    
    else if (window.ActiveXObject) 
	{ // IE 
		try 
		{ 
			http_request = new ActiveXObject("Msxml2.XMLHTTP"); 
		} 
		catch (e) 
		{ 
			try 
			{ 
				http_request = new ActiveXObject("Microsoft.XMLHTTP"); 
			} 
				
			catch (e) 
			{
			
			} 
		} 
	} 

   if (!http_request) 
   { 
	
       return false; 
   } 
   
   http_request.onreadystatechange = function() 
   { 
       // Check if the request is complete (4 - request is complete)     
		if (http_request.readyState == 4) 
		{ 
		    // If the request is successful execute the callback function 
			if (http_request.status == 200) 
			{         
               if (return_xml) 
               { 
                   eval(callback_function + '(http_request.responseXML)'); 
               } 
               else 
               { 
                   eval(callback_function + '(http_request.responseText)'); 
               } 
			} 
           
		} 
	} 
	
	// Sends off the request to the server
	http_request.open('get', url, true); 
	http_request.send(null); 
}

/*End of AJAX.JS*/

/*Start of BANNER.JS*/

//Embeddded Attachment Media Help Global Variable
var embeddedAttachmentCount = 0;
var embeddedID = 0;

/* Funtion for finding HTML Control */
function getBannerObj(id) 
{
	if (document.getElementById) {
		return document.getElementById(id);
		}
	else if (document.all) {
		return document.all[id];
		}
}

 /* It is responsible for assigning the random image to corresponding HTML control*/
function random_image()
{
	if (getBannerObj("sBackgroundImage")==null) return;
	getBannerObj("sBackgroundImage").style.display = ''
	if (document.all)
	    {
		document.images("BackgroundImage").src = random_background[random_background_number];
		document.images("BackgroundImage").alt = random_background_alt[random_background_number];
		getBannerObj("BannerContainer").height = document.images("BackgroundImage").height
		}
	else
	    {
		document.getElementById("BackgroundImage").setAttribute("src", random_background[random_background_number]);
		document.getElementById("BackgroundImage").setAttribute("alt", random_background_alt[random_background_number]);
		document.getElementById("BannerContainer").height = document.getElementById("BackgroundImage").height
		}
}

function AnchorBookmark(url)
{
	var currentURL = document.location.href;
	var sharpLocation = currentURL.lastIndexOf('#')
	
	if (sharpLocation != -1) currentURL = currentURL.substring(0,sharpLocation)
	
	location = currentURL + url;
}

function writeBannerCookie(name, value)
{
  try
  {
	document.cookie = name + '=' + escape(value);
  }
  catch(Err)
  {}
}

/* function for reading cookies */
function readBannerCookie(name)
{
  var cookieValue = '';
  var search = name + '=';
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(';', offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function searchKeyPress(searchValue){ 
		if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
		{ 
			if (event.keyCode == 13)
			{ 
				writeBannerCookie("SearchBox",searchValue);
			} 
		} 
		else 			
		{ 
			
			try
			{
				if (e.keyCode == 13 || e.which == 13)
				{ 
					writeBannerCookie("SearchBox",searchValue);
				}
			}
			catch(Err)
			{}
		}		
}
/*End of BANNER.JS*/

/*Description: LOADMEDIACONTROL.JS*/

var hiddenDivID = '';

function LoadWindowsMediaPlayer (divID, mediaUrl, controlWidth, controlHeight)
{ 
  SetVisibility (divID, 'hidden');
  hiddenDivID = divID;  
  
  var d = document.getElementById(divID);
  
  d.innerHTML  = '<OBJECT ID="MediaPlayer" ' +
                'NAME="MediaPlayer" ' + 
                'CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" ' +
                'TYPE="application/x-oleobject" ' + 
                'WIDTH="' + controlWidth + '" ' +      // Default width = 320
                'HEIGHT="' + controlHeight + '" ' +    // Default height = 310
                'SHOWASTEXT> ' +
                '<param name="ShowStatusBar" value="true"> ' +
                '<param name="ShowTracker" value="true"> ' +		
		        '<param name="StandBy" value="Loading Microsoft Media Player components..."> ' +
		        '<param name="FileName" value="' + mediaUrl + '" > ' +
		        '<param name="AnimationStart" value="true"> ' +
		        '<param name="AutoStart" value="true"> ' + 
		        '<param name="ShowControls" value="true"> ' +	
		        '<EMBED ShowStatusBar="true" ' + 
		        'ShowTracker="true" ' + 
		        'TYPE="application/x-mplayer2" ' + 
		        'PLUGINSPAGE="http://www.microsoft.com/isapi/redir.dll?sbp=mediaplayer&amp;prd=windows&amp;ar=Media&amp;sba=Plugin" ' +
		        'SRC="' + mediaUrl + '" ' + 
		        'NAME="MediaPlayer" ' + 
		        'SHOWCONTROLS="true" ' + 
		        'WIDTH="' + controlWidth + '" ' +      // Default width = 320
                'HEIGHT="' + controlHeight + '" ' +    // Default height = 310
		        '</EMBED> ' +
		        '</OBJECT><BR>' ;          	                                                       
		            
}

function LoadWindowsMediaPlayer2 (divID, mediaUrl, controlWidth, controlHeight)
{    
  hiddenDivID = '';
  
  document.write ('<OBJECT ID="MediaPlayer" ');
  document.write ('NAME="MediaPlayer" '); 
  document.write ('CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" ');
  document.write ('TYPE="application/x-oleobject" '); 
  document.write ('WIDTH="' + controlWidth + '" ');
  document.write ('HEIGHT="' + controlHeight + '" ');
  document.write ('SHOWASTEXT> ');
  document.write ('<param name="ShowStatusBar" value="true"> ');
  document.write ('<param name="ShowTracker" value="true"> ');		
  document.write ('<param name="StandBy" value="Loading Microsoft Media Player components..."> ');
  document.write ('<param name="FileName" value="' + mediaUrl + '" > ');
  document.write ('<param name="AnimationStart" value="true"> ');
  document.write ('<param name="AutoStart" value="true"> '); 
  document.write ('<param name="ShowControls" value="true"> ');	
  document.write ('<EMBED ShowStatusBar="true" ');
  document.write ('ShowTracker="true" ');
  document.write ('TYPE="application/x-mplayer2" ');
  document.write ('PLUGINSPAGE="http://www.microsoft.com/isapi/redir.dll?sbp=mediaplayer&amp;prd=windows&amp;ar=Media&amp;sba=Plugin" ');
  document.write ('SRC="' + mediaUrl + '" ');
  document.write ('NAME="MediaPlayer" ');
  document.write ('SHOWCONTROLS="true" ');
  document.write ('WIDTH="' + controlWidth + '" ');
  document.write ('HEIGHT="' + controlHeight + '" ');
  document.write ('</EMBED> ');
  document.write ('</OBJECT> ');  
		
}
function LoadRealPlayer (divID, mediaUrl, controlWidth, controlHeight)   
{   
  hiddenDivID = '';
  
  var d = document.getElementById(divID);
  
  d.innerHTML = '<OBJECT ID="Rp1" ' +
                'classid="CLSID:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ' +                
                'WIDTH="' + controlWidth + '" ' +       // Default width = 320
                'HEIGHT="' + controlHeight + '"> ' +    // Default height = 240                
                '<param name="controls" value="ImageWindow"> ' +
                '<param name="console" value="one"> ' +
                '<param name="maintainaspect" value="true"> ' +
                '<param name="autostart" value="true"> ' + 
                '<EMBED name="Rp1" ' + 
                'src="' + mediaUrl + '" ' +
                'width="' + controlWidth + '" ' +
                'height="' + controlHeight + '" ' +                  
                'autostart="true" ' +
                'nojava="true" ' + 
                'controls="ImageWindow" ' +
                'console="one" ' +
                'mainaspect="true" ' + 
                'pluginspage="http://www.real.com/index.htm"></EMBED>' +
                '</OBJECT><BR>' + 
                '<OBJECT ID="Rp2" ' +
                'classid="CLSID:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ' + 
                'WIDTH="' + controlWidth + '" ' +
                'HEIGHT="81" > ' +
                '<param name="src" value="' + mediaUrl + '"> ' +
                '<param name="console" value="one"> ' + 
                '<param name="controls" value="All">' + 
                '<param name="loop" value="false">' + 
                '<EMBED name="Rp2" ' + 
                'src="' + mediaUrl + '" ' +
                'width="' + controlWidth + '" ' + 
                'height="81" ' +                 
                'autostart="false" ' +
                'loop="false" ' + 
                'nojava="true" ' + 
                'controls="All" ' +
                'console="video1" > ' + 
                '</EMBED> ' +
                '<NOEMBED> ' +
                '<a href="' + mediaUrl + '">Play first clip</a> ' +
                '</NOEMBED> ' + 
                '</OBJECT><BR>' ;  

}  

function LoadRealPlayer2 (divID, mediaUrl, controlWidth, controlHeight)   
{    
    hiddenDivID = '';

	document.write ('<OBJECT ID="Rp1" ');
	document.write ('classid="CLSID:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ');                
	document.write ('WIDTH="' + controlWidth + '" ');
	document.write ('HEIGHT="' + controlHeight + '"> ');
	document.write ('<param name="controls" value="ImageWindow"> ');
	document.write ('<param name="console" value="one"> ');
	document.write ('<param name="maintainaspect" value="true"> ');
	document.write ('<param name="autostart" value="true"> '); 
	document.write ('<EMBED name="Rp1" '); 
	document.write ('src="' + mediaUrl + '" ');
	document.write ('TYPE="audio/x-pn-realaudio-plugin" ');
	document.write ('width="' + controlWidth + '" '); 
	document.write ('height="' + controlHeight + '" '); 
	document.write ('autostart="true" ');
	document.write ('nojava="true" '); 
	document.write ('controls="ImageWindow" ');
	document.write ('console="one" ');
	document.write ('mainaspect="true" '); 
	document.write ('pluginspage="http://www.real.com/index.htm"></EMBED> ');
	document.write ('</OBJECT><BR> '); 
	document.write ('<OBJECT ID="Rp2" ');
	document.write ('classid="CLSID:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" '); 
	document.write ('WIDTH="' + controlWidth + '" ');
	document.write ('HEIGHT="81" > ');
	document.write ('<param name="src" value="' + mediaUrl + '"> ');
	document.write ('<param name="console" value="one"> '); 
	document.write ('<param name="controls" value="All"> '); 
	document.write ('<param name="loop" value="false"> '); 
	document.write ('<EMBED name="Rp2" '); 
	document.write ('src="' + mediaUrl + '" ');
	document.write ('TYPE="audio/x-pn-realaudio-plugin" ');
	document.write ('width="' + controlWidth + '" '); 
	document.write ('height="81" '); 
	document.write ('autostart="false" ');
	document.write ('loop="false" '); 
	document.write ('nojava="true" '); 
	document.write ('controls="All" ');
	document.write ('console="video1" > '); 
	document.write ('</EMBED> ');
	document.write ('<NOEMBED> ');
	document.write ('<a href="' + mediaUrl + '">Play first clip</a> ');
	document.write ('</NOEMBED> '); 
	document.write ('</OBJECT><BR>');

} 

// This is not yet used.
function LoadFlashPlayer (divID, mediaUrl, controlWidth, controlHeight)
{  
  hiddenDivID = '';
  
  var d = document.getElementById(divID);  
  
  d.innerHTML = '<OBJECT ID="Flash" ' + 
                'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' + 
                'CODEBASE="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ' +
                'width="' + controlWidth + '" ' +       // Default width = 320
                'height="' + controlHeight + '"> ' +    // Default height = 240    
                '<param name="movie" value="' + mediaUrl + '"> ' +
                '<param name="quality" value="high"> ' +
                '<param name="LOOP" value="false"> ' +
                '<EMBED quality="high" ' +
                'align="" ' +
                'type="application/x-shockwave-flash" ' +
                'pluginspage="http://www.macromedia.com/go/getflashplayer" ' + 
                'WIDTH="' + controlWidth + '" ' +       // Default width = 320
                'HEIGHT="' + controlHeight + '" ' +     // Default height = 240    
                'LOOP="false" ' +
                'src="' + mediaUrl + '"> ' +
                '</EMBED> ' +
                '</OBJECT> ' ;

}

// This is not yet used.
function LoadFlashPlayer2 (divID, mediaUrl, controlWidth, controlHeight)
{  
  SetVisibility (divID, 'hidden');
  hiddenDivID = divID;    
  
  document.write ('<OBJECT ID="Flash" ');
  document.write ('classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '); 
  document.write ('CODEBASE="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ');
  document.write ('width="' + controlWidth + '" ');       // Default width = 320
  document.write ('height="' + controlHeight + '"> ');    // Default height = 240    
  document.write ('<param name="movie" value="' + mediaUrl + '"> ');
  document.write ('<param name="quality" value="high"> ');
  document.write ('<param name="LOOP" value="false"> ');
  document.write ('<EMBED quality="high" ');
  document.write ('align="" ');
  document.write ('type="application/x-shockwave-flash" ');
  document.write ('pluginspage="http://www.macromedia.com/go/getflashplayer" '); 
  document.write ('WIDTH="' + controlWidth + '" ');       // Default width = 320
  document.write ('HEIGHT="' + controlHeight + '" ');     // Default height = 240    
  document.write ('LOOP="false" ');
  document.write ('src="' + mediaUrl + '"> ');
  document.write ('</EMBED> ');
  document.write ('</OBJECT> ');

}

function LoadQuickTimePlayer (divID, mediaUrl, controlWidth, controlHeight)
{  
  hiddenDivID = '';
  
  var d = document.getElementById(divID);  
  d.innerHTML = QT_GenerateOBJECTText(mediaUrl, controlWidth, controlHeight, '', 'CONTROLLER', 'true', 'ShowStatusBar', 'true', 'type', 'video/QuickTime', 'SRC' , mediaUrl, 'QTSRC', mediaUrl, 'id', 'QuickTimePlayer');   

}


function LoadQuickTimePlayer2 (divID, mediaUrl, controlWidth, controlHeight)
{   
  hiddenDivID = '';
  
  QT_WriteOBJECT (mediaUrl, controlWidth, controlHeight, '', 'CONTROLLER', 'true', 'ShowStatusBar', 'true', 'type', 'video/QuickTime', 'SRC' , mediaUrl, 'QTSRC', mediaUrl, 'id', 'QuickTimePlayer');   
}

/* ------------------------------------------------------------------------------------------------

   THE FOLLOWING JAVASCRIPT FUNCTIONS ARE FROM http://developer.apple.com/internet/ieembedprep.html
   
   This file contains functions to generate OBJECT and EMBED tags for QuickTime content. 
   These functions assemble the tags from parameters passed to them as parameters.

    QT_WriteOBJECT()              - generate HTML tags and insert them into the calling document
    QT_WriteOBJECT_XHTML()        - generate XHTML tags and insert them into the calling document

    QT_GenerateOBJECTText()       - generate HTML tags and return them as a string
    QT_GenerateOBJECTText_XHTML() - generate XHTML tags and return them as a string
    
    AC_QuickTimeVersion()         - return the version of this file as a floating point number.

   To call one of these functions, pass the url, width, height, and required ActiveX
   control version as parameters 1 through 4, and pass all other attributes and 
   parameters that you would otherwise specify for the OBJECT, PARAM, and EMBED 
   tags as pairs of parameters:

   <script language="JavaScript" type="text/javascript">
      QT_WriteOBJECT(srcURL, width, height, activeXVersion,
         "attributeName1", "attributeValue1",
         "attributeName1", "attributeValue2",
         "attributeName1", "attributeValue3",
         "attributeName1", "attributeValue4",
         ...
         "attributeNameN", "attributeValueN"
      );
    </script>

   These functions automatically add the "classid", "codebase", and "pluginspage" tags to 
   the OBJECT and/or EMBED tags with standard values if they are not specified in the
   parameter list, so you need not supply these tags unless you require non-standard values.
   
   Although the OBJECT and EMBED tags typically have the same attributes and parameters, it
   is sometimes useful to have different values for each. 
   Any attribute name prefixed with "obj#" is added to the OBJECT tag only, any attribute 
   name prefixed with "emb#" is added to the EMBED tag only.

   <script language="JavaScript" type="text/javascript">
      QT_WriteOBJECT('http://www.domain.com/sample.mov', '480', '288', ''
        , 'emb#bgcolor', '#FFFFFF');
   </script>

 */

/************** LOCALIZABLE GLOBAL VARIABLES ****************/

var gArgCountErr =	'The "%%" function requires an even number of arguments.'
				+	'\nArguments should be in the form "atttributeName", "attributeValue", ...';

/******************** END LOCALIZABLE **********************/

var gTagAttrs				= null;
var gQTGeneratorVersion		= 0.8;

function AC_QuickTimeVersion()	{ return gQTGeneratorVersion; }

function _QTComplain(callingFcnName, errMsg)
{
    errMsg = errMsg.replace("%%", callingFcnName);
	alert(errMsg);
}

function _QTAddAttribute(prefix, slotName, tagName)
{
	var		value;

	value = gTagAttrs[prefix + slotName];
	if ( null == value )
		value = gTagAttrs[slotName];

	if ( null != value )
	{
		if ( 0 == slotName.indexOf(prefix) && (null == tagName) )
			tagName = slotName.substring(prefix.length); 
		if ( null == tagName ) 
			tagName = slotName;
		return tagName + '="' + value + '" ';
	}
	else
		return "";
}

function _QTAddObjectAttr(slotName, tagName)
{
	// don't bother if it is only for the embed tag
	if ( 0 == slotName.indexOf("emb#") )
		return "";		

	if ( 0 == slotName.indexOf("obj#") && (null == tagName) )
		tagName = slotName.substring(4); 

	return _QTAddAttribute("obj#", slotName, tagName);
}

function _QTAddEmbedAttr(slotName, tagName)
{
	// don't bother if it is only for the object tag
	if ( 0 == slotName.indexOf("obj#") )
		return "";

	if ( 0 == slotName.indexOf("emb#") && (null == tagName) )
		tagName = slotName.substring(4); 

	return _QTAddAttribute("emb#", slotName, tagName);
}


function _QTAddObjectParam(slotName, generateXHTML)
{
	var		paramValue;
	var		paramStr = "";
	var		endTagChar = (generateXHTML) ? ' />' : '>';

	if ( -1 == slotName.indexOf("emb#") )
	{
		// look for the OBJECT-only param first. if there is none, look for a generic one
		paramValue = gTagAttrs["obj#" + slotName];
		if ( null == paramValue )
			paramValue = gTagAttrs[slotName];

		if ( 0 == slotName.indexOf("obj#") )
			slotName = slotName.substring(4); 
	
		if ( null != paramValue )
			paramStr = '  <param name="' + slotName + '" value="' + paramValue + '"' + endTagChar + '\n';
	}

	return paramStr;
}

function _QTDeleteTagAttrs()
{
	for ( var ndx = 0; ndx < arguments.length; ndx++ )
	{
		var attrName = arguments[ndx];
		delete gTagAttrs[attrName];
		delete gTagAttrs["emb#" + attrName];
		delete gTagAttrs["obj#" + attrName];
	}
}

		

// generate an embed and object tag, return as a string
function _QTGenerate(callingFcnName, generateXHTML, args)
{
	// is the number of optional arguments even?
	if ( args.length < 4 || (0 != (args.length % 2)) )
	{
		_QTComplain(callingFcnName, gArgCountErr);
		return "";
	}
	
	// allocate an array, fill in the required attributes with fixed place params and defaults
	gTagAttrs = new Array();
	gTagAttrs["src"] = args[0];
	gTagAttrs["width"] = args[1];
	gTagAttrs["height"] = args[2];
	gTagAttrs["classid"] = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
	gTagAttrs["pluginspage"] = "http://www.apple.com/quicktime/download/";

	// set up codebase attribute with specified or default version before parsing args so
	//  anything passed in will override
	var activexVers = args[3]
	if ( (null == activexVers) || ("" == activexVers) )
		activexVers = "6,0,2,0";
	gTagAttrs["codebase"] = "http://www.apple.com/qtactivex/qtplugin.cab#version=" + activexVers;

	var	attrName,
		attrValue;

	// add all of the optional attributes to the array
	for ( var ndx = 4; ndx < args.length; ndx += 2)
	{
		attrName = args[ndx].toLowerCase();
		attrValue = args[ndx + 1];

		// "name" and "id" should have the same value, the former goes in the embed and the later goes in
		//  the object. use one array slot 
		if ( "name" == attrName || "id" == attrName )
			gTagAttrs["name"] = attrValue;

		else 
			gTagAttrs[attrName] = attrValue;
	}

	// init both tags with the required and "special" attributes
	var objTag =  '<object '
					+ _QTAddObjectAttr("classid")
					+ _QTAddObjectAttr("width")
					+ _QTAddObjectAttr("height")
					+ _QTAddObjectAttr("codebase")
					+ _QTAddObjectAttr("name", "id")
					+ _QTAddObjectAttr("tabindex")
					+ _QTAddObjectAttr("hspace")
					+ _QTAddObjectAttr("vspace")
					+ _QTAddObjectAttr("border")
					+ _QTAddObjectAttr("align")
					+ _QTAddObjectAttr("class")
					+ _QTAddObjectAttr("title")
					+ _QTAddObjectAttr("accesskey")
					+ _QTAddObjectAttr("noexternaldata")
					+ '>\n'
					+ _QTAddObjectParam("src", generateXHTML);
	var embedTag = '  <embed '
					+ _QTAddEmbedAttr("src")
					+ _QTAddEmbedAttr("width")
					+ _QTAddEmbedAttr("height")
					+ _QTAddEmbedAttr("pluginspage")
					+ _QTAddEmbedAttr("name")
					+ _QTAddEmbedAttr("align")
					+ _QTAddEmbedAttr("tabindex");

	// delete the attributes/params we have already added
	_QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex",
					"hspace","vspace","border","align","noexternaldata","class","title","accesskey");

	// and finally, add all of the remaining attributes to the embed and object
	for ( var attrName in gTagAttrs )
	{
		attrValue = gTagAttrs[attrName];
		if ( null != attrValue )
		{
			embedTag += _QTAddEmbedAttr(attrName);
			objTag += _QTAddObjectParam(attrName, generateXHTML);
		}
	} 

	// end both tags, we're done
	return objTag + embedTag + '> </em' + 'bed>\n</ob' + 'ject' + '>';
}

// return the object/embed as a string
function QT_GenerateOBJECTText()
{
	return _QTGenerate("QT_GenerateOBJECTText", false, arguments);
}

function QT_GenerateOBJECTText_XHTML()
{
	return _QTGenerate("QT_GenerateOBJECTText_XHTML", true, arguments);
}

function QT_WriteOBJECT()
{
	document.writeln(_QTGenerate("QT_WriteOBJECT", false, arguments));
}

function QT_WriteOBJECT_XHTML()
{
	document.writeln(_QTGenerate("QT_WriteOBJECT_XHTML", true, arguments));
}

/*-------------------------------------------------------------------------------------------------

ActivateActiveX

Purpose:  Dynamically replace any elements that will be affected by the new security feature 
          in IE6/IE7 that requires a user to click certain types of elements to activate them 
          before use.

Usage:    Include this file at the end of your html document using the following...
	      <script language="javascript">
	        ActivateActiveX(); 
	      </script>

License:

ActivateActiveX is Copyright (C) 2006 Jason Baker (therippa AT gmail.com). It is available 
as open source code from: http://therippa.blogspot.com

This program is free software; you can redistribute it and/or modify it under the terms 
of the GNU General Public License as published by the Free Software Foundation; 
either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
See the GNU General Public License for more details http://www.gnu.org/licenses/gpl.html

-------------------------------------------------------------------------------------------------*/

function ActivateActiveX ()
{
  // Determine browser, we only need this for Internet Explorer
  
  var ieVersion = GetInternetExplorerVersion();
  var isInAuthoringMode = CheckAuthoringMode();  
  
  if (navigator.appName == "Microsoft Internet Explorer" && 
      ieVersion > 4 &&       
      isInAuthoringMode == false) 
  {	
  
	//Array of elements to be replaced
	var arrElements = new Array(4);
	arrElements[0] = "object";
	arrElements[1] = "embed";
	arrElements[2] = "applet";	
	
	//Loop over element types
	for (n = 0; n < arrElements.length; n++) 
	{
	  try
	  {		  
	    //set object for brevity
	    replaceObj = document.getElementsByTagName(arrElements[n]);
		
	    //loop over element objects returned
	    for (i = 0; i < replaceObj.length; i++ ) 
	    {
	      try
	      {	        
	        var isSkipped = CheckIfSkipped(replaceObj[i].classid);	        	        
	        
	        if (isSkipped == false)
	        {
			       
	          //set parent object for brevity
		      parentObj = replaceObj[i].parentNode;
	
	          //If top nav flash do not reinsert HTML
			  if(parentObj.id != 'flashcontent')
			  {   			  
				//grab the html inside of the element before removing it from the DOM
				newHTML = parentObj.innerHTML;
				
				//remove element from the DOM
				parentObj.removeChild(replaceObj[i]);
				
				//stick the element right back in, but as a new object
				parentObj.innerHTML = newHTML;		
		      }
		    }  
		  }
		  catch (error1)
		  {		    

		  }  
	    }
	  }
	  catch (error2)
	  {	  

	  }	  
    }

  }
  
  // Check if a DIV has been hidden. If yes then make it visible. 
  if (hiddenDivID != '')
  {
    SetVisibility (hiddenDivID, 'visible');
  } 
  
}


// Returns the version of Internet Explorer
function GetInternetExplorerVersion()
{  
  var version = 0;
  
  if (navigator.appName == "Microsoft Internet Explorer") 
  {
    if (navigator.appVersion.indexOf("MSIE") != -1)
    {
      var temp = navigator.appVersion.split("MSIE");
      version = parseFloat(temp[1]);
    }
  }
  
  return version;
}


// This function sets the visibility of a DIV element.
function SetVisibility (divID, value)
{
  var d = document.getElementById(divID);
  d.style.visibility = value;
}


// This function checks if the current page in in authoring mode.
function CheckAuthoringMode ()
{
  var isInAuthoringMode = false;  
  
  var location = document.location.href.toLowerCase();
  var authoringPreview = location.lastIndexOf("authoringpreview");  
  var authoring = location.lastIndexOf("authoring");          
  var authoringNew = location.lastIndexOf("authoringnew");        
  var authoringReEdit = location.lastIndexOf("authoringreedit");
  
  if (authoringNew > -1 || authoringReEdit > -1 || authoring > -1 || authoringPreview > -1)
  {
    isInAuthoringMode = true;
  }
  
  return isInAuthoringMode;
}


function CheckIfSkipped (objectClassID)
{
  var isSkipped = false;
  
  if (objectClassID != null)
  {
    var lowerCaseClassID = objectClassID.toLowerCase();
  
    if (lowerCaseClassID == 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa' ||   // Real Player                        
        lowerCaseClassID == 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b')   // QuickTime Player        
    {  
      isSkipped = true;
    }   
  }  

  return isSkipped;
}


function sendOmnitureEvents (eventType,url)
{
if (typeof(s_account)!='undefined')
{
var fileName;
var currentDomain = document.domain;
var resultUrl;
var externalMediaUrl;
var mediafileDomain = url.substring(url.indexOf("/")+2);
mediafileDomain = mediafileDomain.substring(0,mediafileDomain.indexOf("/"));

url = url.toLowerCase();
externalMediaUrl = url + " | " + currentPage;
fileName = url.substring(url.lastIndexOf("/")+1);
fileName = fileName + " | " + currentPage;


var s=s_gi(s_account); 
var UserGuid = RetrieveCookieVal("UserId");

	if (UserGuid!=null){
		s.prop29=UserGuid;
	}

	if ((mediafileDomain == currentDomain) || (url.indexOf("/") == 0)){
	resultUrl = fileName
	}
	else{
	resultUrl = externalMediaUrl
	}
	resultUrl

	switch(eventType)
	{
		case 'event6': 
			s.linkTrackVars='eVar16,prop29,events';
			s.linkTrackEvents='event6';
			s.eVar16=resultUrl;
			s.events='event6';
			s.tl(true,'o','Watch the Video'); 
			break;
		case 'event7':
			s.linkTrackVars='eVar17,prop29,events';
			s.linkTrackEvents='event7';
			s.eVar17=resultUrl;
			s.events='event7';
			s.tl(true,'o','Listen to Audio');
			break;
		case 'event9':
			s.linkTrackVars='eVar19,prop29,events';
			s.linkTrackEvents='event9';
			s.eVar19=url;
			s.events='event9';
			s.tl(true,'o','Rate this Article');
			break;		
		case 'event28':
			s.linkTrackVars='eVar32,prop29,events';
			s.linkTrackEvents='event28';
			s.eVar32=url;
			s.events='event28';
			s.tl(true,'o','Print Article');
			break;
		default:

	}
	}
}


function RetrieveCookieVal(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length + 1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return null;
}
/*End of LOADMEDIACONTROL.JS*/

/*Start of  TOPNAV.JS*/
         
         /*Function for changing image on mouseover and mouseout event.*/
         function changeimage(object,mouseover)
         {
			/*Check if the calling event came from a mouseover event*/
            if (mouseover)
            {
			   /* mouseover argument equal to true */
               /* Find the divider image before the navimage then change the image source to  divider image on */
               document.getElementById("TopNav" + (parseInt(object.id.substr(6,object.id.length)) - 1)).src=nav_divider_on;  
               
               /* Change the image source of the calling Image to nav image on */
               object.src=nav_image_on[parseInt(object.id.substr(6,object.id.length))];
               
               /*Find the divider image after the navimage then change the image source to divider image on */
               document.getElementById("TopNav" + (parseInt(object.id.substr(6,object.id.length)) + 1)).src=nav_divider_on;
            }
            else
            {
			   /* mouseover argument equal to false */	
               /* Find the divider image before the navimage then change the image source to  divider image off */
               document.getElementById("TopNav" + (parseInt(object.id.substr(6,object.id.length)) - 1)).src=nav_divider_off;  
               
               /* Change the image source of the calling Image to nav image off */
               object.src=nav_image_off[parseInt(object.id.substr(6,object.id.length))];
               
               /*Find the divider image after the navimage then change the image source to divider image off */
               document.getElementById("TopNav" + (parseInt(object.id.substr(6,object.id.length)) + 1)).src=nav_divider_off;
            }
            try
            {
				setActiveImage(ActiveImageID) 
			}
			catch(err)
			{
			}
         }

	function setActiveImage(objectid) 
		{
			   try
			   {
			   var object = document.getElementById(objectid)
			   
			   if (object==null) return;
			   
			   /* mouseover argument equal to true */
	               /* Find the divider image before the navimage then change the image source to  divider image on */
	               document.getElementById("TopNav" + (parseInt(objectid.substr(6,objectid.length)) - 1)).src=nav_divider_on;  
	               
	               /* Change the image source of the calling Image to nav image on */
	               object.src=nav_image_on[parseInt(objectid.substr(6,objectid.length))];
	               
	               /*Find the divider image after the navimage then change the image source to divider image on */
	               document.getElementById("TopNav" + (parseInt(objectid.substr(6,objectid.length)) + 1)).src=nav_divider_on;
	               }
	               catch(err)
	               {
	               }
		}


/*End of TOPNAV.JS*/

/*Start of SearchSuggest.JS*/
var isClose = false; 
var origVal = ""; 
var rowHighlighted; 
var pos = 0; 
var searchBox;
var searchSuggestion = false;
var divID = "";
var chosenRow = ""; 
var timeOut;


// retains input on search text box 
function SearchBoxOnFocus(searchTextBox) 
{
	if (searchSuggestion == false)		
		searchTextBox.value = "";
}

// detects keyboard events
function Detect(searchTextBox,e)
{	
	var KeyID = e.keyCode;
	
	var backspaceKey = 8;
	var enterKey = 13;	
	var escapeKey = 27;	
	var arrowUpKey = 38;
	var rightKey = 39;	
	var arrowDownKey = 40;
	var printScreenKey = 44;
	var deleteKey = 46;
	
	searchBox = searchTextBox;
	
	if (GetParentDiv(searchBox) != "SiteSearchControlBottomBasic_pnlBasic")
	{
		switch (KeyID)
		{
			case printScreenKey:
				break;
			
			case enterKey:
				Collapse(searchTextBox);
				break;
				
			case backspaceKey:  
			{			
				origVal = searchTextBox.value;
				if (isClose == false)
					{
						clearTimeout(timeOut);
						timeOut=setTimeout("Expand()",200)
					}
				if (Ltrim(searchTextBox.value).length == 0)
					isClose = false;
				pos = 0;
			}
				break;
				
			case deleteKey:
			{			
				origVal = searchTextBox.value;
				if (isClose == false)
					{
						clearTimeout(timeOut);
						timeOut=setTimeout("Expand()",200)
					}
				if (Ltrim(searchTextBox.value).length == 0)
					isClose = false;
				pos = 0;
			}
				break;
				
			case escapeKey:
				{ 
					if(document.getElementById("row1") != null) 
						Collapse(searchTextBox);
					searchTextBox.value = origVal;
				}
				break;
				
			case rightKey:
				OnRightKey(rowHighlighted);
				break;
				
			case arrowDownKey:
			{
				OnDownKey(searchTextBox);				
			}
				break;

			case arrowUpKey:
			{
				OnUpKey(searchTextBox);
			}	
				break;
					
			default:
			{
				origVal = searchTextBox.value;
				if (isClose==false) 
				{
					clearTimeout(timeOut);
					timeOut=setTimeout("Expand()",250)
				}
			}
		}
	}	
}

// displays search suggestion text box
function Expand ()
{    
	if (isClose==false) 
	{
		divID = GetSearchSuggestDiv(searchBox);
		var state = document.getElementById(divID);
		var width = SetSearchSuggestWidth(searchBox);
		
		if ((Ltrim(searchBox.value).length) > 0)
		{
			origVal = Ltrim(searchBox.value);
			
			if (window.ActiveXObject)  
				state.innerHTML = DisplayResult(origVal, width);
			else if (document.implementation && document.implementation.createDocument)  
				state.appendChild(DisplayResult(origVal, width));
			
			if(document.getElementById("row1") != null) 
				state.className = "expand";		
			else 
				Collapse(searchBox);
		}	
		else 
		{
			Collapse(searchBox);
			isClose = false;
		}	
	}
}

// hides the search suggestion text box 
function Collapse (searchTextBox)
{
	divID = GetSearchSuggestDiv(searchTextBox);
	var state = document.getElementById(divID);
	state.className = "collapse";
	state.innerHTML = "";
	searchSuggestion = true;
	searchTextBox.focus();	
}

//Displays resulting search suggestions
function DisplayResult(input, width)
{
var str = input;
var firstChar=String(str).substring(0,1);
var xmlPath = "/Accenture/XML/SearchSuggestion_"

input = input.replace(",","&#44");
input = input.replace(";","&#59");

var param = "width," + width + ";rawinput," + input;

if (IsNumeric(firstChar))
	{var xmlPath = xmlPath + "Numeric.xml";}
else
	{var xmlPath = xmlPath + firstChar + ".xml"; }

  var resultSuggestions = xsltTransform(xmlPath,"/Accenture/XSLT/SearchSuggestion.xslt",param);
  Collapse(searchBox);
  return(resultSuggestions);
}

// shows table when right arrow key is pressed
function OnRightKey (row)
{
	Expand(searchBox);
	Dehighlight(row);
	pos = 0;
}

// handles up Arrowkey event
function OnUpKey (searchTextBox)
{
	if(document.getElementById("row1") != null)
	{
		var row = document.getElementById('row'+pos);
		
		if (pos==0)
		{
			//saves original value of search text field
			origVal = searchTextBox.value;
			pos = document.getElementById('searchSuggest').rows.length - 1;
		}
		
		else 
		{
			Dehighlight(row);
			pos--
		}
		
		if (pos==0)
		{
			searchTextBox.value = origVal; //displays original value
			chosenRow = "";
		}
		else 
		{
			var data = document.getElementById('data'+pos);
			row = document.getElementById('row'+pos)
			Highlight(row);
			
			if (window.ActiveXObject)  	
				searchTextBox.value = data.innerText;  // IE
			else if (document.implementation && document.implementation.createDocument)  
				searchTextBox.value = data.textContent; //firefox	
			chosenRow = searchTextBox.value;						
		}	
	}
}

// handles down Arrowkey event
function OnDownKey(searchTextBox)
{
	if(document.getElementById("row1") != null)
	{	
		var row = document.getElementById('row'+pos);
						
		if ((pos==0) && (origVal.lenght!=0))					
				origVal = searchTextBox.value;					
		else 
			Dehighlight(row);				
		
		if (pos!=(document.getElementById('searchSuggest').rows.length-1))
			pos++;
		else if (pos>=(document.getElementById('searchSuggest').rows.length-1))
			pos = 0;
		
		var data = document.getElementById('data'+pos);
		
		if (pos==0)
		{
			searchTextBox.value = origVal;	
			chosenRow = "";
		}					
		else 
		{
			row = document.getElementById('row'+pos)
			Highlight(row);
			
			if (window.ActiveXObject)  
				searchTextBox.value = data.innerText;  // IE
			else if (document.implementation && document.implementation.createDocument)  
				searchTextBox.value = data.textContent; //firefox		
			chosenRow = searchTextBox.value;			
		}
	}
}

// closes search suggest textbox when any part of the page is clicked 
function OnBlurSearchTextBox (searchTextBox)
{
	var innerTextVar;
	
	if (window.ActiveXObject)  
		innerTextVar = divID.InnerText ;  
	else if (document.implementation && document.implementation.createDocument)  
		innerTextVar = divID.textContent ; 
	
	if (innerTextVar == "")
		Collapse(searchTextBox);
		
	divID = GetSearchSuggestDiv(searchTextBox);
	var state = document.getElementById(divID);
	
	if (state.innerHTML != "")
	{	
		if (chosenRow == "")
			searchTextBox.value = origVal;
		else if (chosenRow == "CloseLink")
			{
				searchTextBox.focus();
				searchTextBox.value = origVal;
				isClose = true;		
			}
		else
			{
				searchTextBox.focus();
				searchTextBox.value = chosenRow;	
			}
	}
	
	state.className = "collapse";
	state.innerHTML = "";
	searchSuggestion = true;
	chosenRow = "";		
}

// handles mouse out event 
function SuggestMouseOut()
{	
	chosenRow = "";	
}

// highlights row when mouse overed
function SuggestMouseOver (row)
{	
	rowHighlighted = document.getElementById("row" + pos);
	if (rowHighlighted != undefined)
		Dehighlight(rowHighlighted);	
	Highlight(row);
	pos = row.id.replace("row","");
	
	if (window.ActiveXObject)  
		chosenRow = document.getElementById("data" + pos).innerText;   
	else if (document.implementation && document.implementation.createDocument)  
		chosenRow = document.getElementById("data" + pos).textContent; 
}

// highlights row on search suggestion table
function Highlight (row)
{
	row.className = "highlight";
	if (row.id == "row1")
		document.getElementById("suggestions").className = "suggestHighlight";
	rowHighlighted = row;
}

// dehighlights previous row on search suggestion table
function Dehighlight (row)
{
	if (document.getElementById("suggestions")!= null)
	{
		document.getElementById("suggestions").className = "suggestionsText"
		row.className = "dehighlight";
		rowHighlighted = row; 
	}
}

// hides search suggestion table when "close" link is pressed
function SuggestClosed (row)
{
	Collapse(searchBox);
	isClose = true;
}

// gets parent DIV
function GetParentDiv (node)
{
	
	if ((node.tagName == "DIV") || ((node.tagName == "TABLE") && (node.id != "")))
		return(node.id);	
	else 
		return(GetParentDiv(node.parentNode));	
	
}

// gets name of search text box 
function GetSearchSuggestDiv (searchTextBox)
{ 	
  	if (Ltrim(searchTextBox.id) == "SiteSearchControlStandard_txtBasicSearch")
		 return("searchSuggestPage");
	else 
		return("searchSuggestBanner");
}

// sets width of search suggest textbox
function SetSearchSuggestWidth(searchTextBox)
{
	if (Ltrim(searchTextBox.id) == "SiteSearchControlStandard_txtBasicSearch")
			return("240px");
	else 
		return("180px");
}

function IsNumeric(numstr)
{
    var mystring = numstr;
    var IsNumber=false;

	if ((mystring.match(/^\d+$/)) || (mystring.match(/^\W+$/)))
        IsNumber=true; 

	return IsNumber;

}

function Ltrim(str) 
{
	var chars = chars || "\\s";
	return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
/*End of SearchSuggest.JS*/

/*Start of Homepage.JS*/
var detectableWithVBHomePage="false";

function DetectBrowser(CmsEditMode, WithFlash)
{
	var nonFlash;
	var flash;
	var rNav;
	var mode;
	
	//get specific table rows for flash, non flash and rightnav
	nonFlash = GetElementId('NonFlashSection');
	flash = GetElementId('FlashSection');
	rNav = GetElementId('RHNav');

	//use the detectPlugin function for Flash plugins
	pluginFound = detectPlugin('Shockwave','Flash'); 
	
	// if not found, try to detect with VisualBasic
    if(!pluginFound && detectableWithVBHomePage)
    {
		pluginFound = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1');		
    }
    
    if (CmsEditMode == 'true')
    {
		flash.style.display = '';
		nonFlash.style.display = '';
		rNav.style.display = '';
    }

	else
	{
		if (pluginFound && WithFlash == 'true')
		{
			flash.style.display = '';
			nonFlash.style.display = 'none';
			rNav.style.display = 'none';
		}	
		else
		{
			flash.style.display = 'none';
			nonFlash.style.display = '';
			rNav.style.display = '';
		}
	}
}

/******************************************/

function DetectBrowserV2(CmsEditMode, WithFlash)
{
	var nonFlash;
	var flash;
	var rNav;
	var mode;
	
	//get specific table rows for flash, non flash and rightnav
	nonFlash = GetElementId('NonFlashSection');
	flash = GetElementId('FlashSection');
	rNav = GetElementId('RHNav');

	//use the detectPlugin function for Flash plugins
	pluginFound = detectPlugin('Shockwave','Flash'); 
	
	// if not found, try to detect with VisualBasic
    if(!pluginFound && detectableWithVBHomePage)
    {
		pluginFound = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1');		
    }
    
    if (CmsEditMode == 'true')
    {
		flash.style.display = '';
		nonFlash.style.display = '';
		rNav.style.display = '';
    }

	else
	{
	
		if (pluginFound && WithFlash == 'true'  && !IsFlashHidden())
		{
			flash.style.display = '';
			nonFlash.style.display = 'none';
			rNav.style.display = 'none';
		}	
		else
		{
			flash.style.display = 'none';
			nonFlash.style.display = '';
			rNav.style.display = '';
		}
	}
}

function DetectBrowserWidescreen()
{
	var nonFlash;
	var flash;


	//get specific table rows for flash, non flash and rightnav
	nonFlash = GetElementId('NonFlashSection');
	flash = GetElementId('FlashContent');

	//use the detectPlugin function for Flash plugins
	pluginFound = detectPlugin('Shockwave','Flash'); 
	
	// if not found, try to detect with VisualBasic
    if(!pluginFound && detectableWithVBHomePage)
    {
		pluginFound = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1');		
    }

	if (pluginFound == false)
	{
		flash.style.display = 'none';
		nonFlash.style.display = 'block';
	}	
	else
	{
		flash.style.display = 'block';
		nonFlash.style.display = 'none';
	}
}

function LoadFlashPlayer3(mediaUrl)
{

document.write ('<object id="Flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" align="top"> ');
document.write ('<param name="movie" value="' + mediaUrl + '"> ');
document.write ('<param name="LOOP" value="false"/> ');
document.write ('<param name="wmode" value="transparent"/> ');
document.write ('<param name="allowScriptAccess" value="always" /> ');
document.write ('<param name="allowFullScreen" value="false" /> ');
document.write ('<param name="scale" value="noborder" /> '); 
document.write ('<param name="salign" value="lt" /> ');
document.write ('<param name="quality" value="high" /> ');
document.write ('<embed name="Flash" wmode="transparent" quality="high" scale="noborder" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" LOOP="false" allowScriptAccess="always" allowFullScreen="false" width="100%" height="100%" align="top" salign="1t" src = "' + mediaUrl + '"/>');
document.write ('</object>');

}


function IsFlashHidden()
{

var TopNavDHTML;
var OS = navigator.platform.toLowerCase();


TopNavDHTML = GetElementId('TopNavWithDHTML');


	if (TopNavDHTML != null)
	{
		if ((OS.indexOf("mac") != -1) && (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Opera") != -1 ))
		{
			return true;
		}
		
	}
	return false;


}

/*******************************************/

function GetElementId(elemId)
{

   if( document.getElementById ) 
   {
            return document.getElementById(elemId); 
   }
   if( document.all ) 
   {
            return document.all[elemId]; 
   }
}


function detectPlugin() {
    // allow for multiple checks in a single pass
    var daPlugins = detectPlugin.arguments;
    // consider pluginFound to be false until proven true
    var pluginFound = false;
    // if plugins array is there and not fake
    if (navigator.plugins && navigator.plugins.length > 0) 
    {
		var pluginsArrayLength = navigator.plugins.length;
		// iterate plugins
		for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ )
		 {
			// loop through all desired names and check each against the current plugin name
			var numFound = 0;
			for(namesCounter=0; namesCounter < daPlugins.length; namesCounter++) 
			{
				// if desired plugin name is found in either plugin name or description
				if( (navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter]) >= 0) || 
				(navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter]) >= 0) ) 
				{
					// this name was found
					numFound++;
				}   
			}
	    // if the number we found matches the total number provided then we were successful
	    if(numFound == daPlugins.length)
			 {
				pluginFound = true;				
				break;
			 }
		}
    }
    return pluginFound;
}


// VBScript to detect plugins for IE browsers
if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
    document.writeln('<script language="VBscript">');

    document.writeln('\'do a one-time test for a version of VBScript that can handle this code');
    document.writeln('detectableWithVBHomePage = False');
    document.writeln('If ScriptEngineMajorVersion >= 2 then');
    document.writeln('  detectableWithVBHomePage = True');
    document.writeln('End If');

    document.writeln('\'this next function will detect most plugins');
    document.writeln('Function detectActiveXControl(activeXControlName)');
    document.writeln('  on error resume next');
    document.writeln('  detectActiveXControl = False');
    document.writeln('  If detectableWithVBHomePage Then');
    document.writeln('     detectActiveXControl = IsObject(CreateObject(activeXControlName))');
    document.writeln('  End If');
    document.writeln('End Function');    

    document.writeln('</scr' + 'ipt>');
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function PlayFlash(){
	var ret = 
	AC_GetArgs
	(  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
	, "application/x-shockwave-flash"
	); 
	AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);	
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

//START - Functions for TopNavHotSpots
boxOn = new Image();
boxOn.src = "../images/topnav_box_on.gif";
boxOff = new Image();
boxOff.src = "../images/topnav_box_off.gif";

pipeOn = new Image();
pipeOn.src = "../images/topnav_pipe_on.gif";
pipeOff = new Image();
pipeOff.src = "../images/topnav_pipe_off.gif";

function turnOn(imgType, imgName) { 
	imgOn = eval(imgType +"On.src");
	document.getElementById(imgName).src = imgOn; 
}

function turnOff(imgType, imgName) { 
	imgOff = eval(imgType + "Off.src");
	document.getElementById(imgName).src = imgOff; 
}

//buttonX, navPipeX
function buttonRollOver(buttonNum){
	var rightPipeNum = buttonNum + 1;
	var leftPipe = "navDivider" + buttonNum;
	var boxName = "topnav" + buttonNum;
	var rightPipe = "navDivider" + rightPipeNum;
	
	turnOn('pipe', leftPipe);
	turnOn('box', boxName);
	turnOn('pipe', rightPipe);
}

function buttonRollOut(buttonNum){
	var rightPipeNum = buttonNum + 1;
	var leftPipe = "navDivider" + buttonNum;
	var boxName = "topnav" + buttonNum;
	var rightPipe = "navDivider" + rightPipeNum;
	
	turnOff('pipe', leftPipe);
	turnOff('box', boxName);
	turnOff('pipe', rightPipe);
}
//END - Functions for TopNavHotSpots
/*End of Homepage.JS*/


/*Start of TopNavigationFlash.js*/

var detectableWithVB = false;
var flashFile;


function DetectFlashPlugin()
{
	//contains value whether the plug-in exists in user browser
	var pluginFound = false;
	
	//retrieve the value of the FlashPlugin cookie
	var flashPlugInCookie =  readTopNavCookie('FlashPlugIn');
	
	//assign flash url to the a global variable
	flashFile = flashFileURL;
	
	//if cookie does not exist, create the cookie
	if (flashPlugInCookie == ''){
	
		//use the DetectPlugin function for Flash plugins
		pluginFound = DetectPlugin('Shockwave','Flash'); 
		
		// if not found, try to detect with VisualBasic
		if(!pluginFound && detectableWithVB)
		{			
			pluginFound = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1');		
		}		
		
		//save the value of the pluginFound variable to a cookie
		writeTopNavCookie('FlashPlugIn',pluginFound);		
	}
	else{				
		//if value of cookie is true, then set pluginFound value to true
		if (flashPlugInCookie == 'true') pluginFound = true;
	}
	
	//if plugin is found, display the section with flash and hide the section without flash.
	if(pluginFound && IsFlashFile(flashFile))
	{	
		setDisplay(getCWSObj('TopNavWithFlash'),'');
		setDisplay(getCWSObj('TopNavWithoutFlash'),'none');		
		setDisplay(getCWSObj('flashSpacer'),'');				
	}
	else{	
		setDisplay(getCWSObj('TopNavWithFlash'),'none');
		setDisplay(getCWSObj('TopNavWithoutFlash'),'');		
		setDisplay(getCWSObj('flashSpacer'),'none');				
	}		
}


function DetectPlugin() {
    // allow for multiple checks in a single pass
    var daPlugins = DetectPlugin.arguments;
    // consider pluginFound to be false until proven true
    var pluginFound = false;
    // if plugins array is there and not fake
    if (navigator.plugins && navigator.plugins.length > 0) 
    {
		var pluginsArrayLength = navigator.plugins.length;
		// iterate plugins
		for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ )
		 {
			// loop through all desired names and check each against the current plugin name
			var numFound = 0;
			for(namesCounter=0; namesCounter < daPlugins.length; namesCounter++) 
			{
				// if desired plugin name is found in either plugin name or description
				if( (navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter]) >= 0) || 
				(navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter]) >= 0) ) 
				{
					// this name was found
					numFound++;
				}   
			}
	    // if the number we found matches the total number provided then we were successful
	    if(numFound == daPlugins.length)
			 {
				pluginFound = true;				
				break;
			 }
		}
    }
    return pluginFound;
}

function IsFlashFile(flashFileURL)
{
	var flashURL = flashFileURL.toLowerCase();
	
	if(flashURL.indexOf('.swf') != -1){
		return true;
	}
	else{
		return false;
	}

}

function readTopNavCookie(name)
{
  var cookieValue = '';
  var search = name + '=';
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(';', offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function writeTopNavCookie(name, value)
{
  try
  {
	document.cookie = name + '=' + escape(value) + '; path=/';
  }
  catch(Err)
  {}
}



function getCWSObj(id) 
{
	if (document.getElementById) {
		return document.getElementById(id);
		}
	else if (document.all) {
		getCWSObj = document.all[id];
		}
}

function setDisplay(obj,style)
{
	obj.style.display=style;
}

//OnLoad of JavaScript 
// VBScript to detect plugins for IE browsers
if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
    document.writeln('<script language="VBscript">');

    document.writeln('\'do a one-time test for a version of VBScript that can handle this code');
    document.writeln('detectableWithVB = False');
    document.writeln('If ScriptEngineMajorVersion >= 2 then');
    document.writeln('  detectableWithVB = True');
    document.writeln('End If');

    document.writeln('\'this next function will detect most plugins');
    document.writeln('Function detectActiveXControl(activeXControlName)');
    document.writeln('  on error resume next');
    document.writeln('  detectActiveXControl = False');
    document.writeln('  If detectableWithVB Then');
    document.writeln('     detectActiveXControl = IsObject(CreateObject(activeXControlName))');
    document.writeln('  End If');
    document.writeln('End Function');    

    document.writeln('</scr' + 'ipt>');
}

/*End of TopNavigationFlash.js*/

/* Start of Flash Take Over JS */
function takeOverContent()
{
var changeID;
changeID = document.getElementById("FlashContent");
changeID.className = "flash-section-takeover";
stopScroll();

}

function closeContent()
{
var changeID;
changeID = document.getElementById("FlashContent");
changeID.className = "flash-section";
startScroll();

}

/* End of Flash Take Over JS*/

// function that opens the connection of the page to the printer 
function PrintThis() {
	if (window.print) {		
		window.print()
	} 
	else { 
		alert('To print this page press Ctrl-P on your keyboard.');
	}	
}

function RvaToMainContent()
{
	if (document.getElementById("RVA")!=null && document.getElementById("rva-column3")!=null){
		document.getElementById("rva-column3").innerHTML = document.getElementById("RVA").innerHTML;
	
	}	
}

//Function to equally set the column heights (column 2 and column 3) in Widescreen Outlook Navigation template
function SetEqualHeight(){
	var sourceObject = document.getElementById("Column2");
	var destinationObject = document.getElementById("Column3");
					
	if (sourceObject && destinationObject) { 
		var tallestcolumn =  0;	
		var column2 =  document.getElementById("Column2").offsetHeight;
		var column3 =  document.getElementById("Column3").offsetHeight;   

		tallestcolumn  = column2;

		if (tallestcolumn <  column3)
		{
			tallestcolumn  = column3; 
		} 
	  
		document.getElementById("Column2").style.height = tallestcolumn;  
		document.getElementById("Column3").style.height = tallestcolumn;	
   }
}

/*Start of Client Side XSLTransformation JS*/
function xsltTransform(xmlPath,xslPath,parameter)
{
xml=loadXMLDoc(xmlPath);
xsl=loadXSLDoc(xslPath);

var param = parameter.split(";");
var count= param.length;

if (window.ActiveXObject)
  {
    var template = new ActiveXObject("MSXML2.XSLTemplate");
    template.stylesheet = xsl.documentElement;
    var xsltProcessor = template.createProcessor();
    xsltProcessor.input=xml;
	for (i=0; i<=count-1;i++) 
	{
		var paramKeyValue = param[i].split(",");	
		xsltProcessor.addParameter(paramKeyValue[0],paramKeyValue[1]);
	}    
    xsltProcessor.transform();
    var result=xsltProcessor.output; 
	
    return result; 
 }
 
  else if (document.implementation && document.implementation.createDocument)
  {
	  	
	xsltProcessor=new XSLTProcessor();
    xsltProcessor.importStylesheet(xsl);
	for (i=0; i<=count-1;i++) 
	{
		var paramKeyValue = param[i].split(",");	
		xsltProcessor.setParameter(null,paramKeyValue[0],paramKeyValue[1]);
	} 	
	var resultDocument = xsltProcessor.transformToFragment(xml,document);

	return resultDocument;
   	
  }
}


function loadXSLDoc(fname)
{

  var xmlDoc;
  
  if (window.ActiveXObject)
  {
		xmlDoc=new ActiveXObject("MSXML2.FreeThreadedDomDocument");
  }
 
  else if (document.implementation && document.implementation.createDocument)
  {  
		xmlDoc=document.implementation.createDocument("","",null);
  }
  else
  {
		alert('Your browser cannot handle this script');
  }

 if(xmlDoc&&typeof xmlDoc.load!='undefined')
    {
		xmlDoc.async=false;
		xmlDoc.load(fname);
		return xmlDoc;
	}
  
 else
   {
		var request=new XMLHttpRequest();
		request.open("GET",fname,false);
		request.send("");
		return request.responseXML;
	}
	
}


var xmlhttp;
function loadXMLDoc(url)
{
	xmlhttp=null;
	if (window.XMLHttpRequest)
	{
		xmlhttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (xmlhttp!=null)
	{
		xmlhttp.open("GET",url,false);
		xmlhttp.send("");
		return xmlhttp.responseXML;
	}

}
/*End of CLient Side XSLTransformation JS*/

/*Start of EventKeyPress Function for the SearchSuggest*/
function EnterKeyHandler(event, btn){
  var isIE = window.navigator.appName.toLowerCase().indexOf("microsoft") > -1;
  if (event.keyCode == 13){
     var btn = document.getElementById(btn);
      if (isIE == false){
         event.returnValue = false;
         event.cancel = true;
         window.releaseEvents(event.KEYPRESS);
 
         if (btn !=null ){
           btn.click();
         }
      }
      else{
         event.returnValue = false;
         event.cancel = true;
 
         if (btn !=null ){
           btn.click();
         }
      }
  }
  return false;
 }
/*End of EventKeyPress Function for the SearchSuggest*/


/*Start of Twitter JS*/
var marqueespeed = 4;
var marqueeElement = document.getElementById("marquee");
var marqueeContent = null;
var marqueeWidth = 0;
var marqueeHeight = 0;
var actualWidth = 0;

initMarquee();

function stopScroll() {
	marqueespeed = 0;
}

function startScroll() {
	marqueespeed = 4;
}

function initMarquee(){
	if (marqueeElement != null)
	{
		marqueeContent = document.getElementById("marquee").innerHTML;
		marqueeWidth = marqueeElement.offsetWidth;
		marqueeHeight = marqueeElement.offsetHeight;
		actualWidth = marqueeWidth;
		
		marqueeElement.onmouseover = stopScroll;
		marqueeElement.onmouseout = startScroll;
		marqueeElement.style.left = (marqueespeed * 4) + "px";
		marqueeElement.style.position = "absolute";
		marqueeElement.style.overflow = "hidden";
		marqueeElement.innerHTML = '<nobr><span id="marquee1" style="position:relative; width:auto;">' + marqueeContent + '</span></nobr>';
		actualWidth = document.getElementById("marquee1").offsetWidth;
		//lefttime = setInterval("updateMarquee()", 100);
	}
}

function updateMarquee(){
	if(actualWidth == 0){
		actualWidth = document.getElementById("marquee1").offsetWidth;
	}

	if (parseInt(document.getElementById("marquee1").style.left) > ((actualWidth * -1) + 8)) {
		document.getElementById("marquee1").style.left = parseInt(document.getElementById("marquee1").style.left) - marqueespeed + "px";
	} else {
		document.getElementById("marquee1").style.left = "8px";
	}

	if (parseInt(document.getElementById("marquee2").style.left) > ((actualWidth * -1) + 8)) {
		document.getElementById("marquee2").style.left = parseInt(document.getElementById("marquee2").style.left) - marqueespeed + "px";
	} else {
		document.getElementById("marquee2").style.left = "8px";
	}
}
/*End of Twitter JS*/
/*Start of Twitter JS Part 2*/
function twitterUpdates()
{
	var twitterObject = document.getElementById("twitterControl");
	var marqueeObject = document.getElementById("marquee");
					
	if (twitterObject && marqueeObject) { 
						marqueeObject.innerHTML = twitterObject.innerHTML; 
					}
					
}
/*End of Twitter JS Part 2*/

/* MRVA 09/01/09
 * Handles the placement for the HPD in Outlook
 */
function OutlookHPDPlacer()
{
	var sourceObject = document.getElementById("outlook-highperf-container");
	var destinationObject = document.getElementById("outlookhpd");
					
	if (sourceObject && destinationObject) { 
		destinationObject.innerHTML = sourceObject.innerHTML; 
	}
}
/* End of function */

/* MRVA 09/10/09
 * Handles the placement for the Widescreen Navigation 3rd sub-column under the 2nd column 
 * and transfers the inner HTML underneath the contact us section.
 *
 * JSV 10/1/09
 * Some layouts require not implementing the transfer of the 2nd column’s 3rd sub column to 3rd column.
 * CSS picker and the selector #firstColPanel is the criteria, if #firstColPanel display property is equal to none, 
 * then do not implement the transfer else implement the transfer. 
 */
function Transfer3rdColumn(row)
{
	var intRow = parseInt(row);
	var sourceObject;
	var destinationObject;
	var parentSourceObject;
	var withExtraCol = false;
	
	var version = 999;
			
	function getcss( selector, property ) {
		try{
			
			if (navigator.appVersion.indexOf("MSIE") != -1)
				{
					version = parseFloat(navigator.appVersion.split("MSIE")[1]);

					if(version >=7)
					{	
						var i, r, s=document.styleSheets && document.styleSheets[2];
						//alert('7 higher');	
					}
					
					else if(version <=6)
					{
						var i, r, s=document.styleSheets && document.styleSheets[3];
						//alert('6 Lower');
						
					}
				
				}
			else
			{
				var i, r, s=document.styleSheets && document.styleSheets[1];
				//alert('Absolutely Not IE')
			}

				if(s) {
					r = s.rules ? s.rules : s.cssRules; 
					if(r) {
						i = r.length; 
						while (i--) {
							if(r[i].selectorText.toLowerCase() === selector.toLowerCase()) {
								return ( r[i].style[property] );
								}
							}
						}
					}
			return null;
		}
		catch(err){
			return null;
		}
	}

	var firstColPanel = getcss('#firstColPanel', 'display');
	
	if (firstColPanel!='none'){
		for (var x =1; x<=intRow; x++){
			sourceObject = document.getElementById("row"+ x +"-col2-subcol3");
			destinationObject = document.getElementById("extracolumn");

			if (sourceObject && destinationObject) {
				parentSourceObject = sourceObject.parentNode;
				destinationObject.innerHTML += sourceObject.innerHTML;
				parentSourceObject.removeChild(sourceObject);
				withExtraCol = true;
			}				
		}
		
		if (withExtraCol){
			document.getElementById("connectPanel").style.display="none";
			document.getElementById("rightNavPanel").style.display="none";

		}	
		else{
			document.getElementById("extracolumn").style.display="none";
		}	
	}

}
/* End of function */
