<!--//
var tmpMoveSlider = 0;
var BoxItMoveStopPosition = 0;
var BoxItMoveDirection = "left";

function BoxItMove(d) {
	var moveheight = 362;

	el = document.getElementById('search_box_top');
	if(el) {
		BoxItMoveDirection = d;
		if(d=="bottom") {
			BoxItMoveStopPosition = 0;
			BoxItMoveSlide();
		} else if(d!="bottom") {
			BoxItMoveStopPosition = "-"+moveheight;
			BoxItMoveSlide();
		}
	}
}

function BoxItMoveSlide(tmpMoveLayer) {
	//alert(BoxItMoveStopPosition);
	var slidingDiv = document.getElementById('search_box_top');
	var slidingDiv_close = document.getElementById('search_box_close');
	
	if(BoxItMoveDirection=="bottom" && parseInt(slidingDiv.style.top) < BoxItMoveStopPosition ) {
		slidingDiv.style.top = parseInt(slidingDiv.style.top) + 30 + "px";
		slidingDiv_close.style.top = parseInt(slidingDiv_close.style.top) + 5 + "px";
		setTimeout(BoxItMoveSlide, 30);		
	} else if (parseInt(slidingDiv.style.top) > BoxItMoveStopPosition ) {
		slidingDiv_close.style.top = parseInt(slidingDiv_close.style.top) - 5 + "px";
		slidingDiv.style.top = parseInt(slidingDiv.style.top) - 30 + "px";
		setTimeout(BoxItMoveSlide, 30);
	}
}

function show_contact_form(){
	document.getElementById("front_page_flash").style.display="none";
	document.getElementById("search_box_top").style.top = "0px";
	document.getElementById("search_box_close").style.top = "-40px";
}

function js_booking_action() {
	document.getElementById('front_page_flash').style.display="";
}
function js_booking_close() {
	BoxItMove('');
	setTimeout(js_booking_action, 380);
}
function js_booking() {
	document.getElementById('front_page_flash').style.display="none";
	BoxItMove('bottom');
}

function stripHTML(oldString) {
   var newString = "";
   var inTag = false;
   for(var i = 0; i < oldString.length; i++) {
        if(oldString.charAt(i) == '<') inTag = true;
        if(oldString.charAt(i) == '>') {
              inTag = false;
              i++;
        }
        if(!inTag) newString += oldString.charAt(i);

   }
   return newString;
}

function value_check(id,name) {
	tmpel = document.getElementById(id);
	if(name==tmpel.value) {
		tmpel.value="";
	} else if(tmpel.value=="") {
		tmpel.value=name;
	}
}
function plantravel(obj) {
	
	var formAction = document.getElementById("travelForm");
	var calendarStart = document.getElementById("calendarStart");
	var calendarEnd = document.getElementById("calendarEnd");
	if(calendarStart.value) {
	
	}
	//alert(formAction.action);
	this.action = "";
}
//-->