function checkShippingPopup() 
{
	if(document.cookie != "") {
		allCookies = document.cookie.split("; ");
		
		for(i=0; i<allCookies.length; i++) {
			if(allCookies[i].split("=")[0] == "popup2") {
				return;
			}
		}
	}
	
	openPopup('shipping_popup.html',300,300,0,0,0);
	return;
} 

/* Open a window with the following arguments: url, width, height, scrollbars, x-coords, y-coords
function openPopup(url,w,h,s,x,y) {
	newWindow = window.open(url,'window','width=' + w + ',height=' + h + ',scrollbars=' + s + ',screenx=' + x + ',screeny=' + y + ',left=' + x + ',top=' + y + ',toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0');
	self.name = "mainWindow";
}

/* Contains an additional argument for resizing */
function openPopup(url,w,h,s,x,y,r) {
	newWindow = window.open(url,'window','width=' + w + ',height=' + h + ',scrollbars=' + s + ',screenx=' + x + ',screeny=' + y + ',left=' + x + ',top=' + y + ',resizable=' + r + ',toolbar=0,location=0,directories=0,status=0,menubar=0');
	self.name = "mainWindow";
}

/* closes the current window */
function closeWindow() {

  if (window.name != "") 
     window.name = "";

  window.close();
}

