<!--//page intro slideshow

var theAutoTimer;
var recurseTimer;
var timerLength = 2400;

//Start Focusing, then AutoFade
$(document).ready(function() {

	//select zip by default
	document.getElementById("ZipEntryInd").focus();
	
	//start the timer
	//theAutoTimer = setTimeout("autoFading(" + 2 + ")", timerLength);

});

function autoFading(mode) {
//alert("mode before dvsing:" + mode);
	if (mode > 4)
	{mode = 1;}
//alert("mode after dvsing:" + mode);
piShow(mode);
++mode;
theAutoTimer = setTimeout("autoFading(" + mode + ")", timerLength);
}


function stopTimers() {
clearTimeout(theAutoTimer);
//clearTimeout(recurseTimer);
}



function isNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
}


//Set Focus to Zip code field onclick
function focusZip (num) {
	if (num == 1)
	{
		//select zip
		document.getElementById("ZipEntryInd").focus();
	}else if (num == 2)
	{
		//select zip
		document.getElementById("ZipEntryGrp").focus();
	}else if (num == 4)
	{
		//select zip
		document.getElementById("ZipEntryDnt").focus();
	}
}



//Function to show stuff when highlighted
function piShow(mode) {
//individual is highlighted
if (mode == '1')
{
document.getElementById("pi1").className="selected";
document.getElementById("pi2").className="unselected";
document.getElementById("pi3").className="unselected";
document.getElementById("pi4").className="unselected";


//fade to this div


$('#pageIntroRightGroup').hide();
$('#pageIntroRightSenior').hide();
$('#pageIntroRightDental').hide();
$('#pageIntroRightIndividual').fadeIn('fast', function()
{
if (document.getElementById("pi1").className=="unselected") {
	$('#pageIntroRightIndividual').hide();
	}else
	{
		//select zip
		document.getElementById("ZipEntryInd").focus();
	}
}
);


/*
document.getElementById("pageIntroRightIndividual").style.display="inline";

*/


}
//group is highlighted
else if (mode == '2')
{
document.getElementById("pi1").className="unselected";
document.getElementById("pi2").className="selected";
document.getElementById("pi3").className="unselected";
document.getElementById("pi4").className="unselected";



//fade to this div
$('#pageIntroRightIndividual').hide();
$('#pageIntroRightSenior').hide();
$('#pageIntroRightDental').hide();
$('#pageIntroRightGroup').fadeIn('fast', function()
{
if (document.getElementById("pi2").className=="unselected") {
	$('#pageIntroRightGroup').hide();
	}else
	{
		//select zip
		document.getElementById("ZipEntryGrp").focus();
	}
}
);

/*
document.getElementById("pageIntroRightIndividual").style.display="none";
document.getElementById("pageIntroRightGroup").style.display="inline";
document.getElementById("pageIntroRightSenior").style.display="none";
document.getElementById("pageIntroRightDental").style.display="none";
*/

}
//senior is highlighted
else if (mode == '3')
{
document.getElementById("pi1").className="unselected";
document.getElementById("pi2").className="unselected";
document.getElementById("pi3").className="selected";
document.getElementById("pi4").className="unselected";

//fade to this div
$('#pageIntroRightIndividual').hide();
$('#pageIntroRightGroup').hide();
$('#pageIntroRightDental').hide();
$('#pageIntroRightSenior').fadeIn('fast', function()
{
if (document.getElementById("pi3").className=="unselected") {
	$('#pageIntroRightSenior').hide();
	}
}
);

/*
document.getElementById("pageIntroRightIndividual").style.display="none";
document.getElementById("pageIntroRightGroup").style.display="none";
document.getElementById("pageIntroRightSenior").style.display="inline";
document.getElementById("pageIntroRightDental").style.display="none";
*/
}
//dental is highlighted
else if (mode == '4')
{
document.getElementById("pi1").className="unselected";
document.getElementById("pi2").className="unselected";
document.getElementById("pi3").className="unselected";
document.getElementById("pi4").className="selected";

//fade to this div

$('#pageIntroRightIndividual').hide();
$('#pageIntroRightSenior').hide();
$('#pageIntroRightGroup').hide();
$('#pageIntroRightDental').fadeIn('fast', function()
{
if (document.getElementById("pi4").className=="unselected") {
	$('#pageIntroRightDental').hide();
	}else
	{
		//select zip
		document.getElementById("ZipEntryDnt").focus();
	}
}
);


}
}


//check ZipCode Fields
function checkZipSplashIndy(document){
Form = document.pageIntroFormIndy;

  if ((Form.ZipEntryInd.value == "") || (isNumeric(Form.ZipEntryInd.value) != true)) {
     alert("Please enter a valid zip code." );
     Form.ZipEntryInd.focus();
     return false;
  }
  }
  
function checkZipSplashGrp(document){
Form = document.pageIntroFormGrp;

  if ((Form.ZipEntryGrp.value == "") || (isNumeric(Form.ZipEntryGrp.value) != true)) {
     alert("Please enter a valid zip code." );
     Form.ZipEntryGrp.focus();
     return false;
  }
  }
  
  function checkZipSplashDental(document){
Form = document.pageIntroFormDental;

  if ((Form.ZipEntryDnt.value == "") || (isNumeric(Form.ZipEntryDnt.value) != true)) {
     alert("Please enter a valid zip code." );
     Form.ZipEntryDnt.focus();
     return false;
  }
  }
  
  // -->
