/// <reference name="MicrosoftAjax.js"/>
if (typeof (Sys) != 'undefined') {
    function FixYeniPencere() {
        window.YeniPencere = window.yenipencere = function YeniPencere(mypage, myname, w, h, scroll) {
            try {
                var myregexp = /(\d+)[\-]([\-]{0,1}\d*)/;
                var list = myregexp.exec(mypage);
                if (list != null && list.length == 3) {
                    mypage = '../diger/popup.aspx?A=' + list[2] + '&D=' + list[1];
                    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(); }

                }
            } catch (e) {
                window.loaction.href = mypage;
            }
        }
    }
    Sys.Application.add_load(function () {
        window.setTimeout('FixYeniPencere();', 222);
    });
}
