function businessShow(){
    $('24hourdiv').hide();
  	$('residentialoptionsdiv').hide();
  	$('resiblurb').hide();  	
  	$('pickupordeliveryresi').hide();      	
    $('businessoptionsdiv').show();
  	$('pickupordeliverybusi').show();
  	$('busiblurb').show();
  	clear_price();    	        
}

function residentialShow(){
    $('24hourdiv').hide();
  	$('businessoptionsdiv').hide();
  	$('busiblurb').hide();  	 
    $('residentialoptionsdiv').show();
  	$('resiblurb').show();
  	clear_price();    	          	
}

function daypassshow(){
  	$('pickupordeliverybusi').hide();
  	$('pickupordeliveryresi').hide();      	    
  	$('residentialoptionsdiv').hide();
  	$('businessoptionsdiv').hide();
  	$('busiblurb').hide();  	 
  	$('resiblurb').hide();  	   	  	
    $('24hourdiv').show();
  	clear_price();
	document.orderform.totalamount.value="7.99";  	    	            
}

function updateprice(){ 
    currentplan=get_radio_value()
	if(currentplan == 1){
		plan="24.99";
      	$('pickupordeliverybusi').hide();      	 	  	      	
  		$('pickupordeliveryresi').show();		
	}
	if(currentplan == 2){
		plan="34.99";
      	$('pickupordeliverybusi').hide();      	 	  	      	
	  	$('pickupordeliveryresi').show();	
	}
	if(currentplan == 3){
		plan="19.99";
      	$('pickupordeliverybusi').hide();      	 	  	      	
  		$('pickupordeliveryresi').hide();			
	}
	if(currentplan == 4){
		plan="29.99";
      	$('pickupordeliverybusi').hide();      	 	  	      	
  		$('pickupordeliveryresi').hide();			
	}
	if(currentplan == 5){
		plan="34.99";
      	$('pickupordeliverybusi').show();      	 	  	      	
  		$('pickupordeliveryresi').hide();		
	}
	if(currentplan == 6){
		plan="49.99";
      	$('pickupordeliverybusi').show();      	 	  	      	
  		$('pickupordeliveryresi').hide();			
	}
	if(currentplan == 7){
		plan="24.99";
      	$('pickupordeliverybusi').hide();      	 	  	      	
  		$('pickupordeliveryresi').hide();	
	}
	if(currentplan == 8){
		plan="34.99";
      	$('pickupordeliverybusi').hide();      	 	  	      	
  		$('pickupordeliveryresi').hide();	
	}
	if(currentplan == 1 || currentplan == 2 ){

    	resdelivery=document.orderform.deliverytype_resi.value;
		if(resdelivery == 3){
			price=parseFloat(plan)+30;      
			document.orderform.totalamount.value=price.toFixed(2);
      return;
		}else if (resdelivery == 1){
			price=parseFloat(plan)+8;
			document.orderform.totalamount.value=price.toFixed(2);						
      return;
		}else {
			document.orderform.totalamount.value=plan;	
      return;
		}
	}if(currentplan == 5 || currentplan == 6){
    	deliveryoption=document.orderform.deliverytype_busi.value;
		if(deliveryoption == 3){
			price=parseFloat(plan)+30;
			document.orderform.totalamount.value=price.toFixed(2);
      return;
		}else if (deliveryoption == 1){
			price=parseFloat(plan)+8;
			document.orderform.totalamount.value=price.toFixed(2);						
      return;
		}else {
			document.orderform.totalamount.value=plan;		
      return;
		}	
	}else{
			document.orderform.totalamount.value=plan;		
      return;
	}
						
}

function clear_price(){
	document.orderform.totalamount.value="";
}

function get_radio_value()
{
for (var i=0; i < document.orderform.wifiplan.length; i++)
   {
   if (document.orderform.wifiplan[i].checked)
      {
      var rad_val = document.orderform.wifiplan[i].value;
      return rad_val;
      }
   }
}



function notEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		return false;
	}
	return true;
}
function popupmap(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=550,height=490,scrollbars=no');
return false;
}

function popuptos(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=750,height=600,scrollbars=yes');
return false;
}
