﻿function CloseWindow() {
    var win = window.open('', '_parent', '');
    win.close();

}
function OpenPage(url) {
    window.open(url, '', 'width=750,height=635,top=0,left=0, toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=yes,resizable=no');
}

function OpenPageResizable(url) {
    window.open(url, '', 'width=750,height=635,top=0,left=0, toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=yes,resizable=yes');
}

function VisibleImage(obj) {
    var Rept1 = 'ctl00_ContentPlaceHolder1_ucCase_uceCaseChallenge_rptOption_';
    var Rept2 = '_imgOption';
    var tblOption = document.getElementById('tblOption');
    for (i = 1; i <= tblOption.rows.length; i++) {
        if (i <= 9) {
            var CtrlName = Rept1 + 'ctl0' + i + Rept2;
            document.getElementById(CtrlName).style.display = 'inline';
        }
        else {
            var CtrlName = Rept1 + 'ctl' + i + Rept2;
            document.getElementById(CtrlName).style.display = 'inline';
        }
    }
}

function printTable(obj) {
    var printContent = document.getElementById(obj);
    var windowUrl = 'about:blank';
    var num;
    var uniqueName = new Date();
    var windowName = 'Print' + uniqueName.getTime(); var printWindow = window.open(num, windowName, 'left=50000,top=50000,width=0,height=0');
    printWindow.document.write(printContent.innerHTML);
    printWindow.document.close();
    printWindow.focus();
    printWindow.print();
    printWindow.close();
}

function MM_showHideLayers() { //v9.0
    var i, p, v, obj, args = MM_showHideLayers.arguments;
    for (i = 0; i < (args.length - 2); i += 3)
        with (document) if (getElementById && ((obj = getElementById(args[i])) != null)) {
        v = args[i + 2];
        if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; }
        obj.visibility = v;
    }
}

function Show_ClinicalPearl_Popup(varDisplay) {
    var obj = document.getElementById('ctl00_ContentPlaceHolder1_ucCase_uceCaseChallenge_clinicalpearl');
    obj.style.display = varDisplay;
}

function Hidden_Control(objControl) {
    var obj = document.getElementById(objControl);
    obj.style.visibility = 'hidden';
    return false;
}


function CallButtonClickInsert(_arg) {
    UseCallbackButtonClick(_arg, '');
}

function GetButtonClickResult(arg, context) {
}


function SetScrollPosition(_objControl,_objPosition) {
    document.getElementById(_objControl).scrollTop = _objPosition;
}

function CallURLTrackingInsert(_arg) {
    UseCallbackURLTracking(_arg, '');
}

function GetURLTrackingResult(arg, context) {
}

function OpenPageNormal(url) {
    window.open(url,'');
}