var ARPicLinks=new Array("top/1.jpg","top/2.jpg","top/3.jpg","top/4.jpg","top/5.jpg","top/6.jpg","top/7.jpg","top/8.jpg");

//type of link you want to make pictures (1 for web, 2 for email)
var ARtpye=new Array(1,1,1,1,1,1,1,1);

//location for link to go... web page or email address... **DO NOT** include http:// or mailto:
var ARLinks=new Array("www.azarrasa.com","www.azarrasa.com","www.azarrasa.com","www.azarrasa.com","www.azarrasa.com","www.azarrasa.com","www.azarrasa.com","www.azarrasa.com");

//does the fading
function applyFade(){
	if (document.all) {
		PicFade.style.filter="blendTrans(duration=2)";
		PicFade.style.filter="blendTrans(duration=CrossFadeDuration)";
		PicFade.filters.blendTrans.Apply();
	}
}

var arPos=0;          //where to start in array
var DelayTime = 5000; //milliseconds between flips

//flips through the pictures from first to last *Default*
function FadeForward( ){
	if(arPos<ARPicLinks.length-1) {	arPos++; }
	else { arPos=0; }
	
	applyFade();
	document.images.PicFade.src=ARPicLinks[arPos];
	if(document.all) { PicFade.filters.blendTrans.Play(); }
	window.setTimeout('FadeForward()',DelayTime);
}

//flips through the pictures from last to first -- change statement at bottom to use
function FadeBackward(){
	if(arPos>0) {	arPos--; }
	else  { arPos=ARPicLinks.length-1; }
	
	applyFade();
	document.images.PicFade.src=ARPicLinks[arPos];
	if(document.all) { PicFade.filters.blendTrans.Play(); }
	window.setTimeout('FadeBackward()',DelayTime);
}


//makes either a web link or email link for picture
function dolink( )
{	
	linktype=ARtpye[arPos];
	value=ARLinks[arPos];
	if(linktype==1)   {
		l="http://"+value
		window.open(l,"detailview");
		return;
  }	
	if(linktype==2)	{
		l="mailto:"+value
		window.open(l,"detailview");
		return;
	}
}

window.setTimeout('FadeForward()',DelayTime);

