/*
Google Tracking for Form QR
Author: D. Siriwardana
Company: eBeyonds
Create Date:24.04.2008
*/

/*function to replace spaces after using escape() (this is a must, without parsing data through this, iHotelier will not accept params)*/
function remSpaces(variable){
	var temp=variable;
	for(var i=0; i<temp.length;i++){
		temp=temp.replace(/%20/,"+");
	}
	return temp;
}

/*this funtion will get all values from form fields*/
function getData(){
	var data="";
	var date="&DateIn="+escape(document.getElementById('sel3').value);	
	var length="&Length="+escape(document.getElementById('len').value);
	var adults="&Adults="+escape(document.getElementById('adl').value);
	var children="&Children="+escape(document.getElementById('child').value);
	var rooms="&Rooms="+escape(document.getElementById('room').value);
	data=date+length+adults+children+rooms;
	data=remSpaces(data);
	return data;
}
/*funtion to append all values to the address and utmLink it*/
function sendData(val){
	var url="https://reservations.ihotelier.com/onescreen.cfm?hotelid=6671&languageid=5"+val;
	document.forms[0].action=__utmLinker(url);
	/*	window.location=url;*/
	return false;		
}

