function showLayer(layerName) {
	if (document.getElementById) {
		var targetElement = document.getElementById(layerName);
		targetElement.style.display = 'block';
	}
}
function hideLayer(layerName) {
	if (document.getElementById) {
		var targetElement = document.getElementById(layerName);
		targetElement.style.display = 'none';
	}
}

var asBilling = false

function asBilling_Click(){
	asBilling = document.tehform.sameasabove.checked;
	// if the box has been checked
	if (asBilling) {
		copyValues();
	}
	// if the box has been unchecked
	else
	{
		document.tehform.shiptitle.value = "";
		document.tehform.shipfirstname.value = "";
		document.tehform.shiplastname.value = "";
		document.tehform.shippropname.value = "";
		document.tehform.shipaddress1.value = "";
		document.tehform.shipaddress2.value = "";
		document.tehform.shipcity.value = "";
		document.tehform.shipcountry.value = "";
		document.tehform.shipstate.value = "";
		document.tehform.shippostcode.value = "";
	}
	
}


function copyValues (){
	if (asBilling){
		document.tehform.shiptitle.value = document.tehform.title.value;
		document.tehform.shipfirstname.value = document.tehform.firstname.value;
		document.tehform.shiplastname.value = document.tehform.lastname.value;
		document.tehform.shippropname.value = document.tehform.propname.value;
		document.tehform.shipaddress1.value = document.tehform.address1.value;
		document.tehform.shipaddress2.value = document.tehform.address2.value;
		document.tehform.shipcity.value = document.tehform.city.value;
		document.tehform.shipcountry.value = document.tehform.country.value;
		document.tehform.shipstate.value = document.tehform.state.value;
		document.tehform.shippostcode.value = document.tehform.postcode.value;
	}
}

/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

scrollStep=2

timerLeft=""
timerRight=""

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}
