
var mailWin = '';
function mailWindow(myPage) {
	var myWidth = 430;
	var myHeight = 300;	
	var myLeft = (screen.width - myWidth) / 2;
	var myTop = (screen.height - myHeight) / 2;
	winprops = 'height='+myHeight+',width='+myWidth+',top='+myTop+',left='+myLeft+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
	mailWin = window.open('/script/mailme.php?site='+myPage, 'Mail', winprops);
	if (parseInt(navigator.appVersion) >= 4) { mailWin.window.focus(); }
}

var printWin = '';
function printWindow(myPage) {
	var myWidth = 600;
	var myHeight = 600;	
	var myLeft = (screen.width - myWidth) / 2;
	var myTop = (screen.height - myHeight) / 2;
	winprops = 'height='+myHeight+',width='+myWidth+',top='+myTop+',left='+myLeft+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
	printWin = window.open('../script/printme.php?site='+myPage, 'Print', winprops);
	if (parseInt(navigator.appVersion) >= 4) { printWin.window.focus(); }
}


window.onload = function () { 
	var tree = document.getElementById("tree"); 
	if (tree) {
		var lists = [ tree ]; 
		for (var i = 0; i < tree.getElementsByTagName("ul").length; i++) 
			lists[lists.length] = tree.getElementsByTagName("ul")[i]; 

		for (var i = 0; i < lists.length; i++) { 
			var item = lists[i].lastChild; 
			while (!item.tagName || item.tagName.toLowerCase() != "li") 
				item = item.previousSibling; 
			item.className += " last"; 
		} 
	}
}
