<!--

// start script for section navigation rollovers

if (document.images) {
	home_on = new Image();
	home_on.src = "./images/nav/home_on.gif";
	about_on = new Image();
	about_on.src = "./images/nav/about_on.gif";
	products_on = new Image();
	products_on.src = "./images/nav/products_on.gif";
	engineering_on = new Image();
	engineering_on.src = "./images/nav/engineering_on.gif";
	news_on = new Image();
	news_on.src = "./images/nav/news_on.gif";
	dealers_on = new Image();
	dealers_on.src = "./images/nav/dealers_on.gif";
	gallery_on = new Image();
	gallery_on.src = "./images/nav/gallery_on.gif";
	webbies_on = new Image();
	webbies_on.src = "/images/nav/webbies_in.gif";
	the_academy_on = new Image();
	the_academy_on.src = "/images/nav/the_academy_in.gif";
}

imgOrig = null;

function go(imageID) {
	if (document.images) {
		imgOrig = document.images[imageID].src
		imgOn = eval(imageID + "_on.src");
		document.images[imageID].src = imgOn;
	} else {
	}
}

function stop(imageID) {
	if (document.images) {
		document.images[imageID].src = imgOrig;
	} else {
	}
}

// end script for section navigation rollovers
//Add in image swapping js --Netsprout

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 winLaunch (url) {
	window.open(url,'webbywindow','width=750,height=500,resizable,location,status,menubar,scrollbars,toolbar')
}

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 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 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 goThere (formref) {
	newUrl = formref.year.options[formref.year.selectedIndex].value
	if (newUrl == "nothing")
		{
			doNothing();
		}
		else {
		document.forms[0].submit();
	}
}

function isEmailAddr(email) {
    var result = false;
    var theStr = new String(email);
    var index = theStr.indexOf("@");

    if (index > 0) {
        var pindex = theStr.indexOf(".",index);
        if ((pindex > index+1) && (theStr.length > pindex+1))
        result = true;
    }
    return result;
}

function EmailValidator(theForm) {

  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  return (true);
}

var slideShowSpeed = 2000;
var crossFadeDuration = 2;
var Pic = new Array();
Pic[0] = '/images/sponsor_logos/tcg.gif';
Pic[1] = '/images/sponsor_logos/adweek.gif';
Pic[2] = '/images/sponsor_logos/fortune.gif';
Pic[3] = '/images/sponsor_logos/fsb.gif';
Pic[4] = '/images/sponsor_logos/mediaweek.gif';
Pic[5] = '/images/sponsor_logos/brandweek.gif';
Pic[6] = '/images/sponsor_logos/pwc.gif';
Pic[7] = '/images/sponsor_logos/rackspace.gif';
Pic[8] = '/images/sponsor_logos/idg.gif';

var t;
var j = 0;
var p = Pic.length;

var preLoad = new Array();

for (i = 0; i < p; i++) {
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}

function runSlideShow() {
	if (document.all) {
    	document.images.SlideShow.style.filter="blendTrans(duration=2)";
 		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
		document.images.SlideShow.filters.blendTrans.Apply();
	}
	
	document.images.SlideShow.src = preLoad[j].src;
	if (document.all) {
		document.images.SlideShow.filters.blendTrans.Play();
	}
	j = j + 1;
	if (j > (p-1)) j=0;
	t = setTimeout('runSlideShow()', slideShowSpeed);
}

//-->
