function show(obj) { 
	var menus = new Array("act", "inf", "wed")
	
	if (document.getElementById(obj).style.display=='block') {
	document.getElementById(obj).style.display = 'none' ;
	//document.getElementById(obj+'fig').src = 'imag/links_'+obj+'o.gif';
	} else {
	document.getElementById(obj).style.display = 'block'; 
	//document.getElementById(obj+'fig').src = 'imag/links_'+obj+'w.gif';
	}
	for (i=0; i<menus.length; i++) {
		if (!document.getElementById(obj).id.match(menus[i])) {document.getElementById(menus[i]).style.display = 'none' ;}
	}
}

function hover(obj) {
	var string = obj.src;
	var length = string.length;
	if (string.indexOf("_hover") == -1){
		obj.src = string.substring(0, length-4) + '_hover' + string.substring(length-4, length);
	}
	else {
		obj.src = string.substring(0, length-10) + string.substring(length-4, length);
	}
}

function isChanged(element){
	if ( element.value != element.defaultValue )
		element.style.backgroundColor = 'FFFF99';
	else element.style.backgroundColor = 'white';
}

function valiDate(form){
 d = new Date(form.yyyy.value,form.mm.value-1,form.dd.value)
 if (!(1*form.dd.value == d.getDate() && 
 	 1*form.mm.value == d.getMonth()+1 && 
	 1*form.yyyy.value == d.getYear()))
 	alert("The date you entered is not valid");
}

function update_form() {
	document.uploadPictures.aanpassen.value = "1";
	document.uploadPictures.submit();
}

function messageWindow(title) { 
  var width="500", height="350";
  var left = (screen.width/2) - width/2;
  var top = (screen.height/2) - height/2;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("foto_status.php","msgWindow", styleStr);
}