function Initialize() {
	if (!document.getElementById) {
		return
	}

	var imgOriginSrc;
	var imgTemp = new Array();
	var imgarr = document.getElementsByTagName('img');
		
	for (var i = 0; i < imgarr.length; i++) {
		if (imgarr[i].getAttribute('hsrc')) {
			imgTemp[i] = new Image();
			imgTemp[i].src = imgarr[i].getAttribute('hsrc');
			imgarr[i].onmouseover = function() {
				imgOriginSrc = this.getAttribute('src');
				this.setAttribute('src',this.getAttribute('hsrc'))
			}
			imgarr[i].onmouseout = function() {
				this.setAttribute('src',imgOriginSrc)
			}
		}
	}
}

function PopulateShipTo() {
	var orderForm = document.frmOrdering;
	
	if (orderForm.chkShipTo.checked) {
		orderForm.txtShipToName.value = orderForm.txtBillToName.value;
		orderForm.txtShipToAddress.value = orderForm.txtBillToAddress.value;
		orderForm.txtShipToCity.value = orderForm.txtBillToCity.value;
		orderForm.txtShipToProvince.value = orderForm.txtBillToProvince.value;
		orderForm.txtShipToPostal.value = orderForm.txtBillToPostal.value;
		orderForm.txtShipToPhone.value = orderForm.txtBillToPhone.value;
		orderForm.txtShipToEmail.value = orderForm.txtBillToEmail.value;
	}
	else {
		orderForm.txtShipToName.value = (orderForm.txtShipToName.value == orderForm.txtBillToName.value ? '' : orderForm.txtShipToName.value);
		orderForm.txtShipToAddress.value = (orderForm.txtShipToAddress.value == orderForm.txtBillToAddress.value ? '' : orderForm.txtShipToAddress.value);
		orderForm.txtShipToCity.value = (orderForm.txtShipToCity.value == orderForm.txtBillToCity.value ? '' : orderForm.txtShipToCity.value);
		orderForm.txtShipToProvince.value = (orderForm.txtShipToProvince.value == orderForm.txtBillToProvince.value ? '' : orderForm.txtShipToProvince.value);
		orderForm.txtShipToPostal.value = (orderForm.txtShipToPostal.value == orderForm.txtBillToPostal.value ? '' : orderForm.txtShipToPostal.value);
		orderForm.txtShipToPhone.value = (orderForm.txtShipToPhone.value == orderForm.txtBillToPhone.value ? '' : orderForm.txtShipToPhone.value);
		orderForm.txtShipToEmail.value = (orderForm.txtShipToEmail.value == orderForm.txtBillToEmail.value ? '' : orderForm.txtShipToEmail.value);
	}	
}

onload=Initialize;