﻿function PopupFix() {
var o_f = null;
    if (typeof (YeniPencere) == 'function') {
        o_f = window.YeniPencere;
    }
    else {
       /* window.YeniPencere = o_f = function (mypage, myname, w, h, scroll) {
            var i = mypage.indexOf('?');
            if (i > -1)
                mypage = mypage.substr(i + 1, mypage.length - i);
            mypage = './popup.aspx?' + mypage;
            var winl = (screen.width - w) / 2;
            var wint = (screen.height - h) / 2;
            var winprops = 'height=' + h + ',width=' + w + ',top=' + wint + ',left=' + winl + ',scrollbars=' + scroll + ',resizable';
            var win = window.open(mypage, myname, winprops);
            if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
        };*/
    }
    window.YeniPencere = function (mypage, myname, w, h, scroll) {
        if (mypage.indexOf("-") > -1) {
            var myregexp = /-(\d+)\//im;
            var match = myregexp.exec(mypage);
            if (match != null) {
                result = match[0];
                if (result != '')
                    result = result.substring(1, result.length - 1);
            } else {
                result = "";
            }
            mypage = 'about:blank';
            if (result != '') {
                mypage = '../../Genel/Popup.aspx?A=' + result;
            }
            var winl = (screen.width - w) / 2;
            var wint = (screen.height - h) / 2;
            var winprops = 'height=' + h + ',width=' + w + ',top=' + wint + ',left=' + winl + ',scrollbars=' + scroll + ',resizable';
            var win = window.open(mypage, myname, winprops);
            if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
        }
    }
}

window.setTimeout('PopupFix();', 900);
