﻿// JavaScript Document
if(typeof parkside == "undefined") var parkside = new Object();
if(typeof parkside.shippingaddress == "undefined") parkside.shippingaddress = new Object();

// Constructor
parkside.shippingaddress = function() {
}

/// Class members
parkside.shippingaddress.prototype = {
/// Methods
	switchAdress: function(checkbox) {
		if (!document.getElementById)
			return;
			
		if (checkbox.checked && window.location.href.indexOf("shop.checkout.htm") == -1) {
			window.location = "shop.checkout.htm";
		} else if (!checkbox.checked && window.location.href.indexOf("checkout.1.htm") == -1) {
			window.location = "checkout.1.htm";
		}
		
		return;

		var sa_data_div = document.getElementById("checkout_shipping_address");
		var ba_data_div = document.getElementById("checkout_billing_address");

		if (checkbox.checked) {
			ba_data_div.style.display = "block";
			sa_data_div.style.display = "none";
		}
		else {
			ba_data_div.style.display = "none";
			sa_data_div.style.display = "block";
		}
	}
}

shippingaddress = new parkside.shippingaddress();


