// JavaScript Document

// _mo preloader
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];}}
}

// popup window function
function winBRopen(theURL, Name, popW, popH, scroll) { // V 1.0
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable=no'
	Win = window.open(theURL, Name, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }

}


//alternating row color
function alternate(id){ 
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);   
   var rows = table.getElementsByTagName("tr");   
   for(i = 0; i < rows.length; i++){           
 //manipulate rows 
     if(i % 2 == 0){ 
       rows[i].className = "white"; 
     }else{ 
       rows[i].className = "ltgray"; 
     }       
   } 
 } 
}

//print this page function
function printPage() {
  if (window.print)
    window.print()
  else
    alert("Sorry, your browser doesn't support this feature. Please use the Print option from your browser's Main Menu" );
}


function _CF_onError(form_object, input_object, object_value, error_message)
    {
	alert(error_message);
       	return false;	
    }



function _CF_hasValue(obj, obj_type)
    {
    if (obj_type == "TEXT" || obj_type == "PASSWORD")
	{
    	if (obj.value.length == 0) 
      		return false;
    	else 
      		return true;
    	}
    else if (obj_type == "SELECT")
	{
        for (i=0; i < obj.length; i++)
	    	{
		if (obj.options[i].selected)
			return true;
		}

       	return false;	
	}
    else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX")
	{

		if (obj.checked)
			return true;
		else
       		return false;	
	}
    else if (obj_type == "RADIO" || obj_type == "CHECKBOX")
	{

        for (i=0; i < obj.length; i++)
	    	{
		if (obj[i].checked)
			return true;
		}

       	return false;	
	}
	}



function _CF_checkdate(object_value)
    {
    //Returns true if value is a date format or is NULL
    //otherwise returns false	

    if (object_value.length == 0)
        return true;

    //Returns true if value is a date in the mm/dd/yyyy format
	isplit = object_value.indexOf('/');

	if (isplit == -1 || isplit == object_value.length)
		return false;

    sMonth = object_value.substring(0, isplit);

	if (sMonth.length == 0)
        return false;

	isplit = object_value.indexOf('/', isplit + 1);

	if (isplit == -1 || (isplit + 1 ) == object_value.length)
		return false;

    sDay = object_value.substring((sMonth.length + 1), isplit);

	if (sDay.length == 0)
        return false;

	sYear = object_value.substring(isplit + 1);

	if (!_CF_checkinteger(sMonth)) //check month
		return false;
	else
	if (!_CF_checkrange(sMonth, 1, 12)) //check month
		return false;
	else
	if (!_CF_checkinteger(sYear)) //check year
		return false;
	else
	if (!_CF_checkrange(sYear, 0, 9999)) //check year
		return false;
	else
	if (!_CF_checkinteger(sDay)) //check day
		return false;
	else
	if (!_CF_checkday(sYear, sMonth, sDay)) // check day
		return false;
	else
		return true;
    }



function _CF_checkday(checkYear, checkMonth, checkDay)
    {

	maxDay = 31;

	if (checkMonth == 4 || checkMonth == 6 ||
			checkMonth == 9 || checkMonth == 11)
		maxDay = 30;
	else
	if (checkMonth == 2)
	{
		if (checkYear % 4 > 0)
			maxDay =28;
		else
		if (checkYear % 100 == 0 && checkYear % 400 > 0)
			maxDay = 28;
		else
			maxDay = 29;
	}

	return _CF_checkrange(checkDay, 1, maxDay); //check day
    }



function _CF_checkinteger(object_value)
    {
    //Returns true if value is a number or is NULL
    //otherwise returns false	

    if (object_value.length == 0)
        return true;

    //Returns true if value is an integer defined as
    //   having an optional leading + or -.
    //   otherwise containing only the characters 0-9.
	var decimal_format = ".";
	var check_char;

    //The first character can be + -  blank or a digit.
	check_char = object_value.indexOf(decimal_format)
    //Was it a decimal?
    if (check_char < 1)
	return _CF_checknumber(object_value);
    else
	return false;
    }



function _CF_numberrange(object_value, min_value, max_value)
    {
    // check minimum
    if (min_value != null)
	{
        if (object_value < min_value)
		return false;
	}

    // check maximum
    if (max_value != null)
	{
	if (object_value > max_value)
		return false;
	}
	
    //All tests passed, so...
    return true;
    }



function _CF_checknumber(object_value)
    {
    //Returns true if value is a number or is NULL
    //otherwise returns false	

    if (object_value.length == 0)
        return true;

    //Returns true if value is a number defined as
    //   having an optional leading + or -.
    //   having at most 1 decimal point.
    //   otherwise containing only the characters 0-9.
	var start_format = " .+-0123456789";
	var number_format = " .0123456789";
	var check_char;
	var decimal = false;
	var trailing_blank = false;
	var digits = false;

    //The first character can be + - .  blank or a digit.
	check_char = start_format.indexOf(object_value.charAt(0))
    //Was it a decimal?
	if (check_char == 1)
	    decimal = true;
	else if (check_char < 1)
		return false;
        
	//Remaining characters can be only . or a digit, but only one decimal.
	for (var i = 1; i < object_value.length; i++)
	{
		check_char = number_format.indexOf(object_value.charAt(i))
		if (check_char < 0)
			return false;
		else if (check_char == 1)
		{
			if (decimal)		// Second decimal.
				return false;
			else
				decimal = true;
		}
		else if (check_char == 0)
		{
			if (decimal || digits)	
				trailing_blank = true;
        // ignore leading blanks

		}
	        else if (trailing_blank)
			return false;
		else
			digits = true;
	}	
    //All tests passed, so...
    return true
    }



function _CF_checkrange(object_value, min_value, max_value)
    {
    //if value is in range then return true else return false

    if (object_value.length == 0)
        return true;


    if (!_CF_checknumber(object_value))
	{
	return false;
	}
    else
	{
	return (_CF_numberrange((eval(object_value)), min_value, max_value));
	}
	
    //All tests passed, so...
    return true;
    }


function  _CF_checkCFForm_1(_CF_this)

    {

    if  (!_CF_hasValue(_CF_this.FullName, "TEXT" )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.FullName, _CF_this.FullName.value, "Please enter your full name."))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.Address, "TEXT" )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.Address, _CF_this.Address.value, "Please enter an address."))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.City, "TEXT" )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.City, _CF_this.City.value, "Please enter a city."))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.State, "TEXT" )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.State, _CF_this.State.value, "Please enter a state."))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.Zip, "TEXT" )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.Zip, _CF_this.Zip.value, "Please enter a zip code."))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.Phone, "TEXT" )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.Phone, _CF_this.Phone.value, "Please enter a phone number."))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.Email, "TEXT" )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.Email, _CF_this.Email.value, "Please enter an email address"))

            {

            return false; 

            }

        }


    if  (!_CF_checkdate(_CF_this.ArrivalDate.value))

        {

        if  (!_CF_onError(_CF_this, _CF_this.ArrivalDate, _CF_this.ArrivalDate.value, "Please enter a valid arrival date."))

            {

            return false; 

            }

        }


    if  (!_CF_checkdate(_CF_this.DepartureDate.value))

        {

        if  (!_CF_onError(_CF_this, _CF_this.DepartureDate, _CF_this.DepartureDate.value, "Please enter a valid departure date."))

            {

            return false; 

            }

        }


    return true;

    }


//-->





// JavaScript Document


/*
Textual Tooltip Script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/



var caption=new Array()
var bigImage=new Array()

caption[0]='&nbsp;'

//INTERIOR
caption[01]='<b>caption</b>'


bigImage[0]='&nbsp;'

bigImage[02]='<img src="images/galleries/slideshow-01/02.jpg" class="big" name="imageBig" width="400">'
bigImage[03]='<img src="images/galleries/slideshow-01/03.jpg" class="big" name="imageBig" width="400">'
bigImage[04]='<img src="images/galleries/slideshow-01/04.jpg" class="big" name="imageBig" width="400">'
bigImage[05]='<img src="images/galleries/slideshow-01/05.jpg" class="big" name="imageBig" width="400">'
bigImage[06]='<img src="images/galleries/slideshow-01/06.jpg" class="big" name="imageBig" width="400">'
bigImage[08]='<img src="images/galleries/slideshow-01/08.jpg" class="big" name="imageBig" width="400">'
bigImage[09]='<img src="images/galleries/slideshow-01/09.jpg" class="big" name="imageBig" width="400">'

bigImage[10]='<img src="images/galleries/slideshow-01/10.jpg" class="big" name="imageBig" width="400">'
bigImage[11]='<img src="images/galleries/slideshow-01/11.jpg" class="big" name="imageBig" width="400">'
bigImage[12]='<img src="images/galleries/slideshow-01/12.jpg" class="big" name="imageBig" width="400">'
bigImage[13]='<img src="images/galleries/slideshow-01/13.jpg" class="big" name="imageBig" width="400">'
bigImage[14]='<img src="images/galleries/slideshow-01/14.jpg" class="big" name="imageBig" width="400">'
bigImage[15]='<img src="images/galleries/slideshow-01/15.jpg" class="big" name="imageBig" width="400">'
bigImage[16]='<img src="images/galleries/slideshow-01/16.jpg" class="big" name="imageBig" width="400">'
bigImage[17]='<img src="images/galleries/slideshow-01/17.jpg" class="big" name="imageBig" width="400">'
bigImage[18]='<img src="images/galleries/slideshow-01/18.jpg" class="big" name="imageBig" width="400">'
bigImage[19]='<img src="images/galleries/slideshow-01/19.jpg" class="big" name="imageBig" width="400">'

bigImage[20]='<img src="images/galleries/slideshow-01/20.jpg" class="big" name="imageBig" width="400">'
bigImage[21]='<img src="images/galleries/slideshow-01/21.jpg" class="big" name="imageBig" width="400">'
bigImage[22]='<img src="images/galleries/slideshow-01/22.jpg" class="big" name="imageBig" width="400">'
bigImage[23]='<img src="images/galleries/slideshow-01/23.jpg" class="big" name="imageBig" width="400">'
bigImage[24]='<img src="images/galleries/slideshow-01/24.jpg" class="big" name="imageBig" width="400">'
bigImage[25]='<img src="images/galleries/slideshow-01/25.jpg" class="big" name="imageBig" width="400">'
bigImage[26]='<img src="images/galleries/slideshow-01/26.jpg" class="big" name="imageBig" width="400">'
bigImage[27]='<img src="images/galleries/slideshow-01/27.jpg" class="big" name="imageBig" width="400">'
bigImage[28]='<img src="images/galleries/slideshow-01/28.jpg" class="big" name="imageBig" width="400">'
bigImage[29]='<img src="images/galleries/slideshow-01/29.jpg" class="big" name="imageBig" width="400">'

bigImage[30]='<img src="images/galleries/slideshow-01/30.jpg" class="big" name="imageBig" width="400">'
bigImage[31]='<img src="images/galleries/slideshow-01/31.jpg" class="big" name="imageBig" width="400">'





function changeImage(whichImage){
	if (document.all||document.getElementById){
		cross_e2=document.getElementById? document.getElementById("bigImage"):document.all.bigImage
		cross_e2.innerHTML= whichImage
	}
	else if (document.layers){
		document.d3.document.d4.document.write(whichImage)
		document.d3.document.d4.document.close()
	}
}


function changetext(whichcontent){
	if (document.all||document.getElementById){
		cross_el=document.getElementById? document.getElementById("caption"):document.all.caption
		cross_el.innerHTML= whichcontent
	}
	else if (document.layers){
		document.d1.document.d2.document.write(whichcontent)
		document.d1.document.d2.document.close()
	}
}


