var menu=function(){
	var t=15,z=50,s=6,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(this.n+'.st('+i+',true)');
			h.onmouseout=new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st=function(x,f){
		var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
		clearInterval(c.t); c.style.overflow='hidden';
		if(f){
			p.className+=' '+a;
			if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
			if(c.mh==c.offsetHeight){c.style.overflow='visible'}
			else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
		}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
	}
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
		c.style.height=h+(d*f)+'px'
	}
	return{dd:dd}
}();



//Mouseover effect for home page image links, oil collections, featured students

var learn_on     = new Image();			//Create image objects
var learn_off    = new Image();
var revive_on  = new Image();
var revive_off = new Image();
var journey_on    = new Image();
var journey_off   = new Image();
var heal_on    = new Image();
var heal_off   = new Image();
var grow_on     = new Image();	
var grow_off    = new Image();
var consult_on  = new Image();
var consult_off = new Image();
var connect_on    = new Image();
var connect_off   = new Image();
var discover_on    = new Image();
var discover_off   = new Image();
var waiomana_off = new Image();
var waiomana_on = new Image();
var kuhina_off = new Image();
var kuhina_on = new Image();
var halau_off = new Image();
var halau_on = new Image();
var nani_off = new Image();
var nani_on = new Image();
var nick_off = new Image();
var nick_on = new Image();
var monika_off = new Image();
var monika_on = new Image();
var maryann_off = new Image();
var maryann_on = new Image();
var kamakani_off = new Image();
var kamakani_on = new Image();
var leinaala_off = new Image();
var leinaala_on = new Image();
var leihua_off = new Image();
var leihua_on = new Image();


learn_on.src     = "images/hi_awaken_underline.gif";		//Load images from URL
learn_off.src    = "images/learn_underline.gif";
revive_on.src  = "images/hi_revive_underline.gif";
revive_off.src = "images/revive_underline.gif";
journey_on.src    = "images/hi_journey_underline.gif";
journey_off.src   = "images/journey_underline.gif";
heal_on.src    = "images/hi_heal_underline.gif";
heal_off.src   = "images/heal_underline.gif";
grow_on.src     = "images/hi_grow_underline.gif";		//Load images from URL
grow_off.src    = "images/grow_underline.gif";
consult_on.src  = "images/hi_consult_underline.gif";
consult_off.src = "images/consult_underline.gif";
connect_on.src    = "images/hi_connect_underline.gif";
connect_off.src   = "images/connect_underline.gif";
discover_on.src    = "images/hi_discover_underline.gif";
discover_off.src   = "images/discover_underline.gif";
waiomana_on.src    = "images/waiomana_white.jpg";
waiomana_off.src   = "images/waiomana_drk.jpg";
kuhina_on.src    = "images/kuhina_white.jpg";
kuhina_off.src   = "images/kuhina_drk.jpg";
halau_on.src    = "images/tan_halau.jpg";
halau_off.src   = "images/drk_brown_halau.jpg";
nani_on.src    = "images/tan_nani.jpg";
nani_off.src   = "images/drk_brown_nani.jpg";
nick_on.src    = "images/tan_nick.jpg";
nick_off.src   = "images/drk_brown_nick.jpg";
monika_on.src    = "images/tan_monika.jpg";
monika_off.src   = "images/drk_brown_monika.jpg";
maryann_on.src    = "images/tan_maryann.jpg";
maryann_off.src   = "images/drk_brown_maryann.jpg";
kamakani_on.src    = "images/tan_kamakani.jpg";
kamakani_off.src   = "images/drk_brown_kamakani.jpg";
leinaala_on.src    = "images/tan_leinaala.jpg";
leinaala_off.src   = "images/drk_brown_leinaala.jpg";
leihua_on.src    = "images/tan_lehua.jpg";
leihua_off.src   = "images/drk_brown_lehua.jpg";


//SLIDESHOW

// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 2;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var Title = new Array();
var showHot = false; // don't change this

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

//KAUAI
Title[1] = "KAUA\'I";
Title[2] = "KAUA\'I";
Title[3] = "KAUA\'I";
Title[4] = "KAUA\'I";
Title[5] = "KAUA\'I";
Title[6] = "KAUA\'I";
Title[7] = "KAUA\'I";
Title[8] = "KAUA\'I";
Title[9] = "KAUA\'I";
Title[10] = "KAUA\'I";
Title[11] = "KAUA\'I";
Title[12] = "KAUA\'I";
Title[13] = "KAUA\'I";

//OAHU
Title[14] = "O\'AHU";
Title[15] = "O\'AHU";
Title[16] = "O\'AHU";
Title[16] = "O\'AHU";
Title[17] = "O\'AHU";
Title[18] = "O\'AHU";
Title[19] = "O\'AHU";
Title[20] = "O\'AHU";
Title[21] = "O\'AHU";
Title[22] = "O\'AHU";
Title[23] = "O\'AHU";
Title[24] = "O\'AHU";

//MOLOAKAI
Title[25] = "MOLOKA\'I";
Title[26] = "MOLOKA\'I";
Title[27] = "MOLOKA\'I";
Title[28] = "MOLOKA\'I";
Title[29] = "MOLOKA\'I";
Title[30] = "MOLOKA\'I";
Title[31] = "MOLOKA\'I";
Title[32] = "MOLOKA\'I";
Title[33] = "MOLOKA\'I";
Title[34] = "MOLOKA\'I";
Title[35] = "MOLOKA\'I";

//HAWAII
Title[36] = "HAWAI\'I";
Title[37] = "HAWAI\'I";
Title[38] = "HAWAI\'I";
Title[39] = "HAWAI\'I";
Title[40] = "HAWAI\'I";
Title[41] = "HAWAI\'I";
Title[42] = "HAWAI\'I";
Title[43] = "HAWAI\'I";
Title[44] = "HAWAI\'I";
Title[45] = "HAWAI\'I";
Title[46] = "HAWAI\'I";

//KAUAI

Picture[1] = 'images/01_waimea_sideview.jpg';
Picture[2] = 'images/13_waimeacottages.jpg';
Picture[3] = 'images/03_palicoast.jpg';
Picture[4] = 'images/04_lookout.jpg';
Picture[5] = 'images/05_ladies_smile.jpg';
Picture[6] = 'images/06_salt_pile.jpg';
Picture[7] = 'images/07_muddy_walk.jpg';
Picture[8] = 'images/08_wailua_river.jpg';
Picture[9] = 'images/09_view_wailua_river.jpg';
Picture[10] = 'images/10_holoholo_heiau.jpg';
Picture[11] = 'images/11_sunrise.jpg';
Picture[12] = 'images/12_under_lauahala_tree.jpg';
Picture[13] = 'images/02_purple_sunset.jpg';


//OAHU
Picture[14] = 'images/01_waikikiopti.jpg';
Picture[15] = 'images/02_oahu_tree.jpg';
Picture[16] = 'images/03_leonards.jpg';
Picture[17] = 'images/04_makapuu.jpg';
Picture[18] = 'images/05_sharkscove.jpg';
Picture[19] = 'images/06_kapu.jpg';
Picture[20] = 'images/07_northshore.jpg';
Picture[21] = 'images/08_red_dirt.jpg';
Picture[22] = 'images/09_kukaniloko.jpg';
Picture[23] = 'images/10_pali.jpg';
Picture[24] = 'images/11_honolulu.jpg';

//MOLOKAI
Picture[25] = 'images/01_halawa.jpg';
Picture[26] = 'images/02_waterfall_swimopti.jpg';
Picture[27] = 'images/03_room_1opti.jpg';
Picture[28] = 'images/04_ladies_on_lawnoopti.jpg';
Picture[29] = 'images/05_poolopti.jpg';
Picture[30] = 'images/06_ladies_tableoopti.jpg';
Picture[31] = 'images/07_pink_gingeropti.jpg';
Picture[32] = 'images/08_bbqopti.jpg';
Picture[33] = 'images/09_classopti.jpg';
Picture[34] = 'images/10_phallic_rockopti.jpg';
Picture[35] = 'images/11_beachopti.jpg';

//HAWAII
Picture[36] = 'images/01_coastlineopti.jpg';
Picture[37] = 'images/02_waipio_valley_viewopti.jpg';
Picture[38] = 'images/03_taro_patchopti.jpg';
Picture[39] = 'images/04_volcanoopti.jpg';
Picture[40] = 'images/05_ceremonyopti.jpg';
Picture[41] = 'images/06_observatoryopti.jpg';
Picture[42] = 'images/07_signopti.jpg';
Picture[43] = 'images/08_southpointopti.jpg';
Picture[44] = 'images/09_haleopti.jpg';
Picture[45] = 'images/10_turtlesopti.jpg';
Picture[46] = 'images/11_kamehamehaopti.jpg';



// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!


//KAUAI
Caption[1] = "Waimea Canyon, Kaua\'i.";
Caption[2] = "Waimea Cottages, Waimea, Kaua\'i.";
Caption[3] = "Kalalau, Kaua\'i.";
Caption[4] = "Kalalau, Kaua\'i.";
Caption[5] = "Kalalau, Kaua\'i.";
Caption[6] = "Salt Ponds, Hanapepe Kaua\'i.";
Caption[7] = "Salt Ponds, Hanapepe Kaua\'i.";
Caption[8] = "Wailua River, Kaua\'i.";
Caption[9] = "Wailua River View, Kaua\'i.";
Caption[10] = "Holoholo Ku Heiau, Kaua'i.";
Caption[11] = "Ka Hikina O Kala Heiau, Kaua\'i.";
Caption[12] = "Kilauea, Kaua\'i.";
Caption[13] = "Purple Sunset over Wailua Beach, Kaua\'i.";

//OAHU
Caption[14] = "Waikiki, O\'ahu.";
Caption[15] = "Waikiki, O\'ahu.";
Caption[16] = "Leonard\'s, O\'ahu.";
Caption[17] = "Makapu\'u Beach, O\'ahu.";
Caption[18] = "Shark\'s Cove, O\'ahu.";
Caption[19] = "Pu\'u O Mahuka Heiau, O\'ahu.";
Caption[20] = "Pu\'u O Mahuka Heiau, O\'ahu.";
Caption[21] = "Pu\'u O Mahuka Heiau, O\'ahu.";
Caption[22] = "Kukaniloko Birth Stones, O\'ahu.";
Caption[23] = "Pali Lookout, O\'ahu.";
Caption[24] = "Honolulu, O\'ahu.";

//MOLOAKAI
Caption[25] = "Halawa Valley, Moloka\'i.";
Caption[26] = "Halawa Waterfall, Moloka\'i.";
Caption[27] = "Pu\'u O Hoku Ranch, Moloka'i.";
Caption[28] = "Pu\'u O Hoku Ranch Lawn, Moloka\'i.";
Caption[29] = "Pu\'u O Hoku Ranch Pool, Moloka\'i.";
Caption[30] = "Pu\'u O Hoku Ranch Kitchen, Moloka\'i.";
Caption[31] = "Pu\'u O Hoku Ranch, Moloka'i.";
Caption[32] = "Pu\'u O Hoku Ranch, Moloka'i.";
Caption[33] = "Pu\'u O Hoku Ranch Class, Moloka\'i.";
Caption[34] = "Phallic Rock, Moloka\'i.";
Caption[35] = "Papohaku Beach, Moloka\'i.";

//HAWAII
Caption[36] = "Waipio Valley, Hawai\'i.";
Caption[37] = "Waipio Valley, Hawai\'i.";
Caption[38] = "Taro, Waipio Valley, Hawa\'i.";
Caption[39] = "Halema\'uma\'u, Hawai\'i.";
Caption[40] = "Aloha Week Court, Halema\'uma\'u, Hawai\'i.";
Caption[41] = "Mauna Kea, Hawai\'i.";
Caption[42] = "Sign to Mo\'okini Heiau, Hawai\'i.";
Caption[43] = "South Point, Hawai\'i.";
Caption[44] = "Pu\'uhonua O Honaunau, Hawai\'i.";
Caption[45] = "Turtle Preserve, Hawai\'i.";
Caption[46] = "Ahuena Heiau, Hawai\'i.";



// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++)
	{preLoad[iss] = new Image();
	preLoad[iss].src = Picture[iss];}


function control(how){
	if (showHot){
		if (how=="H") jss = 1;
		if (how=="F") jss = jss + 1;
		if (how=="B") jss = jss - 1;
		if (jss > (pss)) jss=1;
		if (jss < 1) jss = pss;
		
			document.images.PictureBox.src = preLoad[jss].src;	

	if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
	if (document.getElementById) document.getElementById("TitleBox").innerHTML= Title[jss];
}}
	




