
/*
# KPMG Career Paths Application Version: 1.0 - March 2007 
# This code was developed by TMP Worldwide for KPMG. Please refer to the 

# Licensing Agreement for licensing, modification and distribution terms. 

# Credits:
# Igor Kitaychik - ASP, SQL Developer 
# Eric Birnbaum - Flash Developer
# Bobby KC - Front end developer
*/

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);


var current = "";

function show(name)
{
current = name;
var tip = document.getElementById(name);

if (tip)
{
//var flyimg = eval('document.all.img' + name);
tip.style.visibility = "visible";
}
}


function hide(name)
{
var tip = document.getElementById(name);
if (tip)
{
tip.style.visibility = "hidden";
current="";
}
}




/* Function highlights left nav section when subnavs are chosen */
function highlight(id){

var x = document.getElementById(id);

if (x)
{
x.style.color = "#FA9A00";
x.onmouseout = "";
x.onmouseover = "";

}
}


/* Highlight function invoked and defined on a per-page basis */
highlight('nav1')

function showLeftNav(num)
{
//alert("num="+num)
	for(i=1;i<7;i++)
	{
		//a = eval("document.all.LN" + i)
		a = document.getElementById("LN" + i);
		//alert("i="+i)
		
		if(i==num)
		{
			a.style.display='block';
		}else{
			a.style.display='none';
		}
	}
	
	
}
 

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

//document.all.top1.style.color="#FA9A00";

var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		
		html += '\n</HE' + 'AD>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("printReady");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}

function toggleShow2(e) 
{
	var content = document.all(e);
	if(content.style.display == 'none') {
		content.style.display = '';
	} else {
		content.style.display = 'none';
	}
}
function ChangeIt2(x) 
{
	var source = document.all(x)
	if (source.className=="Headline") {
		source.className="Headline";
	} else {
		source.className="Headline";
	}
}

function JSFX_FloatTopLeft(x,y)
{
	var startX = x, startY = y;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	var px = document.layers ? "" : "px";
	function ml(id)
	{
		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
		el.x = startX; el.y = startY;
		return el;
	}
	window.stayTopLeft=function()
	{
		var pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
		var dY = (pY > startY) ? pY : startY;
		ftlObj.y += (dY - ftlObj.y)/8;
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 20);
	}
	ftlObj = ml("divStayTopLeft");
	stayTopLeft();
}

function externalLink(myURL) {
	if (confirm('You are leaving a KPMG Web site and accessing a third party Web site. Third party Web links are provided as a convenience to our users.  As KPMG does not control and is not responsible for third party Web sites or their content, you are urged to review the terms and conditions, privacy policies, and disclaimers that appear on third party Web sites and govern the access and use of such third party Web sites.')){
	window.open(myURL,'Window','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=400');
}
	}
	
	
function goto_link(url)
{
	window.open(url,'','')
}

function move_footer()
{
	document.all.footer.style.top = document.body.clientHeight - 15
}

function scroll_footer()
{
	document.all.footer.style.visibility = "hidden"	
	document.all.footer.style.top = document.body.clientHeight + document.body.scrollTop - 15
	scroll_timer = 1000
}

function show_footer()
{
	timer = 1000
	if (scroll_timer <= 0)
	{
		blend_in()
		setTimeout('show_footer()',timer)
	}
	else
	{
		scroll_timer = scroll_timer - timer
		setTimeout('show_footer()',timer)
	}
}
function blend_in() 
{
	//document.all.footer.filters.RevealTrans.apply()
	document.all.footer.style.visibility = "visible"
	//document.all.footer.filters.RevealTrans.play()
}
function hide(name)
{
var tip = document.getElementById(name);
if (tip)
{
tip.style.visibility = "hidden";
current="";
}
}	

function fnPrintSnapShot(id,MenuFlag)
{
	var printWin = window.open('PrintDataSheet.asp?id=' + id + '&MenuFlag=' + MenuFlag,'Window','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=400');
	
	if (gAutoPrint)
			printWin.print();
}

