/*--- Avanquest WebEasy Document Script ---*/

IE=(navigator.appName.indexOf('Microsoft') >= 0);
NS=(navigator.appName.indexOf('Netscape') >= 0);
SF=(navigator.appName.indexOf('Safari') >= 0);
FF=(navigator.userAgent.indexOf('Firefox') >= 0);
OP=(navigator.userAgent.indexOf('Opera') >= 0);
GK=(navigator.userAgent.indexOf('Gecko') >= 0);
V4=(parseInt(navigator.appVersion) >= 4);
if((V5=navigator.appVersion.indexOf('MSIE '))<0) V5=-5;
V5=(parseInt(navigator.appVersion.charAt(V5+5))>=5);
MAC=(navigator.userAgent.indexOf('Mac')!=-1);

function weCheckForm( frm )
{
	for(var k=0; k<frm.elements.length; ++k)
	{	var obj=frm.elements[k];
		if(obj.type && ('text,textarea,password,file'.indexOf(obj.type.toLowerCase()) >= 0))
		{
			if( obj.value == '')
			{	alert('Please enter required information in the field.');
				obj.focus();
				return false;
			}
		}
	}
	return true;
}


//Swap Image with fade effect

function swapImage(id, path) 

{
//Swap Images with Filter

var el = document.getElementById(id);
el.count = el.count || 0;
document.getElementById(id).style.filter="blendTrans(duration=3)"

if (document.getElementById(id).filters &&
document.getElementById(id).filters[0])

{

document.getElementById(id).filters.blendTrans.Apply()
document.getElementById(id).filters.blendTrans.Play()
document.getElementById(id).src = path[el.count];

el.count = (el.count + 1) % path.length;

}
}
//Allows for Multiple Slides

function slideshow()
{
setInterval(function ()
{

swapImage ('slide1', [

"images/BlankTopLeft.jpg",
"images/formen.jpg",
"images/byAndyFields.jpg",
"images/BlankTopLeft.jpg",
"images/BlankTopLeft.jpg",
"images/BlankTopLeft.jpg"


]);
}, 3200);

setInterval(function ()

{

swapImage ('slide2', [

"images/BlankRightTop.jpg",
"images/Connect.jpg",
"images/Enrich.jpg",
"images/Strengthen.jpg",
"images/Balance.jpg",
"images/MindBodySpirit.jpg",
"images/BlankRightTop.jpg"


]);
}, 5000);

setInterval(function ()

{

swapImage ('slide3', [

"images/PlainSky.jpg",
"images/ServingBaltimore.jpg"


]);
}, 6000);

setInterval(function ()

{

swapImage ('slide4', [

"images/PlainBush.jpg",
"images/AllLevels.jpg",
"images/Beginning.jpg",
"images/Intermediate.jpg",
"images/Advanced.jpg"


]);
},4000);





}



/*--- EndOfFile ---*/

