// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
var locatie = selObj.options[selObj.selectedIndex];
if(!selObj.selectedIndex== 0){
  eval(targ+".location='"+locatie.value+"'");}
  if (restore) selObj.selectedIndex=0;
}


function trim(str, chars) {  
    return ltrim(rtrim(str, chars), chars);  
}  
   
function ltrim(str, chars) {  
    chars = chars || "\\s";  
    return str.replace(new RegExp("^[" + chars + "]+", "g"), "");  
}  
   
function rtrim(str, chars) {  
    chars = chars || "\\s";  
    return str.replace(new RegExp("[" + chars + "]+$", "g"), "");  
}  

function simpleSelect() {
  menuValue = document.JobForm.JobNr.value;
  result = "";

  for (t=0;t<=menuValue.length;t++) {
	if (menuValue.charAt(t) != "") {
      result += menuValue.charAt(t);
	}
  }
  if (trim(result) != "") {
  location.href = "http://baan.nl.pwc.com/fe/tpl_pwcholland07.asp?newms=rf&id="+result;
  }

}


                      							var activeVideo;
												function showVideo (inNr) {
													if (activeVideo) {
														hideVideo(activeVideo);
													}
													activeVideo = inNr;
													document.getElementById('video_frame_' + inNr).style.left = "200px"; 
													UFO.create(eval('FO' + inNr), 'video_player_' + inNr);
													//document.getElementById('pageContent').scrollIntoView();
													
													// set the Y location
													hoogtewindow = document.documentElement.clientHeight;
													dd = getScrollY();
													locNew = (hoogtewindow + dd)-445;
													document.getElementById('video_frame_' + inNr).style.top = locNew + 'px';
												}
												
												function hideVideo (inNr) {
													document.getElementById('video_frame_' + inNr).style.left = "-1000px"; 
													UFO.create(eval('FO' + inNr), 'video_player_' + inNr);
													activeVideo = 0;
												}
												
												function getScrollY() {
													  var scrOfX = 0, scrOfY = 0;
													  if( typeof( window.pageYOffset ) == 'number' ) {
													    //Netscape compliant
													    scrOfY = window.pageYOffset;
													  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
													    //DOM compliant
													    scrOfY = document.body.scrollTop;
													  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
													    //IE6 standards compliant mode
													    scrOfY = document.documentElement.scrollTop;
													  }
													  return scrOfY;
													}
													

function MM_showHideLayers() { //v6.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.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}
function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function loadrhnpage(containerid, type){
		var container_div = document.getElementById(containerid);
		var page=type;
		container_div.style.visibility= "hidden";
		container_div.style.position= "absolute";
		container_div.style.backgroundColor = "#ffffff";
		container_div.style.top= "120px";
		container_div.style.left= "200px";
		container_div.style.height="478px";
		container_div.style.width="478px";
		container_div.style.border="1px solid #000000";
		container_div.style.overflow = "hidden";
		container_div.style.zIndex="999999"
		
		
		
		var myElement = document.createElement("IFRAME");
		myElement.id="RHN_Content_frm";
		myElement.style.position= "absolute";
		myElement.frameBorder ="0px";
		myElement.scrolling="no";
		myElement.style.backgroundColor = "#ffffff";
		myElement.style.border= "0px";
		myElement.style.top= "25px";
		myElement.style.left= "0px";
		myElement.style.padding = "0px";
		myElement.style.margin = "0px";
		myElement.style.height="480px";
		myElement.style.width="480px";
		myElement.style.zIndex="999999"
		if (page=='taf') {
			myElement.src="http://recruitment.nl.pwc.com/rhn/tell_a_friend/index.php";
		} else if (page=="bm"){
			myElement.src="http://recruitment.nl.pwc.com/rhn/belmij/index.php";
		} else if (page=="mm"){
			myElement.src="http://recruitment.nl.pwc.com/rhn/mailmij/index.php";
		} else if (page=="bo"){
			myElement.src="http://recruitment.nl.pwc.com/rhn/belons/index.php";
		} else {
			myElement.src="#";
		} 
		container_div.appendChild(myElement); 
		container_div.style.visibility= "visible";
		
}

function printPagina()
{
window.print();	
}

