﻿window.name = "smartwater";

function Popup(url, width, height) {
    window.open('/pages/popups/' + url + '', 'popup',
            'left=5,top=5,width=' + width + ',height=' + height + ',toolbar=0,scrollbars=1,resizable=1, status=0');

}

function ShowHide(id, sender) {
    var el = document.getElementById(id);
    if (el.style.display == 'block') {
        el.style.display = 'none';
    }
    else {
        el.style.display = 'block';
    }
}

function ShowHideMenu(MenuDiv, ParentDiv) {
    var menu = document.getElementById(MenuDiv);
    var parent = document.getElementById(ParentDiv);
    if (menu.style.display == 'block') {
        menu.style.display = 'none';
        //img.src = img.src.replace("down", "right");
        parent.className = "subNavLinkBox clearfix";
    }
    else {
        menu.style.display = 'block';
        //img.src = img.src.replace("right", "down");
        parent.className = "subNavBox clearfix";
    }
}

function Confirm(msg) {

    var conf = confirm(msg);
    if (conf) { return true; } else { return false; }

}
