function setHighlight(theWindow,theId){
	clearTopLinks();
	clearBottomLinks();
	a = document.getElementById(theId);
	a.className = "navilinkClicked";
}



function clearTopLinks(){
	b = top.window.frames[1].document.all.tags("A").length;
	for(i=0;i < b;i++){
	top.window.frames[1].document.all.tags("A")[i].className = "navilink";
	}
}

function clearBottomLinks(){
	b = top.window.frames[3].document.all.tags("A").length;
	for(i=0;i < b;i++){
	top.window.frames[3].document.all.tags("A")[i].className = "navilink";
	}
}

function setItemPicture(subject){
	a = subject;
	d = top.topNav.document.getElementById("itemPicture") ;
	e=d;
	e.src = "/pictures/naviTopImages/VPCSite-Titel_" + escape(a);
}

function openLocationSpecs(locationId){
	var locWindow = window.open("viewLocationBySpecs.asp?id="+locationId,"specs","left="+ (screen.availWidth-470) +",top=25,status=no,resizable=yes,scrollbars=yes")
	locWindow.focus();
}

function checkForm(frm){
	a = frm;
	if(checkString(a.bedrijfsnaam,"Bedrijfsnaam",0)&&
	checkString(a.branche,"Branche",0)&&
	checkBoxChecked(a.aanhef,"Mijnheer / Mevrouw")&&
	checkString(a.contactpersoon,"Contactpersoon",0)&&
	checkString(a.adres,"Adres",0)&&
	checkString(a.postcode,"Postcode",0)&&
	checkString(a.woonplaats,"Woonplaats",0)&&
	checkEmail(a.email,"e-Mail",0)&&
	checkString(a.telefoon,"Telefoon",0)&&
	checkString(a.aanvraag_betreft,"Informatie m.b.t.",0)&&
	checkBoxChecked(a.vertrouwelijk,"Vertrouwelijk",0)){return true}
	else{return false}
}

function checkFormEnglish(frm){
	a = frm;
	if(checkString(a.bedrijfsnaam,"Company name",0)&&
	checkString(a.branche,"Branche",0)&&
	checkBoxChecked(a.aanhef,"Male / Female")&&
	checkString(a.contactpersoon,"Contact",0)&&
	checkString(a.adres,"Address",0)&&
	checkString(a.postcode,"Postal code",0)&&
	checkString(a.woonplaats,"City",0)&&
	checkEmail(a.email,"e-Mail",0)&&
	checkString(a.telefoon,"Phone",0)&&
	checkString(a.aanvraag_betreft,"Receive information",0)&&
	checkBoxChecked(a.vertrouwelijk,"Confidential",0)){return true}
	else{return false}
}

// EDITOR START

var openValue
var closeValue
var theSwitch

openValue = "Open editor";
closeValue = "Sluit editor";
theSwitch = true

function setButtons(){
	a = document.getElementById("admButton");
	a.value = openValue;
	openClose = true;
}

function openEditorBar(theSwitch){
	if(theSwitch == true){
	top.window.frames("editor").document.location = "/cmt/editor/richtTextBar.asp?frameName=main";
	top.window.frames.document.body.rows = "27,*";
	openClose = false
	buttonValue = "Sluit editor"
	a.value = closeValue
}
else{
	top.window.document.body.rows = "0,*";
	openClose = true;
	a.value = openValue;
	}
}

function moveContent(){
	a 			= document.getElementById("divContentLeft");
	b			= document.getElementById("divContentRight");
	c			= document.getElementById("formContentLeft");
	c.value 	= a.innerHTML;
	d			= document.getElementById("formContentRight");
	d.value 	= b.innerHTML;
	document.frm.submit();
}

// EDITOR END

function printWin(){
	window.print();
}

function logon(){
	if (document.login.username.value=="") {
	alert("U bent vergeten uw gebruikersnaam in te vullen");
	return false}
	if (document.login.password.value=="") {
	alert("U bent vergeten uw wachtwoord in te vullen");
	return false}
}

function reageer()
{
	if (document.frm.voornaam.value=="") {
	alert("U bent vergeten uw voornaam in te vullen");
	return false}
	if (document.frm.achternaam.value=="") {
	alert("U bent vergeten uw achternaam in te vullen");
	return false}
	a=document.frm.email.value.indexOf("@");
	p=document.frm.email.value.lastIndexOf(".");
	l=document.frm.email.value.length-1;
	if (a<1 || p-a<2 || l-p>3 || l-p<2)
	{alert("Het emailadres klopt niet");
	return false}
}

function runScript(){
	alert(event.ctrlKey);
	a = document.getElementById("divContentLeft")
	b = document.getElementById("divContentRight")
	a.contentEditable = false;

}


function mouseDown(e) {
	var ctrlPressed=0;
	var altPressed=0;
	var shiftPressed=0;
	a = document.getElementById("divContentLeft")
	b = document.getElementById("divContentRight")

	 if (parseInt(navigator.appVersion)>3) {
	  if (navigator.appName=="Netscape") {
	   var mString =(e.modifiers+32).toString(2).substring(3,6);
	   shiftPressed=(mString.charAt(0)=="1");
	   ctrlPressed =(mString.charAt(1)=="1");
	   altPressed  =(mString.charAt(2)=="1");
	   self.status="modifiers="+e.modifiers+" ("+mString+")"
	  }
	  else {
	   shiftPressed=event.shiftKey;
	   altPressed  =event.altKey;
	   ctrlPressed =event.ctrlKey;
	  }

	   if(ctrlPressed){
		   	a.contentEditable 	= false;
		   	b.contentEditable 	= false;
		   }
		  else{
		   	a.contentEditable 	= true;
		   	b.contentEditable 	= true;
		  }
	 }
}

function openisn()
{
    str='http://www.panoview.nl/7976/2040002453/' ;
    isn = window.open(str,'isn','width=400,height=270,left=200,top=140,statusbar=yes,scrollbars=no');
    //isn.opener = _blank;
}
