var nIE4Win;    
var nCanPrint;
var printed;
var popupWin;

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.");          
        }
}

function bookmarkPage(url,title) {
	var txt = "Press Ctrl+D to bookmark this page: ";
	var ver = navigator.appName;
	var num = parseInt(navigator.appVersion);
	if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
		window.external.AddFavorite(url,title);
	}else{
		txt += url;
		alert(txt);
	}
}


function mailMe(sDom, sUser){
    return("mail"+"to:"+sUser+"@"+sDom.replace(/%23/g,"."));
}
