function getElementByClass(classname) {
	var inc=0
	var alltags=document.all? document.all : document.getElementsByTagName("*");
	for (i=0; i<alltags.length; i++){
		if (alltags[i].className==classname){
			return alltags[i];	
		}
		
	}
	
}
function hideRest(){

//changecss(".featureBox2","opacity","0.3");
//changecss(".featureBox2","-moz-opacity","0.3");
//changecss(".featureBox2","filter","alpha(opacity=30)");
changecss(".featureBox a","opacity","0.3");
changecss(".featureBox a","-moz-opacity","0.3");
changecss(".featureBox a","filter","alpha(opacity=30)");

    
}
function resetRest(){

//changecss(".featureBox2","opacity","1.0");
//changecss(".featureBox2","-moz-opacity","1.0");
//changecss(".featureBox2","filter","alpha(opacity=100)");

changecss(".featureBox a","opacity","1.0");
changecss(".featureBox a","-moz-opacity","1.0");
changecss(".featureBox a","filter","alpha(opacity=100)");
}

function changecss(theClass,element,value) {
	//documentation for this script at http://www.shawnolson.net/a/503/
	 var cssRules;
	 if (document.all) {
	  cssRules = 'rules';
	 }
	 else if (document.getElementById) {
	  cssRules = 'cssRules';
	 }
	 for (var S = 0; S < document.styleSheets.length; S++){
		  for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
			   if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
				document.styleSheets[S][cssRules][R].style[element] = value;
			   }
		  }
	 }	
	 
}

function doTooltip(e, msg) {

  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}
	
// variables for tooltip content 
var tipRich = '<div class="tp1">This text is in a div with it\'s own class for different style specifications than the tooltip. </div>';
var tipImg = '<div style="text-align:center"><img src="/images/dot-com-btn.gif" width="176" height="30" alt="" border="0"></div>';
var tipImgTxt = '<img src="/images/sm-duck.gif" width="90" height="44" alt="" border="0"><div class="tp2">Images and text can go together in a tooltip.</div>';
var tipTerms = "If you plan to use our code, please follow our terms. Thank you.";

<!--//--><![CDATA[//><!--

//sfHover = function() {
	//var sfEls = document.getElementById("nav").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);

//--><!]]>
var coder
var itemNum
itemNum = Math.floor(4*Math.random())+2

function showVal(code,what)
{ 

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	coder=code
	var url="/js/getQuote.php?what="+what+"&which="+itemNum
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged 
	//setTimeout("xmlHttp", 60);
	xmlHttp.open("GET",url,true)
	
	xmlHttp.send(null)
	
}

function stateChanged() 
{ 
	
	if(xmlHttp.readyState == 0) { showLR('loading.') }
	if(xmlHttp.readyState == 1) { showLR('loading..') }
	if(xmlHttp.readyState == 2) { showLR('loading...') }
	if(xmlHttp.readyState == 3) { showLR('loading....') }
	
	if(xmlHttp.readyState == 4)
		{ 
		if (xmlHttp.status == 200) {
			showLR(xmlHttp.responseText);
	  }
	  }
	
	
	
} 
function showLR(named) {
	//alert(coder);
	document.getElementById(coder).innerHTML=named
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}