
function confirmAndGo (confirmText, targetUrl) {
			var question = confirm(confirmText);
			if (question != "0"){
				top.location = targetUrl
			}
}

function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}



function estimate() {  
	popupWin = window.open('estimate_shipping_costs.asp', '', 'scrollbars,resizable=no,width=600,height=400')
}

	function popMod(type)
	{
		switch (type)
		{
			case "billto":
				window.open("/account/account_maintenance_popup.asp", "_mod", "toolbar=0, menubar=0, resizable=0, scrollbars=1, width=600, height=600"); 
			break;
			case "shipto":
				window.open("/checkout/checkout_shipping_address_popup.asp", "_mod", "toolbar=0, menubar=0, resizable=0, scrollbars=1, width=600, height=600");
			break;
			case "shipvia":
				window.open("/checkout/checkout_shipping_method_popup.asp", "_mod", "toolbar=0, menubar=0, resizable=0, scrollbars=1, width=600, height=600");
			break;
			case "newacct":
				window.open("/account/new_account_popup.asp", "_mod", "toolbar=0, menubar=0, resizable=0, scrollbars=1, width=600, height=600");
				break;
			case "forgot":
				window.open("/account/login_forgot_password_popup.asp", "_mod", "toolbar=0, menubar=0, resizable=0, scrollbars=1, width=600, height=600");
			default:
				window.open("/shop/product_popup.asp?number=" + type , "_mod", "toolbar=0, menubar=0, resizable=0, scrollbars=1, width=500, height=500");
				break;
		}
	}
	
	function popUpgrade(href)
	{
		window.open(href, "_new", "toolbar=0, menubar=0, resizable=0, scrollbars=1, width=700, height=500"); 		
	}

	function show(elName)
	{
		document.getElementById(elName).style.display = "block";
	}
	
	function hide(elName)
	{
		document.getElementById(elName).style.display = "none";
	}
	
	function openWindowNO_CALC() {
		popupWin = window.open('checkout_ship_error_popup.asp', '', 'scrollbars,resizable=no,width=400,height=400')
	}

	function checkIt(s)	{
	
		var chk = document.all(s);
				
		if (chk) {
			chk.checked = true;
		}
		return;
				
	}

	function openWindow0ref(item) {
		popupWin = window.open('recommend.asp?item_url=http://www.paintball-online.com/paintball/product_information.asp?number=' + item, '', 'scrollbars,resizable,width=700,height=350')
	}

	function openWindowPM(item, title, st, price) {
		popupWin = window.open('PriceMatch.asp?item=' + item + '&title=' + title + '&st=' + st + '&prc=' + price, '', 'scrollbars,resizable,width=800,height=440')
	}

	function openWindowVP() {
		popupWin = window.open('package_descriptions.html', '', 'scrollbars,resizable,width=700,height=440')
	}

	function openWindowbig(item, variation, pic) {
	  popupWin = window.open('view_big.asp?number=' + item + '&variation=' + variation + '&picnum=' + pic, 'view_big', 'scrollbars,resizable=no,width=720,height=450');
	  popupWin.focus();
	}

	function openWarranty() {
		popupWin = window.open('warranty.html', '', 'scrollbars,resizable=no,width=610,height=450')
	}