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;
} 

/* Opens 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";
}

/* Opens a window with the following arguments: url, width, height, scrollbars, x-coords, y-coords, resize */
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";
}

/*
 * Opens a window with the following arguments: url, window name, width, height, scrollbars, x-coords, y-coords 
 * This function should be used instead of openPopup if the window you are openning opens additional windows.
*/
function openWindow(url,name,w,h,s,x,y) {
	newWindow = window.open(url,name,'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";
}
