// functions for mouse rollovers
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];}
}

var onHours = " ";
var onMinutes = " ";
var onSeconds = " ";
var offHours = 0;
var offMinutes = 0;
var offSeconds = 0;
var logSeconds = 0;
var logMinutes = 0;
var logHours = 0;
var OnTimeValue = " ";
var OffTimeValue = " ";
var PageTimeValue = " ";

function getLogonTime() {
var now = new Date();
var ampm = (now.getHours() >= 12) ? " P.M." : " A.M."
var Hours = now.getHours();
Hours = ((Hours > 12) ? Hours - 12 : Hours);
var Minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
var Seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();
OnTimeValue =(" "
+ Hours
+ Minutes
+ Seconds
+ " "
+ ampm);
onHours = now.getHours();
onMinutes = now.getMinutes();
onSeconds = now.getSeconds();  
}
function getLogoffTime() {
var now = new Date();
var ampm = (now.getHours() >= 12) ? " P.M." : " A.M."
var Hours = now.getHours();
Hours = ((Hours > 12) ? Hours - 12 : Hours);
var Minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
var Seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();
OffTimeValue =(" "
+ Hours
+ Minutes
+ Seconds
+ " "
+ ampm);
offHours = now.getHours();
offMinutes = now.getMinutes();
offSeconds = now.getSeconds();
timer(); 
}
function timer() { 
if (offSeconds >= onSeconds) { 
logSeconds = offSeconds - onSeconds; }
else {
offMinutes -= 1;
logSeconds = (offSeconds + 60) - onSeconds;      
}
if (offMinutes >= onMinutes) { 
logMinutes = offMinutes - onMinutes; }
else {
offHours -= 1;
logMinutes = (offMinutes + 60) - onMinutes;
}
logHours = offHours - onHours;
logHours =  ((logHours < 10) ? "0" : ":") + logHours;
logMinutes = ((logMinutes < 10) ? ":0" : ":") + logMinutes;
logSeconds = ((logSeconds < 10) ? ":0" : ":") +logSeconds;
PageTimeValue =(" "
+ logHours
+ logMinutes
+ logSeconds);
displayTimes();
}
function displayTimes() {
alert("\nYou arrived here at: "+OnTimeValue+"\n\nIt's already: "+OffTimeValue+"\n\nOh my gosh!  You've already wasted...\n             " + PageTimeValue);
}
// End -->

<!--
var allowpop=1;
function popWin(){
var ppl="popLayer";var objppl=findObj(ppl);
if (objppl==null){return;}// if the layer does not exist, do nothing.
var args=arguments,movetoX=parseInt(args[0]),movetoY=parseInt(args[1]),movespeed=parseInt(args[2]);
var cycle=10,pxl="";
if(!document.layers){objppl=objppl.style;}
if(objppl.tmofn!=null){clearTimeout(objppl.tmofn);}
var pplcoordX=parseInt(objppl.left),pplcoordY=parseInt(objppl.top);
var xX=movetoX,yY=movetoY;if((pplcoordX!=movetoX)||(pplcoordY!=movetoY)){
   var moveX=((movetoX-pplcoordX)/movespeed),moveY=((movetoY-pplcoordY)/movespeed);
   moveX=(moveX>0)?Math.ceil(moveX):Math.floor(moveX);movetoX=pplcoordX+moveX;
   moveY=(moveY>0)?Math.ceil(moveY):Math.floor(moveY);movetoY=pplcoordY+moveY;
   if((parseInt(navigator.appVersion)>4||navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {pxl="px";}
   if (moveX!=0){eval("objppl.left='" + movetoX + pxl + "'");}
   if (moveY != 0) {eval("objppl.top = '" + movetoY + pxl + "'");}
   var sFunction = "popWin(" + xX + "," + yY + "," + movespeed+ ")";
   objppl.tmofn = setTimeout(sFunction,cycle);
   }
}
function findObj(theObj, theDoc){
var p, i, foundObj;
if(!theDoc) theDoc = document;
if((p = theObj.indexOf("?")) > 0 && parent.frames.length)
   {theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);}
if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
for (i=0; !foundObj && i < theDoc.forms.length; i++)
foundObj = theDoc.forms[i][theObj];
for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
foundObj = findObj(theObj,theDoc.layers[i].document);
if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
return foundObj;
}
function hideLayer(layername){
layer=findObj(layername);
if(layer.style){layer=layer.style;}
layer.visibility='hidden'; }



	// declare global variable name
	var newWindow = null
	function testWindow(URLPage) {
	// check if window already exists
	if (!testWindow || testWindow.closed) {
		var testWindow = null
	        // store new window object in global variable
	        testWindow = window.open(URLPage,"test_window","width=600,height=600,scrollbars, resizable=1")
	        
	} else {
	// window already exists, bring it forward
	newWindow.focus()
	newWindow = window.open(URLPage,"test_window","width=500,height=400,scrollbars, resizable=1")
	}
	}

//-->

// function to spawn email client
// pass comma separated strings
// useage: <a href="javascript:js_mail('somesite.com?subject=Website Inquiry','username')">username@somesite.com</a>
var domain;
var id;
function js_mail(domain, id) {
location.href = "mailto:" + id + "@" + domain;
}