
function addLoadEvent(func,order) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
		if (order=='prepend') {func()};
		if (oldonload) {
			oldonload();
		}
		if (order!='prepend') {func()};
	}
  }
}

function FreezeScreen(msg) {
	scroll(0,0);
	var outerPane = document.getElementById('FreezePane');
	var innerPane = document.getElementById('InnerFreezePane');
	if (outerPane) outerPane.className = 'FreezePaneOn';
	if (innerPane) innerPane.innerHTML = msg;
}

function oneSubmit(ele){
	ele.onclick=function(){FreezeScreen('Processing...');}
}


if ( typeof( window[ 'screenSize' ] ) != "undefined" ){

	if (screenSize == 'UKN' && screen.width < thresholdWidth){
		document.location.href=redirectURL + '&smallscreen=1';
	} else if (	screenSize == 'standard' && 
				screen.width >= thresholdWidth &&
				typeof( window[ 'redirectURL' ] ) != "undefined" 
				){
		document.location.href=redirectURL;
	} else if (	screenSize == 'small' && 
				screen.width < thresholdWidth &&
				typeof( window[ 'redirectURL' ] ) != "undefined" 
				){
		document.location.href=redirectURL;
	}
}

