//MOUSETRAILER

    var x,y
    var step=20
    var flag=0

    // Your snappy message. Important: the space at the end of the sentence!!!
    var message="Called In Sick! "
    message=message.split("")

    var xpos=new Array()
    for (i=0;i<message.length;i++) {
	xpos[i]=-50
    }

    var ypos=new Array()
    for (i=0;i<message.length;i++) {
	ypos[i]=-50
    }

    function handlerMM(e){
	x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
	y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
	flag=1
    }

    function makesnake() {
	if (flag==1 && document.all) {
    	for (i=message.length; i > 0; i--) {
   			xpos[i]=xpos[i-1]+step
			ypos[i]=ypos[i-1]
    	}
		xpos[0]=x+step
		ypos[0]=y
	
		for (i=0; i<message.length; i++) {
    		var thisspan = eval("span"+(i)+".style")
    		thisspan.posLeft=xpos[i]
			thisspan.posTop=ypos[i]
        }
    	    }
	
	    else if (flag==1 && document.layers) {
        	for (i=message.length-1; i>0; i--) {
   			xpos[i]=xpos[i-1]+step
			ypos[i]=ypos[i-1]
    	    }
		xpos[0]=x+step
		ypos[0]=y
	
		for (i=0; i<message.length; i++) {
    		var thisspan = eval("document.span"+i)
    		thisspan.left=xpos[i]
			thisspan.top=ypos[i]
        	}
        	}
	    	var timer=setTimeout("makesnake()",1)
    }

//SLIDESHOW
//	var Slides = new Array('photos/10.jpg','photos/11.jpg','photos/12.jpg','photos/13.jpg','photos/14.jpg','photos/15.jpg','photos/16.jpg','photos/17.jpg','photos/18.jpg','photos/19.jpg','photos/32.jpg','photos/33.jpg','photos/34.jpg','photos/35.jpg','photos/36.jpg','photos/37.jpg','photos/38.jpg','photos/39.jpg','photos/40.jpg','photos/november.jpg');
//  var PCaption = new Array('Thanks rvrbndr','New Chics meet the Chickens','Dinner Party','Spring is here','Happy Easter!','Float Trip','Buck','Thanks Dave and Scott!','GT`s 21st BDay at Fast Eddies','Mississippi River at New Orleans','Just Chat`n','Final Touches','Time to Eat','Just Play`n','She does exist!','Mid-Winter Party','Game Room','Dawgs','Kids!','Boating!');


	// DO NOT EDIT BELOW THIS LINE!
	//function CacheImage(ImageSource) { // TURNS THE STRING INTO AN IMAGE OBJECT
	//   var ImageObject = new Image();
	//   ImageObject.src = ImageSource;
	//   return ImageObject;
//	}

//	function ShowSlide(Direction) {
//   if (SlideReady) {
//	      NextSlide = CurrentSlide + Direction;
	      // THIS WILL DISABLE THE BUTTONS (IE-ONLY)
//	      document.SlideShow.Previous.disabled = (NextSlide == 0);
//	      document.SlideShow.Next.disabled = (NextSlide == 
//		(Slides.length-1));  
	
//	if ((NextSlide >= 0) && (NextSlide < Slides.length)) {
 //       	    document.images['Screen'].src = Slides[NextSlide].src;
//	            CurrentSlide = NextSlide++;
//        	    Message = 'Picture ' + (CurrentSlide+1) + ' of ' + 
//		Slides.length;
 //       	    self.defaultStatus = Message;
 //                   document.SlideShow.button1.value = PCaption[CurrentSlide];
//	            if (Direction == 1) CacheNextSlide();
//	      }
//
//	      return true;
//       }
           
//	}
//	function Download() {
//	   if (Slides[NextSlide].complete) {
//	      SlideReady = true;
//	      self.defaultStatus = Message;
//	   }
//	   else setTimeout("Download()", 100); // CHECKS DOWNLOAD STATUS EVERY 100 MS
//	   return true;
//	}

//	function CacheNextSlide() {
//	   if ((NextSlide < Slides.length) && (typeof Slides[NextSlide] == 
//		'string'))
//	{ // ONLY CACHES THE IMAGES ONCE
//	      SlideReady = false;
//	      self.defaultStatus = 'Downloading next picture...';
//	      Slides[NextSlide] = CacheImage(Slides[NextSlide]);
//	      Download();
//	   }
//	   return true;
//	}

	//function StartSlideShow() {
	   //CurrentSlide = -1;
	   //Slides[0] = CacheImage(Slides[0]);
	   //SlideReady = true;
	   //ShowSlide(1);
	   //document.images['Screen'].src = 'photos/10.jpg'
	//}
	
	
	
//**********************************************************
//For the scrolling Thumbnails




var restarea=6;
var maxspeed=2;
var maxwidth=1000;
var startpos=0;
var endofgallerymsg='<span style="font-size: 11px;">End of Gallery</span>';

function enlargeimage(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
var actualWidth=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
var actualHeight=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to  default height
var winattributes="width="+actualWidth+",height="+actualHeight+",resizable=yes"
document.images['Screen'].src = path;
}

////NO NEED TO EDIT BELOW THIS LINE////////////

var iedom=document.all||document.getElementById, scrollspeed=0, movestate='', actualwidth='', cross_scroll, ns_scroll, statusdiv, loadedyes=0, lefttime, righttime;

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function creatediv(){
statusdiv=document.createElement("div")
statusdiv.setAttribute("id","statusdiv")
document.body.appendChild(statusdiv)
statusdiv=document.getElementById("statusdiv")
statusdiv.innerHTML=endofgallerymsg
}

function positiondiv(){
var mainobjoffset=getposOffset(crossmain, "left"),
menuheight=parseInt(crossmain.offsetHeight),
mainobjoffsetH=getposOffset(crossmain, "top");
statusdiv.style.left=mainobjoffset+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px";
statusdiv.style.top=menuheight+mainobjoffsetH+"px";
}

function showhidediv(what){
if (endofgallerymsg!="") {
positiondiv();
statusdiv.style.visibility=what;
}
}

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft: what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function moveleft(){
if (loadedyes){
movestate="left";
if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){
cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px";
showhidediv("hidden");
}
else
showhidediv("visible");
}
lefttime=setTimeout("moveleft()",10);
}

function moveright(){
if (loadedyes){
movestate="right";
if (iedom&&parseInt(cross_scroll.style.left)<0){
cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px";
showhidediv("hidden");
}
else
showhidediv("visible");
}
righttime=setTimeout("moveright()",10);
}

function motionengine(e){
var mainobjoffset=getposOffset(crossmain, "left"),
dsocx=(window.pageXOffset)? pageXOffset: ietruebody().scrollLeft,
dsocy=(window.pageYOffset)? pageYOffset : ietruebody().scrollTop,
curposy=window.event? event.clientX : e.clientX? e.clientX: "";
curposy-=mainobjoffset-dsocx;
var leftbound=(menuwidth-restarea)/2;
var rightbound=(menuwidth+restarea)/2;
if (curposy>rightbound){
scrollspeed=(curposy-rightbound)/((menuwidth-restarea)/2) * maxspeed;
clearTimeout(righttime);
if (movestate!="left") moveleft();
}
else if (curposy<leftbound){
scrollspeed=(leftbound-curposy)/((menuwidth-restarea)/2) * maxspeed;
clearTimeout(lefttime);
if (movestate!="right") moveright();
}
else
scrollspeed=0;
}

function contains_ns6(a, b) {
if (b!==null)
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function stopmotion(e){
if (!window.opera||(window.opera&&e.relatedTarget!==null))
if ((window.event&&!crossmain.contains(event.toElement)) || (e && e.currentTarget && e.currentTarget!= e.relatedTarget && !contains_ns6(e.currentTarget, e.relatedTarget))){
clearTimeout(lefttime);
clearTimeout(righttime);
movestate="";
}
}

function fillup(){
if (iedom){
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
if(typeof crossmain.style.maxWidth!=='undefined')
crossmain.style.maxWidth=maxwidth+'px';
menuwidth=crossmain.offsetWidth;
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery;
actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
if (startpos)
cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
crossmain.onmousemove=function(e){
motionengine(e);
}

crossmain.onmouseout=function(e){
stopmotion(e);
showhidediv("hidden");
}
}
loadedyes=1
if (endofgallerymsg!=""){
creatediv();
positiondiv();
}
if (document.body.filters)
onresize()
}
window.onload=fillup;

onresize=function(){
if (typeof motioncontainer!=='undefined'&&motioncontainer.filters){
motioncontainer.style.width="0";
motioncontainer.style.width="";
motioncontainer.style.width=Math.min(motioncontainer.offsetWidth, maxwidth)+'px';
}
menuwidth=crossmain.offsetWidth;
cross_scroll.style.left=startpos? (menuwidth-actualwidth)/startpos+'px' : 0;
}
