﻿

function ajax(urlpage, load, loadinganimation) {
    showHide(loadinganimation, "show");

    $.ajax({

        type: "get",
        url: urlpage,
        data: "input=null",
        success: function (msg) {
            $("#" + load).html(msg);
            showHide(loadinganimation, "close");
        }
    });
}


function showHide(loadinganimation, state) {

    if (state == "show") {

        //document.getElementById("div_Label").style.visibility = "visible";
        document.getElementById(loadinganimation).style.display = "block";



    }
    else {
        //document.getElementById("div_Label").style.visibility = "hidden";
        document.getElementById(loadinganimation).style.display = "none";



    }

}

function adddaydate(days) {
    var myDate = new Date();
    myDate.setDate(myDate.getDate() + days);
    return myDate;
}


function fb_recomended(url) {
    _url = url.toString();
    return "<iframe width='116' height='22' style='border:0px; background-color:transparent' src='http://www.facebook.com/plugins/like.php?href=" + _url + "&send=false&locale=tr_TR&layout=button_count&width=78&show_faces=false&action=recommend&colorscheme=light&font&height=90'></iframe>";
}
