var inmenu=false;    
var lastmenu=0;  


var loop = 0;
var loop1 = 0;
var imgCt = 5;
var globes = 0;
var jaws = 0;

firstTime = true;
firstTime1 = true;
firstTime2 = true;
firstTime3 = true;
firstTime4 = true;
firstTime5 = true;
firstTime6= true;

var imgCt1 = 3; 
var imgCt2 = 3;
var imgCt3 = 6;
var spiders = 0;
var spiders1 = 0;
var globePics = "" 
var spiderPics =""
var sharkPics = ""
var spiderPics1 =""
var spideryvalue1 = 136;
var spideryvalue = 136;
var nextStep = 0;
var nextStep1 = 0;
var nextStep2 = -340;
var nextStep3 = 0;


var yoffsetl = 0;
var xoffsetr = 0;
var xoffsetl = 0;
var yoffsetr = 0;
var x = 0;
var y = 0;
var tempX = 0;
var tempY = 0;

dayName = new Array ("Sun","Mon","Tues","Wed","Thurs","Fri","Sat")
monName = new Array ("Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec")

var IE = (navigator.appName == "Microsoft Internet Explorer")?true:false;   
//var IE = (navigator.appName == "Windows Internet Explorer")?true:false;  

function init() {
	spinglobe();
	web();
	slide();
//  sharks1();
    showTheTime();
	working2gether();
//    Navigation1();
//	Navigation2();
//	Navigation3();
//	Navigation4();
//	Navigation5();
//	Navigation6();
 }

function init1() {
	spinglobe();
	web();
	slide();
    sharks1();
    showTheTime();
	working2gether();
//    Navigation1();
//	Navigation2();
//	Navigation3();
//	Navigation4();
//	Navigation5();
//	Navigation6();
 }
 
	function showTheHours(theHour) {
		if (theHour > 0 && theHour < 13) 
		{
			return (theHour)
		}
		if (theHour == 0) {
			return (12)
		}
		return (theHour-12)
	}

	function showZeroFilled(inValue) {
		if (inValue > 9) {
			return ":" + inValue
		}
		return ":0" + inValue
	}

	function showAmPm() {
		if (now.getHours() < 12) {
			return (" am")
		}
		return (" pm")
	}

	function showTheTime() {
		now = new Date
		document.timeForm.showTime.value = dayName[now.getDay()] +"  " + monName[now.getMonth()] + " " + now.getDate() + ", " + now.getFullYear() + "   " + showTheHours(now.getHours()) +  showZeroFilled(now.getMinutes()) + showZeroFilled(now.getSeconds()) + showAmPm()
		setTimeout("showTheTime()",1000)
	}

document.onmousemove=getMouseXY

 function getMouseXY(e){	 
	 if (IE) {
        x = event.clientX + document.body.scrollLeft
		y = event.clientY + document.body.scrollTop
		
}
         else {
			
			x=e.pageX
			y=e.pageY
	//		window.status=( x +" : " + y)
		 }

//document.title = "(" + x +"," + y + ")"
	
	if (x <= 300) {xoffset = -12} else
	if (x>300 && x<400) {xoffsetl = -12} else
	if (x>400 && x<500) {xoffsetl = -9} else
	if (x>500 && x<600) {xoffsetl = -6} else
	if (x>600 && x<750) {xoffsetl = -3} else
	if (x>750 && x<760) {xoffsetl = 0} else
	if (x>760 && x<800) {xoffsetl = 3} else
	if (x>800 && x<1000) {xoffsetl = 6} else
	if (x>1000 && x<1100) {xoffsetl = 9} else
	if (x>1100 && x<1400) {xoffsetl = 12} else
	{xoffsetl = 12}                                
	if (y <= 40) {yoffsetl = -11} else 
	if (y>40 && y<60) {yoffsetl = -11} else 
	if (y>60 && y<80) {yoffsetl = -8} else 
	if (y>80 && y<100) {yoffsetl = -5} else 
	if (y>100 && y<120) {yoffsetl = -2} else 
	if (y>120 && y<140) {yoffsetl = 0} else 
	if (y>140 && y<280) {yoffsetl = 2} else 
	if (y>280 && y<380) {yoffsetl = 5} else 
	if (y>380 && y<480) {yoffsetl = 8} else 
	if (y>480 && y<580) {yoffsetl = 11} else 
	if (y>580 && y<680) {yoffsetl = 14} else 
	{yoffsetl = 14}
	
	document.getElementById("eyeleft").style.left = (560 + xoffsetl) + "px"
	document.getElementById("eyeleft").style.top = (83 + yoffsetl) + "px"


	if (x <= 300) {xoffsetr = -12} else
	if (x>300 && x<400) {xoffsetr = -12} else
	if (x>400 && x<500) {xoffsetr = -9} else
	if (x>500 && x<600) {xoffsetr = -6} else
	if (x>600 && x<800) {xoffsetr = -3} else
	if (x>800 && x<900) {xoffsetr = 0} else
	if (x>900 && x<1000) {xoffsetr = 3} else
	if (x>1000 && x<1100) {xoffsetr = 6} else
	if (x>1100 && x<1200) {xoffsetr = 9} else
	if (x>1200 && x<1300) {xoffsetr = 12} else
	{xoffsetr = 12}
	if (y <= 40) {yoffsetl = -11} else 
	if (y>40 && y<60) {yoffsetr = -11} else 
	if (y>60 && y<80) {yoffsetr = -8} else 
	if (y>80 && y<100) {yoffsetr = -5} else 
	if (y>100 && y<120) {yoffsetr = -2} else 
	if (y>120 && y<140) {yoffsetr = 0} else 
	if (y>140 && y<280) {yoffsetr = 2} else 
	if (y>280 && y<380) {yoffsetr = 5} else 
	if (y>380 && y<480) {yoffsetr = 8} else 
	if (y>480 && y<580) {yoffsetr = 11} else 
	if (y>580 && y<680) {yoffsetr = 14} else 
	{yoffsetr = 14}
	
	document.getElementById("eyeright").style.left = (638 + xoffsetr) + "px"
	document.getElementById("eyeright").style.top = (83 + yoffsetr) + "px"
	
	return true
	
	}



function spinglobe() {
		
		globePics= new Array ("/sourceimages/blueglobe2aa.gif",
			                    "/sourceimages/blueglobe1aa.gif",
								"/sourceimages/blueglobe3aa.gif",
		                        "/sourceimages/blueglobe4aa.gif",
		                        "/sourceimages/blueglobe5aa.gif")
							   imgCt = globePics.length;
			
			if (firstTime) {firstTime = false}
			     document.spinner.src = globePics[globes] 
				 if (globes == 4) {globes=0} else {globes++}
							
				setTimeout("spinglobe()",  200)
				if (loop == 120) {document.spinner.src = globePics[1]} else {loop++}
				
		}

	
	
function web(www) {
	theElem = document.getElementById("www")

	        if (firstTime1) {
				nextStep = -260
				firstTime1 = false
			}		
			
			if (nextStep <= 58) {
				nextStep = nextStep +4}
				else {nextStep = 60
				}
				
				theElem.style.left = (nextStep + "px")
				
		      setTimeout("web()", 70)
        }
        
	function working2gether() {
	theElem2 = document.getElementById("working2gether")

	        if (firstTime4) {
				 (theElem2.style.visibility="hidden")  
				firstTime4 = false
			}		
			
			if (nextStep2 > 360) {
			(theElem2.style.visibility="visible") 
			nothing = 5
			}
			
			if (nextStep2 <= 540) {
				nextStep2 = nextStep2 +4}
				else {nextStep2 = 542
				}
				
				theElem2.style.left = (nextStep2 + "px")
				
		      setTimeout("working2gether()", 70)
        }
	
	
	function slide() {
		theElem1 = document.getElementById("mover")
	    theElem3 = document.getElementById("mover1")
		
		spiderPics= new Array ("/spiderpics/cutout10.gif",
			                    "/spiderpics/cutout20.gif",
								"/spiderpics/cutout30.gif")                
							    imgCt1 = spiderPics.length;
								
		  spiderPics1= new Array ("/spiderpics/cutout10up.gif",
			                    "/spiderpics/cutout20up.gif",
								"/spiderpics/cutout30up.gif")                
							    imgCt2 = spiderPics1.length;					
						
						
							   
			if (firstTime2) {	  
				nextStep1 = -176 
				
				firstTime2 = false
			}
			
			    nextStep1 = nextStep1 + 4
				
				 theElem1.style.left = (nextStep1 + "px")
				 theElem1.src  = spiderPics[spiders]
				 if (spiders == 2) {spiders = 0} else {spiders ++}	
				 
				 if (nextStep1 < 400) {
					theElem1.style.top = (spideryvalue) + "px" }
					else { theElem1.style.top = (spideryvalue + 16) + "px"
					}
			
				 if (nextStep1 < 750) {
				 (theElem1.style.visibility="visible") } 
			         else { (theElem1.style.visibility="hidden") 
			  
				   spideryvalue1 = (spideryvalue1 - 3)
		           theElem3.style.top = (spideryvalue1 + "px")
					theElem3.src  = spiderPics1[spiders1]
					if (spiders1 == 2) {spiders1 = 0} else {spiders1 ++}	
	       }
					if (nextStep1 < 1220) 
				{ setTimeout("slide()",  70) }	
			
			
	} 



function sharks1() {
		
		sharkPics= new Array ("/bahama pics/images/shark1.jpg",
							  "/bahama pics/images/shark2.jpg",
							  "/bahama pics/images/shark3.jpg",
							  "/bahama pics/images/shark4.jpg",
							  "/bahama pics/images/shark5.jpg",
							  "/bahama pics/images/shark6.jpg",
							  "/bahama pics/images/shark7.jpg")
							   imgCt3 = sharkPics.length;
			 if (jaws == 6) {jaws = 0} else {jaws++}
			 document.shark.src = sharkPics[jaws]
				 setTimeout("sharks1()",  100)
				if (loop1 == 6) {document.shark.src = sharkPics[6]} else {loop1++}				
		}


	function Navigation1() { 
	   theElem = document.getElementById("Navigation1")
	   theElem.style.visibility = "hidden"
        }     

	function showNavigation1() {
		theElem = document.getElementById("Navigation1")
		theElem.style.visibility = "visible" 
	   }
	
	function hideNavigation1() {
		theElem = document.getElementById("Navigation1")
		theElem.style.visibility = "hidden" 
	   }
	
		
	function Navigation2() {
	   theElem = document.getElementById("Navigation2")
	   theElem.style.visibility = "hidden"     
        }
		
	function showNavigation2() {	
	   theElem = document.getElementById("Navigation2")
	   theElem.style.visibility = "visible"   
	}
	
	function hideNavigation2() {
		theElem = document.getElementById("Navigation2")
		theElem.style.visibility = "hidden"
	}
	
		
	function Navigation3() {
	   theElem = document.getElementById("Navigation3")
	   theElem.style.visibility = "hidden"     
        }
		
	function showNavigation3() {	
	   theElem = document.getElementById("Navigation3")
	   theElem.style.visibility = "visible"   
	}
	
	function hideNavigation3() {
		theElem = document.getElementById("Navigation3")
		theElem.style.visibility = "hidden"
	}
	
		
	function Navigation4() {
	   theElem = document.getElementById("Navigation4")
	   theElem.style.visibility = "hidden"     
        }
		
	function showNavigation4() {	
	   theElem = document.getElementById("Navigation4")
	   theElem.style.visibility = "visible"		   
	}
	
	function hideNavigation4() {
		theElem = document.getElementById("Navigation4")
		theElem.style.visibility = "hidden"
	}
	
	
	function Navigation5() {
	   theElem = document.getElementById("Navigation5")
	   theElem.style.visibility = "hidden"     
        }
		
	function showNavigation5() {	
	   theElem = document.getElementById("Navigation5")
	   theElem.style.visibility = "visible"   
	}
	
	function hideNavigation5() {
		theElem = document.getElementById("Navigation5")
		theElem.style.visibility = "hidden"
	}
	
		
	function Navigation6() {
	   theElem = document.getElementById("Navigation6")
	   theElem.style.visibility = "hidden"     
        }
		
	function showNavigation6() {	
	   theElem = document.getElementById("Navigation6")
	   theElem.style.visibility = "visible"   
	}
	
	function hideNavigation6() {
		theElem = document.getElementById("Navigation6")
		theElem.style.visibility = "hidden"
	}

