
function getRealAvailHeight()
{
	var nHeight = 0;
	if (typeof(window.innerWidth ) == 'number')
	{
		//Non-IE
		nHeight = window.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight )
	{
		//IE 6+ in 'standards compliant mode'
		nHeight = document.documentElement.clientHeight;
	}
	else if (document.body && document.body.clientHeight)
	{
		//IE 4 compatible
		nHeight = document.body.clientHeight;
	}
	return nHeight;
}

function adjustHeight()
{
	document.getElementById("main").style.height	= (getRealAvailHeight() - 215) + "px";
	//document.getElementById("left").style.height	= document.getElementById("content").style.pixelHeight + 202;
}

function checkFields()
{
	var frm = document.getElementsByName("order");
	frm = frm.item(0);
	var compuls_fields = new Array("school", "name", "address", "postalcode", "city", "country");

	var field, index, valid = true;
	for (index = 0; index < compuls_fields.length; index++)
	{
		field = document.getElementsByName(compuls_fields[index]);
		field = field.item(0);

		if (field.value == "")
			valid = false;
	}

	if (valid)
		frm.submit();
	else
	{
		alert("U heeft niet alle verplichte velden ingevuld.");
		return false;
	}
}

window.onresize = adjustHeight;
window.onload	= adjustHeight;

