﻿function ValidateBox(source, args) {
    //args.IsValid = document.getElementById('<%= chkTandCs.ClientID %><%= chkTandCs.ClientID %>').checked;
    alert(source);
}
function ConfermaElimina() {
    if (confirm("Eliminare il record?"))
        return true;
    else
        return false;
}
function GoUrl(message, url) {
    if (message != "")
        alert(message);
    if (url != "")
        location.href = url;
}
function clearMarkers() {
    subgurim_gMap.clearOverlays();
 }
function removeText(ID) {
    var Control = document.getElementById(ID);
    if (Control != null)
        Control.value = '';
}
function doPostBackAsync(eventName, eventArgs) {
    var prm = Sys.WebForms.PageRequestManager.getInstance();

    if (!Array.contains(prm._asyncPostBackControlIDs, eventName)) {
        prm._asyncPostBackControlIDs.push(eventName);
    }

    if (!Array.contains(prm._asyncPostBackControlClientIDs, eventName)) {
        prm._asyncPostBackControlClientIDs.push(eventName);
    }

    __doPostBack(eventName, eventArgs);
}
function mapChange(value) {
    doPostBackAsync('mapChange', value);
    theForm.__EVENTARGUMENT.value = "";
    theForm.__EVENTTARGET.value = "";
}
var divRicercaClassName = "noDisplay";
function btnRicerca(Control) {
   
    var divRicerca = document.getElementById('btnRicerca');
    if (divRicerca.className == "noDisplay") {
        divRicerca.className = "displayYes";
        divRicercaClassName = "displayYes";
        if (Control != null)
            Control.innerText = "Ricerca base";
    } else {
        divRicerca.className = "noDisplay";
        divRicercaClassName = "noDisplay";
        if (Control != null)
            Control.innerText = "Ricerca avanzata";
    }
}
function sendText(value) {
    if (value != null) {
        var Flash = document.getElementById('flash');
        Flash.sendTextFromHtml(value);
    }
    returnDivRicerca();
}
function returnDivRicerca() {
    var divRicerca = document.getElementById('btnRicerca');
    divRicerca.className = divRicercaClassName;
}
function formatFloat(Value) {
    return Value.toString().replace(".", ",");
}
function getMarker(Value) {

}
function fbs_click() { u = location.href; t = document.title; window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436'); return false; }

function openWindow(link) {

    var minipop = window.open(link, 'minipop', 'toolbar=no,location=no, status=no,menubar=no,scrollbars=yes,resizable=yes,width=380, height=430,top=0,left=0'); 
    minipop.focus();

}
