// JavaScript functions for MEGA site



function changeText(text){



newElem = document.createElement("i");

newText = document.createTextNode(text);

newElem.appendChild(newText);



allElem = document.getElementsByTagName("i");

oldElem = allElem.item(0);



var parentElem = document.getElementById("variable_text");

var replaced = parentElem.replaceChild(newElem, oldElem);



return true;

}



startList = function() {

if (document.all&&document.getElementById) {

navRoot = document.getElementById("mainNav");

for (i=0; i<navRoot.childNodes.length; i++) {

node = navRoot.childNodes[i];

if (node.nodeName=="LI") {

node.onmouseover=function() {



this.className+=" over";

  }

  node.onmouseout=function() {

  this.className=this.className.replace(" over", "");

   }

   }

  }

 }

}

//window.onload=startList;

function doLogin(form) {
	var theUrl = "_home.shtml";

   if (form.login[0].checked) { theUrl = "member" + theUrl; }
   if (form.login[1].checked) { theUrl = "agent" + theUrl; }
   if (form.login[2].checked) { theUrl = "provider" + theUrl; }
   //alert (theUrl);

	form.action = theUrl;
	return true;
}

function doSmartFundEstimator(form, thetype) {
	var theUrl = "member_smartfund_estimated_allowances.shtml";

   if (thetype=="full") { theUrl = "member_smartfund_estimated_allowances.shtml"; }
   else { theUrl = "member_smartfund_allowance_estimator.shtml"; }

	form.action = theUrl;
	return true;
}

