//required CentraleWeb estore.js file
function verify_country(country,stateID) {
	
	var state = document.getElementById(stateID);
	if(state) {
		if(country.options[country.selectedIndex].text == "United States of America") {
			state.disabled = false;
		} else {
			state.disabled = true;
		}
	}
	
}

function resize_pic() {
	
      if (window.innerWidth) {
		  
		     iWidth = window.innerWidth;
             iHeight = window.innerHeight;
			 
      } else {
		  
              iWidth = document.body.clientWidth;
              iHeight =document.body.clientHeight;
      }
              iWidth = document.images[0].width - iWidth;
              iHeight = document.images[0].height - iHeight;
              window.resizeBy(iWidth, iHeight);

}

function resize_win() {
		  
       //iWidth = document.body.clientWidth;
      // iHeight =document.body.clientHeight;
     
       iWidth = document.images.pic.width + document.images.thumb.width;
	   iHeight = document.images.pic.height + document.images.thumb.height;
       window.resizeTo(iWidth,iHeight);
	   self.moveTo((screen.width - iWidth) / 2,(screen.height - iHeight) / 2);
}

function grabCustomerInfo() {
	if(document.member_info.sameAsCustomer.checked) {

		/*if (document.member_info.address.value == "" || 
			document.member_info.city.value == "" || 
			document.member_info.state.value == "" || 
			document.member_info.zip.value == "" ||
			document.member_info.phone == "") {
			alert ('Some information fields in personal information are empty.');
			
		} else {*/
	
		document.member_info.shipping_address.value = document.member_info.address.value;
		document.member_info.shipping_address2.value = document.member_info.address2.value;
		document.member_info.shipping_city.value = document.member_info.city.value;
		document.member_info.shipping_state.selectedIndex = document.member_info.state.selectedIndex;
		document.member_info.shipping_country.selectedIndex = document.member_info.country.selectedIndex;
		document.member_info.shipping_zip.value = document.member_info.zip.value;
		document.member_info.shipping_phone.value = document.member_info.phone.value;

		//}

	} else {
		document.member_info.shipping_address.value = "";
		document.member_info.shipping_address2.value = "";
		document.member_info.shipping_city.value = "";
		document.member_info.shipping_state.selectedIndex = 0;
		document.member_info.shipping_country.selectedIndex = 0;
		document.member_info.shipping_zip.value = "";
		document.member_info.shipping_phone.value = "";
	
	}
}

function mOvr(src,clrOver) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = clrOver;
	}
  }
  
function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = clrIn;
	}
  }
function mClk(src) {
    document.location.href=src;
	/*if(event.srcElement.tagName=='TR'){
	   src.children.tags('A')[2].click();
    }*/
  }
