	var java = navigator.javaEnabled();

	function insertPanorama(pWidth,pHeight,pFile)
	{
	if (java)
		{
        	document.write("<applet archive=ptviewer.jar code=ptviewer.class width=" + pWidth + " height=" + pHeight + ">") ;
        	document.write("<param name=file   value=" + pFile + ">") ;
//        	document.write("</applet>") ;
		}
	else
		{
       		document.write("To view this panorama and others on this site, ") ;
       		document.write("you must have Java enabled in your browser. ") ; 
      		document.write("How you enable Java depends on your browser. Look for 'enable Java' in the ") ;
       		document.write("browser's online Help.<BR>") ; 
		}
  	}

function switchAd() 
{

	var n=(ct+1)%src.length;

	if (stopped != true)
	{
	if (ads[n] && (ads[n].complete || ads[n].complete==null)) 
	{
		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["SlideShow"].src = ads[ct=n].src;

   		if (document.all)
		{
      			document.images.SlideShow.filters.blendTrans.Play()
   		}
	}
	ads[n=(ct+1)%src.length] = new Image;
	ads[n].src = "../../common/images/slideshows/" + src[n];
	doText();
	setTimeout("switchAd()",duration*1000);
	}
}

function doLink()
{
	location.href = url[ct];
}

function doText()
{
	if (document.all)
	{
		document.all.Caption.innerHTML = cap[ct];
		document.all._Ath_Img_X.innerHTML = ct + 1;
		document.all._Ath_Img_N.innerHTML = src.length;
	}
} 

function chgImg(direction)
{
	if (document.images) 
	{
		ct = ct + direction;
		if (ct > ImgLength) 
		{
		ct = 0;
		}
		if (ct < 0)
		{
		ct = ImgLength;
		}

		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.SlideShow.src = "../../common/images/slideshows/" + src[ct];
   		if (document.all)
		{
      			document.images.SlideShow.filters.blendTrans.Play()
   		}
		doText();
   	}
}

function auto() 
{
	if (stopped == true)
	{
		stopped = false;
//		window.clearInterval(run);
		switchAd();

	}
	else if (stopped == false)
	{
		stopped = true;
//		run = setInterval("chgImg(1)", duration);

	}
}




