// JavaScript Document
function same_address() {
document.checkout.delivery_first_name.value=document.checkout.first_name.value
document.checkout.delivery_last_name.value=document.checkout.last_name.value;
document.checkout.delivery_telephone.value=document.checkout.telephone.value;
document.checkout.delivery_address_1.value=document.checkout.billing_address_1.value;
document.checkout.delivery_address_2.value=document.checkout.billing_address_2.value;
document.checkout.delivery_town_city.value=document.checkout.billing_town_city.value;
document.checkout.delivery_county.value=document.checkout.billing_county.value;
document.checkout.delivery_post_code.value=document.checkout.billing_post_code.value;
document.checkout.delivery_country_id.selectedIndex=document.checkout.billing_country_id.selectedIndex;
}
        function validate_checkout(){
          if(document.checkout.first_name.value==""){
            alert('Please enter your first name.');
            document.checkout.first_name.focus();
            return false;
          }
          else if(document.checkout.last_name.value==""){
            alert('Please enter your last name.');
            document.checkout.last_name.focus();
            return false;
          }
          else if(document.checkout.email_address.value==""){
            alert('Please enter your email address.');
            document.checkout.email_address.focus();
            return false;
          }
          else if(document.checkout.telephone.value==""){
            alert('Please enter your telephone number.');
            document.checkout.telephone.focus();
            return false;
          }
          else if(document.checkout.billing_address_1.value==""){
            alert('Please enter your address.');
            document.checkout.billing_address_1.focus();
            return false;
          }
         document.checkout.submit();
		         }
function cc_validate(){
          if(document.checkout.Cardname.value==""){
            alert('Please enter the name that appears on your card.');
            document.checkout.Cardname.focus();
            return false;
          }
          else if(document.checkout.cc_number.value==""){
            alert('Please enter your credit card number.');
            document.checkout.cc_number.focus();
            return false;
          }
          document.checkout.submit();
document.checkout.makepayment.value='Processing, please wait...';
document.checkout.makepayment.disabled=true;
		         }

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}


function printit(){  
if (window.print) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}

function thumbFile(myFile,myID) {


//change class of image clicked
document.getElementById(myID).className='imageClicked';

//set hidden field to file name
document.product_update.thumb_filename.value = myFile;

}
//<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(50.92449,-0.14294), 10);
		
		var point = new GLatLng(50.92449,-0.14294);
 		map.addOverlay(createMarker(point));
		map.addControl(new GLargeMapControl());
      }
    }

    //]]

function createMarker(point) {
  var marker = new GMarker(point);
 GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml("Electronic Healing Shop");
  }
 );
  return marker;
}

