var lowmenu="";
function copyright(){
	//document.write("Copyright © 1993-2009 Corybant, Inc.  All Rights Reserved");
	var text = "<center><font style=\"font-size:8pt\" face=\"Arial,Helvetica,Geneva,Swiss,SunSans-Regular\">"
		+"Copyright © 1993-2009 Corybant, Inc.<br>"
		+"</font><font style=\"font-size:7pt\" face=\"Arial,Helvetica,Geneva,Swiss,SunSans-Regular\" size=\"1\">"
		+"All patents, pending patents, trademarks, copyrights, and content are owned by Corybant, Inc. All rights reserved. </font>"
		+"<a href=\"javascript:displayhelp('privacy.html')\" title=\"Privacy Policy\">Privacy Policy</a></center>";
	document.write(text);
	document.getElementById("lowmenublock").innerHTML=lowmenu;
	showDiv("lowmenublock");


}

function displaycontactform(url) {
	tv=window.open(url,"contact","toolbar=no,menubar=no,status=yes,scrollbars=yes,resizable=yes,width=560,height=480");
}
function displaypage(url) {
	tv=window.open(url,"page","toolbar=no,menubar=no,status=yes,scrollbars=yes,resizable=yes,width=300,height=400");
}

function displayhelp(url) {
	tv=window.open (url,"Description","toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=yes,width=500,height=300");
}

function rowUpdateBg(row, box) {
  if (box && box.checked) {
    row.style.backgroundColor = "#808080";
  } else {
    row.style.backgroundColor = (row == rowWithMouse) ? '#daa520' : '#FFFFFF';
  }
}

function getMenu(root){
	var table = "<table cellpadding='0' cellspacing='2'  width='100%'>";
	var order = root.menu.order;
	lowmenu="<table width='60%' callpadding='0' cellspacing='0' ><tr>";
	for (var i=0; i<order.length; i++){
		var item = root.menu[order[i]];
		var ht = item.height?" height='"+item.height+"' ":"";
		table += "<tr><td align='left' valign='middle' "+ht+">"
			+"<a id='"+order[i]+"'class='"+item.style+"' onclick=\"javascript:replaceContent('"+order[i]+"')\">"+item.lable+"</a>"
			+"</td></tr>";
if (item.lowstyle){
		lowmenu+= "<td align='center' class='lowmenucell' >"
			+"<a  id='low_"+order[i]+"' class='"+item.lowstyle+"' onclick=\"javascript:replaceContent('"+order[i]+"')\">"+item.lowlable+"</a>"
			+"</td>";
}
	}
	lowmenu+="</tr></table>";
	table += "</table>";
	document.write(table);

}

function showDiv(div){
	if (!document.getElementById(div)) return;
	document.getElementById(div).style.display = "block";
	document.getElementById(div).style.visibility = "visible";
}

function hideDiv(div){
	if (!document.getElementById(div)) return;
	document.getElementById(div).style.display = "none";
	document.getElementById(div).style.visibility = "hidden";
}

function replaceContent(tag){
		var ct = contents.menu[tag].content;
		var divname = contents.menu[tag].destination;
	setSelected(tag);
	var fr = "<Iframe name='"+tag+"' src='"+ct+"' frameborder='0' marginwidth='0' scrolling='auto' width='100%' height='360'></Iframe>";
	document.getElementById(divname).innerHTML= fr;
	showDiv(divname);
}

var _selecteditem="init";
function setSelected(id){ // set the style of a link to selected
	var ac;
	var oc;
	var cellid="low_"+id;
	if (_selecteditem!="init"){
		ac = document.getElementById(_selecteditem).className;
		oc = ac.substring(0,ac.indexOf("_sel"));
		document.getElementById(_selecteditem).className= oc;//drop _sel from the className for the menueitem that was selected
		if (document.getElementById("low_"+_selecteditem)){
			ac = document.getElementById("low_"+_selecteditem).className;
			oc = ac.substring(0,ac.indexOf("_sel"));
			document.getElementById("low_"+_selecteditem).className=oc;// also for the menu list
		} 
	}
	ac = contents.menu[id];
	document.getElementById(id).className= ac.style+"_sel";
if(ac.lowstyle){
	document.getElementById(cellid).className=ac.lowstyle+"_sel";
}
	_selecteditem=id;
}


function addScrollers(){
	var scrolldiv = "<div id='staticbuttons' style='position:absolute;'>"
	+"<br><br><br><br><br><br><a href='javascript:' onmouseover='myspeed=-thespeed' onmouseout='myspeed=0'>"
	+"<img src='arrows_up.gif' border='0'></a><br><br><br><br><br><br><br><br>"
	+"<a href='javascript:' onmouseover='myspeed=thespeed' onmouseout='myspeed=0'>"
	+"<img src='arrows_dn.gif' border='0'></a></div>";
	document.write(scrolldiv);
}

var Hoffset; //Enter buttons' offset from right edge of window (adjust depending on images width)
var Voffset; //Enter buttons' offset from bottom edge of window (adjust depending on images height)
var thespeed; //Enter scroll speed in integer (Advised: 1-3)

var ieNOTopera;
var myspeed;

var ieHoffset_extra;
var cross_obj;

function initVars(){
	Hoffset=0;
	Voffset=0;
	thespeed=3;
	ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1;
	myspeed=0;
	ieHoffset_extra=document.all? 15 : 0;
	cross_obj=document.all? document.all.staticbuttons : document.getElementById? document.getElementById("staticbuttons") : document.staticbuttons;
	if (document.all||document.getElementById||document.layers) setInterval('initializeIT()',20);
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function positionit(){
var dsocleft=document.all? iecompattest().scrollLeft : pageXOffset
var dsoctop=document.all? iecompattest().scrollTop : pageYOffset
var window_width=ieNOTopera? iecompattest().clientWidth+ieHoffset_extra : window.innerWidth+ieHoffset_extra
var window_height=ieNOTopera? iecompattest().clientHeight : window.innerHeight

if (document.all||document.getElementById){
cross_obj.style.left=parseInt(dsocleft)+Hoffset+"px"
cross_obj.style.top=dsoctop+Voffset+"px"
}
else if (document.layers){
cross_obj.left=dsocleft+Hoffset
cross_obj.top=dsoctop+Voffset
}
}

function scrollwindow(){
window.scrollBy(0,myspeed)
}

function initializeIT(){
positionit()
if (myspeed!=0){
scrollwindow()
}
}




