﻿
function userkont(gidis) {
    kuki = getCookie("tedavix");

    if (kuki != null && kuki != "") {

        document.location.href = gidis;
    }

    else {
        OpenWindow("~/../winGiris.aspx", "Üye Girişi");

    }
    return false;
}


function zapoto() {
    kuki = getCookie("tedavix");

    if (kuki != null && kuki != "") {

        return true;
    }
    else {
        var oWnd = $find('ctl00_mdlsfire');
        oWnd.show();
        oWnd.setSize(447, 426);
        oWnd.setUrl('winGiris.aspx');
        //document.getElementsByName("mdlsfire")[0].style.height = document.getElementById(eleman).clientHeight;
        document.getElementsByName("mdlsfire")[0].allowTransparency = "true";
        document.getElementsByName("mdlsfire")[0].style.height = "426px";
        //		var aa=GetRadWindow();
        //		alert(aa.document.getElementById("tap_login").clientWidth+":"+aa.document.getElementById("tap_login").clientHeight);

        return false;


    }

}

function OpenWindow(nesne, url, name) {
    var oWnd = $find(nesne);
    oWnd.show();
    oWnd.setSize(447, 426);
    oWnd.setUrl(url);
    //document.getElementsByName("mdlsfire")[0].style.height = document.getElementById(eleman).clientHeight;
    document.getElementsByName("mdlsfire")[0].allowTransparency = "true"; 
   document.getElementsByName("mdlsfire")[0].style.height = "426px";
    //		var aa=GetRadWindow();
    //		alert(aa.document.getElementById("tap_login").clientWidth+":"+aa.document.getElementById("tap_login").clientHeight);

    return false;


}
function OpenMsgWindow(nesne, url, name) {
    
    var oWnd = $find(nesne);
    oWnd.show();
    oWnd.setSize(447, 426);
    oWnd.setUrl(url);
    //document.getElementsByName("mdlsfire")[0].style.height = document.getElementById(eleman).clientHeight;
    document.getElementsByName("mdlmsg")[0].allowTransparency = "true";
    document.getElementsByName("mdlmsg")[0].style.height = "426px";
    //		var aa=GetRadWindow();
    //		alert(aa.document.getElementById("tap_login").clientWidth+":"+aa.document.getElementById("tap_login").clientHeight);

    return false;


}

function OpenArkadasWindow(nesne, url, name) {
  
    var oWnd = $find(nesne);
    oWnd.show();
   
    oWnd.setSize(447, 426);
    oWnd.setUrl(url);
    //document.getElementsByName("mdlsfire")[0].style.height = document.getElementById(eleman).clientHeight;
    document.getElementsByName("mdlArkadas")[0].allowTransparency = "true";
    document.getElementsByName("mdlArkadas")[0].style.height = "426px";
    //		var aa=GetRadWindow();
    //		alert(aa.document.getElementById("tap_login").clientWidth+":"+aa.document.getElementById("tap_login").clientHeight);

    return false;


}

function OpenArkadasIletWindow(nesne, url, name) {

    var oWnd = $find(nesne);
    oWnd.show();
    oWnd.setSize(447, 626);
    oWnd.setUrl(url);
    //document.getElementsByName("mdlsfire")[0].style.height = document.getElementById(eleman).clientHeight;
    document.getElementsByName("mdlMsj")[0].allowTransparency = "true";
    document.getElementsByName("mdlMsj")[0].style.height = "426px";
    //		var aa=GetRadWindow();
    //		alert(aa.document.getElementById("tap_login").clientWidth+":"+aa.document.getElementById("tap_login").clientHeight);

    return false;


}




function cikisWindow(nesne, url, name) {
    var oWnd = $find(nesne);
    oWnd.show();
    oWnd.setSize(447, 426);
    oWnd.setUrl(url);
    //document.getElementsByName("mdlsfire")[0].style.height = document.getElementById(eleman).clientHeight;
    document.getElementsByName("mdlsfire")[0].allowTransparency = "true";
    document.getElementsByName("mdlsfire")[0].style.height = "426px";
    //		var aa=GetRadWindow();
    //		alert(aa.document.getElementById("tap_login").clientWidth+":"+aa.document.getElementById("tap_login").clientHeight);

    return false;


}

function getCookie(c_name) {
    if (document.cookie.length > 0) {
        c_start = document.cookie.indexOf(c_name + "=");
        if (c_start != -1) {
            c_start = c_start + c_name.length + 1;
            c_end = document.cookie.indexOf(";", c_start);
            if (c_end == -1) c_end = document.cookie.length;
            //alert(unescape(document.cookie.substring(c_start,c_end)));
            return unescape(document.cookie.substring(c_start, c_end));
        }
    }
    return "";
}


function confirmCallBackFn(arg) {
    //alert("Confirm returned the following result: " + arg);
    //document.cookie["Reyting.Org"]
    if (arg == true) {
        createCookie('tedavix.com', '', -1);
        top.document.location.href = top.document.location.href;
    }
}
function createCookie(name, value, days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        var expires = "; expires=" + date.toGMTString();
    }
    else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}
//function baglantiEkle(requestId, link,nesne) {

//    if (link.toString().length > 7 && link.toString() != "") {
//       
//        OpenMsgWindow(nesne, 'winBaglantiEkle.aspx?grup=' + requestId + "&link=" + link, 'Bağlantı Ekle');
//    }
//}

function showComplimentsPopup(nesne, recipientId, recipientNick, complimentsToShow, complimentsToSelectDefault, assocObjId, assocRefType) {
    /*
    assocRefType
    0 - Soru
    1 - Cevap
    7 - Sorulojist
    */
   // alert("serdar");
    var oWnd = $find(nesne);
    oWnd.show();
    oWnd.setSize(447, 426);
    var url = "winKomplimanGonder.aspx?recipientId=" + recipientId + "&recipientNick=" + recipientNick + "&complimentsToShow=" + complimentsToShow + "&complimentsToSelectDefault=" + complimentsToSelectDefault + "&assocObjId=" + assocObjId + "&assocRefType=" + assocRefType;
    oWnd.setUrl(url);
    //document.getElementsByName("mdlsfire")[0].style.height = document.getElementById(eleman).clientHeight;
    document.getElementsByName("mdlArkadas")[0].allowTransparency = "true";
    document.getElementsByName("mdlArkadas")[0].style.height = "426px";
    //		var aa=GetRadWindow();
    //		alert(aa.document.getElementById("tap_login").clientWidth+":"+aa.document.getElementById("tap_login").clientHeight);

    return false;
}