function createXMLHttpRequest()
{
	if (window.ActiveXObject)
	{
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest)
	{
		xmlHttp = new XMLHttpRequest();
	}
}

function changeCities(id, base_url) {

  	createXMLHttpRequest();
	xmlHttp.onreadystatechange=processCity;
	xmlHttp.open("GET",base_url+"xml_city/"+escape(id),true);
	xmlHttp.send(null);
}

function processCity()
{
	if(xmlHttp.readyState==4 && xmlHttp.status==200)
	{
		var xmlDoc=xmlHttp.responseXML;
		var list=xmlDoc.getElementsByTagName("city");
		var selectObject=document.getElementById("va_city_id");
		
		selectObject.options.length=0;
		
		selectObject.disabled=false;
		
		if(document.getElementById('allCities').value != "true")
		{
			var value0text = "Kies een stad";
			var value0value = "";
		}
		else
		{
			var value0text = "Alle steden";
			var value0value = "0";	
		}
		
		selectObject.options[0]=new Option(value0text, value0value);
		
		for (var i=0; i<list.length; i++)
		{
			selectObject.options[i+1]=new Option(list[i].childNodes[1].firstChild.nodeValue, list[i].childNodes[0].firstChild.nodeValue);
		}	
	}
}

function changeSignupCities(id, base_url, row_id)
{
	document.getElementById('ajax_indicator').style.display='';
  	createXMLHttpRequest();
	xmlHttp.onreadystatechange=processSignupCities;
	xmlHttp.open("GET",base_url+"xml_city/"+escape(id)+"/"+escape(row_id),true);
	xmlHttp.send(null);
}

function processSignupCities()
{
	if(xmlHttp.readyState==4 && xmlHttp.status==200)
	{
		var xmlDoc=xmlHttp.responseXML;
		var list=xmlDoc.getElementsByTagName("city");
		var selectObject=document.getElementById("city_id_"+list[0].getAttribute("row_id"));
		
		selectObject.options.length=0;
		
		selectObject.disabled=false;
		
	
		for (var i=0; i<list.length; i++)
		{
			selectObject.options[i]=new Option(list[i].childNodes[1].firstChild.nodeValue, list[i].childNodes[0].firstChild.nodeValue);
		}	
		document.getElementById('ajax_indicator').style.display='none';
		calculate();
	}
}

function changeSelectCities(id, base_url, row_id)
{
	document.getElementById('ajax_indicator').style.display='';
  	createXMLHttpRequest();
	xmlHttp.onreadystatechange=processSelectCities;
	xmlHttp.open("GET",base_url+"xml_city/"+escape(id)+"/"+escape(row_id),true);
	xmlHttp.send(null);
}

function processSelectCities()
{
	if(xmlHttp.readyState==4 && xmlHttp.status==200)
	{
		var xmlDoc=xmlHttp.responseXML;
		var list=xmlDoc.getElementsByTagName("city");
		var selectObject=document.getElementById("city_id_"+list[0].getAttribute("row_id"));
		
		selectObject.options.length=0;
		selectObject.disabled=false;
	
		for (var i=0; i<list.length; i++)
		{
			selectObject.options[i]=new Option(list[i].childNodes[1].firstChild.nodeValue, list[i].childNodes[0].firstChild.nodeValue);
		}
		document.getElementById('ajax_indicator').style.display='none';
		calculate();
	}
}
/**
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){
_16.push(key+"="+_18[key]);}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";
}else{
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
return true;
}else{
if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
var _25=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_23&&_25.major>_23.major){return _25;}
if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}
return _25;};
deconcept.PlayerVersion=function(_29){
this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
this.minor=parseInt(_29[1])||0;
this.rev=parseInt(_29[2])||0;};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};
deconcept.util={getRequestParameter:function(_2b){
var q=document.location.search||document.location.hash;
if(q){
var _2d=q.indexOf(_2b+"=");
var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
if(q.length>1&&_2d>-1){
return q.substring(q.indexOf("=",_2d)+1,_2e);
}}return "";}};
if(Array.prototype.push==null){
Array.prototype.push=function(_2f){
this[this.length]=_2f;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject; // for backwards compatibility
var SWFObject=deconcept.SWFObject;

/* $Id: pngfix.js,v 1.1.2.2 2005/11/30 21:09:00 robinmonks Exp $ */

// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004
// updated 2005-05-11 to test for IE

function correctPNG() {
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && navigator.userAgent.indexOf("Opera") == -1 && window.attachEvent) {
    for(var i=0; i<document.images.length; i++) {
  	  var img = document.images[i]
  	  var imgName = img.src.toUpperCase()
  	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
        var imgID = (img.id) ? "id=\"" + img.id + "\" " : ""
        var imgClass = (img.className) ? "class=\"" + img.className + "\" " : ""
        var imgTitle = (img.title) ? "title=\"" + img.title + "\" " : "title=\"" + img.alt + "\" "
	var imgOver = ""
	if (img.onmouseover != null) {
		var s = img.onmouseover + ""
		s = s.replace(/[\s\S]+\{[\s]*([\s\S]*)[\s]*\}$/, "$1");
		imgOver = "onmouseover=\"" + s + "\" "
	}
	var imgOut = ""
	if (img.onmouseout != null) {
		var s = img.onmouseout + ""
		s = s.replace(/[\s\S]+\{[\s]*([\s\S]*)[\s]*\}$/, "$1")
		imgOut = "onmouseout=\"" + s + "\" "
	}
	var imgDown = ""
	if (img.onmousedown != null) {
		var s = img.onmousedown + ""
		s = s.replace(/[\s\S]+\{[\s]*([\s\S]*)[\s]*\}$/, "$1");
		imgDown = "onmousedown=\"" + s + "\" "
	}
	var imgClick = ""
	if (img.onclick != null) {
		var s = img.onclick + "";
		s = s.replace(/[\s\S]+\{[\s]*([\s\S]*)[\s]*\}$/, "$1");
	        imgClick = "onclick=\"" + s + "\" "
	}
	var imgAttr = imgID + imgClass + imgTitle + imgOver + imgOut + imgDown + imgClick
        var imgStyle = "display:inline-block;" + img.style.cssText 
        if (img.align == "left") imgStyle = "float:left;" + imgStyle
        if (img.align == "right") imgStyle = "float:right;" + imgStyle
        if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
        var strNewHTML = "<span " + imgAttr
		      + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
          + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		      + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		      img.outerHTML = strNewHTML
		      i = i-1
	    }
    }
  }
}
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && navigator.userAgent.indexOf("Opera") == -1 && window.attachEvent) {
  window.attachEvent("onload", correctPNG);
}
<!--
// copyright 1999 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but please keep this 
// notice with the code.
var url = "";
var rollOverArr=new Array();
function setrollover(OverImgSrc,pageImageName)
{
if (! document.images)return;
if (pageImageName == null)
    pageImageName = document.images[document.images.length-1].name;
rollOverArr[pageImageName]=new Object;
rollOverArr[pageImageName].overImg = new Image;
rollOverArr[pageImageName].overImg.src=OverImgSrc;
}

function rollover(pageImageName)
{
if (! document.images)return;
if (! rollOverArr[pageImageName])return;
if (! rollOverArr[pageImageName].outImg)
    {
    rollOverArr[pageImageName].outImg = new Image;
    rollOverArr[pageImageName].outImg.src = document.images[pageImageName].src;
    }
document.images[pageImageName].src=rollOverArr[pageImageName].overImg.src;
}

function rollout(pageImageName)
{
if (! document.images)return;
if (! rollOverArr[pageImageName])return;
document.images[pageImageName].src=rollOverArr[pageImageName].outImg.src;
}
//-->
function emptyProvincie()
{
	//alert('empty');
	// Maak alle provincies onzichtbaar
	var provincies = new Array("brabant", "limburg", "zeeland", "gelderland", "zuidholland", "noordholland", "overijssel", "flevoland", "utrecht", "drenthe", "friesland", "groningen");
	for(i = 0; i < provincies.length; i++)
	{
		div = provincies[i];
		document.getElementById(div).style.display='none';
	}
}

function showDiv(div)
{	
	
	if(document.getElementById(div)) {
		//alert(div);
		//alert(document.getElementById(div).style.display);
	}
	document.getElementById(div).style.display='';
//	alert(document.getElementById(div).style.display);
}

function hideDiv(div)
{	
	document.getElementById(div).style.display='none';
}

function emptyPlace(province, div)
{
	// Maak alle plaatsen onzichtbaar
	switch(province)
	{
		case 'brabant':
		var places = new Array("eindhoven", "denbosch", "breda", "tilburg");
		break;
	}
	
	for(i = 0; i < places.length; i++)
	{
		div = "div_"+places[i];
		document.getElementById(div).style.display='none';
	}
}

function checkEmployerInput()
{
	var missingInput = 0;
	var inputFields = new Array("bedrijfsnaam", "initialen", "achternaam", "geslacht", "email", "wachtwoord");
	for(i = 0; i < inputFields.length; i++)
	{
		if(document.getElementById(inputFields[i]).value == "")
		{
			message = "message_"+inputFields[i];
			document.getElementById(message).style.display = "";
			missingInput++;
		}
		else
		{
			message = "message_"+inputFields[i];
			document.getElementById(message).style.display = "none";
		}
	}
	
	if(document.getElementById('voorwaarden').checked != true)
	{
		document.getElementById('message_voorwaarden').style.visibility = "visible";
		missingInput++;
	}
	else
	{
		document.getElementById('message_voorwaarden').style.visibility = "hidden";
	}
	
	if(document.getElementById('wachtwoord').value != document.getElementById('bevestiging_wachtwoord').value)
	{
		document.getElementById('message_bevestiging_wachtwoord').style.visibility = "visible";
		missingInput++;
	}
	else
	{
		document.getElementById('message_bevestiging_wachtwoord').style.visibility = "hidden";
	}
	
	if(emailCheck(document.getElementById('email').value))
	{
		document.getElementById('message_email').style.visibility = "hidden";
	}
	else
	{
		document.getElementById('message_email').style.visibility = "visible";
		missingInput++;
	}
	
	if(missingInput != 0)
	{
		//alert('Alles invullen!!!');
	}
	else
	{
		document.getElementById('employer_signup').submit();
	}
}

function checkVacancyInput()
{
	var missingInput = 0;
	var inputFields = new Array("title", "company_name", "function_name", "city", "branch", "hours_min", "salary", "availability", "education", "company_description", "function_description", "profile", "reaction");
	for(i = 0; i < inputFields.length; i++)
	{
		if(document.getElementById(inputFields[i]).value == "")
		{
			message = "message_"+inputFields[i];
			document.getElementById(message).style.visibility = "visible";
			missingInput++;
		}
		else
		{
			message = "message_"+inputFields[i];
			document.getElementById(message).style.visibility = "hidden";
		}
	}
	
	if(missingInput != 0)
	{
		//alert('Alles invullen!!!');
	}
	else
	{
		document.getElementById('employer_vacancy').submit();
	}
}

function emailCheck (emailStr) {
/* The following pattern is used to check if the entered e-mail address
   fits the user@domain format.  It also is used to separate the username
   from the domain. */
var emailPat=/^(.+)@(.+)$/
/* The following string represents the pattern for matching all special
   characters.  We don't want to allow special characters in the address. 
   These characters include ( ) < > @ , ; : \ " . [ ]    */
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
/* The following string represents the range of characters allowed in a 
   username or domainname.  It really states which chars aren't allowed. */
var validChars="\[^\\s" + specialChars + "\]"
/* The following pattern applies if the "user" is a quoted string (in
   which case, there are no rules about which characters are allowed
   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
   is a legal e-mail address. */
var quotedUser="(\"[^\"]*\")"
/* The following pattern applies for domains that are IP addresses,
   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
   e-mail address. NOTE: The square brackets are required. */
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
/* The following string represents an atom (basically a series of
   non-special characters.) */
var atom=validChars + '+'
/* The following string represents one word in the typical username.
   For example, in john.doe@somewhere.com, john and doe are words.
   Basically, a word is either an atom or quoted string. */
var word="(" + atom + "|" + quotedUser + ")"
// The following pattern describes the structure of the user
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
/* The following pattern describes the structure of a normal symbolic
   domain, as opposed to ipDomainPat, shown above. */
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")


/* Finally, let's start trying to figure out if the supplied address is
   valid. */

/* Begin with the coarse pattern to simply break up user@domain into
   different pieces that are easy to analyze. */
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
  /* Too many/few @'s or something; basically, this address doesn't
     even fit the general mould of a valid e-mail address. */
	return false
}
var user=matchArray[1]
var domain=matchArray[2]

// See if "user" is valid 
if (user.match(userPat)==null) {
    // user is not valid
    return false
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
   host name) make sure the IP address is valid. */
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
    // this is an IP address
	  for (var i=1;i<=4;i++) {
	    if (IPArray[i]>255) {
		return false
	    }
    }
    return true
}

// Domain is symbolic name
var domainArray=domain.match(domainPat)
if (domainArray==null) {
    return false
}

/* domain name seems valid, but now make sure that it ends in a
   three-letter word (like com, edu, gov) or a two-letter word,
   representing country (uk, nl), and that there's a hostname preceding 
   the domain or country. */

/* Now we need to break up the domain to get a count of how many atoms
   it consists of. */
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>4) {
   // the address must end in a two letter or three letter word.
   return false
}

// Make sure there's a host name preceding the domain.
if (len<2) {
   return false
}

// If we've gotten this far, everything's valid!
return true;
}