
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function setLeftPosition(){
centreWidth = (ns4) ? (window.innerWidth)/2 : (document.body.clientWidth)/2 ;
leftPosition = centreWidth - 381;
return leftPosition;
}

function setTopPosition(){
centreHeight = (ns4) ? (window.innerHeight)/2 : (document.body.clientHeight)/2 ;
topPosition = centreHeight - 287;
return topPosition;
}




var sRepeat=null
function doScroller(dir, src, amount) {
	// 3 arguments, dir: scroll "up" or "down", 
	// src is the string id of positioned element
	// amount (optional) is number of pixels to scroll 
	if (window.document.readyState=="loading") alert("Please wait until the page is finished loading.")
	if (amount==null) amount=10
	if (dir=="down") {
		document.all[src].style.pixelTop-=amount
		if (-document.all[src].style.pixelTop>=document.all[src].offsetHeight-document.all[src].offsetParent.offsetHeight)
			document.all[src].style.pixelTop=-document.all[src].offsetHeight+document.all[src].offsetParent.offsetHeight			
	}
	else {
		document.all[src].style.pixelTop+=amount
		if (document.all[src].style.pixelTop>0)
			document.all[src].style.pixelTop = 0
	}
	if (sRepeat==null)
		sRepeat = setInterval("doScroller('" + dir + "','" + src + "'," + amount + ")",100)
	return false
}



function doScrollerHor(dir, src, amount) {
	// 3 arguments, dir: scroll "up" or "down", 
	// src is the string id of positioned element
	// amount (optional) is number of pixels to scroll 
	if (window.document.readyState=="loading") alert("Please wait until the page is finished loading.")
	if (amount==null) amount=10
	if (dir=="left") {
		document.all[src].style.pixelLeft-=amount
		if (document.all[src].style.pixelLeft < -420)
			document.all[src].style.pixelLeft = -420
	}
	else {
		document.all[src].style.pixelLeft+=amount
		if (document.all[src].style.pixelLeft > 0)
			document.all[src].style.pixelLeft = 0
	}
	if (sRepeat==null)
		sRepeat = setInterval("doScrollerHor('" + dir + "','" + src + "'," + amount + ")",100)
	return false
}



window.document.onmouseup = new Function("clearInterval(sRepeat);sRepeat=null")
window.document.ondragstart = new Function("return false")




