/*   GLOBAL JS FUNCTIONS      *//*   version 1.0 - 20081206   */function gup(name){  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  var regexS = "[\\?&]"+name+"=([^&#]*)";  var regex = new RegExp(regexS);  var results = regex.exec(window.location.href);  if(results == null)    return "";  else    return results[1];}function getcolor(s) {if (s<3) {	colors = new Array(14)	colors[0]="0"	colors[1]="1"	colors[2]="2"	colors[3]="3"	colors[4]="4"	colors[5]="5"	colors[5]="6"	colors[6]="7"	colors[7]="8"	colors[8]="9"	colors[9]="a"	colors[10]="b"	colors[11]="c"	colors[12]="d"	colors[13]="e"	colors[14]="f"	digit = new Array(5)	color="#"	for (i=0;i<6;i++){		digit[i]=colors[Math.round(Math.random()*14)]		color = color+digit[i]		}	}	else {color="#FFFFFF"}		//alert(color)	return color}function login(password){  var rootdir = ""; // deze aanpassen als je beveiligde map in een subdirectory staat  var testfile = "psw.txt"; // deze aanpassen als je testfile anders heet.  if(!password){    alert("Vul iets in bij wachtwoord");    return false;  }      var url = rootdir + password + "/" + testfile; //if (document.getElementById) var request = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();   var request = new XMLHttpRequest();  //request.open("GET", url, false);  request.open("HEAD", url, false);  request.send(null);  alert(request.status)  if(request.status == 200){    // het bestand bestaat > redirect > met timeout werkt het ook in FF    setTimeout('location.href = "' + rootdir + password + '/"',5);  }  else{    // eventueel zou deze foutmelding nog mooier kunnen    alert("Het wachtwoord is onjuist");  }  }function login2(password){  var rootdir = ""; // deze aanpassen als je beveiligde map in een subdirectory staat  var testfile = "psw.txt"; // deze aanpassen als je testfile anders heet.  if(!password){    alert("Vul iets in bij wachtwoord");    return false;  }      var url = rootdir + password + "/" + testfile;   if(isThere(url)==true){    // het bestand bestaat > redirect > met timeout werkt het ook in FF    setTimeout('location.href = "' + rootdir + password + '/"',5);  }  else{    // eventueel zou deze foutmelding nog mooier kunnen    alert("Het wachtwoord is onjuist");  }  }function isThere(url) {	var req= new AJ(); // XMLHttpRequest object	try {		req.open("HEAD", url, false);		req.send(null);				return req.status== 200 ? true : false;	}	catch (er) {		return false;	}}function AJ() {	var obj;	if (window.XMLHttpRequest) obj= new XMLHttpRequest(); 	else if (window.ActiveXObject){		try{			obj= new ActiveXObject('MSXML2.XMLHTTP.3.0');		}		catch(er){			try{				obj= new ActiveXObject("Microsoft.XMLHTTP");			}			catch(er){				obj= false;			}		}	}	return obj;}