function acSetShowHide(clicked, a, b, c, lnk, e, f, g) {
    if (document.getElementById(clicked).className == 'hide') {
        document.getElementById(clicked).className = 'show';
        document.getElementById(a).className = 'hide';
        document.getElementById(b).className = 'hide';
        document.getElementById(c).className = 'hide';
        //document.getElementById(d).className = 'hide';

        document.getElementById(lnk).innerHTML = 'Hide';
        document.getElementById(e).innerHTML = 'Change This';
        document.getElementById(f).innerHTML = 'Change This';
        document.getElementById(g).innerHTML = 'Change This';
    }
    else if (document.getElementById(clicked).className == 'show') {
        document.getElementById(clicked).className = 'hide';
        document.getElementById(a).className = 'hide';
        document.getElementById(b).className = 'hide';
        document.getElementById(c).className = 'hide';
        //document.getElementById(d).className = 'hide';

        document.getElementById(lnk).innerHTML = 'Change This';
        document.getElementById(e).innerHTML = 'Change This';
        document.getElementById(f).innerHTML = 'Change This';
        document.getElementById(g).innerHTML = 'Change This';
    }
}

function acSetClose(clicked, lnk) {
    if (document.getElementById(clicked).className == 'show') {
        document.getElementById(clicked).className = 'hide';
        document.getElementById(lnk).innerHTML = 'Change This';
    }
}

function chkRateTab(src) {
    if (src == 't1') {
        document.getElementById('ulRating').className = 'tab1_bg';
        document.getElementById('dvHighRate').className = 'show';
        document.getElementById('dvMostView').className = 'hide';
    }
    if (src == 't2') {
        document.getElementById('ulRating').className = 'tab2_bg';
        document.getElementById('dvHighRate').className = 'hide';
        document.getElementById('dvMostView').className = 'show';
    }
}

function viewallcomments() {
    if (document.getElementById('dvCommentsPosted').className == 'hide') {
        document.getElementById('dvCommentsPosted').className = 'show';
        document.getElementById('aViewAll').innerText = 'Hide All';
    }
    else {
        document.getElementById('dvCommentsPosted').className = 'hide';
        document.getElementById('aViewAll').innerText = 'View All';
    }
}

var win = null;
function popupwin(mypage, myname, w, h) {
    LeftPosition = (screen.width) ? (screen.width - w) / 2 : 0;
    TopPosition = (screen.height) ? (screen.height - h) / 2 : 0;
    settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,resizable=no';
    win = window.open(mypage, myname, settings)
}


function Check_Digit(e) {
    var key;
    if (navigator.appName == 'Microsoft Internet Explorer')
        key = event.keyCode;
    else
        key = event.which
    if (!(key >= 48 && key <= 57)) {
        event.returnValue = false;
    }
}

//read the content and rewrite to new page
function CreateNewPopup(printDiv) {
    var printContent = document.getElementById(printDiv);
    var printWindow = window.open("", "PrintWindow", "width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes");
    printWindow.document.writeln(printContent.innerHTML);
    printWindow.document.close();
    printWindow.focus();
    printWindow.print();
}


