function openCenteredWindow(url, name, width, height, features) {
  if(screen.width){
	  var winl = (screen.width-width)/2;
	  var wint = (screen.height-height)/2;
  } else {
		winl = 0;
		wint =0;
  }
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + height + ',';
  settings += 'width=' + width + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(url, name, settings);
  win.window.focus();
}

function openPasswordPopup() {
	openCenteredWindow('forgot_password', 'password_popup', '400', '160', 'scrollbars=no');
}

function openOEMPopup() {
        openCenteredWindow('what_is_oem', 'oem_popup', '400', '160', 'scrollbars=no');
}

function openOrderPopup() {
	openCenteredWindow('popupOrder.html', 'order_popup', '662', '450', 'scrollbars=no');
}

function openProductClaimPopup() {
	openCenteredWindow('popupProductClaim.html', 'product_claim_popup', '400', '200', 'scrollbars=no');
}

function openShippingPopup() {
	openCenteredWindow('popupShipping.html', 'shipping_popup', '500', '350', 'scrollbars=no');
}

function openAdditionalShippingPopup() {
	openCenteredWindow('popupAdditionalShipping.html', 'additional_shipping_popup', '400', '350', 'scrollbars=no');
}

function openPaymentPopup() {
	openCenteredWindow('popupPayment.html', 'payment_popup', '500', '350', 'scrollbars=no');
}

function openAdditionalPaymentPopup() {
	openCenteredWindow('popupAdditionalPayment.html', 'additional_payment_popup', '400', '350', 'scrollbars=no');
}

function openNewsPopup() {
	openCenteredWindow('popupNews.html', 'news_popup', '400', '350', 'scrollbars=no');
}

function openOpinionsPopup() {
	openCenteredWindow('popupOpinions.html', 'opinions_popup', '440', '330', 'scrollbars=no');
}


