sfHover = function() {
	var sfEls = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover)

function e_friend(page)
{
var e_add= prompt('Enter your friend\'s email address:',' ');
var subj= 'Thought you might be interested in this, from Ziff Davis';
var content= page;
window.location="mailto:"+e_add+"?subject="+subj+"&body="+content;
}


<!--SCRIPTING FOR CALCULATOR -->

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function calculateClicked() {
	if (!document.getElementById('AnnualSales').value.match(/^[\d\,\.]+$/)) {
		alert("Please enter a numeric value for your annual sales");
	}

	else if (!document.getElementById('XactionIncrease').value.match(/^[\d\,\.]+$/)) {
		alert("Please enter a numeric value for your increase in transactions");
	}
	else if (!document.getElementById('NewXactionSize').value.match(/^[\d\,\.]+$/)) {
		alert("Please enter a numeric value for your new transactions");
	}
	else {
		var percentSalesGrowth = findNewSales();
		var tmpAnnualSales = document.getElementById('AnnualSales').value;
		tmpAnnualSales = tmpAnnualSales.replace(/\,/g,"");
		var increaseInSales = (percentSalesGrowth * parseFloat(tmpAnnualSales)) / 100;
		var prettySales = prettify(increaseInSales);
		document.getElementById('SalesIncoutput').innerHTML = "$" + prettySales;
		document.getElementById('PercSalesoutput').innerHTML = (Math.round(percentSalesGrowth*Math.pow(10,0))/Math.pow(10,0)) + "%";
		document.getElementById('buttonLayer').focus();
	}
}

function prettify(number) {
	number = Math.round(number*Math.pow(10,0))/Math.pow(10,0);
	var prettyNumberString = "";
	var digitCounter = 1;
	do {
		if ( digitCounter > 3 ) {
			prettyNumberString = "," + prettyNumberString;
			digitCounter = 1;
		}
		var tempNum = number % 10;
		prettyNumberString = tempNum.toString()+ prettyNumberString;
		number = (number - tempNum) / 10;
		digitCounter++;
	}
	while (number > 0 );
	return( prettyNumberString );
}

function findNewSales() {
	var tmpXI = document.getElementById('XactionIncrease').value;
	transactIncrease = tmpXI.replace(/\,/g,"");
	var tmpXS = document.getElementById('NewXactionSize').value;
	newTransactSize = tmpXS.replace(/\,/g,"");
	var newSalesPercent = 	(
							  ( 1 + 
							    (
								  parseFloat(transactIncrease) / 100
								)
							  )
							* ( 1 +
							    ( 
								  parseFloat(newTransactSize) / 100
							    )
							  ) - 1
							) * 100;
	return(newSalesPercent);
}

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_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];}
}

function P7_MultiClass2() { //v1.0 by PVII
 var args=P7_MultiClass2.arguments;if(document.getElementById){
  for(var i=0;i<args.length;i+=2){if(document.getElementById(args[i])!=null){
  if(document.p7setdown){for(var k=0;k<p7dco.length-1;k+=2){
  if(args[i]==p7dco[k]){args[i+1]=p7dco[k+1];break;}}}
  document.getElementById(args[i]).className=args[i+1];}}}
}

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 P7_autoShowHide() { //v1.2 by PVII-www.projectseven.com
 var g,b,k,f,ag=arguments,a=parseInt(ag[0]);
 if(!document.p7setc){p7c=new Array();document.p7setc=true;for(var u=0;u<10;u++){
 p7c[u]=new Array();}}for(k=0;k<p7c[a].length;k++){if((g=MM_findObj(p7c[a][k]))!=null){
 b=(document.layers)?g:g.style;b.visibility="hidden";}}for(k=1;k<ag.length;k++){
 if((g=MM_findObj(ag[k]))!=null){b=(document.layers)?g:g.style;b.visibility="visible";
 f=false;for(var j=0;j<p7c[a].length;j++){if(ag[k]==p7c[a][j]){f=true;}}
 if(!f){p7c[a][p7c[a].length++]=ag[k];}}}
}