var popupWin;

function popup(url,w,h,target,windowOptions) {
	if ((!target)||(target=="")) target="_blank";
	if ((!windowOptions)||(windowOptions==""))  windowOptions= 'scrollbars,titlebar,resizable';
	popupWin = window.open(url,target,'width='+w+',height='+h+','+windowOptions);
	setTimeout("popupWin.focus();",250);
}


var nIE4Win;    
var nCanPrint;
var printed;

function printme() {
        printed = "no";
        if (window.print) {
                nCanPrint = "yes";
        } else {
                nCanPrint = "no";
        }

    var agt=navigator.userAgent.toLowerCase()

    nVersion = parseInt(navigator.appVersion);
    nIE  = (agt.indexOf("msie") != -1);
    nWin   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
        nMac = (agt.indexOf("mac") != -1);
        nIE4Win  = (nIE && (nVersion == 4) && nWin);
        doPrint();
}

function doPrint() {
        if (nCanPrint == "yes") {
                printed="yes";
                window.print();

        } else if (nIE4Win) {
                printed="yes";
                IEPrint();
        }
        else
        {
        alert("To print this page, click your browser's Print button or select File - Print from your browser menu.");          
        }
}