﻿//survey

function surveyPop(name) {

popwin = this.open(name, "survey", "width=526,height=450, toolbar=no,menubar=no,location=no,resize=no,noresize, scrollbars=yes");

popwin.focus();}



//POPUP SCRIPTS

function page(imagename) {

popwin = this.open(imagename, "page", "width=500,height=450, toolbar=no,menubar=no,location=no,resize=no,noresize");

popwin.focus()}



function photo(imagename) {

popwin = this.open(imagename, "gallery", "width=500,height=375, toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,noresize");

popwin.focus()}



function gallery() {

popwin = this.open("gallery/gallery.html", "gallery", "width=500,height=375, toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,noresize");

popwin.focus()}



function map() {

popwin = this.open("map.html", "map", "width=500,height=375, toolbar=no,menubar=no,location=no,scrollbars=no,resize=no,noresize");

popwin.focus()}





//Amo's choice of pop up script.

function openNewWindow(URLtoOpen, windowName, windowFeatures) {

        newWindow=window.open(URLtoOpen, windowName, windowFeatures);

		newWindow.moveTo((window.screen.availWidth -  200) / 3 , (window.screen.availHeight - 550) / 2 );

							popup.blur();focus();

    }





//DYNAMIC FORM VALUE RESTORE

function Text_Input(elm, onoff){

if (typeof(onoff) == "undefined" ) {

onoff = "blur"; }

if (!elm.base) {

elm.base = elm.value; }

if (elm.value == elm.base && onoff != "blur") {

elm.value = ""; }

else if (elm.value == "" && onoff == "blur") {

elm.value = elm.base; }}

//usage:<input type="text" value="TEXT" onBlur="Text_Input(this, 'blur')" onFocus="Text_Input(this, 'focus')">









//ROLLOVER AND PRELOAD SCRIPTS

function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}



function MM_swapImgRestore() { //v3.0

var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}



function MM_findObj(n, d) { //v4.01

var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

if(!x && d.getElementById) x=d.getElementById(n); return x;}



function MM_swapImage() { //v3.0

var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}



//HIDE EMAIL SCRIPT

function hideEmail()

{

 path = 'mailto:info@'

 path += 'sawasdee'

 path += '-aruba.com'

 location.href = path;

}





//PRIVATE FUNCTIONS VALIDATOR

function RequestForm_Validator(theForm){



if (theForm.name1.value == ""){

alert("Please enter a value for the \"Name\" field.");

theForm.name1.focus();

return (false);}



if (theForm.tel.value == ""){

alert("Please enter a value for the \"Telephone\" field.");

theForm.tel.focus();

return (false);}



if (theForm.tel.value.length < 10){

alert("Please include your area code in the \"Telephone\" field.");

theForm.tel.focus();

return (false);}



if (theForm.date_of_event.value == ""){

alert("Please enter a value for the \"Date of Event\" field.");

theForm.date_of_event.focus();

return (false);}



if (theForm.date_of_event.value.length < 6){

alert("Please enter a valid date in the \"Date of Event\" field.");

theForm.date_of_event.focus();

return (false);}



if (theForm.number_of_people.value == ""){

alert("Please enter a value for the \"Number of People\" field.");

theForm.number_of_people.focus();

return (false);}



return (true);}







//TELL A FRIEND VALIDATOR

function TellAFriend_Form_Validator(theForm){



if (theForm.name.value == ""){

alert("Please enter a value for the \"name\" field.");

theForm.name.focus();

return (false);}



if (theForm.name.value.length < 2){

alert("Please enter at least 2 characters in the \"Your Name\" field.");

theForm.name.focus();

return (false);}



if (theForm.emailrecommender.value == ""){

alert("Please enter a value for the \"Your E-mail\" field.");

theForm.emailrecommender.focus();

return (false);}



if (theForm.emailrecommender.value.length < 6){

alert("Please enter at least 6 characters in the \"Your E-mail\" field.");

theForm.emailrecommender.focus();

return (false);}



return (true);}









//RESERVATION VALIDATOR

function ReservationForm_Validator(theForm){



if (theForm.salutation.value == "x"){

alert("Please select a Salutation.");

theForm.salutation.focus();

return (false);}



if (theForm.reserveFirstName.value == "First"){

alert("Please enter your First Name.");

theForm.reserveFirstName.focus();

return (false);}



if (theForm.reserveFirstName.value == ""){

alert("Please enter your First Name.");

theForm.reserveFirstName.focus();

return (false);}



if (theForm.reserveLastName.value == "Last"){

alert("Please enter your Last Name.");

theForm.reserveLastName.focus();

return (false);}



if (theForm.reserveLastName.value == ""){

alert("Please enter your Last Name.");

theForm.reserveLastName.focus();

return (false);}



if (theForm.reserveTelephoneNumber.value == ""){

alert("Please enter your Phone Number.");

theForm.reserveTelephoneNumber.focus();

return (false);}



if (theForm.reserveTelephoneNumber.value.length < 10){

alert("Please include your area code in the \"Phone Number\" field.");

theForm.reserveTelephoneNumber.focus();

return (false);}



if (theForm.reservationDay.value == "x"){

alert("Please specify what Day of the Week your reservation is for.");

theForm.reservationDay.focus();

return (false);}



if (theForm.reservationMonth.value == "x"){

alert("Please specify what Month your reservation is for.");

theForm.reservationMonth.focus();

return (false);}



if (theForm.reservationDate.value == ""){

alert("Please enter the date of your reservation.");

theForm.reservationDate.focus();

return (false);}



if (theForm.reservationTime.value == ""){

alert("Please enter the Time of Reservation.");

theForm.reservationTime.focus();

return (false);}



if (theForm.numberOfPeople.value == ""){

alert("Please enter the Number of People in your party.");

theForm.numberOfPeople.focus();

return (false);}



return (true);}



















//RANDOM STUFF

var a = Math.round(9*Math.random()) + ""



randomStuff = new Array



randomStuff[0]  = "1"

randomStuff[1]  = "2"

randomStuff[2]  = "3"

randomStuff[3]  = "4"

randomStuff[4]  = "5"

randomStuff[5]  = "6"

randomStuff[6]  = "7"

randomStuff[7]  = "8"

randomStuff[8]  = "9"

randomStuff[9]  = "10"

/*

randomStuff[10] = "11"

randomStuff[11] = "12"

randomStuff[12] = "13"

randomStuff[13] = "14"

randomStuff[14] = "15"

randomStuff[15] = "16"

randomStuff[16] = "17"

randomStuff[17] = "18"

randomStuff[18] = "19"

randomStuff[19] = "20"

randomStuff[20] = "21"

*/



var randomThing = randomStuff[a]



/*

<script language="JavaScript">

document.write("<p>" + randomThing + "</p>")

</script>

*/















//SCREEN REZ CHECKER

/*

Screen resolution detecter script: By JavaScript Kit (www.javascriptkit.com) More free scripts here! Note: Credit must stay intact for use.

*/

 

var correctwidth=800;

var correctheight=600;

if (screen.width<correctwidth||screen.height<correctheight){

alert("This webpage is bested viewed with screen resolution "+correctwidth+" x "+correctheight+" or above. Your current resolution is "+screen.width+" x "+screen.height+". If possible, please change the resolution!");

}

//END SCREEN REZ CHECKER

















//SLIDESHOW PIXELATE

//Pixelating Image slideshow

//Copyright Dynamic Drive 2001

//Visit http://www.dynamicdrive.com for this script



//specify interval between slide (in mili seconds)

var slidespeed=3000

var randomMax=8



//specify images RANDOM

var slideimages=new Array("images/slide1.jpg","images/slide2.jpg","images/slide3.jpg","images/slide4.jpg")



//specify corresponding links

//var slidelinks=new Array("http://www.dynamicdrive.com","http://wsabstract.com","http://www.geocities.com")



var imageholder=new Array()

var ie55=window.createPopup

for (i=0;i<slideimages.length;i++){



imageholder[i]=new Image()

imageholder[i].src=slideimages[i]

}



/*

<img src="photo_0.jpg" name="slide" width=205 height=143 border=0 style="filter:progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,Duration=1); margin-top:3px">

<script language=javascript>

var whichlink=0

var whichimage=0

var pixeldelay=(ie55)? document.images.slide.filters[0].duration*1000 : 0

function slideit()

{

	if (!document.images) return

	if (ie55) document.images.slide.filters[0].apply()

	document.images.slide.src=imageholder[whichimage].src

	if (ie55) document.images.slide.filters[0].play()

	whichlink=whichimage

	whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0

	setTimeout("slideit()",slidespeed+pixeldelay)

}

slideit()

</script>

*/















//SLIDESHOW FADE



//*****************************************

// Blending Image Slide Show Script- 

// © Dynamic Drive (www.dynamicdrive.com)

// For full source code, visit http://www.dynamicdrive.com/

//*****************************************



//specify interval between slide (in mili seconds)

var slidespeed=3000



//specify images

var slideimages=new Array("art1.gif","art2.gif","art3.gif","art4.gif")



//specify corresponding links

//var slidelinks=new Array("http://www.dynamicdrive.com","http://javascriptkit.com","http://www.geocities.com")



var newwindow=1 //open links in new window? 1=yes, 0=no



var imageholder=new Array()

var ie=document.all

for (i=0;i<slideimages.length;i++){

imageholder[i]=new Image()

imageholder[i].src=slideimages[i]

}



function gotoshow(){

if (newwindow)

window.open(slidelinks[whichlink])

else

window.location=slidelinks[whichlink]

}



/*

<a href="javascript:gotoshow()"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>

<script language="JavaScript1.1">

var whichlink=0

var whichimage=0

var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0

function slideit(){

if (!document.images) return

if (ie) document.images.slide.filters[0].apply()

document.images.slide.src=imageholder[whichimage].src

if (ie) document.images.slide.filters[0].play()

whichlink=whichimage

whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0

setTimeout("slideit()",slidespeed+blenddelay)}

slideit()

</script>

*/



















//CHROMELESS WINDOW

/*

Chromeless Window (v3.5)- By Gabriel Suchowolski (this credit MUST stay intact)

Author site at http://www.microbians.com

Visit http://www.dynamicdrive.com for this script

NOTE: As modified slightly by AaronCampbell of Menupalace.com - go to microbians if you want the absolute original.

*/



//For paramater explanations, see accompanying faq.htm file

function openIT(u,W,H,X,Y,n,b,x,m,r) {

	var cU  ='scripts/close.gif'   //gif for close on normal state.

	var cO  ='scripts/close.gif'  //gif for close on mouseover.

	var cL  ='scripts/clock.gif'      //gif for loading indicator.

	var mU  ='scripts/minimize.gif'     //gif for minimize to taskbar on normal state.

	var mO  ='scripts/minimize.gif'    //gif for minimize to taskbar on mouseover.

	var xU  ='scripts/max.gif'     //gif for maximize normal state.

	var xO  ='scripts/max.gif'    //gif for maximize on mouseover.

	var rU  ='scripts/restore.gif'     //gif for minimize on normal state.

	var rO  ='scripts/restore.gif'    //gif for minimize on mouseover.

	var tH  ='<font style="font-size:11px; font-family:verdana; color:white; font-weight:bold"> ChromelessWindow </font>'   //title for the title bar in html format.

	var tW  ='Window'   //title for the task bar of Windows.

	var wB  ='silver'   //Border color.

	var wBs ='black'   //Border color on window drag.

	var wBG ='black'   //Background of the title bar.

	var wBGs='black'   //Background of the title bar on window drag.

	var wNS ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0'  //Html parameters for Netscape.

	var fSO ='scrolling=auto noresize'   //Html parameters for main content frame.

	var brd =b||0;   //Extra border size.

	var max =x||false;   //Maxzimize option (true|false).

	var min =m||false;   //Minimize to taskbar option (true|false).

	var res =r||false;   //Resizable window (true|false).

	var tsz =20;   //Height of title bar.

	return chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz)}



//onclick="openIT('url',Width,Height,Xpos,Ypos,'name',extraBorder,maximize,minimize,resize)"

/*

<p><a href="#" onclick="mywin001=openIT('http://www.google.com',300,300,null,null,'mywin001',0,true,true,true);return false">Open Google.com</a>

<p><a href="#" onclick="mywin001=openIT('http://www.google.com',600,400,null,null,'mywin001',0,true,true,true);return false">Open Google.com</a>

<p><a href="#" onclick="mywin002=openIT('http://www.dynamicdrive.com/faqs.htm',550,600,null,null,'mywin002',0,false,false,true,'#FFffff','#000000');return false">Dynamic Drive FAQs</a>

<p><a href="#" onclick="openIT('url',Width,Height,Xpos,Ypos,'name',extraBorder,maximize,minimize,resize)">URL</a>

*/













//ALPHA FADE

opacityFadeObjects = new Object();

opacityFadeTimers = new Object();

function opacityFade(object, destOp, rate, delta){

if (!document.all)

return

if (object != "[object]"){

setTimeout("opacityFade("+object+","+destOp+","+rate+","+delta+")",0);

return;}

clearTimeout(opacityFadeTimers[object.sourceIndex]);

diff = destOp-object.filters.alpha.opacity;

direction = 1;

if (object.filters.alpha.opacity > destOp){

direction = -1;}

delta=Math.min(direction*diff,delta);

object.filters.alpha.opacity+=direction*delta;

if (object.filters.alpha.opacity != destOp){

opacityFadeObjects[object.sourceIndex]=object;

opacityFadeTimers[object.sourceIndex]=setTimeout("opacityFade(opacityFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);}}



//<p style="filter: alpha(opacity=40)" onmouseout="opacityFade(this,40,25,5)" onmouseover="opacityFade(this,100,25,5)">SAMPLE</p>

//<p style="filter: alpha(opacity=100)" onmouseout="opacityFade(this,100,25,5)" onmouseover="opacityFade(this,40,25,5)">SAMPLE</p>















//FLIP SCREEN

function WM_toggle(id){

   if (document.all){  if(document.all[id].style.display == 'none'){    document.all[id].style.display = '';  } else {    document.all[id].style.display = 'none';}

return false;

   } else if (document.getElementById){  if(document.getElementById(id).style.display == 'none'){    document.getElementById(id).style.display = 'block';  } else {    document.getElementById(id).style.display = 'none';}

return false;} }

















//UNDERWATER CODE

var wavphase = 0;



function animatwav()

{

	if(wavable){

		wavphase = (wavphase + 10) % 100;

		if(document.body.style.filter == "wave(freq=5, strength=10, phase=0, lightstrength=0, add=0, enabled=1)"){

			document.body.filters[0].phase = wavphase;

		}

		window.setTimeout("animatwav()", 0400, "JavaScript");

	}

}



//<input value="Underwater" type=button name=animwave onclick="document.body.style.filter = 'wave(freq=5, strength=10, phase=0, lightstrength=0, add=0, enabled=1)'; wavable = 1; animatwav();">