// notpad information
function OpenScrollingPopup(URL, width, height) {
	window.self.name = "main";
	var now = new Date();
	var remote = window.open(URL, "popup" + now.getTime(), "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=1,status=1,menubar=0,scrollbars=yes");
}
// ----- END: FOR OPENING GENERAL POPUP WINDOWS -----



// ----- BEGIN: FOR HIDING/SHOWING LAYERS -----
function showLayer(strLayerName) {
	if(document.all)
		document.all[strLayerName].style.display = 'block';
	else if(document.layers)
		document.layers[strLayerName].display = 'block';
}
function hideLayer(strLayerName) {
	if(document.all)
		document.all[strLayerName].style.display = 'none';
	else if(document.layers)
		document.layers[strLayerName].display = 'none';
}
// ----- END: FOR HIDING/SHOWING LAYERS -----



function swapImage(strImgName, strImgSrc) {
	if(document.images)
		document.images[strImgName].src = strImgSrc;
}

 

// ----- BEGIN: FOR GETTING COOKIES -----
function getCookie(strName) {
	var strCookie = document.cookie;
	if(strCookie.length == 0) return '';
	var strValue = '';
	var intStart = strCookie.indexOf(strName + '=');
	if(intStart > -1) {
		intStart += strName.length + 1;
		var intEnd = strCookie.indexOf(';', intStart + 1);
		if(intEnd == -1) intEnd = strCookie.length;
		strValue = strCookie.substring(intStart, intEnd);
	}
	return strValue;
}

function setCookie(strName, strValue, strExp) {
	document.cookie = strName + '=' + strValue
			+ (document.location.hostname == 'www.allstarvacationhomes.com' ? '' : '')
			+ (strExp == '' ? '' : ';expires=' + strExp);
}


function setCookieWithPath(strName, strValue, strPath, strExp) {
	document.cookie = strName + '=' + strValue
			+ (document.location.hostname == 'www.allstarvacationhomes.com' ? '' : '')
			//+ (strPath == '' ? '' : ';path=' + strPath)
			+ (strExp == '' ? '' : ';expires=' + strExp);
}

function deleteCookie(strName) {
	var dtmExp = new Date();
	dtmExp.setTime(dtmExp.getTime() - 3600000); // 1 hr ago
	setCookieWithPath(strName, '', '/', dtmExp.toGMTString())
}
// ----- END: FOR GETTING COOKIES -----





// ----- BEGIN: FOR STRING/NUMBER CONVERSIONS -----
function isNumericString(strOrig) {
	if(strOrig.length==0) return false;

	var strChar;
	var strValidChars = "1234567890$,";
	for (var i = 0; i < strOrig.length; i++) {
		strChar = strOrig.substring(i, i+1);
		if (strValidChars.indexOf(strChar, 0) == -1)
			return false;
	}
	return true;
}

function isValidEmail(strEmail) {
	var strBadChars, strChar, strSuffix, intNumBadChars, intCount, intPos, intPosPeriod

	// --- CHECKING FOR BAD CHARACTERS ---
	strBadChars = ' /:,#\'"`$~!%^&*();<>?\\|{}[]';
	intNumBadChars = strBadChars.length
	for(intCount = 0;  intCount < intNumBadChars;  ++intCount) {
		strChar = strBadChars.substring(intCount, 1);
		if(strEmail.indexOf(strChar) > 0)
			return false;
	}

	// --- CHECKING FOR THE @ SIGN ---
	intPos = strEmail.indexOf('@')
	if(intPos == -1)
		return false;

	// --- CHECKING FOR A . AFTER THE @ SIGN ---
	intPosPeriod = strEmail.indexOf('.', intPos);
	if(intPosPeriod == -1)
		return false;

	// --- CHECKING FOR AT LEAST 2 AFTER THE PERIOD ---
	if(strEmail.length - intPosPeriod < 3)
		return false;

	// --- ALL CHECKS OUT - MUST BE OKAY ---
	return true;
}
// ----- END: FOR STRING/NUMBER CONVERSIONS -----


// load into head of page

  var notepad_page
	var paddir
	// BROWSER CHECK
	browser = navigator.appName;
	appVer = parseInt(navigator.appVersion);
	ie = "Microsoft Internet Explorer";
	ns = "Netscape";
	if (browser == ns && appVer < 5) {
			notepad_page = "_ns";
	}else{
	        notepad_page = "_ie";
			
	} 

	notepad_page = "_ie";
	
	
if(document.all || document.layers || document.getElementById) {
	document.write('<' + 'SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/js/notepad/notepad'+notepad_page+'.js"></' + 'SCRIPT>');
	document.write('<' + 'SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/js/notepad/listing.js"></' + 'SCRIPT>');
}


var objNotePad = null, divSP = null, imgPreloads;
function loadNotePadObj() {
	if(blnNotePadJSLoaded)
		objNotePad = new jsNotePad('objNotePad', divSP);
	else
		setTimeout('loadNotePadObj()', 1111);
}
function initNotePad() {
	if(document.getElementById)
		divSP = document.getElementById('divNotePad');
	else if(document.all)
		divSP = document.all('divNotePad');
	else if(document.layers)
		divSP = document.layers['divNotePad'];
	if(divSP != null) {
		loadNotePadObj();

		
	}
}




function errorsuppressor(){
		window.status = 'JavaScript Error';
		return true;
	}
//window.onerror=errorsuppressor


// check browser
var br
if(navigator.appName == "Netscape" && navigator.appVersion.charAt(0)=="4"){br="N";}
else if(navigator.appName == "Microsoft Internet Explorer" && document.all != null){br="IE";}
else if(navigator.appName == "Netscape" && document.getElementById != null && navigator.appVersion.charAt(0)=="5"){br="N5";}
else{br=null}


function goProperty(box) {
		var val = box.options[box.selectedIndex].value;
		if (val != "") {
					window.parent.location.href = val;
				}
			}

function go(box) {
		var val = box.options[box.selectedIndex].value;
		if (val != "") {
					window.location.href = val;
				}
			}
			
			

function ViewImage(page) { var cal = window.open(page, "view_image", "directories=no,height=400,location=no,menubar=No,resizable=Yes,scrollbars=yes,status=no,width=600"); } 

function ViewCalendar(page) { var cal = window.open(page, "calendar", "directories=no,height=400,location=no,menubar=no,scrollbars=yes,status=no,width=525"); } 

function ViewVirtual(page) { var cal = window.open(page, "Allstarvation", "directories=no,height=450,location=no,menubar=no,scrollbars=yes,status=no,width=600"); } 

function OpenWindow(page,width,height) { var cal = window.open(page, "popup", "directories=no,resizable=1,height=" + height + ",location=no,menubar=no,scrollbars=yes,status=no,width=" + width + ""); }


function PopUp(URL,Window,w,h,x,y) {
	var popupwin = window.open(URL,Window,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+w+",height="+h+",left="+x+",top="+y);
}

function OpenTest() {
	PopUp('/testimonials.asp','Test','590','360','10','10');
}

function Jump(Location) {
	opener.location.href = Location;window.close()
}

function QuickCheck() {

if (document.fSite.Name.value == "" && (document.fSite.Sub.value == "" ) ) {
	alert("Please Specify a Search Term");
	document.fSite.Name.focus();return false
	}


if(document.fSite.Name.value.length < 3 && document.fSite.Sub.value.length < 3 ) {
		alert('You need to specify more than 2 letters to search for.');
		return false;
	}
	

}



function confirmAction() {
    return confirm("THIS ACTION WILL DELETE THIS COMPLETELY..\n\nClick OK to DELETE!\nClick Cancel to ABORT!")
}


//----------------------------------------------------------------------------
// Code to determine the browser and version.
//----------------------------------------------------------------------------

function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isOP    = false;  // Opera
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "Opera";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isOP = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as Netscape 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }

  s = "MSIE";
  if ((i = ua.indexOf(s))) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
}

var browser = new Browser();

//----------------------------------------------------------------------------
// Code for handling the menu bar and active button.
//----------------------------------------------------------------------------

var activeButton = null;

function buttonClick(event, menuId) {

  var button;

  // Get the target button element.

  if (browser.isIE)
    button = window.event.srcElement;
  else
    button = event.currentTarget;

  // Blur focus from the link to remove that annoying outline.

  button.blur();

  // Associate the named menu to this button if not already done.
  // Additionally, initialize menu display.

  if (button.menu == null) {
    button.menu = document.getElementById(menuId);
    if (button.menu.isInitialized == null)
      menuInit(button.menu);
	  
  }
  
  // index menu compare // and communities
  if (document.getElementById('bedSelect')!= null){
  if (menuId == "comMenu" || menuId == "hmMenu") {
	  document.getElementById('bedSelect').style.visibility='hidden';

	  }else{
	  document.getElementById('bedSelect').style.visibility='visible';

  }
  }
  
   
  // index menu communities
  if (document.getElementById('Index_hometype')!= null){
  if (menuId == "comMenu") {
	  document.getElementById('Index_hometype').style.visibility='hidden';

	  }else{
	  document.getElementById('Index_hometype').style.visibility='visible';

  }
  }
  
  
  // left site menu
  
  
   // index menu communities
  if (document.getElementById('page_SeriesSelect')!= null){
  if (menuId == "hmMenu") {
	  document.getElementById('page_SeriesSelect').style.visibility='hidden';

	  }else{
	  document.getElementById('page_SeriesSelect').style.visibility='visible';

  }
  }
  
  
  // compare search compare menu
  if (document.getElementById('com_sleeps')!= null){
  if (menuId == "hmMenu") {
	  document.getElementById('com_sleeps').style.visibility='hidden';
	  document.getElementById('com_bed').style.visibility='hidden';

	  }else{
	  
	  document.getElementById('com_sleeps').style.visibility='visible';
	  document.getElementById('com_bed').style.visibility='visible';

  }
  }
  
  
  // compare search community
  if (document.getElementById('com_price')!= null){
  if (menuId == "comMenu") {
	  document.getElementById('com_price').style.visibility='hidden';
	  document.getElementById('com_bath').style.visibility='hidden';

	  }else{
	  
	  document.getElementById('com_price').style.visibility='visible';
	  document.getElementById('com_bath').style.visibility='visible';

  }
  }

  
  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the button, if not already done.

  if (button.onmouseout == null)
    button.onmouseout = buttonOrMenuMouseout;

  // Exit if this button is the currently active one.

  if (button == activeButton)
    return false;

  // [END MODIFIED]

  // Reset the currently active button, if any.

  if (activeButton != null)
    resetButton(activeButton);

  // Activate this button, unless it was the currently active one.

  if (button != activeButton) {
    depressButton(button);
    activeButton = button;
  }
  else
    activeButton = null;

  return false;
}

function buttonMouseover(event, menuId) {

  var button;



  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Activates this button's menu if no other is currently active.

  if (activeButton == null) {
    buttonClick(event, menuId);
    return;
  }

  // [END MODIFIED]

  // Find the target button element.

  if (browser.isIE)
    button = window.event.srcElement;
  else
    button = event.currentTarget;

  // If any other button menu is active, make this one active instead.

  if (activeButton != null && activeButton != button)
    buttonClick(event, menuId);

 
}

function depressButton(button) {

  var x, y;

  // Update the button's style class to make it look like it's
  // depressed.

  button.className += " menuButtonActive";

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the button, if not already done.

  if (button.onmouseout == null)
    button.onmouseout = buttonOrMenuMouseout;
  if (button.menu.onmouseout == null)
    button.menu.onmouseout = buttonOrMenuMouseout;

  // [END MODIFIED]

  // Position the associated drop down menu under the button and
  // show it.

  x = getPageOffsetLeft(button);
  y = getPageOffsetTop(button) + button.offsetHeight;

  // For IE, adjust position.

  if (browser.isIE) {
    x += button.offsetParent.clientLeft;
    y += button.offsetParent.clientTop;
  }

  // set the x variable + a number to push right
  //set the y variable + a number to push down
  //alert(getContainerWith(window.event.srcElement, "A", "menuButton"))

  button.menu.style.left = x + - 0 + "px";
  button.menu.style.top  = y + - 5 + "px";
  button.menu.style.visibility = "visible";
}

function resetButton(button) {
  // Restore the button's style class.

  removeClassName(button, "menuButtonActive");

  // Hide the button's menu, first closing any sub menus.

  if (button.menu != null) {
    closeSubMenu(button.menu);
    button.menu.style.visibility = "hidden";
	
	// make the dropdown visible - left side search
	if (document.getElementById('bedSelect')!= null){
  	document.getElementById('bedSelect').style.visibility='visible';

  }
  
  // index menu
  if (document.getElementById('Index_hometype')!= null){
  	document.getElementById('Index_hometype').style.visibility='visible';

  }
  
  // page side menu
  if (document.getElementById('page_SeriesSelect')!= null){
  	document.getElementById('page_SeriesSelect').style.visibility='visible';

  }
  
  // compare search page  
  
  // page side menu
  if (document.getElementById('com_sleeps')!= null){
  	document.getElementById('com_sleeps').style.visibility='visible';
	document.getElementById('com_bed').style.visibility='visible';

  }
  
   if (document.getElementById('com_price')!= null){
      document.getElementById('com_price').style.visibility='visible';
	  document.getElementById('com_bath').style.visibility='visible';
   }
  
  
  }
}

//----------------------------------------------------------------------------
// Code to handle the menus and sub menus.
//----------------------------------------------------------------------------

function menuMouseover(event) {

  var menu;

  // Find the target menu element.

  if (browser.isIE)
    menu = getContainerWith(window.event.srcElement, "DIV", "menu");
  else
    menu = event.currentTarget;

  // Close any active sub menu.

  if (menu.activeItem != null)
    closeSubMenu(menu);
}

function menuItemMouseover(event, menuId) {

  var item, menu, x, y;

  // Find the target item element and its parent menu element.

  if (browser.isIE)
    item = getContainerWith(window.event.srcElement, "A", "menuItem");
  else
    item = event.currentTarget;
  menu = getContainerWith(item, "DIV", "menu");

  // Close any active sub menu and mark this one as active.

  if (menu.activeItem != null)
    closeSubMenu(menu);
  menu.activeItem = item;

  // Highlight the item element.

  item.className += " menuItemHighlight";

  // Initialize the sub menu, if not already done.

  if (item.subMenu == null) {
    item.subMenu = document.getElementById(menuId);
    if (item.subMenu.isInitialized == null)
      menuInit(item.subMenu);
  }

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the sub menu, if not already done.

  if (item.subMenu.onmouseout == null)
    item.subMenu.onmouseout = buttonOrMenuMouseout;

  // [END MODIFIED]

  // Get position for submenu based on the menu item.

  x = getPageOffsetLeft(item) + item.offsetWidth;
  y = getPageOffsetTop(item);

  // Adjust position to fit in view.

  var maxX, maxY;

  if (browser.isIE) {
    maxX = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) +
      (document.documentElement.clientWidth != 0 ? document.documentElement.clientWidth : document.body.clientWidth);
    maxY = Math.max(document.documentElement.scrollTop, document.body.scrollTop) +
      (document.documentElement.clientHeight != 0 ? document.documentElement.clientHeight : document.body.clientHeight);
  }
  if (browser.isOP) {
    maxX = document.documentElement.scrollLeft + window.innerWidth;
    maxY = document.documentElement.scrollTop  + window.innerHeight;
  }
  if (browser.isNS) {
    maxX = window.scrollX + window.innerWidth;
    maxY = window.scrollY + window.innerHeight;
  }
  maxX -= item.subMenu.offsetWidth;
  maxY -= item.subMenu.offsetHeight;

  if (x > maxX)
    x = Math.max(0, x - item.offsetWidth - item.subMenu.offsetWidth
      + (menu.offsetWidth - item.offsetWidth));
  y = Math.max(0, Math.min(y, maxY));

  // Position and show the sub menu.

  item.subMenu.style.left = x + "px";
  item.subMenu.style.top  = y + "px";
  item.subMenu.style.visibility = "visible";

  // Stop the event from bubbling.

  if (browser.isIE)
    window.event.cancelBubble = true;
  else
    event.stopPropagation();
}

function closeSubMenu(menu) {

  if (menu == null || menu.activeItem == null)
    return;

  // Recursively close any sub menus.

  if (menu.activeItem.subMenu != null) {
    closeSubMenu(menu.activeItem.subMenu);
    menu.activeItem.subMenu.style.visibility = "hidden";
    menu.activeItem.subMenu = null;
  }
  removeClassName(menu.activeItem, "menuItemHighlight");
  menu.activeItem = null;
}

// [MODIFIED] Added for activate/deactivate on mouseover. Handler for mouseout
// event on buttons and menus.

function buttonOrMenuMouseout(event) {

  var el;

  // If there is no active button, exit.

  if (activeButton == null)
    return;

  // Find the element the mouse is moving to.

  if (browser.isIE)
    el = window.event.toElement;
  else if (event.relatedTarget != null)
      el = (event.relatedTarget.tagName ? event.relatedTarget : event.relatedTarget.parentNode);

  // If the element is not part of a menu, reset the active button.

  if (getContainerWith(el, "DIV", "menu") == null) {
    resetButton(activeButton);
    activeButton = null;
  }
  
  
}



// [END MODIFIED]

//----------------------------------------------------------------------------
// Code to initialize menus.
//----------------------------------------------------------------------------

function menuInit(menu) {

  var itemList, spanList;
  var textEl, arrowEl;
  var itemWidth;
  var w, dw;
  var i, j;

  // For IE, replace arrow characters.

  if (browser.isIE) {
    menu.style.lineHeight = "2.5ex";
    spanList = menu.getElementsByTagName("SPAN");
    for (i = 0; i < spanList.length; i++)
      if (hasClassName(spanList[i], "menuItemArrow")) {
        spanList[i].style.fontFamily = "Webdings";
        spanList[i].firstChild.nodeValue = "4";
      }
  }

  // Find the width of a menu item.

  itemList = menu.getElementsByTagName("A");
  if (itemList.length > 0)
    itemWidth = itemList[0].offsetWidth;
  else
    return;

  // For items with arrows, add padding to item text to make the
  // arrows flush right.

  for (i = 0; i < itemList.length; i++) {
    spanList = itemList[i].getElementsByTagName("SPAN");
    textEl  = null;
    arrowEl = null;
    for (j = 0; j < spanList.length; j++) {
      if (hasClassName(spanList[j], "menuItemText"))
        textEl = spanList[j];
      if (hasClassName(spanList[j], "menuItemArrow"))
        arrowEl = spanList[j];
    }
    if (textEl != null && arrowEl != null) {
      textEl.style.paddingRight = (itemWidth 
        - (textEl.offsetWidth + arrowEl.offsetWidth)) + "px";
      // For Opera, remove the negative right margin to fix a display bug.
      if (browser.isOP)
        arrowEl.style.marginRight = "0px";
    }
  }

  // Fix IE hover problem by setting an explicit width on first item of
  // the menu.

  if (browser.isIE) {
    w = itemList[0].offsetWidth;
    itemList[0].style.width = w + "px";
    dw = itemList[0].offsetWidth - w;
    w -= dw;
    itemList[0].style.width = w + "px";
  }

  // Mark menu as initialized.
  // hide the dropdown menu for IE
  
  menu.isInitialized = true;
}

//----------------------------------------------------------------------------
// General utility functions.
//----------------------------------------------------------------------------

function getContainerWith(node, tagName, className) {

  // Starting with the given node, find the nearest containing element
  // with the specified tag name and style class.

  while (node != null) {
    if (node.tagName != null && node.tagName == tagName &&
        hasClassName(node, className))
      return node;
    node = node.parentNode;
  }

  return node;
}

function hasClassName(el, name) {

  var i, list;

  // Return true if the given element currently has the given class
  // name.

  list = el.className.split(" ");
  for (i = 0; i < list.length; i++)
    if (list[i] == name)
      return true;

  return false;
}

function removeClassName(el, name) {

  var i, curList, newList;

  if (el.className == null)
    return;

  // Remove the given class name from the element's className property.

  newList = new Array();
  curList = el.className.split(" ");
  for (i = 0; i < curList.length; i++)
    if (curList[i] != name)
      newList.push(curList[i]);
  el.className = newList.join(" ");
}

function getPageOffsetLeft(el) {

  var x;

  // Return the x coordinate of an element relative to the page.

  x = el.offsetLeft;
  if (el.offsetParent != null)
    x += getPageOffsetLeft(el.offsetParent);

  return x;
}

function getPageOffsetTop(el) {

  var y;

  // Return the x coordinate of an element relative to the page.

  y = el.offsetTop;
  if (el.offsetParent != null)
    y += getPageOffsetTop(el.offsetParent);

  return y;
}

//]]>

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


// popup help menus
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=lib_bwcheck()

/***************************************************************************************
Variables to set:
***************************************************************************************/
messages=new Array()
//Write your descriptions in here.
messages[0] = "There is a one time departure cleaning fee on stays less than 6 nights."
messages[1] = "Please contact our Reservations Department for details at 1-800-592-5568 if you need to coordinate additional baby equipment items. "
messages[2] = "<strong>Town Homes:</strong> <br>$75.00 per week or $15.00 per day<br><strong>Resort and Estate Series:</strong> <br>$150 per week or $35 per day<br><strong>Condos do not have pools</strong>. <br>Certain Terms & Conditions apply. <br>See below for Terms & Conditions."
messages[3] = "Please contact our Reservations Department at 1-888-249-1779 if you need a rental car during your stay.    See below for Terms & Conditions"
messages[4] = "For more information on how we can advise you on all aspects of your vacation home or condo purchase, please call us at 1-800-693-0996   or e-mail at realestate@allstarvacationhomes.com"
messages[5] = "There will be an $85 Property Protection & Processing fee. The Property Protection Fee ($60) is a damage waiver that will cover up to $1500 for accidental or inadvertent damages. Please be advised that intentional damage or gross negligence will result in additional costs. The Processing Fee ($25) covers our administrative costs. If you make a change to your reservation, there will be an additional processing fee ($20), which will be charged at the time of the change. No changes can be made within 30 days of your arrival."
messages[6] = "For travel insurance coverage information, please contact TravelGuard at 888-409-7749 or when calling from abroad, call 1-715-295-5452.  Reference policy #: 008085. Travel insurance premium will be processed within 24 hours of making your reservation to start coverage. <br> The Travel Insurance payment is processed when the reservation is booked."
messages[7] = "Enter your gift certificate / promotional code here. <br>Not valid during peak / holiday season or with any other discount or offer <strong>unless otherwise specific.</strong>"
messages[8] = "A Mid-stay Clean includes: washing all towels and sheets, cleaning all bathrooms, kitchen area, vacuuming and dusting, sweeping and mopping and refreshing your starter paper products. <br><strong>Cleans are completed between 9:00 a.m. and 3:00 p.m.</strong>"
messages[9] = "The charge for an early check in is half the nightly rental rate. If you request an Early Check In your home will be available at 9:00 a.m. on your arrival date. Normal Check-in time is 4:00 p.m."
messages[10] = " The charge for a late check out is half the nightly rental rate. Your Late Check Out time is 5:00 p.m. on your departure date. Normal Check-Out time is 11:00 a.m."
messages[11] = "Money Rebate or Free Rental Car cannot be combined with a Promotion or Gift Certificate unless otherwise specified. <br><strong>Offer not valid with CONDO or TOWNHOUSE rental.</strong>"
messages[12] = "State law limits occupancy based on the number of bedrooms.  Please read our FAQ page for specific information under Vacation Home Information."
messages[13] = "Most of our Estate Homes have 3 or more Masters Bedrooms, while our Resort and Luxury Homes typically have 2 or more"
messages[14] = "Vacation home will include either a 42 inch Plasma Television or a 52 inch TV or larger"
messages[15] = "Several of our Vacation Homes include both a Game Room and Home Movie Theatre, however you will find more of a selection of homes if you choose only one option"
messages[16] = "If one of our homes does not include a BBQ grill one can be ordered for an additional charge"
messages[17] = "Most of our vacation homes with Game Rooms or Home Theatres have had the garage space converted. Therefore, many of our homes do not include garages."
messages[18] = "High Speed Internet Access is not available in every home with a computer.  Be sure to check amenities list if this is a requirement.<br> <strong>Note:</strong> If high speed is available that does not mean there is a computer in the home.  Please check the amenities list of each vacation home for details"
messages[19] = "Please check the property`s amenities list to verify if it is a PS1, PS2, WII or X Box"
messages[20] = "Please click on Full Quote to view the total cost of rental including taxes and fees for this vacation rental."
messages[21] = "Select either 2 Gas Cards or 2 Grocery Cards or one of each"

calendarLegend = new Array();
calendarLegend[0] = "<table cellpadding=1 cellspacing=2 bgcolor=#ffffff width=300><tr><td valign=top style='background:#EFEFEF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Available</td></tr><tr><td valign=top style='background:#FFFF99;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Unavailable</td></tr></tr><td valign=top style='background:#99CCFF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Owner/Comp</td><tr><tr><td valign=top style='background:#99CC00;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td><td valign=top class=caltd>Available for Both Check In/Out</td></tr><tr><td valign=top style='background:#005900;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Early Check In: Check In Time: 9 am</td></tr><tr><td valign=top style='background:#800080;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></td><td valign=top class=caltd>Late Check Out: Check Out Time: 5 pm</td></tr></tr><td valign=top style='background:CACAFF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>24 Hour Hold on Property</td><tr></table>";
// vista cay menu
calendarLegend[1] = "<table cellpadding=1 cellspacing=2 bgcolor=#ffffff width=300><tr><td valign=top style='background:#EFEFEF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Available</td></tr><tr><td valign=top style='background:#003366;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Unavailable</td></tr></tr><td valign=top style='background:#99CCFF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Owner/Comp</td><tr><tr><td valign=top style='background:1473D3;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td><td valign=top class=caltd>Available for Both Check In/Out</td></tr><tr><td valign=top style='background:#005900;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Early Check In: Check In Time: 9 am</td></tr><tr><td valign=top style='background:#800080;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></td><td valign=top class=caltd>Late Check Out: Check Out Time: 5 pm</td></tr></tr><td valign=top style='background:CACAFF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>24 Hour Hold on Property</td><tr></table>";
// Main Calendars not on Reports
calendarLegend[2] = "<table cellpadding=1 cellspacing=2 bgcolor=#ffffff width=300><tr><td valign=top style='background:#EFEFEF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Available</td></tr><tr><td valign=top style='background:#FFCC66;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Unavailable</td></tr></tr><td valign=top style='background:#99CCFF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Owner/Comp</td><tr><tr><td valign=top style='background:#C0C081;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td><td valign=top class=caltd>Available for Both Check In/Out</td></tr><tr><td valign=top style='background:#005900;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Early Check In: Check In Time: 9 am</td></tr><tr><td valign=top style='background:#800080;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></td><td valign=top class=caltd>Late Check Out: Check Out Time: 5 pm</td></tr></tr><td valign=top style='background:CACAFF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>24 Hour Hold on Property</td><tr></table>";

calendarLegend[3] = "<table cellpadding=1 cellspacing=2 bgcolor=#ffffff width=300><tr><td valign=top style='background:#EFEFEF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Available</td></tr><tr><td valign=top style='background:#FFCC66;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Unavailable</td></tr><tr><td valign=top style='background:#C0C081;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td><td valign=top class=caltd>Available for Both Check In/Out</td></tr><tr><td valign=top style='background:#005900;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>Early Check In: Check In Time: 9 am</td></tr><tr><td valign=top style='background:#800080;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></td><td valign=top class=caltd>Late Check Out: Check Out Time: 5 pm</td></tr></tr><td valign=top style='background:CACAFF;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign=top class=caltd>24 Hour Hold on Property</td><tr></table>";

//To have more descriptions just add to the array.

fromX = 10 //How much from the actual mouse X should the description box appear?
fromY = -20 //How much from the actual mouse Y should the description box appear?

//To set the font size, font type, border color or remove the border or whatever,
//change the clDescription class in the stylesheet.

//Makes crossbrowser object.
function makeObj(obj){								
   	this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
	if(!this.evnt) return false
	this.css=bw.dom||bw.ie4?this.evnt.style:bw.ns4?this.evnt:0;	
   	this.wref=bw.dom||bw.ie4?this.evnt:bw.ns4?this.css.document:0;		
	this.writeIt=b_writeIt;																
	return this
}

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

function b_writeIt(text){
	if (bw.ns4){this.wref.write(text);this.wref.close()}
	else this.wref.innerHTML = text
}

//Capturing mousemove
var descx = 0
var descy = 0
function popmousemove(e){descx=bw.ns4||bw.ns6?e.pageX:event.x; descy=bw.ns4||bw.ns6?e.pageY:event.y}

var oDesc;
//Shows the messages
function popup(num){
    if(oDesc){
		oDesc.writeIt('<div class="clDescription">'+messages[num]+'</div>')
		if(bw.ie5||bw.ie6) descy = descy+document.body.scrollTop
		oDesc.css.left = (descx+fromX)+px
		oDesc.css.top = (descy+fromY)+px
		oDesc.css.visibility = "visible"
    }
}

document.write("<script language=\"JavaScript\" src=\"/ad2/js/form_calendar.js\"></script>")
document.write("<script language=\"JavaScript\" src=\"/js/javaCalendar.js?v=2\"></script>")
//Hides it

function popout(){
	if(oDesc) oDesc.css.visibility = "hidden"
}

function setPopup(){
   	if(bw.ns4)document.captureEvents(Event.MOUSEMOVE)
    document.onmousemove = popmousemove;
	oDesc = new makeObj('divDescription')
}


//-------------------------------------------------------------
// tooltip 2
//-------------------------------------------------------------

var tipwidth = '150px' //default tooltip width
var tipbgcolor = '#E7E8E2'  //tooltip bgcolor
var disappeardelay = 250  //tooltip disappear speed onMouseout (in miliseconds)
var vertical_offset = "8px" //horizontal offset of tooltip from anchor link
var horizontal_offset = "8px" //horizontal offset of tooltip from anchor link
fromX = 10 //How much from the actual mouse X should the description box appear? Netscape
fromY = -10 //How much from the actual mouse Y should the description box appear? Netscape

/////No further editting needed

var ie4 = document.all
var ns6 = document.getElementById&&!document.all

document.write('<div id="fixedtipdiv" style="visibility:hidden;" ></div>')
document.write('<img id=dhtmlpointer src=https://www.allstarvacationhomes.com/images/site/arrow_tooltip.gif style="visibility:hidden;">') //write out pointer image

function getposOffset(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
	totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
	parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhidetip(obj, e, visible, hidden, tipwidth){
if (ie4||ns6)
tipmenuobj.style.left=tipmenuobj.style.top=-500
	if (tipwidth!=""){
	tipmenuobj.widthobj=tipmenuobj.style
	tipmenuobj.widthobj.width=tipwidth
}
if (e.type =="click" && obj.visibility==hidden || e.type=="mouseover")
	obj.visibility=visible
else if (e.type =="click")
	obj.visibility=hidden
}

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
	var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
	if (whichedge=="rightedge"){
		var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 :	window.pageXOffset+window.innerWidth-15
		tipmenuobj.contentmeasure = tipmenuobj.offsetWidth
		if (windowedge-tipmenuobj.x < tipmenuobj.contentmeasure)
		edgeoffset=tipmenuobj.contentmeasure-obj.offsetWidth
	} else {
		var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		tipmenuobj.contentmeasure=tipmenuobj.offsetHeight
		if (windowedge-tipmenuobj.y < tipmenuobj.contentmeasure)
		edgeoffset=tipmenuobj.contentmeasure+obj.offsetHeight
	}
return edgeoffset
}


var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""


function tooltips(menucontents, obj, e, tipwidth){

if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
	clearhidetip()
	tipmenuobj = document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
	tipmenuobj.innerHTML=menucontents

if (ie4||ns6){

showhidetip(tipmenuobj.style, e, "visible", "hidden", tipwidth)


         if(bw.ns4)document.captureEvents(Event.MOUSEMOVE)
		
		
		
		if (bw.ns6) {
		
		    descx = bw.ns4 || bw.ns6? e.pageX:event.x; 
       		descy = bw.ns4 || bw.ns6? e.pageY:event.y
			tipmenuobj.style.left = (descx + fromX) + "px"
			tipmenuobj.style.top = (descy + fromY) + "px"
			tipmenuobj.style.visibility = "visible"
			
		} else {

	showhidetip(pointerobj.style, e, "visible", "hidden", "")
	tipmenuobj.x= getposOffset(obj, "left")
	tipmenuobj.y= getposOffset(obj, "top")
	tipmenuobj.style.left= tipmenuobj.x - clearbrowseredge(obj, "rightedge")+ "px"
	tipmenuobj.style.top= tipmenuobj.y - clearbrowseredge(obj, "bottomedge") + obj.offsetHeight + "px"

// pointer
	pointerobj.style.top = tipmenuobj.y - clearbrowseredge(obj, "bottomedge") + obj.offsetHeight - 14 + "px"
	pointerobj.style.left = tipmenuobj.x - clearbrowseredge(obj, "rightedge") + 12   + "px"
	
	  }

}
}

function hidetip(e){
if (typeof tipmenuobj!="undefined"){
if (ie4||ns6)
	tipmenuobj.style.visibility="hidden"
	pointerobj.style.visibility="hidden"
}
}

function cleartooltips(){
if (ie4||ns6)
	delayhide= setTimeout("hidetip()",disappeardelay)
}

function clearhidetip(){
if (typeof delayhide!="undefined")
	 clearTimeout(delayhide)
}




//--------------------------------------------------------------
// rotating images.
//--------------------------------------------------------------

// image fade rotation
//new fadeshow(fadeimages, 500, 333, 1, 7000, 1, "R")  "R" is random , leave blank for not random
var fadeimages=new Array()
fadeimages[0] = ["1-Celebrate-togetherness-Special-Occasions.jpg", "", "","Discover your vacation home away from home"]     
fadeimages[1] = ["2-Celebrate-Togetherness-Family-and-Friends.jpg", "", "", "Private Pool Vacation Homes in Orlando"]          
fadeimages[2] = ["3-Celebrate-Value-Choose-Your-Home.jpg", "", "","Reconnect on your next Orlando family vacation"] 
fadeimages[3] = ["4-Celebrate-Value-Your-Own-Pool.jpg", "", "","Reserve the vacation home of your choice"]
fadeimages[4] = ["5-Celebrate-in-Orlando-Closest-Homes-to-Disney.jpg", "", "","Find your Orlando vacation getaway"]
fadeimages[5] = ["6-Celebrate-in-Orlando-Unforgettable-Experiences.jpg", "", "","Celebrate in Orlandos Unforgettable Experiences"]      
fadeimages[6] = ["7-Celebrate-with-All-Star-Commitment-to-Service.jpg", "", "","Enjoy family fun in an Orlando vacation rental"]  

 
var fadebgcolor = "ffffff"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src= 'https://www.allstarvacationhomes.com/images/homes/' + theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px" alt="'+this.theimages[picindex][3]+'" width=550>'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}


//------------------------------------------------------------------
// rotating images and text
// text on the index page
//-------------------------------------------------------------------

var delay = 7000; //set delay between message change (in miliseconds)
var maxsteps = 40; // number of steps to take to change from start color to endcolor
var stepdelay = 60; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor = new Array(255,255,255); // start color (red, green, blue)
var endcolor = new Array(0,0,0); // end color (red, green, blue)

var fcontent=new Array();

begintag = '<div style="padding:5px;text-align:center;"><table cellpadding=3 width=350 cellspacing=0 border=0 align=center><tr><td valign=top align=center>'; //set opening tag, such as font declarations

closetag = '</td></tr></td></table></div>';

var scrollerwidth='150px'; //set scroller width
var scrollerheight='150px'; //set scroller height

var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////

//var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;

/*Rafael Raposo edited function*/
//function to change content
function changecontent(){
  if (index>=fcontent.length)
    index=0
	var strImage = "";
	
	if (fcontent[index][1].length > 0) {
	     strImage = "<img src=https://www.allstarvacationhomes.com/images/homes/" + fcontent[index][1] + " style=\"border:1px solid #000;\"  hspace=10 alt=\"" + fcontent[index][2] + "\"></td></tr><tr><td valign=top align=center><br>"
        
	 }
	
  if (DOM2){
     
    //document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("fscroller").innerHTML= begintag + strImage + fcontent[index][0] + closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML = begintag + strImage + fcontent[index][0] + closetag;
  index++
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function linkcolorchange(step){
  var obj=document.getElementById("fscroller").getElementsByTagName("A");
  if (obj.length>0){
    for (i=0;i<obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}

/*Rafael Raposo edited function*/
var fadecounter;
function colorfade(step) {
  if(step<=maxsteps) {	
    document.getElementById("fscroller").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter = setTimeout("colorfade("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter);
    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    setTimeout("changecontent()", delay);
	
  }   
}

/*Rafael Raposo's new function*/
function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff > 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}




function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

function StopFlashMovie()
{
	var flashMovie = getFlashMovieObject("flashmovie1");
	flashMovie.StopPlay();
}


function center(object)
 {
  //object.style.marginLeft = "-" + parseInt(object.offsetWidth / 2) + "px";
  //object.style.marginTop = "-" + parseInt(object.offsetHeight /2 ) + "px";
 }
 
 var loadedvideo;
 var videoplayer;
 function videoBox(videoload,player){
  	var videobox = document.getElementById("videobox");  
	loadedvideo = videoload;
	videoplayer = player;
	document.getElementById("slideshow-box").style.display = "none"; 
	document.getElementById("videobox").style.display = "block"; 

	
	strTablestart = "<table bgcolor=#FFFFFF width=550 height=359 border=0 cellpadding=1 cellspacing=0><tr><td rowspan=3><img src=https://www.allstarvacationhomes.com/images/site/spacer.gif width=1 height=359></td><td><img src=https://www.allstarvacationhomes.com/images/site/spacer.gif width=550 height=1></td></tr><tr><td><a href=javascript:closeVideo();>Close Video</a></td></tr><tr><td  align=center>"

    strTableEnd = "</td></tr></table>"
	
	if (player=="1") {
	document.getElementById("videobox").innerHTML = strTablestart + "<object width=495 height=333 id=flashmovie1><param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\"" + videoload + "&autoplay=1\"></param><embed src=\"" + videoload + "&autoplay=1\" type=\"application/x-shockwave-flash\" width=\"495\" height=\"333\"  name=\"flashmovie1\"></embed></object>" + strTableEnd; 


	 } else if (player=="2")  { // mixpo
	 
	 
document.getElementById("videobox").innerHTML = strTablestart + "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=\"flashmovie1\" codebase=\"http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab\" width=\"320\" height=\"240\"> <param name=\"movie\" value=\"http://www.mixpo.com/player/main.swf\" /> <param name=\"quality\" value=\"high\" /> <param name=\"bgcolor\" value=\"#000000\" /> <param name=\"allowScriptAccess\" value=\"always\" /> <param name=\"allowFullScreen\" value=\"false\" /> <param name=\"flashvars\" value=\"guid=" + videoload + "&environment=&host=www.mixpo.com&forcePlay=false&autoPlay=true&autoPlayAudio=true\" /> <embed src=\"http://www.mixpo.com/player/main.swf\" quality=\"high\" bgcolor=\"#000000\" width=\"320\" height=\"240\" name=\"flashmovie1\" align=\"middle\" play=\"true\" loop=\"false\" quality=\"high\" allowScriptAccess=\"always\" allowFullScreen=\"true\" flashvars=\"guid=" + videoload + "&environment=&host=www.mixpo.com&forcePlay=false&autoPlay=true&autoPlayAudio=true\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.adobe.com/go/getflashplayer\"> </embed></object>" + strTableEnd;


     } else if (player=="3")  { // normal
	 
	 document.getElementById("videobox").innerHTML = strTablestart + "<object width=\"375\" height=\"285\" id=\"flashmovie1\"><param name=\"movie\" value=\"/images/homes/videos/flvplayer.swf?file=/images/homes/videos/" + videoload + "\" /><embed src=\"/images/homes/videos/flvplayer.swf?file=/images/homes/videos/" + videoload + "\" width=\"375\" height=\"285\" name=\"flashmovie1\"  allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" /></object>" + strTableEnd;


	 

     } else {
	 
	 document.getElementById("videobox").innerHTML = strTablestart + "<object width=\"400\" height=\"300\" id=\"flashmovie1\"><param name=\"movie\" value=\"/player/flvplayer.swf?file=allstar_commercial.flv\" /><embed src=\"/player/flvplayer.swf?file=allstar_commercial.flv\" width=\"400\" height=\"300\" name=\"flashmovie1\"  allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" /></object>" + strTableEnd;
	 
   }

 }

 function closeVideo(){
    videoBox(loadedvideo,3);
	document.getElementById("videobox").style.display = "none"; 
	document.getElementById("slideshow-box").style.display = "block"; 
	document.getElementById("slideshow-box").style.marginTop = "10px";
	//StopFlashMovie();
	
	
 }

 
// httprequest ajax calls
// load page for get gata
	

function wp_HttpRequest( mcfg ) {
	
	var self = this;
	var obj = null;
	var data = null;
	
	var cfg = {
		mode : (mcfg.mode == "dom") ? "dom" : "text",
		autoload : (mcfg.autoload==false)?false:true,
		url : mcfg.url ? mcfg.url : "",
		parameters : mcfg.parameters ? mcfg.parameters : "",
		method : (mcfg.method == "post") ? "post" : "get",
		form : mcfg.form ? mcfg.form : "",
		cache : (mcfg.cache==false)?false:true,
		onload : mcfg.onload,
		onerror : mcfg.onerror,
		spanid : mcfg.spanid
	};
	
	// -- debug
	try{var debug = new wp_Log();}catch(e){var debug = new Object();debug.log = function(){};};
	this._function = "wp_HttpRequest";
	this.debug = debug;
	// --
	
	init();
	
	function init() {

		if( cfg["autoload"] && cfg["url"]) {
			createConnection();
			load();
		}
	}
	
	function createConnection() {
	
		if( cfg["mode"] == "dom" ) {
			// -- Loading data as dom structure
			if( document.implementation && document.implementation.createDocument ) {
				obj = document.implementation.createDocument("", "", null);
				obj.onload = onload(); // -- mozilla doesn't support "readystatechange" on this object
			} else if( window.ActiveXObject ) {
				obj = new ActiveXObject("Microsoft.XMLDOM");
			} else {
				// -- no support
				obj = null;
			}
		} else {
			// -- Loading data as text
			if(window.XMLHttpRequest && !(window.ActiveXObject)) {
				obj = new XMLHttpRequest();
			} else if(window.ActiveXObject) {
			
				var ver = new Array("Msxml6","Msxml5","Msxml3","Msxml2","Msxml4","Microsoft");
				var i = 0;
				
				do {
					try {
						obj = new ActiveXObject(ver[i++]+".XMLHTTP");
					} catch(e) {
						obj = null;
					}
				} while( !obj && i<ver.length );
			}
			// --
		}
		
		if( !obj && cfg["onerror"] ) {
			cfg["onerror"]();
		}
		
		if( obj ) {
			obj.onreadystatechange = onstatechange;
		}
	}
	
	// -- public functions ------------------------------
	this.cancel = function() {
		if( obj )
			obj.abort();
	}
	
	function load( location, parameters ) {
		
		location = location ? location : cfg.url;
		
		// -- Kolla så vi har en url...
		if( !location ) {
			return false;
		}
		// --
		
		// -- Har vår url parametrar?
		if( location.indexOf("?") > -1 ) {
			//-- Ja, splitta...
			parameters = location.split("?")[1];
			location = location.split("?")[0];
		} else if( !parameters ) {
			// -- Nej, ladda parametrar från constructor
			parameters = cfg.parameters;
		}
		
		if( !cfg.cache ) {
			if( parameters.length ) {
				parameters += "&";
			}
			parameters += "__wp_nocache=";
			parameters += Math.random();	
		}
		
		debug.log(self,parameters);
		
		if( cfg.mode == "dom" ) {
			obj.load( url );
		} else {			
			createConnection();
			location = location + ((parameters.length) ? ("?" + parameters) : "");
			obj.open("GET", location, true);
			obj.send(null);
		}
	}
	this.load = load;
	
	this.submit = function( form, field, action ) {
	
		form = form ? form : cfg.form;
		var parameters = null;
		var data = "";
		
		// -- Försök skapa wp_Form objekt
		var wpform = null;
		
		debug.log(self,"trying to create wp_Form with: "+form);
		
		try {
			wpform = new wp_Form({ id : form });
		} catch( err ) {
			// -- wp_Form.js verkar inte finnas...
			debug.log(self,"FATAL: wp_Form missing...");
		}
		// --
		
		// -- Finns det något formulär att skicka?
		if( !wpform || !form || (field && !document[form][field]) ) {
		
			if( cfg.onerror ) {
				cfg.onerror();
			}
			return;
		}
		// --
		
		// -- bestäm action --
		action = action ? action : cfg.action;
		action = action ? action : document.getElementById(form).action;
		action = action ? action : "/";
		// --
		
		// -- skicka hela formuläret eller endast ett fält?
		if( field ) {
			parameters = wpform.collect( field );
		} else {
			parameters = wpform.collect();
		}
		// --
		
		// -- Bygg...
		for( param in parameters ) {
			if( typeof parameters[param] != "function" ) {
				
				if( data ) {
					data += "&";
				}
				
				if( typeof parameters[param] == "string" ) {
					data += (param + "=" + escape( parameters[param] ));
				} else {
					for( var count = 0; count < parameters[param].length; count++ ) {
						if( data && count ) {
							data += "&";
						}
						data += (param + "=" + escape( parameters[param][count] ));
					}
				}
			}
		}
		
		if( !cfg.cache ) {
			if( data.length ) {
				data += "&";
			}
			data += "__wp_nocache=";
			data += Math.random();	
		}
		
		debug.log(self,"data: "+data);
		// --
		
		// -- posta --
		debug.log(self,"Posting " + data.length + " bytes of data to: "+action);
		
		createConnection();
		obj.open("POST", action, true);
		obj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		obj.setRequestHeader("Content-length", data.length);
		obj.setRequestHeader("Connection", "close");
		obj.send( data );
		// --
	};
	// --------------------------------------------------
	
	// -- event functions -------------------------------
	function onstatechange() {
	
		if( cfg["onstatechange"] ) {
			cfg["onstatechange"]( obj.readyState );
		}
		
		if(obj.readyState == 4) {
			onload();
		}
	}
	
	function onload() {
	
		var doc = null;
		
		if ( window.ActiveXObject ) {
		
			doc=new ActiveXObject("Microsoft.XMLDOM");
			doc.async="false";
			doc.loadXML(obj.responseText);
			
		} else {
		
			var dp = new DOMParser();
			doc = dp.parseFromString( obj.responseText, "text/xml" );
	    }
		
		this.dom = doc.documentElement;
		this.text = obj.responseText;
		this.id = cfg["spanid"]
		
		debug.log(self,"Recieving "+this.text.length +" bytes of data");
		
		if( cfg["onload"] ) {
			cfg["onload"]( this );
		}
	}
	// --------------------------------------------------
	
}


function getServerName(){
    var str = window.location.protocol + '//' + window.location.hostname;
	//alert(str)
    return str;
}

function show800Data( obj) {
            var strHtml;
			var strXML = obj.text.toString();
	        document.getElementById(obj.id).innerHTML = strXML;

    } 
	
	
		function abort800( obj ) {
			obj = null;
		}
		

function get800data(strKeyword,id){

		var strURL = "/webservice/getCampaintfnumber.aspx?";
        var url = getServerName() + strURL;
        url += "q=" + strKeyword
		
		
		var get800number = new wp_HttpRequest({
			autoload : false,
			cache : false,
			onload : show800Data,
			onerror : abort800,
			spanid : id
		});
		
		
		get800number.load(url);
		
	
}


document.write("<scr" + "ipt src=\"/js/prototype.js\" type=\"text/javascript\"></sc" + "ript>")
document.write("<scr" + "ipt src=\"/js/scriptaculous.js?load=effects\" type=\"text/javascript\"></sc" + "ript>")

/* main page video box (domestic & intl) 
===================================================================== */
var MpVpCurPage = 1;
var MpVpLock = false;
function MpVpBlur( lnk ) {
	try {
		lnk.blur();
	} catch(e) {};
}
/*
 * MpVpNext() and MpVpPrev()
 * are called from previous and next buttons
 */
function MpVpNext( lnk ) {
	MpVpBlur( lnk );
	if((MpVpCurPage < 2)&&(!MpVpLock)) {  // change this to 3
		MpVpSlideLeft();
	}
}

function MpVpPrev( lnk ) {
	MpVpBlur( lnk );
	if((MpVpCurPage > 1)&&(!MpVpLock)) {
		MpVpSlideRight();
	}
}

/*
 * MpVpPage( intPage )
 * called from clicking on gray dot icon
 */
function MpVpPage( intPage, lnk ) {
	MpVpBlur( lnk );
	if((MpVpCurPage != intPage)&&(!MpVpLock)) {
		if(MpVpCurPage < intPage) {
			if((intPage - MpVpCurPage) > 1) {
				MpVpSlideDoubleLeft();
			}
			else {
				MpVpSlideLeft();
			}
		}
		else {
			if((MpVpCurPage - intPage) > 1) {
				MpVpSlideDoubleRight();
			}
			else {
				MpVpSlideRight();
			}
		}
	}
}

function LockMpVp( intDur ) {
	var LockDur = intDur * 100;
	MpVpLock = true;
	setTimeout(function() { MpVpLock = false; },LockDur);
}
function MpVpSlideLeft() {
	LockMpVp(3);
	new Effect.MoveBy( 'MpVidCtnt0', 0, -540 , {duration: 0.3} );
	new Effect.MoveBy( 'MpVidCtnt1', 0, -540 , {duration: 0.3} );
	//new Effect.MoveBy( 'MpVidCtnt2', 0, -336 , {duration: 0.3} );
	MpVpCurPage++;
	MpVpUpdateBtns();
}

function MpVpSlideDoubleLeft() {
	LockMpVp(6);
	new Effect.MoveBy( 'MpVidCtnt0', 0, -1100 , {duration: 0.6} );
	new Effect.MoveBy( 'MpVidCtnt1', 0, -1100 , {duration: 0.6} );
	//new Effect.MoveBy( 'MpVidCtnt2', 0, -672 , {duration: 0.6} );
	MpVpCurPage++;
	MpVpCurPage++;
	MpVpUpdateBtns();
}

function MpVpSlideRight() {
	LockMpVp(3);
	new Effect.MoveBy( 'MpVidCtnt0', 0, 540 , {duration: 0.3} );
	new Effect.MoveBy( 'MpVidCtnt1', 0, 540 , {duration: 0.3} );
	//new Effect.MoveBy( 'MpVidCtnt2', 0, 336 , {duration: 0.3} );
	MpVpCurPage--;
	MpVpUpdateBtns();
}

function MpVpSlideDoubleRight() {
	LockMpVp(6);
	new Effect.MoveBy( 'MpVidCtnt0', 0, 540 , {duration: 0.6} );
	new Effect.MoveBy( 'MpVidCtnt1', 0, 540 , {duration: 0.6} );
	//new Effect.MoveBy( 'MpVidCtnt2', 0, 672 , {duration: 0.6} );
	MpVpCurPage--;
	MpVpCurPage--;
	MpVpUpdateBtns();
}


function MpVpUpdateBtns() {
	if(MpVpCurPage > 1) {
		$('v_right_arrow').style.cursor ='default';
		$('v_right_arrow').src = 'https://www.allstarvacationhomes.com/images/site/spacer.gif';

	}
	else {
		$('v_right_arrow').style.cursor ='default';
		$('v_right_arrow').src = 'https://www.allstarvacationhomes.com/images/new/v_image_right.gif';
		$('v_right_arrow').onmouseover = function() {}
		$('v_right_arrow').onmouseout = function() {}
	}

	if(MpVpCurPage < 2) {
		$('v_right_arrow').style.cursor ='default';
		$('v_right_arrow').src = 'https://www.allstarvacationhomes.com/images/new/v_image_right.gif';

	}
	else {
		$('v_right_arrow').style.cursor ='default';
		$('v_right_arrow').src = 'https://www.allstarvacationhomes.com/images/site/spacer.gif';

	}
}
/* end main page video box
===================================================================== */


function allDigits(str)
{
	return inValidCharSet(str,"-.0123456789");
}


function allNumbers(str)
{
	return inValidCharSet(str,"0123456789");
}
function allDigits_positive(str)
{
	return inValidCharSet(str,".0123456789");
}

function inValidCharSet(str,charset)
{
	var result = true;

	// Note: doesn't use regular expressions to avoid early Mac browser bugs	
	for (var i=0;i<str.length;i++)
		if (charset.indexOf(str.substr(i,1))<0)
		{
			result = false;
			break;
		}
	
	return result;
}

function validRequired(formField)
{
	var result = true;
	
	if (formField.value == "")
	{
		result = false;
	}
	
	return result;
}

	  
	  
function validPositiveNum(formField)
{
	var result = true;

	if (!validRequired(formField))
		result = false;
  
 	if (result)
 	{
 		if (!allDigits_positive(formField.value))
 		{	
			result = false;
		}
	} 
	
	return result;
}
	
	
function validNum(formField)
{
	var result = true;

	if (!validRequired(formField))
		result = false;
  
 	if (result)
 	{
 		if (!allDigits(formField.value))
 		{	
			result = false;
		}
	} 
	
	return result;
}



function validcardnumber(strOrig) {
	if(strOrig.length==0) return false;

	var strChar;
	var strValidChars = "1234567890*";
	for (var i = 0; i < strOrig.length; i++) {
		strChar = strOrig.substring(i, i+1);
		if (strValidChars.indexOf(strChar, 0) == -1)
			return false;
	}
	return true;
}


function showhide (show,hide) 
{
	show_obj = document.getElementById(show);
	hide_obj = document.getElementById(hide);
		
	show_obj.style.display = "block";
	hide_obj.style.display = "none";
}
 
function showhide1 (show,hide)
{
        show_obj = document.getElementById(show);
        hide_obj = document.getElementById(hide);

        show_obj.style.display = "";
        hide_obj.style.display = "none";
}
function httpsOnLoad() {
		
			if (location.href.substr(0,5).toLowerCase() == 'http:')  {
					var str = window.location.href;
			    	window.location.href = str.replace("http:","https:");
			}
}
	
	
// --------------------------------------------------------
// index search
// --------------------------------------------------------
// --------------------------------------------------------
// set the java calendar
// --------------------------------------------------------
if (document.getElementById('txtStartDate') != null) {
document.getElementById('txtStartDate').focus()

var javaCalendar = (window.JavaCalendar) ? new JavaCalendar() : "NoJS";
function javaCalendarButtonElementClick(b, v, l, params, stayOpen){
 if(javaCalendar){
 	javaCalendar.stayOpen = stayOpen; javaCalendar.showPopUp(b, v, l, params);
 }
 
 	}
 }
 


function changebeds(){

StyleIndex = document.SearchSet2.Style.selectedIndex;
if (StyleIndex == 0) {
NewBed = new Array;
NewBed[0] = new Option('All','0'); 
NewBed[1] = new Option('2','2'); 
NewBed[2] = new Option('3','3'); 
NewBed[3] = new Option('4','4'); 
NewBed[4] = new Option('5','5');  
NewBed[5] = new Option('6','6'); 
NewBed[6] = new Option('7','7'); 

} else if (StyleIndex == 4) { // 4
NewBed = new Array;
NewBed[0] = new Option('All','0');  
NewBed[1] = new Option('1','1'); 
NewBed[2] = new Option('2','2'); 
NewBed[3] = new Option('3','3'); 
NewBed[4] = new Option('4','4'); 

} else if (StyleIndex == 5) { // 4
NewBed = new Array;
NewBed[0] = new Option('All','0');  
NewBed[1] = new Option('2','2'); 
NewBed[2] = new Option('3','3');

} else {  

NewBed = new Array;
NewBed[0] = new Option('All','0'); 
NewBed[1] = new Option('2','2'); 
NewBed[2] = new Option('3','3'); 
NewBed[3] = new Option('4','4'); 
NewBed[4] = new Option('5','5');  
NewBed[5] = new Option('6','6'); 
NewBed[6] = new Option('7','7'); 

}


bedsearch = document.SearchSet2.Bed_select.options.length;

	for (i=bedsearch; i > 0; i--) {
		document.SearchSet2.Bed_select.options[i] = null;
	}


	for (i=0; i < NewBed.length; i++) {
		document.SearchSet2.Bed_select.options[i] = NewBed[i];
	}


}
// --------------------------------------------------------
// end index search
// --------------------------------------------------------
// search ajax
function getServerName(){
    var str = window.location.protocol + '//' + window.location.hostname;
	//alert(str)
    return str;
}
function getSelectedCheckbox(buttonGroup) {
   var retArr = new Array();
   var lastElement = 0;
   if (buttonGroup[0]) { 
      for (var i=0; i<buttonGroup.length; i++) {
         if (buttonGroup[i].checked) {
            retArr.length = lastElement;
            retArr[lastElement] = i;
            lastElement++;
         }
      }
   } else { 
      if (buttonGroup.checked) { 
         retArr.length = lastElement;
         retArr[lastElement] = 0; 
      }
   }
   return retArr;
} 
function getSelectedCheckboxValue(buttonGroup) {
   var retArr = new Array(); 
   var selectedItems = getSelectedCheckbox(buttonGroup);
   if (selectedItems.length != 0) { 
      retArr.length = selectedItems.length;
      for (var i=0; i<selectedItems.length; i++) {
         if (buttonGroup[selectedItems[i]]) { 
            retArr[i] = buttonGroup[selectedItems[i]].value;
         } else {
            retArr[i] = buttonGroup.value;
         }
      }
   }
   return retArr;
} 

function checksearchform(){
var checkBoxArr = getSelectedCheckboxValue(document.Search_xml.PageDataID);
if (checkBoxArr.length == 0) { 

		alert("No Properties were selected. Please select up to 3 properties if available."); 
		return false;
		
	} else if (checkBoxArr.length == 1) {
	
	    alert("Sorry you cannot compare homes if there is only one property"); 
	    return false;
	
	} else if (checkBoxArr.length > 3) {
	
	    alert("You have sleceted more then 3 properties. Please remove one"); 
	    return false;
}
}


function showData( obj ) {
            var strHtml;
			var strXML = obj.text.toString();
            strHtml = strXML; 
			//strHtml += ("</td></tr><tr><td align='right'>Select two or three vacation homes to compare amenities <input type='submit' value='Compare Vacation Homes' class=bungreenGoBtn></td></tr></table></form>"); 
			 document.getElementById('loadingData').innerHTML = '';
			 document.getElementById('propertylist').innerHTML = strHtml;

    } 
	
	
		
		function abort( obj ) {
			document.getElementById('loadingData').innerHTML = '';
			document.getElementById('propertylist').innerHTML = "Sorry, Could not finish your query, please try again";
			
			obj = null;
		}
		
		var get = new wp_HttpRequest({
			autoload : false,
			cache : false,
			onload : showData,
			onerror : abort
		});
		
		
var oInterval="";
function fnStopInterval() {
 if(oInterval!="") {
   window.clearInterval(oInterval);
   oInterval="";
 }
}
function CompareChange(){
 	document.getElementById('loadingData').innerHTML = "";
 	fnStopInterval();
 	oInterval=window.setInterval("fnRecycle()",2000);
}
function fnRecycle(){
    fnStopInterval();
    CompareChange_start();
 }
 
var spinningimage = newImage("https://www.allstarvacationhomes.com/images/site/loading.gif");

function CompareChange_start(orderby)
{
document.getElementById('loadingData').innerHTML = "<div class='loadingText'><img src='https://www.allstarvacationhomes.com/images/site/loading.gif' align=absmiddle> loading New Data</div>";
var formObj = document.AvailSearchX
var strURL = "/inc/availproperties.aspx?"
var url = getServerName() + strURL;
url += seturl;
var selectedBeds = formObj.Bed.options[formObj.Bed.options.selectedIndex].value;
url += "&bed=" + selectedBeds
var selectedbath = formObj.Bath.options[formObj.Bath.options.selectedIndex].value;
url += "&bath=" + selectedbath
url += "&arrivaldate=" + searchdatearrival;
url += "&departuredate=" + searchdatedeparture
var selectedMasterBedrooms = formObj.MasterBedrooms.options[formObj.MasterBedrooms.options.selectedIndex].value;
url += "&masters=" + selectedMasterBedrooms
var selectedExecutive;
if (formObj.Executive.checked) {selectedExecutive = "Yes"};
url += "&Executive=" + selectedExecutive;
var selectedResort;
if (formObj.Resort.checked) {selectedResort = "Yes"};
url += "&Resort=" + selectedResort;
var selectedLuxury;
if (formObj.Luxury.checked) {selectedLuxury = "Yes"};
url += "&Luxury=" + selectedLuxury;
var selectedSelect;
if (formObj.Select.checked) {selectedSelect = "Yes"};
url += "&Select=" + selectedSelect;
var selectedTownHomes;
if (formObj.TownHomes.checked) {selectedTownHomes = "Yes"};
url += "&TownHomes=" + selectedTownHomes;
var selectedGameRoom;
if (formObj.GameRoom.checked) {selectedGameRoom = "Yes"};
url += "&GameRoom=" + selectedGameRoom;
var selectedHomeTheatre;
if (formObj.HomeTheatre.checked) {selectedHomeTheatre = "Yes"};
url += "&HomeTheatre=" + selectedHomeTheatre;
var selectedComputer;
if (formObj.Computer.checked) {selectedComputer = "Yes"};
url += "&Computer=" + selectedComputer;
var selectedWirelessInternet;
if (formObj.WirelessInternet.checked) {selectedWirelessInternet = "Yes"};
url += "&WirelessInternet=" + selectedWirelessInternet;
var selectedVideoGame;
if (formObj.VideoGame.checked) {selectedVideoGame = "Yes"};
url += "&VideoGame=" + selectedVideoGame;
var selectedBBQGrill;
if (formObj.BBQGrill.checked) {selectedBBQGrill = "Yes"};
url += "&BBQGrill=" + selectedBBQGrill;
var selectedFormalLivingRoom;
if (formObj.FormalLivingRoom.checked) {selectedFormalLivingRoom = "Yes"};
url += "&FormalLivingRoom=" + selectedFormalLivingRoom;
var selectedFormalDiningRoom;
if (formObj.FormalDiningRoom.checked) {selectedFormalDiningRoom = "Yes"};
url += "&FormalDiningRoom=" + selectedFormalDiningRoom;
var selectedResort_amen;
if (formObj.Resort_amen.checked) {selectedResort_amen = "Yes"};
url += "&Resort_amen=" + selectedResort_amen;
var selectedThemedBedroom;
if (formObj.ThemedBedroom.checked) {selectedThemedBedroom = "Yes"};
url += "&ThemedBedroom=" + selectedThemedBedroom;
var selectedSteamShower;
if (formObj.SteamShower.checked) {selectedSteamShower = "Yes"};
url += "&SteamShower=" + selectedSteamShower;
var selectedPrice = formObj.price_search.options[formObj.price_search.options.selectedIndex].value;
url += "&price=" + selectedPrice
var selectedsqfeet = formObj.sqfeet.options[formObj.sqfeet.options.selectedIndex].value;
url += "&squarefoot=" + selectedsqfeet
url +="&O=" + orderby
var selectedsubdivid = formObj.SubDivID.options[formObj.SubDivID.options.selectedIndex].value;
url +="&sdid=" + selectedsubdivid
get.load(url);
}

function upperCaseLine(strText) {

	  var words = strText.split(" ");
	  var output;
      for (var i = 0; i < words.length; i++) {
         words[i] = words[i].substr(0, 1).toUpperCase() + words[i].substr(1);
      }
	  output = words.join(" ");
      return output
}

function showhidediv(show,hide)
{
        show_obj = document.getElementById(show);
        hide_obj = document.getElementById(hide);

        show_obj.style.display = "";
        hide_obj.style.display = "none";
}
