var mn1Menu = new ypSlideOutMenu("menu1", "down", 0, 0, 200, 400);
var mn2Menu = new ypSlideOutMenu("menu2", "down", 0, 0, 200, 600);
var mn3Menu = new ypSlideOutMenu("menu3", "down", 0, 0, 200, 600);
var mn4Menu = new ypSlideOutMenu("menu4", "down", 0, 0, 200, 600);
var mn5Menu = new ypSlideOutMenu("menu5", "right", 200, 0, 200, 600, "menu1");
var mn6Menu = new ypSlideOutMenu("menu6", "right", 200, 42, 200, 600, "menu1");
var mn7Menu = new ypSlideOutMenu("menu7", "right", 200, 84, 200, 600, "menu1"); 
var mn8Menu = new ypSlideOutMenu("menu8", "down", 0, 0, 200, 600);
var mn9Menu = new ypSlideOutMenu("menu9", "right", 200, 0, 200, 600, "menu3");
ypSlideOutMenu.writeCSS();

var browser, verStr = navigator.appVersion, app = navigator.appName, version = parseFloat(verStr);

function test_browser () {
  if ((app.indexOf('Netscape') != -1) && version >= 5) {
    browser = "netscape";
  }
  else if ((app.indexOf('Microsoft') != -1) && version >= 4) {
    browser = "ie";
  }
}

test_browser();

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->// JavaScript Document
function PopupPic(sPicURL) { 
	window.open("../popup.asp?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
}

function menu_css(menu_id, width) {

  var width;  
  
  document.write("<style type=\"text/css\">");
  document.write("<!--");
  document.write("#menu" + menu_id + "navigation{");
  document.write("	font: 10px Verdana, Arial, Helvetica, sans-serif;");
  document.write("	width:" + width + "px;");
  document.write("	background-color: #2A2927;");
  document.write("	border: 1px solid #3A3937;");
	document.write("	text-align: left;");
  document.write("}");
  document.write("#menu" + menu_id + "navigation a{");
  document.write("	color:#909392;");
  document.write("	border-bottom:1px solid #3A3937;");
  document.write("	text-decoration:none;");
  document.write("	padding: 4px;");
  document.write("	display:block;");
  document.write("	height:auto !important;");
  document.write("	height:1em;");
  document.write("}");
  document.write("#menu" + menu_id + "navigation a:hover{");
  document.write("	background:#3C3433;");
  document.write("	color: #FFFFFF;");
  document.write("	border-bottom:1px solid #3A3937;");
  document.write("	text-decoration:none;");
  document.write("}");
  document.write("-->");
  document.write("</style>");
}
function loadterms(page, width, height)
{
var v = window.open(page,'_blank','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width='+width+',height='+height+',left=300,top=400');
}
var y1 = 20;   // change the # on the left to adjuct the Y co-ordinate
(document.getElementById) ? dom = true : dom = false;

function hideIt(layerId) {
  if (dom) {document.getElementById(layerId).style.visibility='hidden';}
  if (document.layers) {document.layers[layerId].visibility='hide';} }

function showIt(layerId) {
  if (dom) {document.getElementById(layerId).style.visibility='visible';}
  if (document.layers) {document.layers[layerId].visibility='show';} }

function Comma(number) {
	number = '' + number;
	if (number.length > 3) {
	var mod = number.length % 3;
	var output = (mod > 0 ? (number.substring(0,mod)) : '');
	for (i=0 ; i < Math.floor(number.length / 3); i++) {
	if ((mod == 0) && (i == 0))
	output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
	else
	output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
	}
	return (output);
	}
	else return number;
}