window.addOnload = function (fn)
{
	if (!window.OnloadCache) window.OnloadCache = [];
	var ol = window.OnloadCache;
	ol[ol.length] = fn;
}

window.onload = function ()
{
	var ol = window.OnloadCache;
	if (ol)
	for (var x = 0; x < ol.length; x++)
	this.action = ol[x]();
}


window.addOnresize = function (fn)
{
	if (!window.OnresizeCache) window.OnresizeCache = [];
	var ol = window.OnresizeCache;
	ol[ol.length] = fn;
}

window.onresize = function ()
{
	var ol = window.OnresizeCache;
	if (ol)
	for (var x = 0; x < ol.length; x++)
	this.action = ol[x]();
}


var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function getStyle(el,styleProp)
{
	var x = document.getElementById(el);
	if (window.getComputedStyle)
		var y = window.getComputedStyle(x,null).getPropertyValue(styleProp);
	else if (x.currentStyle)
		var y = eval('x.currentStyle.' + styleProp);
	return y;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
