function TurnStuffOn(){
	if(pdGlobal.currentPages[0]){
		if(pdimageon = pdGlobal.currentPages[0].id){
			CurrentOn = pdimageon;
			switch(pdimageon){
				case 109972:
					$('#L1_1').css("background-position","-14px -31px");
					//Add 'by L1' banner code in here
					break;
				case 109983:
					$('#L1_2').css("background-position","-224px -31px");
					//Add 'by L1' banner code in here
					break;
				case 109993:
					$('#L1_3').css("background-position","-390px -31px");
					//Add 'by L1' banner code in here
					break;
				case 111994:
					$('#L1_4').css("background-position","-563px -31px");
					//Add 'by L1' banner code in here
					break;
				case 111995:
					$('#L1_5').css("background-position","-775px -31px");
					//Add 'by L1' banner code in here
					break;
			}
		}
	}
}


function MS_swap(Mitem,Mtype){
	Mitem.src=Mitem.getAttribute(Mtype || "origsrc");
}

function MS(img_swap){
	img_swap.setAttribute("origsrc",img_swap.src);
	img_swap.setAttribute("onload","");
   	img_swap.oversrc_img = new Image();
  	img_swap.oversrc_img.src=img_swap.getAttribute("oversrc");
    img_swap.onmouseover = new Function("MS_swap(this,'oversrc');");
    img_swap.onmouseout = new Function("MS_swap(this);");
	img_swap.style.cursor = 'pointer';
}

/*ripped from prototype.js*/
function M_object(element) {
	if (arguments.length > 1) {
		for (var i = 0, elements = [], length = arguments.length; i < length; i++)
			elements.push(M_object(arguments[i]));
		return elements;
	}
	if (typeof element == 'string')
		element = document.getElementById(element);
	return element;
}

//Check for added variable to podium url
function getQueryVariable(variable) {
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) {
		var pair = vars[i].split("=");
		if (pair[0] == variable) {
			return pair[1];
		}
	} 
	return -100;

}

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

function insertFooterCode(){
	var footerContainer = document.createElement("div");
	footerContainer.innerHTML = M_object("podium_footer").innerHTML;
	document.body.appendChild(footerContainer);
}