﻿function OpenForm(formOpen, myProp) {
    var Left;
    var Top;
    var Width = 680;
    var Height = 400;
    var Properties;
    if (myProp != '')
        Properties = myProp;
    Left = (screen.width / 2) - (Width / 2);
    Top = (screen.height / 2) - (Height / 2) - 50;
    Properties = "height=" + Height + ",width=" + Width + ",left=" + Left + ",top=" + Top + ",status=no,toolbar=no,menubar=no,location=no,titlebar=no,resizable=no,scrollbars=yes";

    window.open(formOpen, "", Properties);
}
function OcultaDIV(idDiv) {
    var vDiv = document.getElementById(idDiv);
    vDiv.style.display = "none";
}
function MM_openBrWindow(theURL, winName, features) {
    window.open(theURL, winName, features);
}
function PageToDown(IdObj) {
    window.scroll(0, document.getElementById(IdObj).clientHeight);
}
function PageToUp(IdObj) {
    window.scroll(document.getElementById(IdObj).clientHeight, 0);
}

function setHeight(divH, DivnH) {
    if (DivnH == "sidebar1")
        vDivH = document.getElementById(divH).offsetHeight + 120;
    else if (DivnH == "sidebar2")
        vDivH = document.getElementById(divH).offsetHeight + 45;
    else
        vDivH = document.getElementById(divH).offsetHeight;
    vDivnH = document.getElementById(DivnH);
    vDivnH.setAttribute('style', 'height:' + vDivH + 'px;');
}

function WriteDiv(vDivName, vText) {
    document.getElementById(vDivName).innerHTML = vText;
}

function MM_preloadImages() {
    var d = document;
    if (d.images) {
        if (!d.MM_p) d.MM_p = new Array();
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
        for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; }
    }
}