<!--

	// DEFINITION OF ARRAYS FOR PAGE LINKS
	//
	// KEEP ORDER THE SAME IN ALL
	// IF PAGE/LINK DOES NOT EXIST FOR GIVEN AREA, PUT A "#" IN THE SPOT
	// PARAMETER NAMED passingNum CALLED IN THE doShow FUNCTIONS TARGET BASED ON THIS
	//
	// 0 - HOME
	// 1 - ABOUT US
	// 2 - KONA COFFEE 		
	// 3 - STORE              		
	// 4 - CONTACT US		
	// 5 - #       		
	// 6 - #         	
	// 7 - #
	// 8 - #
	 
	var a_array = new Array (
		"#", //dummy
		"#",
		"http://www.bongbrothers.com/aboutus.html#BBHistory",
		"http://www.bongbrothers.com/konacoffee.html#KonaHistory",
		"http://www.bongbrothers.com/coffee.htm",
		"http://www.bongbrothers.com/contactus.html",
		"#",
		"#",
		"#"
	);
	var b_array = new Array (
		"#", //dummy
		"#",
		"http://www.bongbrothers.com/aboutus.html#BBTour",
		"http://www.bongbrothers.com/konacoffee.html#KonaFAQ",
		"http://www.bongbrothers.com/logowear.html",
		"http://www.bongbrothers.com/contactus.html",
		"#",
		"#",
		"#"
	);
	var c_array = new Array (
		"#", //dummy
		"#",
		"#",
		"#",
		"http://www.bongbrothers.com/choc.html",
		"http://www.bongbrothers.com/contactus.html",
		"#",				
		"#",
		"#"
	);
	var d_array = new Array (
		"#", //dummy
		"#",
		"#",
		"#",
		"http://www.bongbrothers.com/more.html",
		"#",
		"#",
		"#",
		"#"
	);
	var e_array = new Array (
		"#", //dummy
		"#",
		"#",
		"#",
		"http://www.bongbrothers.com/policies.html",
		"#",
		"#",
		"#",
		"#"
	);
	var f_array = new Array (
		"#", //dummy
		"#",
		"#",
		"#",
		"#",
		"#",
		"#",
		"#",
		"#"
	);

	// GLOBAL VARIABLES
	//
	// TIMER IS FOR THE SET & CLEAR TIMEOUT FUNCTIONS
	var timerID0;
	var timerID1;
	var timerID2;
	var timerID3;
	var timerID4;
	var timerID5;

	// THESE VARIABLES PASS THE CORRECT ARRAYS + PARAMETER WHICH CONTAIN PAGE LINKS
	var location0;
	var location1;
	var location2;
	var location3;
	var location4;
	var location5;

	// LOAD TEST
	var loaded = 0;

function loadImages() {

	// DEFINITION OF ROLLOVER IMAGES
	if (document.images) {

				
	            img1on = new Image();          
	            img1on.src = "images/home.off.gif";

	            img2on = new Image();          
	            img2on.src = "images/aboutus.on.gif";       

	            img3on = new Image(); 
	            img3on.src = "images/konacoffee.on.gif"; 
	            
	            img4on = new Image();          
	            img4on.src = "images/store.on.gif";

	            img5on = new Image();          
	            img5on.src = "images/contactus.on.gif";       

	            img6on = new Image(); 
	            img6on.src = "files/spacer.FFFFFF.gif"; 			
	            
	            img7on = new Image();          
	            img7on.src = "files/spacer.FFFFFF.gif";

	            img8on = new Image();          
	            img8on.src = "files/spacer.FFFFFF.gif";



	            img1off = new Image();         
	            img1off.src = "images/home.on.gif";

	            img2off = new Image();         
	            img2off.src = "images/aboutus.off.gif";     

	            img3off = new Image(); 
	            img3off.src = "images/konacoffee.off.gif"; 

	            img4off = new Image();         
	            img4off.src = "images/store.off.gif";

	            img5off = new Image();         
	            img5off.src = "images/contactus.off.gif";    

	            img6off = new Image(); 
	            img6off.src = "files/spacer.FFFFFF.gif"; 			
	            
	            img7off = new Image();         
	            img7off.src = "files/spacer.FFFFFF.gif";

	            img8off = new Image();          
	            img8off.src = "files/spacer.FFFFFF.gif";




				sub0img = new Image();          
	            sub0img.src = "files/blank.img.gif";

	            sub1img = new Image();
	            sub1img.src = "images/aboutus.img.gif";       

	            sub2img = new Image(); 
	            sub2img.src = "images/konacoffee.img.gif"; 
	            
	            sub3img = new Image();          
	            sub3img.src = "images/store.img.gif";

	            sub4img = new Image();
	            sub4img.src = "images/contactus.img.gif"; 
	            
	            sub5img = new Image();
	            sub5img.src = "images/contactus.img.gif";

		    sub6img = new Image();
	            sub6img.src = "files/blank.img.gif";

	            sub7img = new Image();
	            sub7img.src = "files/blank.img.gif";   
	            
	            sub8img = new Image();
	            sub8img.src = "files/blank.img.gif";

	            tour = new Image();          
	            tour.src = "images/btour.gif";

	            faq = new Image(); 
	            faq.src = "images/bfaq.gif"; 
	            
	            storehome = new Image();          
	            storehome.src = "images/bstorehome.gif";

	            konacoffee = new Image(); 
	            konacoffee.src = "images/bkonacoffee.gif"; 
	            
	            chocolate = new Image();          
	            chocolate.src = "images/bchocolate.gif";
	            
	            logowear = new Image();          
	            logowear.src = "images/blogowear.gif";
	            
	            misc = new Image();          
	            misc.src = "images/bmisc.gif";
	            
	            policies = new Image();          
	            policies.src = "images/bpolicies.gif";
	            
	            feedback = new Image();          
	            feedback.src = "images/bfeedback.gif";
	            
	            wholesale = new Image();          
	            wholesale.src = "images/bwholesale.gif";
	            
	            service = new Image();          
	            service.src = "images/bservice.gif";
	            
	            story = new Image();          
	            story.src = "images/bstory.gif";
	            
	            aloha1 = new Image();          
	            aloha1.src = "images/baloha1.gif";
	            
	            aloha2 = new Image();          
	            aloha2.src = "images/baloha2.gif";
	            
	            aloha3 = new Image();          
	            aloha3.src = "images/baloha3.gif";
	            
	            aloha4 = new Image();          
	            aloha4.src = "images/baloha4.gif";

	 			suboff = new Image();          
	            suboff.src = "images/blank.sub.gif";

				loaded = 1;
				
				imgFlipTwo('img1','img1on','subimg','sub1img');
				doShow1(0);

	}

}

// FUNCTIONS WHICH UPON MOUSEOVER DO THE FOLLOWING
// 1 - PASS THE CORRECT ARRAY AND PARAMETER TO THE GLOBAL VARIABLES ie. location0
//     GLOBAL VARIABLE WILL IN TURN BE CALLED IN THE VIEW_URL FUNCTIONS
//     TO CALL APPROPRIATE LINKS FROM THE ARRAYS
// 2 - CALLS FUNCTION chopITnReset TO STOP ANY PREVIOUS TIMEOUTS THAT WERE SET BEFORE
// 3 - SETS NEW TIMEOUTS GOING TO LOAD THE ROLLOVER IMAGES IN THE SUB NAV
//
//IN UPDATING:
//MAKE SURE THAT THE NAME OF THE IMAGE BEING PASSED IN THE timerID# VARIABLE
//CORRESPONDS WITH THE NAME OF THE ARRAY BEING PASSED IN THE location# VARIABLE
//ie. timerID0 corresponds with location0


// 1 - HOME

function doShow1(){
	
	var passingNum = 1;
	location0 = "#";
	location1 = "#";
	location2 = "#";
	location3 = "#";
	location4 = "#";
	location5 = "#";
	
	chopITnReset()
	
	timerID0 = setTimeout("doTheLoad('sub0','aloha1')", 100);	
	timerID1 = setTimeout("doTheLoad('sub1','aloha2')", 200);
	timerID2 = setTimeout("doTheLoad('sub2','aloha3')", 300);
	timerID3 = setTimeout("doTheLoad('sub3','aloha4')", 400);
	
}



// 2 - ABOUT US		

function doShow2(passingNum){

	var passingNum = 2;	
	location0 = a_array[passingNum];
	location1 = b_array[passingNum];
	location2 = "#";
	location3 = "#";
	location4 = "#";
	location5 = "#";
	
	chopITnReset()
	timerID0 = setTimeout("doTheLoad('sub0','story')", 100);	
	timerID1 = setTimeout("doTheLoad('sub1','tour')", 200);
        
}




// 3 - KONA COFFEE             		

function doShow3(passingNum){

	var passingNum = 3;	
	location0 = a_array[passingNum];
	location1 = b_array[passingNum];
	location2 = "#";
	location3 = "#";
	location4 = "#";
	location5 = "#";
	
	chopITnReset()
	timerID0 = setTimeout("doTheLoad('sub0','story')", 100);	
	timerID1 = setTimeout("doTheLoad('sub1','faq')", 200);
	
}



// 4 - STORE		

function doShow4(passingNum){

	var passingNum = 4;	
	location0 = a_array[passingNum];
	location1 = b_array[passingNum];
	location2 = c_array[passingNum];
	location3 = d_array[passingNum];
	location4 = e_array[passingNum];
	location5 = "#";
	
	chopITnReset()
	timerID0 = setTimeout("doTheLoad('sub0','konacoffee')", 100);	
	timerID1 = setTimeout("doTheLoad('sub1','logowear')", 200);	
	timerID2 = setTimeout("doTheLoad('sub2','chocolate')", 300);	
	timerID3 = setTimeout("doTheLoad('sub3','misc')", 400);
	timerID4 = setTimeout("doTheLoad('sub4','policies')", 500);


}



// 5 - CONTACT US	

function doShow5(passingNum){

	var passingNum = 5;	
	location0 = a_array[passingNum];
	location1 = b_array[passingNum];
	location2 = c_array[passingNum];
	location3 = "#";
	location4 = "#";
	location5 = "#";
	
	chopITnReset()
	timerID0 = setTimeout("doTheLoad('sub0','feedback')", 100);
	timerID1 = setTimeout("doTheLoad('sub1','service')", 200);
	timerID2 = setTimeout("doTheLoad('sub2','wholesale')", 300);


}



// 6 -          		

function doShow6(passingNum){

	var passingNum = 6;	
	location0 = "#";
	location1 = "#";
	location2 = "#";
	location3 = "#";
	location4 = "#";
	location5 = "#";
	


}


// 7 -            	

function doShow7(passingNum){

	var passingNum = 7;		
	location0 = "#";
	location1 = "#";
	location2 = "#";
	location3 = "#";
	location4 = "#";
	location5 = "#";

	


}





// 8 -  		

function doShow8(passingNum){

	var passingNum = 8;	
	location0 = "#";
	location1 = "#";
	location2 = "#";
	location3 = "#";
	location4 = "#";
	location5 = "#";


}




// FUNCTION THAT LOADS THE IMAGES IN THE 'ROLLOVER' STATE IN THE SUB NAV
function doTheLoad(imgID,imgName){

	if ((document.images) && (loaded == 1)){
			document[imgID].src = eval(imgName + ".src"); 
	    }
	else return 0;

}

// FUNCTIONS TO DYNAMICALLY CHANGE THE URL LINKS OF THE SUB NAVIGATION IMAGES
function view_url0(){
    
    window.location.href = location0;

}

function view_url1(){
    
    window.location.href = location1;

}

function view_url2(){
    
    window.location.href = location2;

}

function view_url3(){
    
    window.location.href = location3;

}

function view_url4(){
 
    window.location.href = location4;

}

function view_url5(){
  
    window.location.href = location5;

}

// FOLLOWING FUNCTION CLEARS ALL ONGOING TIMEOUTS
// AND RESETS SUB NAV IMAGES INTO THE 'OFF' STATE

function chopITnReset(){

clearTimeout(timerID0);
clearTimeout(timerID1);
clearTimeout(timerID2);
clearTimeout(timerID3);
clearTimeout(timerID4);
clearTimeout(timerID5);

if ((document.images) && (loaded == 1)) {

document.sub0.src = suboff.src;
document.sub1.src = suboff.src;
document.sub2.src = suboff.src;
document.sub3.src = suboff.src;
document.sub4.src = suboff.src;
document.sub5.src = suboff.src;
	
}
}

// ROLLOVER FUNCTION
// TURNS OFF ALL IMAGES IN MAIN NAVIGATION
// TURNS ON THE IMAGE TO BE ROLLED OVER
// TURNS ON THE CATEGORY'S SUB NAVIGION IMAGE TOO

function imgFlipTwo(imageID,imageName,imageID2,imageName2) {
 
 if ((document.images) && (loaded == 1))	{	
 
		document.img1.src = img1off.src;
		document.img2.src = img2off.src;
		document.img3.src = img3off.src;
		document.img4.src = img4off.src;
		document.img5.src = img5off.src;
		document.img6.src = img6off.src;
		document.img7.src = img7off.src;
		document.img8.src = img8off.src; 

		document[imageID].src = eval(imageName + ".src");

		document[imageID2].src = eval(imageName2 + ".src"); 
		
    }
}

//-->
