function savePC() { sPC(document.getElementById('pc')) }
function savePC2() { sPC(document.getElementById('pc2')) }
function sPC(e) {
	// save the postcode as a permanent cookie and reload page
	px = e.options[e.selectedIndex].value;
	if(px.length>0) {
		// store cookie
		setCookie('cartPC', px, 365);
		//reload page
		location.reload(true)
	}
}

function popp(e) {
	myReference = getRefToDiv(e);
	if( !myReference ) {
		//window.alert('Nothing works in this browser');
		return; //don't go any further
	}

	cBody = getCartBodyPos()

	var noPx = document.childNodes ? 'px' : 0;

	if( myReference.style ) {
		//DOM & proprietary DOM
		myReference.style.visibility = 'visible';
		myReference.style.left = cBody[0] + noPx;
		myReference.style.top = cBody[1] + noPx;
		myReference.style.height = getElementsByClassName('cartBody')[0].offsetHeight + 2 + noPx;
	} else {
		//layers syntax
		myReference.visibility = 'show';
		myReference.left = ( parseInt(myReference.left) + 100 ) + noPx;
	}
}

function unpopp(e) {
	myReference = getRefToDiv(e);
	if( !myReference ) {
		//window.alert('Nothing works in this browser');
		return; //don't go any further
	}

	if( myReference.style ) {
		//DOM & proprietary DOM
		myReference.style.visibility = 'hidden';
	} else {
		//layers syntax
		myReference.visibility = 'hide';
	}
}

function getCartBodyPos() {
	if(getElementsByClassName('cartBody')) {
		return findPos(getElementsByClassName('cartBody')[0])
	}
}