function launchReportPalette(theURL,winName,popW,popH) 
{
    if( theURL.charAt(theURL.length-1)=="=" )
    {
        return;
    }

    if(!popW) popW=720;
    if(!popH) popH=540;
    if (document.all) {
       w = document.body.clientWidth;
       h = document.body.clientHeight;
    }
    else if (document.layers) {
       w = window.innerWidth;
       h = window.innerHeight;
    }
    
    var leftPos = (w-popW)/2, topPos = (h-popH)/2;
    
    //msgWindow = window.open('', winName, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top='+topPos+',left='+leftPos+',width='+popW+',height='+popH+'\'');
    msgWindow = window.open('', winName, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=0,left=0,width=800,height=600\'');

    //msgWindow=open('',winName,features);
    msgWindow.location.href =theURL;
    if (msgWindow.opener == null) msgWindow.opener = self;

    msgWindow.focus();
}

function numbersonly(myfield, e, dec)
    {
    var key;
    var keychar;

    if (window.event)
       key = window.event.keyCode;
    else if (e)
       key = e.which;
    else
       return true;
    keychar = String.fromCharCode(key);

    // control keys
    if ((key==null) || (key==0) || (key==8) || 
        (key==9) || (key==13) || (key==27) )
       return true;

    // numbers
    else if ((("0123456789").indexOf(keychar) > -1))
       return true;

    // decimal point jump
    else if (dec && (keychar == "."))
       {
       myfield.form.elements[dec].focus();
       return false;
       }
    else
       return false;
    }

