﻿
var w = 480, h = 340;

if (document.all || document.layers) {
   w = screen.availWidth;
   h = screen.availHeight;
}
var win;
function openPopUp(theURL,winName) 
{
	var popW=500, popH=500;

	switch (winName)
	{
		case "bilgi" : 	popW = 550, popH = 500;	break;
		case "ekle" : 	popW = 380, popH = 180;	break;
		case "sil" : 	popW = 300, popH = 140;	break;
		case "tasi" : 	popW = 450, popH = 180;	break;
		case "cevap" : popW =750, popH = 520;	break;
		case "Cevap" : popW =750, popH = 520;	break;
		case "Cevapla" : popW =750, popH = 520;	break;
		case "uye" : 	popW = 300, popH = 260;	break;
		case "ilan" : 	popW = 750, popH = 680;	break;
		case "CevaplaAdmin" : 	popW = 750, popH = 610;	break;		
		case "kilitle" : popW = 300, popH = 150;	break;
		case "sifreGonder" : popW = 400;popH = 190;		break;
		case "yardım" : popW = 550, popH = 500;		break;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	
	if (winName == "yardım")
		win = window.open(theURL,'','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',status=0,resizable=0,scrollbars=yes');
	else
		win = window.open(theURL,'','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',status=0,resizable=0,scrollbars=yes');
}




<!-- modal dialog penceresi açma -->

/*oluşturulması gereken nesneler*/
/*  eğer listbox 'a değil de  input 'a değer döndürülecekse  
input type="hidden" id="hdnselectDlgValues" name="hdnselectDlgValues" runat="server"
 alanı forma eklenmeli*/

var inputBox,objType,onlyOneChecked;
function pencereAc(obj,hiddentextName,intType,blnonlyOneChecked,file,dialogLocation)                                             
{
	/***değişkenler***/
    /*----------------*/
    inputBox = eval(obj);   
    inputBox2 = eval(hiddentextName);
    fileName = file;
	objType = intType;//'lst';
    onlyOneChecked = blnonlyOneChecked;
  //  PanelText1 = PanelText;
    /*---------------*/


Width = 555;Height = 540;

switch (dialogLocation)
{
	case "dlgUyelik" : Width = 555;Height = 540;
		break;
	case "dlgEkle" : Width = 555;Height = 460;
		break;

}


    /**Pencere Açma**/
  // var sFeatures="dialogHeight: "+ Height + " px; dialogWidth: "+ Width +" px; center: Yes; scroll:no; status: no;";
   var sFeatures=" center: Yes; scroll:no; status: no" + ";dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;";
   //alert(sFeatures);
   window.showModalDialog(file, window,sFeatures);

}

<!-- modal dialog penceresi açma -->

