﻿
/*-------- MODAL --------*/

function OpenModal() {
    var modal = document.getElementById('Modal');
    modal.style.display = 'block';
    modal.style.height = document.documentElement.scrollHeight;

    window.scrollTo(0, 0);
    //addEvent(window, 'scroll', ScrollYapma);
}

function CloseModal() {
    var modal = document.getElementById('Modal');
    modal.style.display = 'none';
    //removeEvent('scroll', ScrollYapma);
}

/*-------- MODAL --------*/

          

function den(id) {
    if (document.getElementById(id).value.length == 0) {
        document.getElementById(id).value = document.getElementById(id).defaultValue;
    }
}


function ArkadasinaOner() {
    var divArkadasinaOner = document.getElementById("ArkadasinaOner");
    var divUyeGiris = document.getElementById("UyeGiris");

    if (IsLogin()) {
        __doPostBack('ctl00$LinkButtonArkadasineTavsiyeEtYeni0', '');
    }
    else {
        alert("Üyelik işlemini gerçekleştirerek puan kazanabilirsiniz.");
        location = "/Uye/UyeGiris/UyeGiris.aspx";
    }
}

/*------- Verisign popup WINDOW --------*/
function VeriOpen() {

    window.open("https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=WWW.KOZMETIKSITE.COM&lang=en", "Popup", "location=0, toolbar=0, status=0, resizable=0, menubar=0, width=520, height=500", false);
}
/*------- Verisign popup WINDOW --------*/



/*------- POPUP WINDOW --------*/

function OpenPopupWindow(url, width, height, scrollbars) {
    window.open(url, "Popup", "location=0, toolbar=0, status=0, scrollbars=" + scrollbars + ", resizable=0, menubar=0, width=" + width + ", height=" + height, true);
}

/*------- POPUP WINDOW --------*/

 

/*****************************************/
//function loadModal() {
//    $(function () {

//        $("#dialog-form").dialog({
//            autoOpen: false,
//            height: 200,
//            width: 600,
//            modal: true,
//            buttons: {
//                "CCCC": function () {
//                },
//                Cancel: function () {
//                    $(this).dialog("close");
//                }
//            },
//            close: function () {
//            }
//        });

//        $("#OpenModalButton")
//			.button()
//			.click(function () {
//			    $("#dialog-form").dialog("open");
//			});
//    });



//    $(function () {
//        // run the currently selected effect
//        function runEffect() {
//            // get effect type from 
//            var selectedEffect = "bounce";
//            // most effect types need no options passed by default
//            var options = {};
//            // some effects have required parameters
//            if (selectedEffect === "scale") {
//                options = { percent: 0 };
//            } else if (selectedEffect === "transfer") {
//                options = { to: "#OpenModalButton", className: "ui-effects-transfer" };
//            } else if (selectedEffect === "size") {
//                options = { to: { width: 200, height: 60} };
//            }
//            // run the effect
//            $("#dialog-form").effect(selectedEffect, options, 500, callback);
//        };
//        // callback function to bring a hidden box back
//        function callback() {
//            setTimeout(function () {
//                $("#dialog-form").removeAttr("style").hide().fadeIn();
//            }, 1000);
//        };
//        // set effect from select menu value
//        $("#OpenModalButton").click(function () {
//            runEffect();
//            return false;
//        });
//    });
//}
/*********************************************/
