// JavaScript Document
function checkResolution(page){
	var screenX = 0;
	var screenY = 0;
          if( typeof( window.innerWidth ) == 'number' ) {
            //Non-IE
            screenX = window.innerWidth;
            screenY = window.innerHeight;
          } else if( document.documentElement && ( document.documentElement.clientWidth)) {
            //IE 6+ in 'standards compliant mode'
            screenX = document.documentElement.clientWidth;
            screenY = document.documentElement.clientHeight;
          } else if( document.body && ( document.body.clientWidth) ) {
            //IE 4 compatible
            screenX = document.body.clientWidth;
            screenY = document.body.clientHeight;
          }
	
	var page = page;
	if(screenY < 750){

		document.getElementById("logoImg").width = 150;
		document.getElementById("logoImg").height = 55;
		document.getElementById("navTop").style.marginLeft = 10 + 'px';
		document.getElementById("navTop").style.marginTop = 25 + 'px';
		document.getElementById("header").style.height = 70 + 'px';

	}
	
	if(screenY < 750){
		
		document.getElementById("wd").width = document.getElementById("wd").width * (4/5);
		document.getElementById("wd").height = document.getElementById("wd").height * (4/5);
		document.getElementById("buurt").width = document.getElementById("buurt").width * (4/5);
		document.getElementById("buurt").height = document.getElementById("buurt").height * (4/5);
		document.getElementById("wij").width = document.getElementById("wij").width * (4/5);
		document.getElementById("wij").height = document.getElementById("wij").height * (4/5);
		document.getElementById("Doemee").width = document.getElementById("Doemee").width * (4/5);
		document.getElementById("Doemee").height = document.getElementById("Doemee").height * (4/5);
		document.getElementById("Nieuws").width = document.getElementById("Nieuws").width * (4/5);
		document.getElementById("Nieuws").height = document.getElementById("Nieuws").height * (4/5);
		if(page == 'willemendrees'){
			document.getElementById("wdCutoutSide").style.top = 71 + 'px';
		}
		if(page == 'kaart'){

			document.getElementById("wdCutoutSide").height = 350;
			document.getElementById("map").style.width = 562 + 'px';
			document.getElementById("map").style.height = 300 + 'px';
			document.getElementById("map").style.marginTop = 30 + 'px';

		}
		if(page == 'wij'){
			document.getElementById("wdCutoutSide").height = 350;
		}
		if(page == 'meedoen'){

			document.getElementById("wd250").style.display = 'none';
			document.getElementById("wdCutout").style.display = 'none';
			document.getElementById("wdCutoutSide").height = 350;
			document.getElementById("bedankt").style.left = (screen.width /2) - 150 + 'px';

		}
		if(page == 'nieuws'){
			document.getElementById("newsBox").style.height = 350 + 'px';
			document.getElementById("newsBox").style.width = 460 + 'px';
			document.getElementById("newsContent").style.marginTop = 10 + 'px';
			document.getElementById("wdContent").style.marginTop = 10 + 'px';
			document.getElementById("newsText").style.height = 300 + 'px';
			document.getElementById("newsText").style.width = 460 + 'px';
			document.getElementById("shadowBox").style.height = 400 + 'px';
			document.getElementById("shadowBox").style.width = 499 + 'px'
			document.getElementById("blogBox").style.height = 350 + 'px';
			document.getElementById("shadowBlogBox").style.height = 400 + 'px';
			document.getElementById("blogPane").style.height = 300 + 'px';
			
			document.getElementById("terugPijl").style.marginTop = 10 + 'px';
			document.getElementById("verderPijl").style.marginTop = 10 + 'px';
		document.getElementById("twitterContent").style.height = 400 + 'px';
			
	
		}
		
	}
	if(screenX > 1100 && screenX < 1300 && screenY > 800){
		if(page == 'willemendrees'){
			document.getElementById("wd250").style.left = 200 + 'px';
			document.getElementById("wd250").style.bottom = 150 + 'px';
			//document.getElementById("wdCutout").width = (document.getElementById("wdCutout").width / 2);
			document.getElementById("wdCutout").style.left = 400 + 'px';
			document.getElementById("wdCutout").style.bottom = 20 + 'px';
			document.getElementById("wdCutoutSide").style.top = 71 + 'px';
		}

		if(page == 'meedoen'){

			document.getElementById("bedankt").style.left = (screen.width /2) - 150 + 'px';

		}
		if(page == 'wij'){
			
		}
		
	}
	if(page == 'nieuws'){
			
		
			$(function()
			{
				// this initialises the demo scollpanes on the page.
				
				$('#blogPane').jScrollPane({showArrows:true}); 
				$('#newsText').jScrollPane({showArrows:true}); 
				$('#twitterContent').jScrollPane({showArrows:true});                 
				
			});		
	}
	if(page == 'wij'){
			
		
			$(function()
			{
				// this initialises the demo scollpanes on the page.
				
				$('#blogPane').jScrollPane({showArrows:true}); 
				$('#newsText').jScrollPane({showArrows:true}); 
				$('#twitterContent').jScrollPane({showArrows:true});                 
				
			});		
	}


	if(page == 'meedoen'){


		document.getElementById("bedankt").style.left = (screen.width /2) - 150 + 'px';

	}
	
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}