function $(el)
{
	return document.getElementById(el);
}

/*
 * Append function to window.onload
 */
window.addLoadEvent = function(func)
{
	var oldonload = window.onload;
	
	if (typeof window.onload != 'function')
		window.onload = func;
	else 
		window.onload = function() 
		{
			oldonload();
			func();
		}
}


/*
 * Load CSS to support JS
 */
window.loadCss = function(cssFile)
{
	var agt=navigator.userAgent.toLowerCase();
	
	if (!((-1 != agt.indexOf("msie")) && (-1 != agt.indexOf("mac")))) //Don't bother with IE:Mac.
		document.writeln('<link rel="stylesheet" type="text/css" href="'+cssFile+'" media="screen" />');
}

	
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("msie 5.0")!=-1) 
{
	//kill background anchor images in IE 5.0 as it doesn't render them correctly
	var strOut = '<style>\n'
	strOut += ' a {background-image:none !important}\n'
	strOut += '</style>\n'
	document.writeln(strOut);
	
	
	//IE5 doesn't support the array push method, so we have to write our own version.  
	Array.prototype.push = function(item)
	{
		this[this.length] = item;
	}
	
}

