
function setShipping() {
	document.aspnetForm.txtShippingFirstName.value = document.aspnetForm.txtBillingFirstName.value;
	document.aspnetForm.txtShippingLastName.value = document.aspnetForm.txtBillingLastName.value;
	document.aspnetForm.txtShippingPhone.value = document.aspnetForm.txtBillingPhone.value;
	document.aspnetForm.txtShippingEmail.value = document.aspnetForm.txtBillingEmail.value;
	document.aspnetForm.txtShippingAddress1.value = document.aspnetForm.txtBillingAddress1.value;
	document.aspnetForm.txtShippingAddress2.value = document.aspnetForm.txtBillingAddress2.value;
	document.aspnetForm.txtShippingSuite.value = document.aspnetForm.txtBillingSuite.value;
	document.aspnetForm.txtShippingCity.value = document.aspnetForm.txtBillingCity.value;
	document.aspnetForm.txtShippingState.value = document.aspnetForm.txtBillingState.value;
	document.aspnetForm.txtShippingZip.value = document.aspnetForm.txtBillingZip.value;
	//document.frmCheckout.txtShippingCountry.value = document.frmCheckout.txtBillingCountry.value;	
}

function init() {
	border = (ns4)? document.borderDiv.document: (ie4)? document.all['borderDiv']: (ie5||ns5)? document.getElementById('borderDiv'): null;
	bordercss = (ns4)? document.borderDiv: border.style;
	//bordercss.display="block";	
}

function ShowImage (index,objImg ) {
	//alert(imgName.name);
	if ( document.images ) {
		document["defImage"].src = aryImages[index];// eval(imgName + ".src");
	}
}

function HideBorder(objImg) {
	objImg.border = 0;	
}
function ShowDefaultImg () {
	//alert("Default");
	if ( document.images ) {
		document["defImage"].src = defaultImg ;
	}
}

function showCatalogPhoto(photo){	
	var clientpic;
    ImageLarge = document.getElementById("pageCatalogPhoto");
	ImageLarge.innerHTML = "<img src=\"../upFiles/catalog/product/"+photo+ "\" class=\"CatalogLargePhoto\" width=\"633\" height=\"348\" alt=\"\">";
}

function getObjByName(name,doc) {
  var o = 0;
  if(!doc) doc = document;
  if(doc[name]) o=doc[name];
  if(document.all && doc.all[name]) o=doc.all[name];
  if(o) {
    if(!o.getElementsByTagName) o.getElementsByTagName = getElementsArray;
    return o;
  }
  if(document.layers) {
    for(var i=0;i < doc.layers.length;i++){
      var lyrdoc = doc.layers[i].document;
      if(lyrdoc[name]) return lyrdoc[name];
      if(lyrdoc.layers.length > 0) {
        var o = getObjByName(name,lyrdoc);
        if(o) return o;
      }
    }
  }
  return 0;
}
if(!document.getElementById) document.getElementById = getObjByName;

function getElementsArray(el) {
  if(document.layers) {
    var doc = (this == document) ? document : this.document;
    switch(el) {
      case 'img' : return doc.images;
      case 'a' : return doc.links;
      case 'div' : return doc.layers;
      case 'form' : return doc.forms;
      default : return 0;
    }
  }
  if(document.all) return this.all.tags(el);
  return 0;
}
if(!document.getElementsByTagName) document.getElementsByTagName = getElementsArray;
if(document.layers) Layer.prototype.getElementsByTagName = getElementsArray;

function show(div){
  if(document.all) window.document.all[div].style.visibility = 'visible';
  else if(document.layers) getObjByName(div).visibility = 'show';
  else document.getElementById(div).style.visibility = 'visible';
}
function hide(div){
  if(document.all) window.document.all[div].style.visibility = 'hidden';
  else if(document.layers) getObjByName(div).visibility = 'hide';
  else document.getElementById(div).style.visibility = 'hidden';
}

function swapImg() {
  if(!document.images) return;
  var args = swapImg.arguments;
  for(var i=0;i < args.length;i+=2) {
    var imgSrc = (args[i + 1].indexOf('[') != -1) ? eval(args[i + 1] + '.src') : args[i + 1];
    if(getObjByName(args[i])) getObjByName(args[i]).src = imgSrc;
  }
}

function jumpTo1(URL_List){
   var URL = URL_List.options[URL_List.selectedIndex].value;
   window.location.href = URL;
}

function jumpTo(URL_List){
   window.location.href = URL_List;
}

function openNewWindow(theURL,winName,features) { //v2.0
  var newWindow =  window.open(theURL,winName,features);
  newWindow.focus();
}
