﻿function showsdescr(divId) {

    if (document.getElementById('div' + divId).style.display == 'none') {
        document.getElementById('div' + divId).style.display = 'block';
    }
    else if (document.getElementById('div' + divId).style.display == 'block') {
        document.getElementById('div' + divId).style.display = 'none';
    }
}

function getfilename() {
    var pathname = location.pathname;
    var filename =
pathname.substr(pathname.lastIndexOf("\\") + 1, pathname.length);
    return (filename);
}

function callPage(oList, param) {
    var sValue = getfilename() + '?' + param + '=' + oList.options[oList.selectedIndex].value;
    window.location.href = sValue;
}

function callshowPage(oList) {
    var sValue = "/show/?eventid=" + oList.options[oList.selectedIndex].value;
    window.location.href = sValue;
}

function calldetails(venid) {
    var modal = $find('ModalPopupExtender1');
    modal.show();
    ret = venues.details(venid, OnComplete, OnTimeOut, OnError);
    return (true);
}

function showmodal(modalid) {
    var modal = $find(modalid);
    modal.show();
    return (true);
}
function hidemodal(modalid) {
    var modal = $find(modalid);
    modal.hide();
}


function popUp(URL)
{ window.open(URL); }

function getparam(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS);
    var results = regex.exec(window.location.href);
    if (results == null)
        return "";
    else
        return results[1];
}