/* Joramd 2010-02 Menu edit
	DIV bgimage changes its background on mouseover on td.menuitem*/
function changebg(bgimage)
{
document.getElementById("bgimage").style.backgroundImage="url("+bgimage+")";
}
/* END changebg function */

 function changePage(theform){
		theform.action=theform.urlpicklist.value;

		var tt=theform.action.substring(theform.action.length-8,theform.action.length);
		if(tt=='imis.php' && theform.s.value=='') theform.action='info.php';

		theform.submit();
 }

 function StartGazetteer(){
   windowprops="directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=500,height=650,left=200,screenX=100,top=100,screenY=100";
   window.open("browsplaats.php","Gazetteer",windowprops).focus();
 }

 function StartGeoInterface(){
   windowprops="directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=550,height=550,left=100,screenX=100,top=100,screenY=100";
   window.open("http://w2.vliz.be/vmdcdata/gis/geointerface.php?map=schelde.map","GeoInterface",windowprops).focus();
 }

 function write2win(title,txt){
   var winTXT = window.open('',title,'WIDTH=550,HEIGHT=400,LEFT=100,TOP=100,RESIZABLE=yes,SCROLLBARS=yes');
   winTXT.document.open('text/html', 'replace');
   winTXT.document.write('<HTML><HEAD><TITLE>'+title+'</TITLE></HEAD><BODY><P>'+txt+'</BODY></HTML>');
 }

 function returnWidth() {
   var myWidth = 0, myHeight = 0;
   if( typeof( window.innerWidth ) == 'number' ) {
     //Non-IE
     myWidth = window.innerWidth;
     myHeight = window.innerHeight;
   } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
     //IE 6+ in 'standards compliant mode'
     myWidth = document.documentElement.clientWidth;
     myHeight = document.documentElement.clientHeight;
   } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
     //IE 4 compatible
     myWidth = document.body.clientWidth;
     myHeight = document.body.clientHeight;
   }
   return(myWidth);
 }

 function returnHeight() {
   var myWidth = 0, myHeight = 0;
   if( typeof( window.innerWidth ) == 'number' ) {
     //Non-IE
     myWidth = window.innerWidth;
     myHeight = window.innerHeight;
   } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
     //IE 6+ in 'standards compliant mode'
     myWidth = document.documentElement.clientWidth;
     myHeight = document.documentElement.clientHeight;
   } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
     //IE 4 compatible
     myWidth = document.body.clientWidth;
     myHeight = document.body.clientHeight;
   }
   return(myHeight);
 }

 function initturnt()
{
	turnt='';
}

$(document).ready(function()
{
	$(".btninfo").click(function()
	{
		// close -> shrink wrapper
		if (turnt=='on')
		{
			$("#hideinf").slideToggle("slow");
			//wait 0.5 second before shrinking (otherwise overlay)
			setTimeout('document.getElementById("themawrapper").style.height="200px"',600);
			turnt='';
		}
		// slide open -> enlarge wrapper
		else
		{
			document.getElementById("themawrapper").style.height="350px";
			turnt='on';
			$("#hideinf").slideToggle("slow");
		}
		return false;
	});
});