function get_height() {
	 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	 
	 if (typeof window.innerWidth != 'undefined')
	 {
	      viewportheight = window.innerHeight;
	 }
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	 else if (typeof document.documentElement != 'undefined'
	     && typeof document.documentElement.clientWidth !=
	     'undefined' && document.documentElement.clientWidth != 0)
	 {
	       viewportheight = document.documentElement.clientHeight;
	 }
	 
	 // older versions of IE
	 
	 else
	 {
	       viewportheight = document.getElementsByTagName('body')[0].clientHeight;
	 }
		var table = '<table border="0" cellpadding="0" cellspacing="0" width="100%" height='+ viewportheight +'>';
		document.write(table);
	
}

function toggle_display(elementID) {
        var e = document.getElementById(elementID);
        if(e.style.display == "block") {
                e.style.display='none';
        }
        else {
                e.style.display='block';
        }
}

/**
 * copyShippping()
 *
 *      a part of the shopping cart where information is copied if the shipping address
 *      is the same as the billing address
 *
 */

function copyShipping() {
	
	var checkoutForm = document.getElementById('Checkout');
	var checkboxGlobal = checkoutForm.elements['checkbox_global'].value;
	
	( checkoutForm.elements['checkbox_global'].value == 1 ) ? checkoutForm.elements['checkbox_global'].value = 0: checkoutForm.elements['checkbox_global'].value = 1;
	
	if( checkboxGlobal == 1) {
		checkoutForm.elements['shipping_email'].value = checkoutForm.elements['billing_email'].value;
		checkoutForm.elements['shipping_first_name'].value = checkoutForm.elements['billing_first_name'].value;
		checkoutForm.elements['shipping_last_name'].value = checkoutForm.elements['billing_last_name'].value;
		checkoutForm.elements['shipping_address1'].value = checkoutForm.elements['billing_address1'].value;
		checkoutForm.elements['shipping_address2'].value = checkoutForm.elements['billing_address2'].value;
		checkoutForm.elements['shipping_city'].value = checkoutForm.elements['billing_city'].value;
		checkoutForm.elements['shipping_state'].value = checkoutForm.elements['billing_state'].value;
		checkoutForm.elements['shipping_province'].value = checkoutForm.elements['billing_province'].value;
		checkoutForm.elements['shipping_postal_code'].value = checkoutForm.elements['billing_postal_code'].value;
		checkoutForm.elements['shipping_phone'].value = checkoutForm.elements['billing_phone'].value;
		checkoutForm.elements['shipping_country'].value = checkoutForm.elements['billing_country'].value;
	}
	else {
		checkoutForm.elements['shipping_email'].value = '';
		checkoutForm.elements['shipping_first_name'].value = '';
		checkoutForm.elements['shipping_last_name'].value = '';
		checkoutForm.elements['shipping_address1'].value = '';
		checkoutForm.elements['shipping_address2'].value = '';
		checkoutForm.elements['shipping_city'].value = '';
		checkoutForm.elements['shipping_state'].value = '';
		checkoutForm.elements['shipping_province'].value = '';
		checkoutForm.elements['shipping_postal_code'].value = '';
		checkoutForm.elements['shipping_phone'].value = '';
		checkoutForm.elements['shipping_country'].value = '';
	}
}
