
var footerH = 0;
var headerH = 461;

var argL = 0; // default

// ======================================================
function doresize() {
	//setH('left','content','right');
	//setH('content','right');

	setH('content','right');

	
	// give the id's of all concerning columns inside 'container'
	// Each column stretches its height due to its content :
	// the footer top position is computed after the page is loaded : under the heighest column
}

// ======================================================
function setH() {
	argL = setH.arguments.length;

	var allColH = colH(setH.arguments);
	var windowH = document.body.clientHeight - headerH;
	var fillH = windowH - footerH;
	var TFfill = (footerH + allColH < windowH);
	var daH = TFfill ? fillH : allColH;

	for (var i=0;i < argL;i++) {
		document.getElementById(setH.arguments[i]).style.height = daH + "px";
		document.getElementById(setH.arguments[i]).style.marginBottom = (TFfill ? 0 : footerH) + "px";
	}

	document.getElementById('footer').style.top = (daH + headerH) + "px";
	document.getElementById('footer').style.visibility = "visible";

}

// ======================================================
function colH(aColID) { // Array containing all IDs of the concerning COLumns
	var i;
	var oH = 0;
	var cOH = new Array();

	for (i=0;i < argL;i++) {
		document.getElementById(aColID[i]).style.height = 'auto';
		cOH[i] = document.getElementById(aColID[i]).offsetHeight;
	}

	for (i=0;i < argL;i++) {
		if (cOH[i] > oH)
			oH = cOH[i];
	}

	return oH;
}

// ======================================================

function checkform_contact(f)
  {
  if (f.elements['bedrijfsnaam'].value == "")
    {
    alert("Vul uw bedrijfsnaam in.");
    window.setTimeout("document.forms['infoboxform'].elements['bedrijfsnaam'].focus()",500);
    return (false);
    }
 if (f.elements['contactpersoon'].value == "")
    {
    alert("Vul de naam van uw contactpersoon in.");
    window.setTimeout("document.forms['infoboxform'].elements['contactpersoon'].focus()",500);
    return (false);
    }
 if (f.elements['email_adres'].value == "")
    {
    alert("Geen e-mail ingevoerd.");
    window.setTimeout("document.forms['infoboxform'].elements['email_adres'].focus()",500);
    return (false);
    }  
 if (f.elements['telefoon'].value == "")
    {
    alert("Vul uw telefoonnummer in.");
    window.setTimeout("document.forms['infoboxform'].elements['telefoon'].focus()",500);
    return (false);
    }
 if (f.elements['land'].value == "")
    {
    alert("Vul uw land in.");
    window.setTimeout("document.forms['infoboxform'].elements['land'].focus()",500);
    return (false);
    }
 if (f.elements['medewerkers'].value == "")
    {
    alert("Vul het aantal medewerkers in.");
    window.setTimeout("document.forms['infoboxform'].elements['medewerkers'].focus()",500);
    return (false);
    }    
   else f.submit();		
  }
 
// ======================================================

function checkform_rma(f)
  {
 if (f.elements['contactpersoon'].value == "")
    {
    alert("Vul de naam van uw contactpersoon in.");
    window.setTimeout("document.forms['rmaboxform'].elements['contactpersoon'].focus()",500);
    return (false);
    }
 if (f.elements['email_adres'].value == "")
    {
    alert("Geen e-mail ingevoerd.");
    window.setTimeout("document.forms['rmaboxform'].elements['email_adres'].focus()",500);
    return (false);
    }  
 if (f.elements['telefoon'].value == "")
    {
    alert("Vul uw telefoonnummer in.");
    window.setTimeout("document.forms['rmaboxform'].elements['telefoon'].focus()",500);
    return (false);
    }
 if (f.elements['serienummer'].value == "")
    {
    alert("Vul uw serienummer in.");
    window.setTimeout("document.forms['rmaboxform'].elements['serienummer'].focus()",500);
    return (false);
    }  
  if (f.elements['datumaankoop'].value == "")
    {
    alert("Vul de datum van aankoop in.");
    window.setTimeout("document.forms['rmaboxform'].elements['datumaankoop'].focus()",500);
    return (false);
    } 
  if (f.elements['sellnaam'].value == "")
    {
    alert("Vul de naam van de winkel of Reseller in.");
    window.setTimeout("document.forms['rmaboxform'].elements['sellnaam'].focus()",500);
    return (false);
    } 
  if (f.elements['omschrijving'].value == "")
    {
    alert("Vul de dmschrijving van het defect in.");
    window.setTimeout("document.forms['rmaboxform'].elements['omschrijving'].focus()",500);
    return (false);
    } 
   else f.submit();		
  }
 

// ======================================================

//function subMV(ID) {
	//miMV(ID);
	//document.getElementById("U"+ID).style.display = 'block';
//}

// ======================================================

//function subMT(ID) {
	//miMT(ID);
	//document.getElementById("U"+ID).style.display = 'none';
//}



