// this writes out bookmark links onto the page, if the browser supports them.
function pageTools() {
	// If the browser understands any of this
    if (window.external || window.sidebar || window.print) document.write('<ul id="pagetools">');
    // Print
    if (window.print) document.write('<li id="toolprint"><a href="#" onclick="window.print(); return false;">Print this page</a></li>' );
    // IE Bookmark - not activated at the moment
//    if (window.external && !window.sidebar)
    	//document.write('<li id="toolfav"><a href="#" onclick="window.external.AddFavorite(location.href, document.title);return false;">Bookmark this page</a></li>' );
    // Gekko bookmark
//    if (window.sidebar) document.write('<li id="toolfav"><a href="#" onclick="window.sidebar.addPanel(document.title, location.href, \'\');return false;">Bookmark this page</a></li>' );
    if (window.external || window.sidebar || window.print) document.write('</ul>');
}

function printTool() {
	if (window.print) document.write('<a href="#" onclick="window.print(); return false;" id="toolprint">Print this page</a>' );
}

// Your standard jump menu stuff
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// Just for showing the historical documents
function showHistory() {
	if (document.getElementById('history')) {
		document.getElementById('history').style.display = 'block';
	}
}

// This is used to post form variables to a popup
// Pop up script
function oWin(url,width,height,name) {
	if (typeof(name)=="undefined") name="w"+new Date().getTime();
	if ((typeof(window["win_"+name])=="object")&&!window["win_"+name].closed) {
		window["win_"+name].location = url;
	} else {
		window["win_"+name]=window.open(url,name,"location=0,status=0,resizable=1,menubar=0,directories=0,width="+width+",height="+height);
	}
	window["win_"+name].focus();
}

// Pop up with scroll
function oWinWithScroll(url,width,height,name) {
	if (typeof(name)=="undefined") name="w"+new Date().getTime();
	if ((typeof(window["win_"+name])=="object")&&!window["win_"+name].closed) {
		window["win_"+name].location = url;
	} else {
		window["win_"+name]=window.open(url,name,"scrollbars=1,location=0,status=0,resizable=1,menubar=0,directories=0,width="+width+",height="+height);
	}
	window["win_"+name].focus();
}