function SendToFriend() {
	var where = window.location.href;
	location.href = "index.php?where=" + escape(where) + "&send_to_friend=form";
}
function PrintablePage(page_id) {
	var page_location = "";
	if(window.location.search=="") {
		page_location = "index.php?page_id="+page_id+"&printable_version=true";
	} else {
		page_location = window.location.search+"&printable_version=true";
	}
	printable_version = window.open(page_location,'','')
	printable_version.focus();
}
function swap_style_over(my_item) {
	my_item.className = 'ruled' ;
}
function swap_style_out(my_item) {
	my_item.className = '' ;
}
startList = function() {
 if (document.all&&document.getElementById) {
  if(navRoot = document.getElementById("nav")) {
   for (i=0; i<navRoot.childNodes.length; i++) {
    node = navRoot.childNodes[i];
	  if (node.nodeName=="LI") {
	   node.onmouseover=function() {
	    this.className+=" over";
		 }
		 node.onmouseout=function() {
		  this.className=this.className.replace(" over", "");
		 }
	  }
   }
  }
 }
}
//window.onload=startList;

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != "function") {
 		window.onload = func;
	} else {
 		window.onload = function () {
			oldonload();
			func();
 		}
	}
}
addLoadEvent(function () {
  self.focus();
});
addLoadEvent(startList);

function showHideDiv(id) { 
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == 'none') {
			document.getElementById(id).style.display = 'block';
		} else {
			document.getElementById(id).style.display = 'none';
		}
	} else {
		if (document.layers) { // Netscape 4
			if (document.id.display == 'none') {
				document.id.display = 'block';
			} else {
				document.id.display = 'none';
			}
		} else { // IE 4
			if (document.all.id.style.display == 'none') {
				document.all.id.style.display = 'block';
			} else {
				document.all.id.style.display = 'none';
			}
		}
	}
} 

