images=new Array()
images[images.length]=new Array("Files/2008tournament/DSC_0001.JPG","","")
spause = 8 // seconds
fadeSpeed = 7

nextPic=2
minValue=0
maxValue=100
sv1=maxValue
sv2=minValue
lnkIndex=0
imgTxt=images[lnkIndex][2]

smoz=document.getElementById&&!document.all

document.write('<img id="opic2" src=" '+images[1][0]+' " alt="" style="position:absolute;left:0px;top:0px;-moz-opacity:0;filter:alpha(opacity=0);z-index:2;background-color:#FFFFFF">') 

function initFader(){
	elOpic=document.getElementById("opic")

	cellLeftPos = elOpic.offsetLeft
	cellTopPos = elOpic.offsetTop
	parentEl = elOpic.offsetParent

	while (parentEl != null){
		if(parentEl.tagName == "TD"){ // if parent a table cell, include cell border width
			if(!smoz){
				cellLeftPos += parentEl.clientLeft
				cellTopPos += parentEl.clientTop
			}
			else{
				if(parentEl.tagName == "TABLE"){ // if parent is a table, get its border as a number
					nParBorder = parseInt(parentEl.border)
				if(nParBorder > 0){ // if a border width is specified
					nLeftPos += nParBorder // append the border width to counter
			}
		}
	}
}

cellLeftPos += parentEl.offsetLeft // add left offset of parent
cellTopPos += parentEl.offsetTop // add top offset of parent
parentEl = parentEl.offsetParent; // move up the elements until no more offset parents exist
}

//return "X pos = "+cellLeftPos+"<P>Y pos ="+cellTopPos // return totals

elOpic2=document.getElementById("opic2")
elOpic2.style.left=cellLeftPos
elOpic2.style.top=cellTopPos
elOpic2.style.width=elOpic.offsetWidth
elOpic2.style.height=elOpic.offsetHeight
lnkLoc=images[lnkIndex][1]
//document.getElementById("txt").innerHTML=imgTxt
setTimeout("fadeImg()",spause*1000)
}

function fadeImg(){
sv1 -= fadeSpeed
sv2 += fadeSpeed
t=setTimeout("fadeImg()",50)

if(!smoz){elOpic.filters.alpha.opacity=sv1}
else{elOpic.style.MozOpacity=(sv1/100)-0.001}

if(sv1<=minValue){
elOpic.src=images[nextPic][0]
nextPic++
lnkIndex++
pauseFader()
}

if(!smoz){elOpic2.filters.alpha.opacity=sv2}
else{elOpic2.style.MozOpacity=(sv2/100)-0.001
}

if(sv2<=minValue){
elOpic2.src=images[nextPic][0]
nextPic++
lnkIndex++
pauseFader()
}

if(nextPic==images.length){nextPic=0}
if(lnkIndex==images.length){lnkIndex=0}

if(sv1>=maxValue||sv1<=minValue){fadeSpeed= -fadeSpeed}

elOpic.style.zIndex=(sv1>maxValue/2?3:2)
elOpic2.style.zIndex=(sv1>maxValue/2?2:3)

//if(sv1>maxValue/2||sv2>maxValue/2){
//lnkLoc=images[lnkIndex][1]
//imgTxt=images[lnkIndex][2]
//}

//if(imgTxt!=""){document.getElementById("txt").innerHTML=imgTxt}
//else{document.getElementById("txt").innerHTML=" "}

}

function pauseFader(){
clearTimeout(t)
setTimeout("fadeImg()",spause*1000)
}

/*
function goLink(){
if(lnkLoc.indexOf(".htm")!=-1){ // if a document
//location=lnkLoc
newWin=window.open(lnkLoc,'lnk_win','left=300,top=300,width=400,height=400')
newWin.focus()
}

}

function mouseoverTxt(id){
document.getElementById(id).alt=lnkLoc+" "+imgTxt
}
*/