var aPath = "http://www.ngochue.com/"
var aImages = new Array(
			aPath+"images/conten8_248x357.jpg",
			aPath+"images/conten7_248x357.jpg",
			aPath+"images/conten6_248x357.jpg",
			aPath+"images/conten5_248x357.jpg",
			aPath+"images/conten4_248x357.jpg"
			)
var aSize = new Array(248,357)
var iDisplay =3000
var oTimer = null
var iCurrent = 0
var sSource = ""

function doDisplay() {
	clearTimeout(oTimer)
	if (sSource!="") {
		if (document.images.slideShow.filters) {
			document.images.slideShow.filters[0].Stop()
			document.images.slideShow.filters[0].Apply()
			document.images.slideShow.filters.revealTrans.transition=23
		}
		document.images.slideShow.src = sSource
		if (document.images.slideShow.filters)
			document.images.slideShow.filters[0].Play()
	}

}

function doReadyImage() {
	sSource = this.src
	if (oTimer==null) doDisplay()
}

function doErrorDisplay() {
	clearTimeout(oTimer)
	doLoad()
}

function doLoad() {
	clearTimeout(oTimer)
	var img = new Image()
	img.onload = doReadyImage
	img.onerror = doErrorDisplay 
	sSource = ""
	iCurrent++
	if (iCurrent==aImages.length) iCurrent=0
	oTimer = setTimeout("oTimer=null;doDisplay()",iDisplay)
	img.src = aImages[iCurrent]
}

function quickNextLoad() {
	clearTimeout(oTimer)
	oTimer=null
	var img = new Image()
	img.onload = doReadyImage
	img.onerror = doErrorDisplay 	
	img.src = aImages[iCurrent]
}

function quickPrevLoad() {
	clearTimeout(oTimer)
	oTimer=null
	var img = new Image()
	img.onload = doReadyImage
	img.onerror = doErrorDisplay 
	iCurrent-=1
	if (iCurrent<0) iCurrent=aImages.length-1
	iCurrent-=1
	if (iCurrent<0) iCurrent=aImages.length-1
	img.src = aImages[iCurrent]
}

document.write("<IMG NAME='slideShow' class='border' SRC='" + aImages[iCurrent] + "' ONERROR='doLoad()' ONLOAD='doLoad()' WIDTH='" + aSize[0] + "' HEIGHT='" + aSize[1] + "' STYLE='filter: revealTrans(TRANSITION=23)'>")
