function getElem(id) {
	return document.getElementById(id);
} // function geteElem(id)

function popUp(URL, width, height) {
	day = new Date();
	id = day.getTime();
	return eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + ",left = 312,top = 234');");
} // function popUp(URL, width, height)

function sessionPopUp(URL) {
	var vars = getUrlVars();
	popUp(URL+"&eId="+vars['eId'], 500, 500);
} // function sessionPopUp(URL)

function loadSWF(filename, width, height, id, innerHTML) {
	// Default parameter values
	var filename   = (filename == null) ? "flash/flash.swf" : filename;
	var width      = (width == null) ? 400 : width;
	var height     = (height == null) ? 400 : height;
	var id         = (id == null) ? "flash" : id;
	// Write tags
	document.write('<object type="application/x-shockwave-flash" data="'+filename+'" width="'+width+'" height="'+height+'" id="'+id+'" allowscriptaccess="always" allownetworking="all">');
	document.write('<param name="movie" value="'+filename+'" />');
	document.write(' <param name="wmode" value="opaque" />');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="allowNetworking" value="all" />');
	if (innerHTML != null) {
		document.write(innerHTML);
	} // if (innerHTML != null)
	document.write('</object>');
}

function getUrlVars() {
	var vars = [], hash;
	var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
	for(var i = 0; i < hashes.length; i++) {
		hash = hashes[i].split('=');
		vars.push(hash[0]);
		vars[hash[0]] = hash[1];
	} // for(var i = 0; i < hashes.length; i++)
	return vars;
} // function getUrlVars()