/* Web Design and Programming by Cube Connection Ltd, Copyright 2006 - www.CubeConnection.co.uk */
function ShowEmail(username, hostname, friendlyname, displaystyle) {
	var linktext;
	if (friendlyname == "") {
		if (displaystyle == "") {
			linktext = username + "@" + hostname;
			document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + ">" + linktext + "</a>");
		}
		else {
			linktext = username + "@" + hostname;
			document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + " class='" + displaystyle + "'>" + linktext + "</a>");
		}
	}
	else {
		if (displaystyle == "") {
			linktext = username + "@" + hostname;
			document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + ">" + friendlyname + "</a>");
		}
		else {
			linktext = username + "@" + hostname;
			document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + " class='" + displaystyle + "'>" + friendlyname + "</a>");
		}
	}
	return true;
}

function SetupHS() {
	hs.Expander.prototype.printHtml = function () {
		var pw = window.open("about:blank", "_new");
		pw.document.open();
		pw.document.write(this.getHtmlPrintPage());
		pw.document.close();
		return false;
	};
	hs.Expander.prototype.getHtmlPrintPage = function() {
    // We break the closing script tag in half to prevent
    // the HTML parser from seeing it as a part of
    // the *main* page.
    var body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body') || this.innerContent;

    return "<html>\n" +
        "<head>\n" +
        "<title>Temporary Printing Window</title>\n" +
        "<link rel='stylesheet' type='text/css' href='/includes/site_screen.css' media='screen, tv' />\n" +
        "<link rel='stylesheet' type='text/css' href='/includes/site_print.css' media='print' />\n" +
        "<script>\n" +"function step1() {\n" +
        "  setTimeout('step2()', 10);\n" +
        "}\n" +
        "function step2() {\n" +
        "  window.print();\n" +
        "  window.close();\n" +
        "}\n" +
        "</scr" + "ipt>\n" +
        "</head>\n" +
        "<body style='background:#fff;' onLoad='step1()'>\n" +
        body.innerHTML +
        "</body>\n" +
        "</html>\n";
	};
}
