var nCurrFaqMnuID = "";
var _tempClass = "";

function SwapFaqMnu(o) 
{
	var _item = $(o.id);
	var _class = _item.className;

	if(nCurrFaqMnuID != "" && nCurrFaqMnuID != _item.id) {
		$(nCurrFaqMnuID + 'sub').style.display = 'none';
		$(nCurrFaqMnuID).className = _tempClass;
	}
	if($(_item.id + 'sub').style.display == 'none' || $(_item.id + 'sub').style.display == '') {
		$(_item.id + 'sub').style.display = 'block';
		nCurrFaqMnuID = _item.id;
		_tempClass = _class;
	} else {
		$(_item.id + 'sub').style.display = 'none';
		$(_item.id).className = _class;
		nCurrFaqMnuID = "";
	}
}

function checkEmail(strEmail) { 
	return (strEmail.search(/^[\w\.\-_]*[A-Z|a-z|0-9]{1}@([\w\-_]+\.)+[A-Za-z]{2,4}$/) != -1)
}

function CheckIsIE() 
{ 
	if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER') { return true;} 
	else { return false; } 
} 

function PrintThisPage() 
{ 
	if (CheckIsIE() == true) 
	{ 
		document.fraPrint.focus(); 
		document.fraPrint.print(); 
	} 
	else 
	{ 
		window.frames['fraPrint'].focus(); 
		window.frames['fraPrint'].print(); 
	} 
}
function fnTrapKP(e)
{ 
	var keynum;
	if(window.event) // IE
	{
	  keynum = e.keyCode;
	}
	else if(e.which) // Netscape/Firefox/Opera
	{
	  keynum = e.which;
	}
	if (keynum == 13) 
	{ 
		e.returnValue = false; 
		e.cancelBubble = true; 
		fnSearch(); 
	} 
}
function fnCheckFile(id) {
	if (id == 1) {
		var strFile = document.forms.frmVacancy.filUpload.value;
	} else {
		var strFile = document.forms.frmVacancy.letterUpload.value;
	}
	ext = strFile.slice(strFile.lastIndexOf(".")).toLowerCase();
	if(ext != '.doc' && ext != '.pdf') 
	{
		return false;
	} 
	else 
	{
		return true;
	}
}
function SetBlockHeight(){

	var blocks = $$('.RightsAreaMenuBody');
	
	if(blocks.length == 2){

		var block1 = blocks[0].getHeight();
		var block2 = blocks[1].getHeight();
		
		if(block1 > block2){
			blocks[1].setStyle({ 'height':block1 + 'px' });
			blocks[0].setStyle({ 'height':block1 + 'px' });
		}else if(block2 > block1){
			blocks[1].setStyle({ 'height':block2 + 'px' });
			blocks[0].setStyle({ 'height':block2 + 'px' });
		}
	}
}

var rndIdx = 0;
var noOfLoops = 0;
function fnStartPix() {
	try {
		noOfLoops = (eyeCatchers.length / 3);
		if(noOfLoops > 0) { var tmr = setTimeout("fnShowPix()",5000); }
	}
	catch (e) { }
}

function fnShowPix() {
	try {
		rndIdx++;
		if(rndIdx >= noOfLoops) {
			rndIdx = 0;
		}
		var min = ((1 + rndIdx) - 1) * 3;
		jQuery("#eyeCatcher1").attr("src", "/afbeeldingen/employees/thumb2/" + eyeCatchers[min]);
		jQuery("#eyeCatcher2").attr("src", "/afbeeldingen/employees/thumb2/" + eyeCatchers[min + 1]);
		jQuery("#eyeCatcher3").attr("src", "/afbeeldingen/employees/thumb2/" + eyeCatchers[min + 2]);
	}
	catch (e) { alert(e); }
	var tmr = setTimeout("fnShowPix()",5000);
}
