function build_anchor(_text, _href, _class) {
	/* Build an anchor and return it with 
	text = text
	href = href
	class = class */
	_txt=document.createTextNode(_text);
	_a=document.createElement("a");
	_a.appendChild(_txt);
	_a.setAttribute("href",_href);
	_a.setAttribute("class",_class);
	return _a;
}	
function build_p(_text, _class) {
	/* Build an paragraph and return it with
	class = class */
	_txt=document.createTextNode(_text);
	_p=document.createElement("p");
	_p.appendChild(_txt);
	_p.setAttribute("class",_class)
	return _p;
}
function build_text(_text) {
	/* Build an paragraph and return it with
	class = class */
	_txt=document.createTextNode(_text);
	return _txt;
}

function build_footer(ID) {
	/* Build the footer within the div with the object with the ID = ID */
	line_one=build_p("","");
	line_one.appendChild(build_anchor("Home", baseHref ,""));
	line_one.appendChild(build_text(" | "));
	line_one.appendChild(build_anchor("Site Map", baseHref+"global/site_map.asp",""));
	line_one.appendChild(build_text(" | "));
	line_one.appendChild(build_anchor("Privacy Policy",baseHref+"global/privacy_policy.asp",""));
	line_one.appendChild(build_text(" | "));
	line_one.appendChild(build_anchor("Optimal Site Requirements",baseHref+"global/site_requirements.asp",""));
	line_one.appendChild(build_text(" | "));
	line_one.appendChild(build_anchor("NYSE EIX","http://ir.edisoninvestor.com/phoenix.zhtml?c=85474&p=irol-stockquote" ,""));
	
	//extend copyright to 2008 - WR# 04092623 - Guru 12/26/2007
	//line_two=build_p("Copyright 2000 - 2006 Edison International. All rights reserved","copyright");
	var now = 2008;
	var cy=new Date().getFullYear();
	now = !isNaN(cy) && cy>0 ? cy:2008;
	//
	line_two=build_p("Copyright "+ now + " Edison International. All rights reserved","copyright");
	//Guru - 8/7/2007
	//WR#3947870IN - Remove Footer
	//line_three=build_p("The other Edison International companies are not the same companies as Southern California Edison (SCE), the utility, and are not regulated by the California Public Utilities Commission.","affiliate_disclaimer");
	
	_ID = document.getElementById(ID);
	_ID.appendChild(line_one);
	_ID.appendChild(line_two);

	//Guru - 8/7/2007
	//WR#3947870IN - Add New Footer for EMG
	if (  (location.href.search(/emg\.asp/i)>0) ||
	      (location.href.search(/emg_jobs\.asp/i)>0) ||
	      (location.href.search(/eme_jobs\.asp/i)>0) ||
	      (location.href.search(/mwg_jobs\.asp/i)>0) )	
	{
		line_three=build_p("Edison Mission Group is not the same company as Southern California Edison (SCE), the utility, and is not regulated by the California Public Utilities Commission.","affiliate_disclaimer");	
		_ID.appendChild(line_three);
	}		
}
	
