// include adicCheckBrowser.js

if (version == "Okay") {

function OpenNewWindow(thePopup, myname, w, h, scroll, menubar) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
				
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',menubar='+menubar+',noresize';
	var newWind = window.open(thePopup, myname, winprops);
	newWind.focus();
	
	if (parseInt(navigator.appVersion) >= 4) { newWind.window.focus(); }
}

} // end if browser version OK

//  Rotating Image Functions

function fadeImage()
{
  if (curPosition<100)
	{
    curPosition = curPosition + 10;
    if (tObject.filters)
      tObject.filters.alpha.opacity=curPosition;
    else if (tObject.style.MozOpacity)
      tObject.style.MozOpacity=curPosition/101;
  }
  else
	{
		clearInterval(imageOut);
		if(curImage=="image0")
		  nextImage = "image0";
		else
		  nextImage = "image1";
		if( ie4 )
		  tObject = eval("document.all."+nextImage) ;
		else
		  tObject = document.getElementById(nextImage);
		tObject.innerHTML = insImage(nextImageInd);
		if ( nextImageInd < (numImages-1))
		  nextImageInd = nextImageInd + 1;
		else
		  nextImageInd = 0;
		if( ie4 )
		  tObject2 = eval("document.all."+nextImage)
		else
		  tObject2 = document.getElementById(nextImage)
		tObject2.style.visibility="hidden";
		setTimeout("rotImage()",msWait);
	}
} // end fadeImage

function insImage(imageIndex)
{
  var imageHTML = '<a href="'+imageHREF[imageIndex]+'" target="'+imageTARGET[imageIndex]+'">';
  imageHTML+='<img src="'+imageSRC[imageIndex]+'" border="0"  alt="'+imageALT[imageIndex]+'">';
  imageHTML+='</a>';
  return imageHTML;
}

function rotImage()
{
  if (ie4||dom)
	{
    resetImage(curImage);
		if( ie4 )
		  cObject = tObject = eval("document.all."+curImage);
		else
		  cObject = tObject = document.getElementById(curImage);
    cObject.style.zIndex++;
    tObject.style.visibility="visible";
    var str='setInterval("fadeImage()",85)'; //fade
    imageOut=eval(str);
		if(curImage=="image0")
      curImage = "image1";
		else
		  curImage = "image0";
  }
  else
	{
    document.images.imageDefault.src=imageSRC[curImageInd];
		if(curImageInd<numImages-1)
		  curImageInd=curImageInd+1;
		else
		  curImageInd = 0;
	}
} // rotImage

function resetImage(theImage)
{
  curPosition=10;
	if( ie4 )
	  cObject = eval("document.all."+theImage);
	else
	  cObject = document.getElementById(theImage);
  if (cObject.filters)
	{
    cObject.filters.alpha.opacity=curPosition;
	}
  else if (cObject.style.MozOpacity)
	{
    cObject.style.MozOpacity=curPosition/101;
	}
} // end resetImage

function beginRotation()
{
  if( ie4 )
	  cObject = eval("document.all."+curImage);
	else
	  cObject = document.getElementById(curImage);
  cObject.innerHTML = insImage(curImageInd);
  rotImage();
} // end Rotating Image Functions