function Showtime(){
monName = new Array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
weekName = new Array ("Sun","Mon","Tues","Wed","Thus","Fri","Sat");
now = new Date;
var yr = now.getYear();
if(yr<1900) yr=yr+1900;
var monNr = monName[now.getMonth()]
var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();
var weekNr = weekName[now.getDay()]

document.write("&nbsp;&nbsp;"+weekNr+" "+monNr+" "+dayNr+" "+yr+"&nbsp;")
}

function change(i) {
    var color = "#E0E0E0"
    if (document.layers){
//        window.document.layers['lt' + i].bgColor = color;
 }
    else if (document.all)
        window.document.all['lt' + i].style.background = color;
}
function changeback(i) {
    var color = "#999999"
    if (document.layers){
//        window.document.layers['lt' + i].bgColor = color;
}
    else if (document.all)
        window.document.all['lt' + i].style.background = color;
}

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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}
function changeheight(layer1) {
	thisheight = document.getElementById("content_tbl").offsetHeight - document.getElementById("nav_tbl").offsetHeight - 560;
	replaceText = '<table width="100%"  border="0" cellspacing="0" cellpadding="0">';
	replaceText += '<tr><td height="'+thisheight+'">&nbsp;</td></tr>';
	replaceText += '</table>';
	if(thisheight > 0){
		 if(document.getElementById) {
			document.getElementById(layer1).innerHTML = replaceText;
		}else if (document.all) {
			document.all(layer1).innerHTML = replaceText;
		}else if (document.layers) {
			document.layers[layer1].document.open();
			document.layers[layer1].document.writeln(replaceText);
			document.layers[layer1].document.close();
		}
	}
}
function openPopup(name) {
	leftPos=160
	topPos=60
	winw=400
	winh=400
/*	if(screen){
	leftPos=screen.width-winw-60
	leftPos=160
	}*/
		remote = window.open(name,"remotepopup","left="+leftPos+",top="+topPos+",width="+winw+",height="+winh+",directories=no,scrollbars=no,status=yes,toolbar=no,menubar=no,location=left,resizable=yes");
        remote.focus();
		
	   if (remote.opener == null) remote.opener = window; 
		remote.opener.name = "opener";
}
function openPDF(name) {
	leftPos=20
	topPos=20
	winw=760
	winh=560
	if(screen){
	winw=screen.width-60
	winh=screen.height-60
	}

		remote = window.open(name,"remotepdf","left="+leftPos+",top="+topPos+",width="+winw+",height="+winh+",directories=no,scrollbars=no,status=yes,toolbar=no,menubar=no,location=left,resizable=yes");
        remote.focus();
		
	   if (remote.opener == null) remote.opener = window; 
		remote.opener.name = "opener";
}
function openRules() {
	leftPos=20
	topPos=20
	winw=570
	winh=500
	/*
	if(screen){
		winw=screen.width-60
		winh=screen.height-60
	}*/

		remote = window.open("rules_popup.asp","remotepdf","left="+leftPos+",top="+topPos+",width="+winw+",height="+winh+",directories=no,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=left,resizable=no");
        remote.focus();
		
	   if (remote.opener == null) remote.opener = window; 
		remote.opener.name = "opener";
}
function openVideo(videofile) {
	leftPos=20
	topPos=20
	winw=368
	winh=366
	/*
	if(screen){
		winw=screen.width-60
		winh=screen.height-60
	}*/

		remote = window.open(videofile,"remotevideo","left="+leftPos+",top="+topPos+",width="+winw+",height="+winh+",directories=no,scrollbars=no,status=yes,toolbar=no,menubar=no,location=left,resizable=no");
        remote.focus();
		
	   if (remote.opener == null) remote.opener = window; 
		remote.opener.name = "opener";
}
function openWin(name) {
	leftPos=20
	topPos=20
	winw=600
	winh=600
	if(screen){
//	winw=screen.width-60
	winh=screen.height-80
	leftPos=screen.width/2-310
	topPos=30
	}

		remote = window.open(name,"remotewin","left="+leftPos+",top="+topPos+",width="+winw+",height="+winh+",directories=no,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=left,resizable=no");
        remote.focus();
		
	   if (remote.opener == null) remote.opener = window; 
		remote.opener.name = "opener";
}
function topbanner(){
	var picn = 8;
	rnum = Math.floor((Math.random() * picn)) + 1;
	if(rnum < 8){
		rnum = "0" + rnum
	}
	if(document.getElementById){
		document.getElementById("top_main").style.backgroundImage = "url(graphics/employee_graphics/top-" + rnum + ".jpg)";
		//document.getElementById("top_lb").src = "graphics/top_bot-" + rnum + ".jpg";
		//document.getElementById("top_rb").src = "graphics/ti_acm-" + rnum + ".jpg";
	}
}
function topbannernew(){
	var picn = 3;
	rnum = Math.floor((Math.random() * picn)) + 1;
	if(rnum < 10){
		rnum = "0" + rnum
	}
	if(document.getElementById){
		document.getElementById("top_main").style.backgroundImage = "url(graphics/employee_graphics/top-" + rnum + "_new.jpg)";
	}
}
function aon(navid){
	linkid = eval("link_" + navid);
	gtid = eval("gt_" + navid);
	linkid.style.color='#E91734';
	gtid.style.color='#E91734';
}
function aoff(navid){
	linkid = eval("link_" + navid);
	gtid = eval("gt_" + navid);
	linkid.style.color='#474F57';
	gtid.style.color='#FFFFFF';
}
function aonL(navid){
	linkid = eval("link_" + navid);
	linkid.style.color='#E91734';
}
function aoffL(navid){
	linkid = eval("link_" + navid);
	linkid.style.color='#474F57';
}

function pictureOpener(loadpos, winw, winh){
	posleft=(screen.width-winw)/2
	postop=(screen.height-winh)/2-20
	newWindow = window.open('about:blank',"result","resizable=yes,scrollbars=yes,width="+winw+",height="+winh+",left="+posleft+",top="+postop);
	var html = '';
    html += '<HTML><HEAD>';
    html += '<TITLE>';
    html += 'Erb Employees';
    html += '<\/TITLE>';
    html += '<script language="JavaScript" type="text/JavaScript" src="js/noanyclick.js"></script>';
    html += '<\/HEAD>';
    html += '<BODY leftmargin="5" topmargin="5" marginwidth="5" marginheight="5">';
    html += '<IMG SRC="' + loadpos + '">';
    html += '<\/BODY><\/HTML>';
    newWindow.document.open();
    newWindow.document.write(html);
    newWindow.document.close(); 

	if ( newWindow && !newWindow.closed){
		newWindow.focus();
	}
}
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_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];}
}


