// JavaScript Documentvar secs = 1;	var timerID = null;	var timerRunning = false;	var delay = 500;	var theImages = new Array();	var currentImage = -1;	var maxImages = -1;	//var trailimage = [theImages[currentImage], 376, 376];	var trailimage = ["", 376, 376];	var offsetfrommouse = [50,10];	var currentimagewidth = 386;	var currentimageheight = 386;	var firstFlag = false;	var userAgent = "0";	if (document.getElementById || document.all) {		userAgent = navigator.userAgent;		if(userAgent.indexOf("MSIE") > 0) {			userAgent = parseInt(userAgent.substring(userAgent.indexOf("MSIE") + 5, userAgent.indexOf("MSIE") + 8));		} else {			userAgent = "0";		}		if(userAgent == "5" || userAgent == "6") {//			document.write('<div id="trail_image" style="background-color: #b9b9b9; position:absolute;visibility:hidden;left:-386px;top:0px;width:386px;height:386px"><img id="imageid" src="'+trailimage[0]+'" border="0" width="'+trailimage[1]+'px" height="'+trailimage[2]+'px" style="position: absolute; left: 5px; top: 5px;z-index:9999"></div>');			document.write('<div id="trail_image" style="background-color: #b9b9b9; position:absolute;visibility:hidden;left:-386px;top:0px;width:386px;height:386px"><img id="imageid" src="'+trailimage[0]+'" border="0" style="position: absolute; left: 5px; top: 5px;z-index:9999"></div>');			document.write('<div id="trail_video" style="position: absolute; visibility: hidden; left: -391px; top: 0px; width: 391px; height: 227px" style="z-index: 999">');			document.write('</div>');		} else {			document.write('<div id="trail_image" style="background-image: url(images/shadow_med.png); position: absolute; visibility: hidden; left: -386px; top: 0px; width: 386px; height: 386px">');//			document.write('<img id="imageid" src="' + trailimage[0] + '" border="0" width="' + trailimage[1] + 'px" height="' + trailimage[2] + 'px">');			document.write('<img id="imageid" src="' + trailimage[0] + '" border="0" >');			document.write('</div>');						document.write('<div id="trail_video" style="background-image: url(images/video_shadow.png); position: absolute; visibility: hidden; left: -391px; top: 0px; width: 391px; height: 227px">');			document.write('</div>');					}	}		function gettrailobj() {		if (document.getElementById) {			if(theImages.length > 0) {				return document.getElementById("trail_image").style;			} else {				return document.getElementById("trail_video").style;			}		} else if (document.all) {			if(theImages.length > 0) {				return document.all.trail_image.style;			} else {				return document.all.trail_video.style;			}		}	}	function truebody() {		return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;	}	function showtrail(sURLs) {		theImages = sURLs.split(",");		currentImage = -1;		maxImages = theImages.length - 1;		if(maxImages > 4) {			maxImages = 4;		}		for(i = 0; i <= maxImages; i++) {			x = "" + theImages[i];			theImages[i] = new Image(376, 376);			theImages[i].src = x;		}        document.getElementById("imageid").src = theImages[0].src;		document.onmousemove = followmouse;		InitializeTimer();		//gettrailobj().visibility = "visible";	}		function hidetrail(){		gettrailobj().visibility = "hidden";		document.onmousemove = "";        document.getElementById("imageid").src = "images/blank_image.jpg";		StopTheClock();		}	function followmouse(e){		var xcoord=offsetfrommouse[0]		var ycoord=offsetfrommouse[1]			var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15		var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)			//if (document.all){		//	gettrailobjnostyle().innerHTML = 'A = ' + truebody().scrollHeight + '<br>B = ' + truebody().clientHeight;		//} else {		//	gettrailobjnostyle().innerHTML = 'C = ' + document.body.offsetHeight + '<br>D = ' + window.innerHeight;		//}			if (typeof e != "undefined"){			if (docwidth - e.pageX < 380){				xcoord = e.pageX - xcoord - 400; // Move to the left side of the cursor			} else {				xcoord += e.pageX;			}			if (docheight - e.pageY < (currentimageheight + 20)){				ycoord += e.pageY - Math.max(0,(20 + currentimageheight + e.pageY - docheight - truebody().scrollTop));			} else {				ycoord += e.pageY;			}			} else if (typeof window.event != "undefined"){			if (docwidth - event.clientX < 380){				xcoord = event.clientX + truebody().scrollLeft - xcoord - 400; // Move to the left side of the cursor			} else {				xcoord += truebody().scrollLeft+event.clientX			}			if (docheight - event.clientY < (currentimageheight + 20)){				ycoord += event.clientY + truebody().scrollTop - Math.max(0,(20 + currentimageheight + event.clientY - docheight));			} else {				ycoord += truebody().scrollTop + event.clientY;			}		}			var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15		var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)			if(ycoord < 0) { ycoord = ycoord*-1; }		gettrailobj().left=xcoord+"px"		gettrailobj().top=ycoord+"px"/*		var xcoord=offsetfrommouse[0]		var ycoord=offsetfrommouse[1]		if (typeof e != "undefined") {			xcoord+=e.pageX			ycoord+=e.pageY		} else if (typeof window.event !="undefined") {			xcoord+=truebody().scrollLeft+event.clientX			ycoord+=truebody().scrollTop+event.clientY		}		var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15		var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)		if (xcoord+trailimage[1]+3>docwidth || ycoord+trailimage[2]> docheight) {			gettrailobj().display="none"		} else {			gettrailobj().display=""			gettrailobj().left=xcoord+"px"			gettrailobj().top=ycoord+"px"		}*/	}		function InitializeTimer() {	    StopTheClock();	    StartTheTimer();	}		function StopTheClock() {	    if(timerRunning) {	        clearTimeout(timerID);		}    	timerRunning = false;	}		function StartTheTimer() {	    if (secs == 0) {	    	if(timerRunning == false){	    		firstFlag = true;	    	}	        StopTheClock();	        currentImage++;	        if(currentImage > maxImages) {	        	currentImage = 0;	        }	        //document.getElementById("imageid").src = "/images/" + theImages[currentImage];	        document.getElementById("imageid").src = theImages[currentImage].src;			gettrailobj().visibility = "visible";						if(firstFlag) {				secs = 2;			} else {				secs = 1.5;			}	        StartTheTimer();	    } else {	        self.status = secs;	        secs = secs - 0.5;	        timerRunning = true;	        timerID = self.setTimeout("StartTheTimer()", delay);	    }	}