<!-- Begin

var myfont_face = "Verdana, Helvetica, Arial, sans-serif";
var myfont_size = "10px";
var myfont_color = "#000000";
var myback_color = "#ffe375";
var mywidth = 80;
var my12_hour = 1;

var dn = ""; var old = "";


function validate() {
   if (document.guide.name.value == "") {
      alert("Please fill in your name.");
      document.guide.name.focus();
      return false;
   }
   if (document.guide.from.value == "") {
      alert("Please fill in your email address.");
      document.guide.from.focus();
      return false;
   }
}


function cust_cookie() {
   var expDays = 365;
   var expDate = new Date();
   expDate.setTime(expDate.getTime() +  (24 * 60 * 60 * 1000 * expDays)); 

   var id = GetCookie('Cust_ID');

   if (!id) {
      var maxNumber = 1000000000;
      var id = Math.round(maxNumber * Math.random());
      SetCookie('Cust_ID', id, expDate);
   }

   function SetCookie (name, value) {  
   var argv = SetCookie.arguments;  
   var argc = SetCookie.arguments.length;  
   var expires = (argc > 2) ? argv[2] : null;  
//   var path = (argc > 3) ? argv[3] : null;  
   var path =  "";  
   var domain = (argc > 4) ? argv[4] : null;  
   var secure = (argc > 5) ? argv[5] : false;  
   document.cookie = name + "=" + escape (value) +
   ("; expires=") + ((expires == null) ? "" : (expires.toGMTString())) +
   ("; path=/") +
   ((domain == null) ? "" : ("; domain=" + domain)) +
   ((secure == true) ? "; secure" : "");
   }
}


function show_clock() {

	//show clock in NS 4
	if (document.layers)
           document.ClockPosNS.visibility="show"
	if (old == "die") { return; }

	var Digital = new Date();
	var hours = Digital.getHours();
	var minutes = Digital.getMinutes();
	var seconds = Digital.getSeconds();

	// GMT - Hawaiian Time. Hawaii is 10 hours behind GMT. Get current time zone difference of GMT from local in minutes
	var tzone = Digital.getTimezoneOffset();

	var hawaii_time_minutes = (hours * 60) + minutes + tzone - (10 * 60);
	if (hawaii_time_minutes < 0) {
		hawaii_time_minutes = hawaii_time_minutes + (24 * 60);
	}

	// Now convert the time back to the variables hours and minutes to get the local Hawaii Time.
	minutes = hawaii_time_minutes % 60;
	hours = (hawaii_time_minutes - minutes) / 60;

 	if (my12_hour) {
		dn = "AM";
		if (hours > 12) { dn = "PM"; hours = hours - 12; }
		if (hours == 12) { dn = "PM"; }
	} else {
		dn = "";
	}
	if (minutes <= 9) { minutes = "0"+minutes; }
	if (seconds <= 9) { seconds = "0"+seconds; }

	myclock = '';
//	myclock += '<font style="color:'+myfont_color+'; font-family:'+myfont_face+'; font-size:'+myfont_size+'pt;">';
	myclock += '<font style="font-family:'+myfont_face+'; font-weight: bold; font-size:'+myfont_size+';">';
	myclock += hours+':'+minutes+':'+seconds+' '+dn;
	myclock += '</font>';

	if (old == "true") {
		document.write(myclock);
		old = "die"; return;
	}

	if (document.layers) {
		clockpos = document.ClockPosNS;
		liveclock = clockpos.document.LiveClockNS;
		liveclock.document.write(myclock);
		liveclock.document.close();
	} else if (document.all) {
		LiveClockIE.innerHTML = myclock;
	} else if (document.getElementById) {
		document.getElementById("LiveClockIE").innerHTML = myclock;
	}

	setTimeout("show_clock()",1000);
}


cust_cookie();

var urlAddress = "http://www.hawaiiactive.com";
var pageName = "Hawaii's Finest Activities";

function addToFavorites()
 {
  if (window.external)
  {
   window.external.AddFavorite(urlAddress,pageName)
  }
  else
  { 
   alert("Sorry! Your browser doesn't support this function.");
  }
}

var qualify = GetCookie('qualify');
GetCookie('qualify');

function getCookieVal (offset) {  
   var endstr = document.cookie.indexOf (";", offset);  
   if (endstr == -1)    
   endstr = document.cookie.length; 
   return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
   var arg = name + "=";  
   var alen = arg.length;  
   var clen = document.cookie.length;  
   var i = 0;  
   while (i < clen) {    
   var j = i + alen;    
   if (document.cookie.substring(i, j) == arg)      
   return getCookieVal (j);  
   i = document.cookie.indexOf(" ", i) + 1;    
   if (i == 0) break;   
}  
return null;
}

function popupPage(startup) {
   var page = "special.html";
   windowprops = "height=450,width=300,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes,left=5,top=5";
   if (qualify != 'Ulalena' && qualify != 'Luau' || startup != 1) {
      window.open(page, "Special", windowprops);
   }
}

function newPage(Act_Num,Act_Sel) {
   if(!Act_Num) {
      document.location = 'activities.html';
   } else {
      var page = "/cart/book-form-single.html?Act="+eval(Act_Num)+"&Sel="+eval(Act_Sel);
      windowprops = "height=280,width=500,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,left=0,top=0";
      window.open(page, "Special", windowprops);
   }   
}

function showCart(Act_Num) {
   var page = "../php/ha-cart-show.php";
   windowprops = "height=250,width=550,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,left=0,top=0";
   show = window.open(page, "Special", windowprops);
   show.focus();
}



// window.onLoad = setTimeout('popupPage(1)', 15000);

 
function click() {
   if (event.button==2) {
      alert('The right mouse button has been blocked for copyright reasons!');
   }
}
// document.onmousedown=click();

//  End -->