/**********************************************************************************/
// Common Javascript Functions
// Created by: Lynx Technical Solutions - Erica Lahoda
/**********************************************************************************/

// JavaScript Document
var browserName=navigator.appName; 

//DEFINE GRAPH VALUES [Item name, absolute value]
var graphimage="/images/poll.gif";
var graphx=new Array();
var graphy=new Array();
var graphz=new Array();

/**********************************************************************/
// m_sfcon: Email Function 
// Description: the email account name is passed in, then parsed onto 
//   the domain for this web site, then launched using the 'mailto' 
//   link. This is to help prevent bots from scouring a web page to 
//   find email addresses, since it is broken up into pieces in this 
//   function
/**********************************************************************/
function m_sfcon (u) {
pre = "mail";
url = pre + "to:" + u;
document.location.href = url + "@lynxts.com";
}





//JavaScript Graph-it! (Absolute)- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
function graphit(g,gwidth,usemax,valuedec){
	var total=0.00;
	var maxamount = 0.00;
	var curvalue = 0.00;
	
	for (i=0;i<g.length;i++) {
		total+=g[i][1];
		if (g[i][1] > maxamount)
			maxamount = g[i][1];
	}

	var divisor = 0.00;
	if (usemax == 1) {
		divisor = maxamount;
	} else {
		divisor = total;
	}
	
	output='<table class="tableClear">\n';
	for (i=0;i<g.length;i++){
		curvalue = g[i][1];		
		calpercentage=Math.round(g[i][1]*100/divisor);
		calwidth=Math.round(gwidth*(calpercentage/100));
		output+='<tr><td>'+g[i][0]+'&nbsp;</td><td><img src="'+graphimage+'" width="'+calwidth+'" height="12"></td><td align="right">&nbsp;&nbsp; '+curvalue.toFixed(valuedec)+'</td></tr>';
	}
	output+='</table>';
	output+='<br />Total: <b>'+total.toFixed(valuedec)+'</b>';
	document.write(output);
}