var CommentWindow;
function MM_displayStatusMsg(msgStr) { 
    status=msgStr;
    document.MM_returnValue = true;
}

function highlight(x){
    document.forms[x].elements[0].focus()
        document.forms[x].elements[0].select()
    }

function MM_jumpMenu(targ,selObj,restore){ 
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
}

var NS
//IE=document.all;
//NS=document.layers;

var cf = "c:\\drcontrol.ini";
var sn = "mdr";


hdrFontFamily="Tahoma";
//hdrFontSize="2";
hdrFontSize="3";
hdrFontColor="white";
// hdrBGColor="#008000";
//hdrBGColor="#ad8f33";
hdrBGColor="#335270";
linkFontFamily="Tahoma";
//linkFontSize="1";
linkFontSize="2";
linkBGColor="white";
linkOverBGColor="#CCCCCC";
linkTarget="_top";
YOffset=5;
staticYOffset=5;
menuBGColor="black";
menuIsStatic="yes";
menuHeader="USHIK"
menuWidth=150; // Must be a multiple of 5!
staticMode="advanced"
// barBGColor="#00ff00";
//barBGColor="#ffcc33";
barBGColor="#336797";
barFontFamily="Tahoma";
barFontSize="1";
//barFontColor="#008000";
barFontColor="#ffffff";
barText="menu";

function moveOut() {
    if (window.cancel) {
        cancel="";
    }
    
    if (window.moving2) {
        clearTimeout(moving2);
        moving2="";
    }
    if ((NS && document.ssm2.left<0)) {
        //  if (IE) {ssm2.style.pixelLeft += (15%menuWidth);}
        if (NS) {document.ssm2.left += (15%menuWidth);}    
        //   moving1 = setTimeout('moveOut()', 5);
        // }
        // else {
        //  clearTimeout(moving1);
        //}
    }
}
function moveBack() {
    cancel = moveBack1();
}
function moveBack1() {
    if (window.moving1) {
        clearTimeout(moving1);
    }
    
    if ((NS && document.ssm2.left>(-menuWidth))) {
        // if (IE) {ssm2.style.pixelLeft -= (15%menuWidth);}
        if (NS) {document.ssm2.left -= (15%menuWidth);}
        //  moving2 = setTimeout('moveBack1()', 5);
        //}
        //else {
        // clearTimeout(moving2);
        //}
    }
    
    lastY = 0;
}
function makeStatic(mode) {
    if (IE) {
        winY = document.body.scrollTop;
        //  var NM=ssm2.style;
    }
    if (NS) {
        winY = window.pageYOffset;
        // var NM=document.ssm2;
    }
    if (mode=="smooth") {
        if ((IE||NS) && winY!=lastY) {
            smooth = .2 * (winY - lastY);
            if(smooth > 0) smooth = Math.ceil(smooth);
            else smooth = Math.floor(smooth);
            //if (IE) NM.pixelTop+=smooth;
            if (NS) NM.top+=smooth;
            lastY = lastY+smooth;
        }
        setTimeout('makeStatic("smooth")', 1);
    }
    
    else if (mode=="advanced") {
        if ((IE||NS) && winY>YOffset-staticYOffset) {
            if (IE) {
                // NM.pixelTop=winY+staticYOffset;
            }
            if (NS) {
                // NM.top=winY+staticYOffset;
            }
        }
        else {
            if (IE) {
                //  NM.pixelTop=YOffset;
            }
            if (NS) {
                // NM.top=YOffset-7;
            }
        }
        setTimeout('makeStatic("advanced")', 1);
    }
}

function init() {
    
    if (IE) {
        //  ssm2.style.pixelLeft = -menuWidth;
        // ssm2.style.visibility = "visible";
    }
    else if (NS) {
        //document.ssm2.left = -menuWidth;
        //document.ssm2.visibility = "show";
    }
    else {
        //ssm2.style.pixelLeft = -menuWidth;
        //ssm2.style.visibility = "visible";
        
        //alert('This browser is not equipped to handle the JavaScripts on this site.');
    }
}


function MM_displayStatusMsg(msgStr) { 
    status=msgStr;
    document.MM_returnValue = true;
}



function ClearForm(formname) { document[formname].reset(); }

function SetAllFormCheckBoxesOn(formname,checkboxname)
{
    var checkboxes = 1;
    if(eval(document[formname][checkboxname].length)){
        checkboxes = document[formname][checkboxname].length;
    }
    if(checkboxes == 1){
        document.MakeMatrix.MatrixSelected.checked = true;
    }
    else {
        for (var i=0; i<checkboxes; i++)
        { 
            document[formname][checkboxname][i].checked=true; 
        }
    }
}

function SetAllFormCheckBoxesOff(formname,checkboxname)
{
    alert("formname = "+ formname);
    alert("checkboxname = " + checkboxname);
    alert("length = " + document[formname][checkboxname].length);
    for (var i=0; i<document[formname][checkboxname].length; i++)
    { 
        alert("i = "+ i);
        document[formname][checkboxname][i].checked=false; }
}
function logonModul(url,width,height) {
    if(width==0 && height==0) {
        window.open(
            url, 
            "subWindow", 
            "toolbar=yes," +
            "location=yes," +
            "directories=no," +
            "status=no," +
            "menubar=no," +
            "scrollbars=yes," +
            "resizable=yes");
    } else  {
        window.open(
            url, 
            "cWindow", 
            "toolbar=yes," +
            "location=yes," +
            "directories=no," +
            "status=no," +
            "menubar=no," +
            "scrollbars=yes," +
            "resizable=yes," +
            "width=" + width + "," +
            "height=" + height);
    }

}

function logonModulFB(url,width,height) {
    if(width==0 && height==0) {
        window.open(
            url, 
            "subWindow", 
            "toolbar=no," +
            "location=no," +
            "directories=no," +
            "status=no," +
            "menubar=no," +
            "scrollbars=no," +
            "resizable=no");
    } else  {
        window.open(
            url, 
            "cWindow", 
            "toolbar=no," +
            "location=no," +
            "directories=no," +
            "status=no," +
            "menubar=no," +
            "scrollbars=no," +
            "resizable=no," +
            "width=" + width + "," +
            "height=" + height);
    }

}

function popUp(URL) {
                day = new Date();
                //id = day.getTime();
                id="ushik"
                eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 320,top = 50');");
            }
function popUpDev(URL) {
                day = new Date();
                //id = day.getTime();
                id="feedback"
                eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=600,left = 320,top = 50');");
            }
function FeedbackPopup(URL) {
    day = new Date();
    //id = day.getTime();
    id="ushik_feedback"
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=500,left = 320,top = 50');");
            }