window.onresize = setSizeCookie;
window.onload = function() {
    setSizeCookie();
    setHoverable();
    if (self.init) init();
    if (self.initAdmin) initAdmin();
    
    if (self.storeDefaults) storeDefaults();
}

window.onbeforeunload = checkFormChanged;

function setSizeCookie() 
{
    var x,y;
    if (self.innerHeight) // all except Explorer
    {
    	x = self.innerWidth;
    	y = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
    {
	x = document.documentElement.clientWidth;
	y = document.documentElement.clientHeight;
    }
    else if (document.body) // other Explorers
    {
	x = document.body.clientWidth;
	y = document.body.clientHeight;
    }

    var future_date = new Date("December 31, 2023");
    var set_date = future_date.toGMTString();

    document.cookie='screenheight='+ y + ";expires=" + set_date;
    document.cookie='screenwidth='+ x + ";expires=" + set_date;
}

function setHoverable() 
{
    var trs = new Array();
		
    trs = $$('.hoverable');
					
    for (i=0; i<trs.length; i++)
    {
	// moet iets komen in de zin van this.className='hoverable highlight';
	trs[i].onmouseover =  function () {this.className = this.className.sub('hoverable', 'highlight')};
	trs[i].onmouseout  =  function () {this.className = this.className.sub('highlight', 'hoverable')};
    }
}



