function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages(image1, image2, image3) { //v3.0
  if (document.images) {
    	img1 = new Image();
    	img1.src = image1;
		img2 = new Image();
		img2.src = image2;
		img3 = new Image();
		img3.src = image3;
	}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function changeText(text) {
	document.getElementById("plandetails").innerHTML=text;
}
function changeLink(text) {
	document.getElementById("joinnow").innerHTML=text;
}
function show_phone_line() {
	MM_swapImage('line','','images/line-tn-home-on.jpg',1);
	MM_swapImage('unlimited','','images/unlimited-tn-home-off.jpg',1);
	MM_swapImage('fax','','images/fax-tn-home-off.jpg',1);
	MM_swapImage('price','','images/line-price-home.gif',1);
	MM_swapImage('mainimg','','images/line-img-home.jpg',1);
	changeText('<ul>'
  + '  <li>3.9¢ long distance calling</li>'
  + '  <li><a href="https://1014.secure2.privacypay.net/areacodes.cfm">Choose your own area code</a></li>'
  + '  <li><a href="https://1014.secure2.privacypay.net/rates.cfm">Great International Rates</a></li>'
  + '  <li><a href="../NewSite/js/features.html">Voicemail, Caller ID, Call Waiting . . .</a></li>'
  + '</ul>');
	changeLink('<a href="../NewSite/js/residential.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'join-ctn\',\'\',\'images/join-btn-home-ctn-on.jpg\',1)"><img src="../NewSite/js/images/join-btn-home-ctn.jpg" name="join-ctn" width="96" height="33" border="0"></a>');
}
function show_unlimited() {
	MM_swapImage('line','','images/line-tn-home-off.jpg',1);
	MM_swapImage('unlimited','','images/unlimited-tn-home-on.jpg',1);
	MM_swapImage('fax','','images/fax-tn-home-off.jpg',1);
	MM_swapImage('price','','images/unlimited-price-home.gif',1);
	MM_swapImage('mainimg','','images/unlimited-img-home.jpg',1);
	changeText('<ul>'
  + '  <li><a href="https://1014.secure2.privacypay.net/areacodes.cfm">Choose your own area code</a></li>'
  + '  <li><a href="https://1014.secure2.privacypay.net/rates.cfm">Great International Rates</a></li>'
  + '  <li><a href="../NewSite/js/features.html">Voicemail, Caller ID, Call Waiting . . .</a></li>'
  + '  <li>FREE SHIPPING</li>'
  + '</ul>');
	changeLink('<a href="../NewSite/js/residential.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'join-ctn\',\'\',\'images/join-btn-home-ctn-on.jpg\',1)"><img src="../NewSite/js/images/join-btn-home-ctn.jpg" name="join-ctn" width="96" height="33" border="0"></a>');	
}
function show_fax() {
	MM_swapImage('line','','images/line-tn-home-off.jpg',1);
	MM_swapImage('unlimited','','images/unlimited-tn-home-off.jpg',1);
	MM_swapImage('fax','','images/fax-tn-home-on.jpg',1);
	MM_swapImage('price','','images/fax-price-home.gif',1);
	MM_swapImage('mainimg','','images/fax-img-home.jpg',1);
	changeText('<ul>'
  + '  <li>150 Free Minutes</li>'
  + '  <li><a href="https://1014.secure2.privacypay.net/areacodes.cfm">Choose your own fax area code</a></li>'
  + '  <li>Unlimited Incoming Faxes</li>'
  + '</ul>');
	changeLink('<a href="../NewSite/js/fax-plus.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'join-ctn\',\'\',\'images/join-btn-home-ctn-on.jpg\',1)"><img src="../NewSite/js/images/join-btn-home-ctn.jpg" name="join-ctn" width="96" height="33" border="0"></a>');	
}

function emptyvalidation(entered, alertbox)
{
	with (entered)
	{
		if (value==null || value=="")
		{if (alertbox!="") {alert(alertbox);} return false;}
		else {return true;}
	}
}

function validate(thisform)
{
	with(thisform)
	{
		if (emptyvalidation(billing_firstname,"Please enter your first name in the billing information")==false) {billing_firstname.focus(); return false;};
		if (emptyvalidation(billing_lastname,"Please enter your last name in the billing information")==false) {billing_lastname.focus(); return false;};
		if (emptyvalidation(billing_address,"Please enter your address in the billing information")==false) {billing_address.focus(); return false;};
		if (emptyvalidation(billing_city,"Please enter your city in the billing information")==false) {billing_city.focus(); return false;};
		if (emptyvalidation(billing_state,"Please choose your state in the billing information")==false) {billing_state.focus(); return false;};
		if (emptyvalidation(billing_zip,"Please enter your ZIP code in the billing information")==false) {billing_zip.focus(); return false;};
		if (emptyvalidation(phone,"Please enter your phone number (Not Cell)")==false) {phone.focus(); return false;};
		if (emptyvalidation(contact_phone,"Please enter your contact phone number")==false) {contact_phone.focus(); return false;};
	}
}//-->

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function port_alert() {
   alert("Don't forget to enter your number if you choose \"Port a Phone\".");
}	


