<!--

if (document.images )

{

home = new Image(60,30);
home.src = "http://www.mcbasset.com/images/nav/home.gif";

home_on = new Image(60,30);
home_on.src = "http://www.mcbasset.com/images/nav/home_on.gif";

about = new Image(77,30);
about.src = "http://www.mcbasset.com/images/nav/about.gif";

about_on = new Image(77,30);
about_on.src = "http://www.mcbasset.com/images/nav/about_on.gif";

buy = new Image(101,30);
buy.src = "http://www.mcbasset.com/images/nav/buy.gif";

buy_on = new Image(101,30);
buy_on.src = "http://www.mcbasset.com/images/nav/buy_on.gif";

login = new Image(59,30);
login.src = "http://www.mcbasset.com/images/nav/login.gif";

login_on = new Image(59,30);
login_on.src = "http://www.mcbasset.com/images/nav/login_on.gif";

contact = new Image(89,30);
contact.src = "http://www.mcbasset.com/images/nav/contact.gif";

contact_on = new Image(89,30);
contact_on.src = "http://www.mcbasset.com/images/nav/contact_on.gif";


}

function hiLite(imgDocID,imgObjName) {
        if( !document.images ) return;
        document.images[imgDocID].src = eval(imgObjName + ".src")
}



function loadPopup(url, xw, xh, name){


   // SPECIFY THE POPUP WINDOW NAME
   var win_popup_name = name;

   // SPECIFY URL OF POPUP WINDOW
   var win_popup_url = url;

   // SPECIFY THE WINDOW HEIGHT AND WIDTH
   var win_width = xw;
   var win_height = xh;

   // SPECIFY THE LOCATION OF THE TOP-LEFT CORNER OF THE WINDOW
   var win_left = (screen.width - win_width) / 2;
   var win_top = (screen.height - win_height) / 2;
   var popup_window = window.open(win_popup_url,win_popup_name,'width=' + win_width + ',height=' + win_height + ',top=' + win_top + ',left=' + win_left + ',directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no')
   popup_window.focus();

}




function updateTotals() {

var total = 0;

  if (document.getElementById('x_quantity').value == null || document.getElementById('x_quantity').value == 0 || document.getElementById('x_quantity').value == "") {
    
    document.getElementById('x_quantity').value = 1; 
  }
  
  total = document.getElementById('item1').value * document.getElementById('x_quantity').value;
  
  var totalF = total.toFixed(2);

  document.getElementById('subtotal').innerHTML = '$' + totalF;
  document.getElementById('total').innerHTML = '$' + totalF;

}

function copyBillingToShipping() {

  if (document.getElementById('shipsame').checked == true) {
      document.getElementById('ship_fname').value = document.getElementById('bill_fname').value;
      document.getElementById('ship_lname').value = document.getElementById('bill_lname').value;
      document.getElementById('ship_address').value = document.getElementById('bill_address').value;
      document.getElementById('ship_city').value = document.getElementById('bill_city').value;
      document.getElementById('ship_state').value = document.getElementById('bill_state').value;
      document.getElementById('ship_zip').value = document.getElementById('bill_zip').value;
  }

return true;
}


function orderValidate(form) {
  var alert_text = '';
  var this_error = 0;
  
  //Billing
 	if (form.bill_fname.value == null || form.bill_fname.value.length == 0) {
		alert_text = alert_text + '\n - Billing First Name is required.';
		this_error = 1;
	}	

	if (form.bill_lname.value == null || form.bill_lname.value.length == 0) {
		alert_text = alert_text + '\n - Billing Last Name is required.';
		this_error = 1;
	}	

	if (form.bill_address.value == null || form.bill_address.value.length == 0) {
		alert_text = alert_text + '\n - Billing Address is required.';
		this_error = 1;
	}	

	if (form.bill_city.value == null || form.bill_city.value.length == 0) {
		alert_text = alert_text + '\n - Billing City is required.';
		this_error = 1;
	}	

	if (form.bill_state.value == null || form.bill_state.value.length == 0) {
		alert_text = alert_text + '\n - Billing State is required.';
		this_error = 1;
	}	

	if (form.bill_zip.value == null || form.bill_zip.value.length == 0) {
		alert_text = alert_text + '\n - Billing Zip Code is required.';
		this_error = 1;
	}	

	if (form.bill_email.value == null || form.bill_email.value.length == 0) {
		alert_text = alert_text + '\n - Billing E-Mail Address is required.';
		this_error = 1;
	}	
  
	if (form.bill_phone.value == null || form.bill_phone.value.length == 0) {
		alert_text = alert_text + '\n - Billing Phone Number is required.';
		this_error = 1;
	}	
  
  //Shipping
	if (form.ship_fname.value == null || form.ship_fname.value.length == 0) {
		alert_text = alert_text + '\n - Shipping First Name is required.';
		this_error = 1;
	}	

	if (form.ship_lname.value == null || form.ship_lname.value.length == 0) {
		alert_text = alert_text + '\n - Shipping Last Name is required.';
		this_error = 1;
	}	

	if (form.ship_address.value == null || form.ship_address.value.length == 0) {
		alert_text = alert_text + '\n - Shipping Address is required.';
		this_error = 1;
	}	

	if (form.ship_city.value == null || form.ship_city.value.length == 0) {
		alert_text = alert_text + '\n - Shipping City is required.';
		this_error = 1;
	}	

	if (form.ship_state.value == null || form.ship_state.value.length == 0) {
		alert_text = alert_text + '\n - Shipping State is required.';
		this_error = 1;
	}	

	if (form.ship_zip.value == null || form.ship_zip.value.length == 0) {
		alert_text = alert_text + '\n - Shipping Zip Code is required.';
		this_error = 1;
	}	

  // payment info
  
  if (form.bill_ccnum.value == null ) {
		alert_text = alert_text + '\n - Credit Card Number is required.';
		this_error = 1;
	}	

  if (form.bill_ccexpmo.value == null || form.bill_ccexpyear.value == null) {
		alert_text = alert_text + '\n - Credit Card Expiration Year is required.';
		this_error = 1;
	}	

  if (this_error == 1) {
    alert ("There were errors with your order:\n" + alert_text + "\n\nPlease check the required fields and re-submit your order.");
    return false;
  } else {
  	return true;
  }
  
}


-->