﻿// ortalanmış pencere açımı
var w = 800, h = 600;

if (document.all || document.layers) {
   w = screen.availWidth;
   h = screen.availHeight;
}

function openPopup(theURL,winName,popupLocation) { //v2.0

Width = 400;Height = 400;

switch (popupLocation)
{
    case "popup_taksit": Width = 600;Height = 500;break;
    case "popup_favori": Width = 460;Height = 330;break;
    case "popup_fiyat": Width = 460;Height = 330;break;
    case "popup_oner": Width = 460;Height = 330;break;
    case "popup_stokHaberci": Width = 450;Height = 330;break;
    case "popup_yorum": Width = 550;Height = 330;break;
    case "popup_satissozlesmesi": Width = 770;Height = 500;break;
    case "kargo_pencere": Width = 760;Height = 500;break;
    case "popup_security": Width = 800;Height = 590;break;
    case "popup_ipucu": Width = 800;Height = 600;break;     
    case "popup_yorumOku": Width = 800;Height = 600;break;
    case "popup_yorumEkle": Width = 550;Height = 300;break;
}


var popW = Width, popH = Height;

var leftPos = (w-popW)/2, topPos = (h-popH)/2;
if (popH > 500)
	topPos =0;
	
	 winName1 = window.open(theURL,winName,'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',status=0,resizable=1,scrollbars=yes');
	 winName1.focus()
	 //var sFeatures=" center: Yes; scroll:no; status: no" + ";dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;";
	 //window.showModalDialog(theURL, window,sFeatures);
}

//ortalanmış pencere açımı
