	var curpos = 10;
	var currcanvas = "textlayer1";
	var crossobj=ie4? eval("document.all.textlayer1") : document.getElementById("textlayer1")
	
	var ie4 = document.all&&navigator.userAgent.indexOf("Opera")==-1
	var dom = document.getElementById&&navigator.userAgent.indexOf("Opera")==-1

	var timerID = null
	function showText() {
		changeObjectVisibility("info","hidden");
		changeObjectVisibility("showimagemenu","hidden");
		changeObjectVisibility("imagemenu","hidden");
		tempobj = fCreateObjRef("textlayer1",true);
		if (tempobj.filters) {
			if (tempobj.filters.alpha.opacity > 0) {
				tempobj.filters.alpha.opacity = 0;
			}
		}
		changeObjectVisibility("textlayer1","visible");
		timerID = setInterval("fadeLayer('textlayer1','in')",20);
	}
	
	/*added by fwk 011205*/
	var bTextOn = false;
	function toggleText() {
		if (bTextOn) {
			var sVis = "hidden";
			bTextOn = false;
			var theLayer = fCreateObjRef("caption",false);
			theLayer.visibility = "visible";	
		} else {
			var sVis = "visible";
			bTextOn = true;
			var theLayer = fCreateObjRef("caption",false);
			theLayer.visibility = "hidden";	
		}
		//var aLayers = new Array("textlayer","up","drag","track","down","container","content","title","end");
		//for (i=0; i<aLayers.length; i++) {
		//	var theLayer = fCreateObjRef(aLayers[i],false);
		//	theLayer.visibility = sVis;	
		//}
	}
	
	
	
	var dom = document.getElementById; var ie = document.all;

	function capEv(event,method) {
		this[event] = method;
	};
	function relEv(event) {
		this[event] = null;
	};
	function getYs(e) {
		return ie ? event.clientY : e.pageY;
	}

	function getEl(nm){
		var el = dom ? document.getElementById(nm) : ie ? document.all[nm] : false;
		if (el) {
			el.getTop = function() {return parseInt(el.offsetTop) || 0};
			el.setTop = function(y){ el.style.top = y+"px"};
			el.getHeight = function(){return el.offsetHeight}; 
			el.getClipHeight = function(){return el.offsetHeight};	
			el.capEv = capEv; el.relEv = relEv;	
		}
		return el;
	}

	document.capEv = capEv;
	document.relEv = relEv;
	
	sObj = function(s, tObj, uObj, dObj, dgObj, hObj, cObj) {
		
		this.s = s;
		var self = this;
		this.tObj = getEl(tObj);
		this.uObj = getEl(uObj);
		this.dObj = getEl(dObj);
		this.dgObj = getEl(dgObj);
		this.hObj = getEl(hObj);
		this.cObj = getEl(cObj,hObj);
		this.dH = this.dgObj.getHeight();
		this.tH = this.tObj.getHeight();
		this.obj = cObj+"Object";
		eval(this.obj+"=this");
		this.tT = this.dgObj.getTop();
		this.tL = this.tH-this.dH; this.tB = this.tT+this.tL; this.hH = this.hObj.getClipHeight(); this.cH = this.cObj.getHeight(); this.cL = this.cH-this.hH; this.sL = this.tL/this.cL; this.sT = null;

		this.tObj.capEv("onmousedown", function(e){self.sJmp(e);return false}); this.uObj.capEv("onmousedown", function(){self.scroll(self.s);return false});
	this.uObj.capEv("onmouseup", function(){self.stSc()}); 	this.uObj.capEv("onmouseout", function(){self.stSc()});	this.dObj.capEv("onmousedown", function(){self.scroll(-self.s);return false}); this.dObj.capEv("onmouseup", function(){self.stSc()});
	this.dObj.capEv("onmouseout", function(){self.stSc()}); this.dgObj.capEv("onmousedown", function(e){self.sDg(e);return false});	if(ie) this.dgObj.capEv("ondragstart", function(){return false});
}

sObj.prototype.sDg = function(e){this.dSM = getYs(e); this.dSO = this.dgObj.getTop(); var self = this; document.capEv("onmousemove", function(e){self.drag(e)}); document.capEv("onmouseup", function(){self.stD()});}
sObj.prototype.stD = function(){document.relEv("onmousemove"); document.relEv("onmouseup");}
sObj.prototype.drag = function(e){var curM = getYs(e); var mDiff = curM-this.dSM;var dD = this.dSO+mDiff; var dM = (dD<this.tT) ? this.tT : (dD>this.tB) ? this.tB : dD;this.dgObj.setTop(dM); var cM = -(dM-this.tT)*(1/this.sL);this.cObj.setTop(cM);}
sObj.prototype.scroll = function(s){var cM = this.cObj.getTop()+s; var dM = this.tT-Math.round(this.cObj.getTop()*(this.tL/this.cL));	if(cM > 0)	cM = 0; else if(cM < -this.cL) cM = -this.cL;if(dM < this.tT)	dM = this.tT; else if(dM > this.tB) dM = this.tB;this.cObj.setTop(cM); 	this.dgObj.setTop(dM); 	this.sT = window.setTimeout(this.obj+".scroll("+s+")",25);}
sObj.prototype.stSc = function(){if(this.sT) window.clearTimeout(this.sT); this.sT = null;}
sObj.prototype.sJmp = function(e){	var curM = getYs(e); var dD = curM-(this.dH/2);var dM = (dD<this.tT) ? this.tT : (dD>this.tB) ? this.tB : dD;this.dgObj.setTop(dM); var cM = -(dM-this.tT)*(1/this.sL); this.cObj.setTop(cM);}

window.onload = function(){

//scroller = new sObj(15,"track","up","down","drag","container","content");

};


/*---------------------*/

	
	function hideText(i) {
		timerID = setInterval("fadeLayer('textlayer" + i + "','out')",20);
		var inID = setTimeout('changeObjectVisibility("info","visible")',300);
		var inID2 = setTimeout('changeObjectVisibility("textlayer' + i + '","hidden")',250);
		changeObjectVisibility("showimagemenu","visible");
	}
	function nextText(bOverlay) {
		changeObjectVisibility("textlayer1","hidden");
		changeObjectVisibility("textlayer2","visible");
		tempobj = fCreateObjRef("textlayer2",true);
		if (bOverlay) {
			if (tempobj.filters) {
				if (tempobj.filters.alpha.opacity < 84) {
					tempobj.filters.alpha.opacity = 84;
				}
			}
		}
	}
	function prevText() {
		changeObjectVisibility("textlayer2","hidden");
		changeObjectVisibility("textlayer1","visible");
	}
	function fadeLayer(sLayer,sDir){
		var tempobj = fCreateObjRef(sLayer,true);
		if (tempobj.filters) {
			if (sDir == "in") {
				if (tempobj.filters.alpha.opacity < 84) {
					tempobj.filters.alpha.opacity = tempobj.filters.alpha.opacity + 14;
				} else {
					clearInterval(timerID);
				}
			} else {
				if (tempobj.filters.alpha.opacity > 0) {
					tempobj.filters.alpha.opacity = tempobj.filters.alpha.opacity - 14;
				} else {
					clearInterval(timerID);
				}
			}
		} else if (tempobj.style.MozOpacity) {
			tempobj.style.MozOpacity=10;
		}	
	}
	function showImageMenu() {
		changeObjectVisibility("showimagemenu","hidden");
		tempobj = fCreateObjRef("imagemenu",true);
		if (tempobj.filters) {
			if (tempobj.filters.alpha.opacity > 0) {
				tempobj.filters.alpha.opacity = 0;
			}
		}
		changeObjectVisibility("imagemenu","visible");
		timerID = setInterval("fadeLayer('imagemenu','in')",20);
	}
	function hideImageMenu() {
		timerID = setInterval("fadeLayer('imagemenu','out')",20);
		var inID = setTimeout('changeObjectVisibility("showimagemenu","visible")',300);
		var inID2 = setTimeout('changeObjectVisibility("imagemenu","hidden")',250);
	}
	function showImage() {
		changeObjectVisibility("showimagemenu","hidden");
		tempobj = fCreateObjRef("imagemenu",true);
		if (tempobj.filters) {
			if (tempobj.filters.alpha.opacity > 0) {
				tempobj.filters.alpha.opacity = 0;
			}
		}
		changeObjectVisibility("imagemenu","visible");
		timerID = setInterval("fadeLayer('imagemenu','in')",20);
	}	
	function hideImage() {
		var inID = setTimeout('changeObjectVisibility("showimagemenu","hidden")',300);
		var inID2 = setTimeout('changeObjectVisibility("imagemenu","hidden")',250);
	}
	function showImageMenuOnly() {
		changeObjectVisibility("showimagemenu","visible");
	}	