// JavaScript Document main MoorMotor

$(document).ready(function(){
	var h = $("#thepagebody").height();
	$("#floatColumn").height(h);
});


///////////////////////////////////////////////////////////////////////////////
//NEWS SCRIPT
///////////////////////////////////////////////////////////////////////////////

var currentItem = null;

function openBody(nw_nr, idArray) {
	for(var i=0;i<idArray.length;i++) {
		document.getElementById("body_"+ idArray[i]).style.display = "none";
	}
	if(currentItem != nw_nr) {
		document.getElementById("body_"+ nw_nr).style.display = "block";
		currentItem = nw_nr;
	} else {
		currentItem = null;
	}
}

///////////////////////////////////////////////////////////////////////////////
//DEMO SCRIPT
///////////////////////////////////////////////////////////////////////////////

var mywin;
var width = screen.width-10;
var height = screen.height-55;

function clicklink(url) {
	if (width <= 800) {
		alert('Om de demo te kunnen bekijken dient u schermresolutie ingesteld te zijn op minimaal 1024x768');
	} else {
		openWin(url,'Demo');
	}
}		

function openWin(url,name) {
	if (width <= 800) {
		alert('Om de demo te kunnen bekijken dient u schermresolutie ingesteld te zijn op minimaal 1024x768');
	} else {
		var att = "top=0,left=0,resizable=yes,titlebar=yes,scrollbars=no" + ",width=" + width + ",height=" + height;
		if (!mywin || mywin.closed) {
			mywin = window.open(url,name,att);
		} else {
			mywin.location.href = url;
			mywin.focus();
		}
	}
}	
