<!--



//initialize Page
function initPage()
{
	topHighlight(topSection);
	leftHighlight(leftNavSelect);
	highlightUtilityNav('utility'+topSection,'on');
}

//highlight topNav
function topHighlight(navId)
{
	var tip = document.getElementById('nav' + navId);
	if (tip)
	{
		tip.style.color = topNavonColor;
  	}
}

//toggle utilityBar Flyout
function toggleUtilityBar(flydownId) 
{
	if (flydownId == "Contact") flydownId = "1";
	
	var navUtility = "utility" + utilityLinks[flydownId][0];
	
	if (utilityLinks[flydownId][1] == "on")
	{
		resetUtilityBar();
	}
	else
	{
		flydown = navUtility + "Flydown";
		resetUtilityBar();
		show(flydown);
		highlightUtilityNav(navUtility,'on');
		utilityLinks[flydownId][1] = "on";
	}
}

//reset utilityBar
function resetUtilityBar()
{
	for(var i = 0; i < utilityLinks.length; i++)
	{
	var navUtility = "utility" + utilityLinks[i][0];
	var flyDown = navUtility + "Flydown";
	var flyDownHide = document.getElementById(flyDown);
	if (flyDownHide)
		{ 
		highlightUtilityNav(navUtility,'off');
		flyDownHide.style.visibility = "hidden";
		current="";
		utilityLinks[i][1] = "off";
    	}
  	}
}

//highlight utilityBar Navigation toggle
function highlightUtilityNav(navId,pos)
{
	var tip = document.getElementById(navId);
	
	if (pos == "on") {
	    if (tip) {
		tip.className = "UtilityNavbarOn";
  	    }
	}
	if (pos == "off") {
	    if (tip) {
		tip.className = "UtilityNavbar";
  	    }
	}
}

//highlight LeftNav
function leftHighlight(navId)
{
	var tip = document.getElementById('left' + navId);
	if (tip)
	{
		tip.style.color = leftNavonColor;
  	}
}

//show elements
function show(name)
{
	current = name;
	var tip = document.getElementById(name);
	if (tip)
	{
		tip.style.visibility = "visible";
	}
}

//hide elements
function hide(name)
{
	var tip = document.getElementById(name);
	if (tip)
	{
		tip.style.visibility = "hidden";
		current = "";
	}
}

//show contact us
function showContact()
{
	topPage();
	resetUtilityBar();
	show('utilityContactFlydown');
	highlightUtilityNav('utilityContact','on');
}

//show utlityBar menu
function showUtilityMenu(menu)
{
    showMenu = menu + "Flydown";
	topPage();
	resetUtilityBar();
	show(showMenu);
	highlightUtilityNav(menu,'on');
}

//activate jumpMenu
function jumpMenu(flydown)
{
	location=document[flydown].menu.options[document[flydown].menu.selectedIndex].value;
}

//activate jumpPublication
function jumpPublication(selection, target)
{
    newLink = document[selection].menu.options[document[selection].menu.selectedIndex].value;
    newWindow = window.open(newLink, target);
}

//search form submit
function submitSearch(tar)
{	
	if (tar == 'A') {
		document.forms['searchFormA'].submit();
	}
	else
	{
		document.forms['searchForm'].submit();
	}
} 

//contact form submit
function submitContact()
{
	language = "en" ;	
  if (language == 'en')
  { 	
	if (document.forms['ContactUs'].elements[2].value == '')  // check for contact name
	{
		alert('Please enter a contact name.');
	}
	else if (document.forms['ContactUs'].elements[3].value == '')  // check for e-Mail address
	{
		alert('Please enter an e-Mail address.');
	}
	else if (document.forms['ContactUs'].elements[3].value != '' &&
    (document.forms['ContactUs'].elements[3].value.indexOf('@') == -1 ||
	 document.forms['ContactUs'].elements[3].value.indexOf('.') == -1))  // check for valid e-Mail address
	{
		alert('Please enter a valid e-Mail address.');		
  	}
	else if (document.forms['ContactUs'].elements[5].value == '-1')  // check for submission regarding
	{
		alert('Please select what your submission is regarding.');
	}
	else if (document.forms['ContactUs'].elements[8].value == '')  // check for comment
	{
		alert('Please enter a question or comment.');
	}
	else
	{
		document.forms['ContactUs'].submit();
	}
  }
  else
  { 
    if (document.forms['ContactUs'].elements[2].value == '')  // check for contact name
	{
		alert('Veuillez entrer le nom d\'un contact.');
	}
	else if (document.forms['ContactUs'].elements[3].value == '')  // check for e-Mail address
	{
		alert('Veuillez entrer votre adresse de courriel.');
	}
	else if (document.forms['ContactUs'].elements[3].value != '' &&
    (document.forms['ContactUs'].elements[3].value.indexOf('@') == -1 ||
	 document.forms['ContactUs'].elements[3].value.indexOf('.') == -1))  // check for valid e-Mail address
	{
		alert('Veuillez vérifier si vous avez entré une adresse de courriel valide.');		
  	}
	else if (document.forms['ContactUs'].elements[5].value == '-1')  // check for submission regarding
	{
		alert('Veuillez choisir l\'objet du message dans la liste d\'options.');
	}
	else if (document.forms['ContactUs'].elements[8].value == '')  // check for comment
	{
		alert('Veuillez taper une question ou formuler des commentaires.');
	}
	else
	{
		document.forms['ContactUs'].submit();
	}
  }
}

//disable status bar
document.onmouseover=hidestatus;
document.onmouseout=hidestatus;

function hidestatus()
{
	if (metaLanguage=="Portuguese") {window.status='KPMG in Brazil'}
	else {window.status='KPMG in Brazil'}
	return true;
	
	if (document.layers)
	{
		document.captureEvents(Event.mouseover | Event.mouseout)
	}
}

//refresh browser
function refresh()
{
	window.location.reload( false );
}

//return to top of page
function topPage()
{
	window.location = pageURL + '#';
}

// ----------------------------------------------------------------------------------------

//Macromedia Functions
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//-->
