//-------------------------------------   Javascript file   --------------------------------------------------
// function to open a new window with a certain specified appearance
function newWindow(address)
{
        var features = "width=475,height=400,location=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,left=0,top=0";

        window.open(address,'',features);
        document.body.style.cursor="default";
}

// function to open a new window with a certain specified appearance
function newWindowEncode(address)
{
        var features = "width=800,height=600,location=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,left=0,top=0";

        window.open(encodeURI(address),'',features);
        document.body.style.cursor="default";
}

// function for About Box
function AboutBox() {
        var features = "dialogWidth:396px;dialogTop:147px;dialogLeft:150px;edge:sunken;status:no;help:no;scroll:no;dialogHeight:385px";

        window.showModalDialog("/erm/AboutDialog.jsp",window,features);
}

// send and alert message
function showMessage(infomsg)
{
        alert(infomsg);
}

// function to close the current window
function closeWindow() {
        document.body.style.cursor="default";
        window.close();
}

// function to show hourglass
function reporturl(reporturl) {
        document.body.style.cursor="wait";
        location.href = reporturl;
}

// function to show hourglass
function reporturlEncode(reporturl) {
        document.body.style.cursor="wait";
        location.href = encodeURI(reporturl);
}

// function to popup seperate application to show report
function reportAppUrl(reportAppUrl) {
        location.href = reportAppUrl;
}

// function to popup seperate application to show report
function reportAppUrlEncode(reportAppUrl) {
        location.href = encodeURI(reportAppUrl);
}

// function to load help
function loadHelp() {
        var features = "dialogHeight:450px;dialogWidth:400px;dialogTop:0px;dialogLeft:0px;edge:sunken;status:no;help:no;scroll:yes;resizable:yes";

        window.showModalDialog('/erm/loadHelp.do',self,features);
}

