
  function newImage(arg) {
  	if (document.images) {
  		rslt = new Image();
  		rslt.src = arg;
  		return rslt;
  	}
  }

  function changeImages() {
  	if (document.images && (preloadFlag == true)) {
  		for (var i=0; i<changeImages.arguments.length; i+=2) {
  			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
  		}
  	}
  }

  var preloadFlag = false;
  function preloadImages() {
  	if (document.images) {
  		img_1_01_over = newImage("images/img-1_01-over.gif");
  		img2_01_over = newImage("images/img2_01-over.gif");
  		img3_01_over = newImage("images/img3_01-over.gif");
  		preloadFlag = true;
  	}
  }

//function by Arno
// 01/04/07

//var used as flag to see if we fix the image to the screen or not
var fix = 'no';
var image_name = 'polair_beam';

//sort of on/off switch for the +/- symbols
function change_visible(id,image) {
	fix = 'no';
	//alert(document[image].src);
	display_val = document.getElementById(id).style.display;
	if(display_val == 'none'){
		if (document.all){
			document.getElementById(id).style.display='block';
		}else{
			document.getElementById(id).style.display='table-row';
		}
		document[image].src='/assets/Web/min.gif';
	}
	else{
		document.getElementById(id).style.display='none';
		document[image].src='/assets/Web/plus.gif';
		//remove_image(image);
	}
}

//idem for the grey ones, should be one function with the previous one :-(
function change_visible_grey(id,image) {
	//alert(document[image].src);
	display_val = document.getElementById(id).style.display;
	if(display_val == 'none'){
		if (document.all){
			document.getElementById(id).style.display='block';
		}else{
			document.getElementById(id).style.display='table-row';
		}
		document.getElementById(image).src='/assets/Web/min_grey.gif';
	}
	else{
		document.getElementById(id).style.display='none';
		document.getElementById(image).src='/assets/Web/plus_grey.gif';
	}

}

//make appear the polair and beam diagram in their div
function show_image(img_src){
	//alert(img_src);
	document.getElementById('polair_beam_image').innerHTML = '<img scr=\"\" width=\"238\" height=\"238\" name=\"polair_beam\" alt=\"polair_beam_image\" class=\"compare\"/>';
	document[image_name].src=img_src;
}

//remove the image again
function remove_image(image_name){
	/*
	if(fix != 'yes'){
		//document.getElementById('polair_beam_image').innerHTML = '';
		var obj = document.getElementByName(image_name);
		window.alert(obj);
		document[image_name].src='/assets/Web/pixel.gif';
		document[image_name].alt='';
		document[image_name].style.border='0px';
		//alert(document[image_name].src);
	}
	*/
	if(fix != 'yes'){
		document.getElementById('polair_beam_image').innerHTML ='<img src="/assets/Web/pixel.gif" width="238px" height="238px" alt="" />';
	}
}

//on/off switch for var fix
function fix_image(){
	if(fix == 'yes'){
		fix = 'no';
	}
	else{
		fix = 'yes';
	}
}


// toggleDisp by joggink
function toggleDisp(id, par){
	var el = document.getElementById(id);
	var im = document.getElementById(par);
	if (el.style.display == 'none'){
		if (document.all){
			el.style.display = 'block';
		}else{
			el.style.display = "table-row";
		}
		im.style.backgroundImage = 'url(/assets/Web/min.gif)';
	}else{
		el.style.display = 'none';
		im.style.backgroundImage = 'url(/assets/Web/plus.gif)';
	}
}

// function by joggink
function changeImage(id, newImg, action){
	if (action == "hover"){
		var img = newImg.split('/');
		var newSrc = newImg.substring(0, (newImg.length - img[(img.length-1)].length)) + 'mouseover_' + img[(img.length-1)];
		id.src = newSrc;

	}else{
		id.src = newImg;
	}
}

	function doJobLight(jid){
		//window.alert('do the light job');
		document.getElementById('job' + jid).style.backgroundImage = "url('/assets/Web/downloads/dl_mouseover.gif')";	
	}
	
	function doJobDark(jid){
		document.getElementById('job' + jid).style.backgroundImage = "url('/assets/Web/downloads/dl_zwart.gif')";	
	}	
	

	function doDlLight(jid){
		//window.alert('do the light job');
		document.getElementById(jid).style.backgroundImage = "url('/assets/Web/downloads/dl_mouseover.gif')";
		document.getElementById(jid).style.color = '#f90';	
	}
	
	function doDlDark(jid){
		document.getElementById(jid).style.backgroundImage = "url('/assets/Web/downloads/dl_zwart.gif')";
		document.getElementById(jid).style.color = '#000';	
	}
	
// Eerst eens de inputBehavior klasse aanmaken

function InputBehavior(input_id){
	this.input_type = document.getElementById(input_id);
	this.default_value = this.input_type.value;
	this.input_type.onfocus = bind(this, this.alterFocus);
	this.input_type.onblur = bind(this, this.alterFocus);
}

InputBehavior.prototype.alterFocus = function(){
	if (this.input_type.value == this.default_value){
		this.input_type.value = "";
	}else{
		if (this.input_type.value == ""){
			this.input_type.value = this.default_value;			
		}
	}
}

function bind(el, func){
   return function() { func.call(el); }
}