//valid replacment for onLoad in body tag
//via : http://simonwillison.net/2004/May/26/addLoadEvent/

function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
	window.onload = func;
    } else {
	window.onload = function() {
	    if (oldonload) {
	        oldonload();
	    }
	    func();
	}
    }
    
    //jon added on resize function
    var oldonresize = window.onresize;
    if (typeof window.onresize != 'function') {
	window.onresize = func;
    } else {
	window.onresize = function() {
	    if (oldonresize) {
	        oldonresize();
	    }
	    func();
	}
    }
}

//seperate js file for large pages, otherwise js error occurs when it cant find the div id - in the long run should merge these scripts

addLoadEvent(function() {
	

	
	if (document.viewport.getWidth() > 400) {
		var newContentSize = ( (document.viewport.getHeight())-161);  //this works best across all browsers 
		
		Element.setStyle('textContentSecure', {height:newContentSize+'px'} );
		return false; 
	}
})

