/*Global */

var Gwarning = 0;
varTwarning =0;
var Duplicate = 0;
//Number of Unique participants
var NumberofParticipants=0;
var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
var illegalNameChars= /[0-9\!\?\%\+\@\{\}\'\(\)\<\>\,\;\:\\\/\"\[\]]/;
var illegalAddressChars= /[\(\)\<\>\;\:\"\[\]\!\?\%\+\@\{\}]/;
var illegalMailAddressChars=/[\|\`\]\\\[\>\<\;\:\,\(\)\%\$\#\"\!\ ]/;
var illegalSpReqChars= /[\<\>\=\;\\\/\"\[\]]/;
var re_alphanum = /^[A-Za-z0-9_\-\. ]+$/;
var posUp = 120;
var colbgrnd = "#32659a";
var A_SPR=["",""] ; 
var A_AH_transfer=["",""] ; 
var A_HA_transfer=["",""] ; 
var A_SecureParking=["",""] ; 
var A_RoomType=["",""] ; 
var A_HotelUpgrade=["",""] ; 
var A_UpgradeType=["",""] ;  
var A_ExtraNights=["",""] ; 
var A_NightsAnumber=["",""] ; 
var A_NightsAdate=["",""] ; 
var A_NightsAlocation=["",""] ; 
var A_NightsBnumber=["",""] ; 
var A_NightsBdate=["",""] ; 
var A_NightsBlocation=["",""] ; 
var A_NightsCnumber=["",""] ; 
var A_NightsCdate=["",""] ; 
var A_NightsClocation=["",""] ; 
var A_VegetarianMeal=["",""] ; 
var A_OnlyBreakfast=["",""] ; 
var A_CycleRental=["",""] ; 
var A_CycleRentalBikeType=["",""] ; 
var A_CycleRentalBikeforHeight=["",""] ; 
var A_Other=["",""] ; 
var ToggleSPR=0;

function initours() {
var myse = location.search;
if (myse.indexOf("?") == -1) 
    { myse = "";  }	
else { myse = myse.slice(1);}
var inString = "";
idx = 0 ;
if (myse != "")
   {
	for ( idx=0; idx < document.requestform.Tour.options.length ; idx+=1)
   
   	    {
            inString = document.requestform.Tour.options[idx].text; 
	    		if ( inString.indexOf(myse) != -1 )
					{
					document.requestform.Tour.selectedIndex=idx;	
					break;
					}
	    	}
   }
}

function hidediv(id) {
	//function hide an element with a specified id
	if (document.getElementById) {
		document.getElementById(id).style.display = 'none';
	}	
}

function showdiv(id) {
	//function show an element with a specified id
		  
	if (document.getElementById) { 
		document.getElementById(id).style.display = 'block';
	}	
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

 function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

function PadDigits(n, totalDigits) 
    { 
        n = n.toString(); 
        var pd = ""; 
        if (totalDigits > n.length) 
        { 
            for (i=0; i < (totalDigits-n.length); i++) 
            { 
                pd += "0"; 
            } 
        } 
        return pd + n.toString(); 
    } 
        
function validateBirthDate(value, ix_traveller, xposbd, yposbd) {
    var tMo, tDay, tYr, iMo, iDay, iYr ; 
    var inp = value;
    // extract components of input data
   iDay = parseInt(inp.substring(0, inp.indexOf("/")), 10);
   iMo   = parseInt(inp.substring((inp.indexOf("/") + 1), inp.lastIndexOf("/")), 10);
   iYr = parseInt(inp.substring((inp.lastIndexOf("/") + 1), inp.length), 10);
	iDay = PadDigits(iDay, 2); 
	iMo = PadDigits(iMo, 2);
	iYr = PadDigits(iYr, 4);
   // make sure parseInt() succeeded on input components
   if ( isNaN(iDay) || isNaN(iMo) || isNaN(iYr) ) 
		{
		window.scrollTo(xposbd,yposbd) ;
		alert ("There is some problem with the Date of Birth entry of participant #" + ix_traveller + " !");
  		Gwarning +=1;
  		return -1;
 		} 
  // attempt to create date object from input data
    var testDate = new Date ();  
    testDate.setFullYear(iYr,iMo-1,iDay);
    // extract pieces from date object
    tDay = testDate.getDate();
    tMo = testDate.getMonth() +1;
    tYr = testDate.getFullYear();
	 tDay = PadDigits(tDay, 2); 
	 tMo = PadDigits(tMo, 2);
	 tYr = PadDigits(tYr, 4);
  // make sure conversion to date object succeeded
  if ( isNaN(tMo) || isNaN(tDay) || isNaN(tYr) ) 
		{
		window.scrollTo(xposbd,yposbd) ;
		alert ("Couldn't convert your entry to a valid  Date of Birth of participant #" +  ix_traveller + "!  Please try again!");
  		Gwarning +=1;
 		return -1;
 		} 
   // make sure values match
   if ((tMo != iMo) || (tDay != iDay) || (tYr != iYr)) 
	{
	window.scrollTo(xposbd,yposbd) ;
	alert ("Please check the range the Date of Birth value of participant #"+  ix_traveller + " !");
  	Gwarning +=1;
 	return -1;
 	} 
  // future date or more than 120 year old 		
  var now=new Date();
  var secnow=now.getTime();
  var Yrnow = now.getFullYear();
  var yearold = Yrnow - tYr;
  var testsec =testDate.getTime();
	if  ((secnow < testsec) ||  (yearold >120) )
		{
		window.scrollTo(xposbd,yposbd) ;
		alert ("Please check the  Date of Birth value of participant #" +  ix_traveller + " !");
  		Gwarning +=1;
  		return -1;
 		} 			
return [iDay, iMo, iYr];
}

function validateAddress(value, ixt, xpa, ypa)
{
/* 
expect Address in Street, City, State, Country, ZIP form separated by ,
*/
var street="";
var city="";
var state="";
var country="";
var zip="";
var inp = value;
var s1 =0; var s2 =0; var s3=0; s4=0;
/*
alert("Address input of participant #" + ixt + ": " + inp ); 
*/
if (inp.match(illegalAddressChars)) 
								{
								window.scrollTo(xpa,ypa) ;
								alert("Error: Address  of participant #" + ixt + " contains invalid characters!"); 
								Gwarning +=1; 
								return -1;
								} 
// extract components of input data
s1 = inp.indexOf(",");
if  (s1 == -1 )
 		{
 		window.scrollTo(xpa,ypa) ;
		alert (	"Error: Street Address field  of Participant #" + ixt + " Address  is not separated by , character !");
 		Gwarning +=1; 
		return -1;
 		}
s2 = inp.indexOf(",", s1+1);
if  (s2 == -1 )
 		{
 		window.scrollTo(xpa,ypa) ;
		alert (	"Error: City  field  of Participant #" + ixt + " Address  is not separated by , character !");
 		Gwarning +=1; 
		return -1;
 		}
s3 = inp.indexOf(",", s2+1);
if  (s3 == -1 )
 		{
 		window.scrollTo(xpa,ypa) ;
		alert (	"Error: State field  of Participant #" + ixt + " Address  is not separated by , character !");
 		Gwarning +=1; 
		return -1;
 		}
s4 = inp.indexOf(",", s3+1);
if  (s4 == -1 )
 		{
 		window.scrollTo(xpa,ypa) ;
		alert (	"Error: Country field  of Participant #" + ixt + " Address  is not separated by , character !");
 		Gwarning +=1; 
		return -1;
 		}
street = inp.substring(0, s1);
street = street.replace(/^\s+|\s+$/g, '');
if (street =="")
	{
	window.scrollTo(xpa,ypa) ;
	alert (	"Error: Street  field  of Participant #" + ixt + " is empty!");
 	Gwarning +=1; 
	}
city = inp.substring(s1+1,s2);
city = city.replace(/^\s+|\s+$/g, '');
if (city =="")
	{
	window.scrollTo(xpa,ypa) ;
	alert (	"Error: City field  of Participant #" + ixt + " is empty!");
 	Gwarning +=1; 
	}
state = inp.substring(s2+1,s3);
state=state.replace(/^\s+|\s+$/g, '');
country = inp.substring(s3+1,s4);
country =  country.replace(/^\s+|\s+$/g, '');
if (country =="")
	{
	window.scrollTo(xpa,ypa) ;
	alert (	"Error: Country field  of Participant #" + ixt + " is empty!");
 	Gwarning +=1; 
	}
zip = inp.substring(s4+1,inp.length);
zip = zip.replace(/^\s+|\s+$/g, '');
if (zip =="")
	{
	window.scrollTo(xpa,ypa) ;
	alert (	"Error: ZIP field  of Participant #" + ixt + " is empty!");
 	Gwarning +=1; 
	}	
return [street,city,state,country,zip];
}

function checkContactPerson(cform)
{
// Check Contact person
var rfref=document.getElementById("Contact person");
var xp = findPosX(rfref) ;
var yp = findPosY(rfref) ; 
 if   (cform.CpFN.value=="")  
 		{
      window.scrollTo(xp,yp);
 		alert ("Please give the First Name of Contact Person !");
  		Gwarning +=1;
 		} 
else if (cform.CpFN.value.match(illegalNameChars)) 
  		{
      window.scrollTo(xp,yp);
   	alert('Error: First Name of Contact Person contains invalid characters!');
  		Gwarning +=1;
  		}
else {
		cform.CpFN.value = cform.CpFN.value.replace(/^\s+|\s+$/g, '');
		}
if   (cform.CpSN.value=="")  
	 	{
      window.scrollTo(xp,yp);
	 	alert ("Please give the Surname of Contact Person !");
  		Gwarning +=1;
 		} 
else  if (cform.CpSN.value.match(illegalNameChars)) 
  		{
      window.scrollTo(xp,yp);
   	alert('Error: Surname of Contact Person contains invalid characters!');
  		Gwarning +=1;
  		}
else {
		cform.CpSN.value = cform.CpSN.value.replace(/^\s+|\s+$/g, '');
		}		  		
 if   (cform.CpPhone.value=="")  
 		{
 		window.scrollTo(xp,yp);
 		alert ("Please give the Phone Number of Contact Person !");
  		Gwarning +=1;
 		} 
 		else {
 				var phone = cform.CpPhone.value;
				var stripped = phone.replace(/[\+\(\)\.\-\ ]/g, '');
				//strip out acceptable non-numeric characters
				if (isNaN(parseInt(stripped))) {
  		 			window.scrollTo(xp,yp);
  					alert("The Contact Person phone number contains illegal characters.");
					Gwarning +=1; 
					}	
				if ((stripped.length  > 15)) {
					window.scrollTo(xp,yp);
					alert("The Contact Person phone number length is wrong!");
					Gwarning +=1; 
					}
				else {
						phone = cform.CpPhone.value;
						stripped = phone.replace(/[\(\)\.\-\ ]/g, '');
						cform.CpPhone.value=stripped;
						}
 				}
 if   (cform.CpEmail.value=="")  
 		{
 		 	window.scrollTo(xp,yp);
 			alert ("Please enter the E-mail address  of Contact Person !");
 		 	Gwarning +=1;
  		}
 else {
  		var address = cform.CpEmail.value;	
  		address = address.replace(/^\s+|\s+$/g, '');
		if (address.match( illegalMailAddressChars)) 
				{
				window.scrollTo(xp,yp);
				alert('Email Address of Contact Person contains illegal characters !');
				Gwarning +=1; 				   
				}
   	else {	
   			var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   			if (reg.test(address) == false) 
   					{
   					window.scrollTo(xp,yp);
   					alert('Email Address of Contact Person is not valid !');
  						Gwarning +=1;
  						}
 				 else {
 				       cform.CpEmail.value=address;
 				 		} 		
				}  		
 		} 
}

function checkTravellers()
{
var trtable = document.getElementById("tblTravellers");
var nTBody=trtable.getElementsByTagName('tbody')[0];
var nRows = nTBody.getElementsByTagName('tr');
var nTlist  = nRows.length;
NumberofParticipants= 0;
Twarning = Gwarning;
var vTlist = new Array("FN","SN","DB","A");
var hTlist = new Array("First Name", "Surname", "Date of Birth", "Address");
var trlslist = [];
var dlist = [];
var i = 0;
var j = 0;
var isMSIE = /*@cc_on!@*/false;
var rfref=document.getElementById("List of participants");
var xpos = findPosX(rfref) ;
var ypos = findPosY(rfref) ; 
var Tlistname ="";
var tcell ="";
var t2cell="";
for (i=1; i <= nTlist ;  i++)
	{ 
		for  (j=0; j < 4; j++)
		{
		Tlistname = vTlist[j] + i;		
		if ( isMSIE) 
		{
		tcell = document.getElementById(Tlistname);
		}	
		else {
		t2cell = document.getElementsByName( Tlistname );
		tcell = t2cell[0];
		}		
		if (i > 2 )
		{
		xpos = findPosX(tcell) ;
      ypos = findPosY(tcell) - posUp ; 
      } 
      if   (tcell.value=="")  
      {
      window.scrollTo(xpos,ypos) ;
      alert ("Please give the " + hTlist[j] + " of participant # " + i + "!");
      Gwarning +=1;   
      return false;
      }        
     switch ( j ) {
        case 0 :			 
        // Validate First Name of participant	
        						if (tcell.value.match(illegalNameChars)) 
		 						{
		 						window.scrollTo(xpos,ypos) ;
		 						alert("Error: First Name of participant #" + i + " contains invalid characters!"); 
								Gwarning +=1; 
 								} 
 								else {
 								tcell.value = tcell.value.replace(/^\s+|\s+$/g, '');
 								}
 								trlslist[i-1] = tcell.value;
        						break;
        case 1 :  		
        // Validate Surname of participant
        
        						if (tcell.value.match(illegalNameChars)) 
		 						{ 
		 						window.scrollTo(xpos,ypos) ;
		 						alert("Error: Surname of participant #" + i + " contains invalid characters!"); 
								Gwarning +=1;  
 								}
 								else {
 								tcell.value = tcell.value.replace(/^\s+|\s+$/g, '');
 								}
 								trlslist[i-1] += tcell.value; 
        						break;
        case 2 :			
        // Validate Date of birth
        						var rd = validateBirthDate(tcell.value, i, xpos, ypos);
        						if (rd != -1)
        						{
        						tcell.value=rd[0];
								for (var q=1;  q< rd.length; q++)
									{
									tcell.value  +=  ("/" + rd[q] ) ;
									}
        						}
        						trlslist[i-1] += tcell.value;
        						break;        						
        case 3:	
        // Validate Address of participant
								var ra = validateAddress(tcell.value,  i, xpos, ypos);
								if (ra != -1)
								{
								tcell.value=ra[0];
								for (var q=1;  q< ra.length; q++)
									{
									tcell.value  +=  (", " + ra[q] ) ;
									}
								}							
        						break;  
        default:		
        						break;
        						}      
		}	
	}		
//check if participants are unique
if  (Twarning == Gwarning)
	{
	Duplicate = 0;
	for ( i=0; i < nTlist ; i++)  
		{ 
		dlist[i] = "U";
		var listi = trlslist[i];
		trlslist[i] =(listi).replace(/\s/g, "");		
		}
	for (i=0; i < (nTlist -1) ; i++)
			{		
			if  (dlist[j] != "D")
				{
				j= i+1;
				for (; (j < (nTlist)) ; j++)
						{
						if  ((dlist[j] != "D") && (trlslist[j] == trlslist[i])) 
							{
							dlist[j] = "D";
							Tlistname = vTlist[0] + (j+1);
							
							if ( isMSIE) 
								{
								tcell = document.getElementById(Tlistname);
								}	
							else {
								t2cell = document.getElementsByName( Tlistname );
								tcell = t2cell[0];
								}							
							xpos = findPosX(tcell) ;
				     		ypos = findPosY(tcell) - posUp ; 
				      	window.scrollTo(xpos,ypos);
							alert("Participant #" + (j+1) + " is duplicate !"); 
							Gwarning +=1;
							Duplicate +=1;
							}  
						}
				 }
			}			
	}
//Number of Unique participants
if  (Twarning == Gwarning)
	{
 		for ( NumberofParticipants=0 ,  i=0; i < nTlist ; i++)  
      		{
      		if  ((dlist[j] != "D") && (trlslist[i] != ""))  
      			{
      			NumberofParticipants +=1;
      			}
      		}
 	}
else 
	{ 
	NumberofParticipants=0 ;
	}
var partnum = document.getElementById("A_TravellersNumber");
partnum.value = NumberofParticipants;  
}

function ResetConditions() {
var cond=document.getElementById("CAgree");
cond.checked = "";
cond.disabled=false ;
}

function Rconditions() {
var cond=document.getElementById("CAgree");
cond.checked = "1";
cond.disabled=false ;
}

function checkRooms(cform)
{
//Check Number of Rooms
var rfref=document.getElementById("Number of Rooms");
var xp = findPosX(rfref) ;
var yp = findPosY(rfref) ; 
var p_in_rooms = 0;
var TwinBed = 0;
var DoubleBed = 0;
var SingleRoom = 0;
var RoomNumber = 0;
if  ((cform.TwinBed.value==0) && (cform.DoubleBed.value==0) && (cform.SingleRoom.value==0))
  {
  window.scrollTo(xp,yp);
  alert ("Please give the required number of Rooms!");
  Gwarning +=1;
  return -1;
  }  
if  (cform.TwinBed.value != 0) 
  				{
  				TwinBed = parseInt (cform.TwinBed.value);
  				if ( isNaN(TwinBed) )
 					 {
 					 window.scrollTo(xp,yp);
 					 alert ("Invalid TwinBed value !");
  					 Gwarning +=1;
  					 return -1;
  					 }  	
  			 	cform.TwinBed.value = TwinBed;
  			 	p_in_rooms += 2*TwinBed;  	
  			 	} 
if  (cform.DoubleBed.value != 0) 
  				{ 		      
  				DoubleBed = parseInt (cform.DoubleBed.value);
  				if ( isNaN(DoubleBed) )
 					 {
 					 window.scrollTo(xp,yp);
 					 alert ("Invalid DoubleBed value !");
  					 Gwarning +=1;
  					 return -1;
  					 }  
  				cform.DoubleBed.value = DoubleBed;
  				p_in_rooms += 2*DoubleBed; 
  			   }
if   (cform.SingleRoom.value !=0) 
  			{
  			SingleRoom = parseInt (cform.SingleRoom.value);
  			if ( isNaN(SingleRoom) )
  				{
  				window.scrollTo(xp,yp);
  				alert ("Invalid SingleRoom value !");
  				Gwarning +=1;
  				return -1;
  				}  
  			cform.SingleRoom.value = SingleRoom;
  			p_in_rooms += SingleRoom; 
  			}
RoomNumber = SingleRoom + DoubleBed +TwinBed;
 if ((RoomNumber > NumberofParticipants ) && (Duplicate == 0) && (Twarning == Gwarning) && ( NumberofParticipants > 0))
  {
  window.scrollTo(xp,yp);
  alert ("You will need less Rooms for " + NumberofParticipants + " participants !");
  Gwarning +=1;
  return -1;
  }    
if ((p_in_rooms < NumberofParticipants ) && (Duplicate == 0) && (Twarning == Gwarning) && ( NumberofParticipants > 0))
  {
  window.scrollTo(xp,yp);
  alert ("You will need more Beds for " + NumberofParticipants + " participants !");
  Gwarning +=1;
  return -1;
  }  
return 0;
}

function ellenoriz()
{
Gwarning = 0;
  var rfref =0;
  var xp=0 ;
  var yp=0;
  var cform=document.getElementById("requestform");
/* 
Check Date of arrival
*/
 if		(cform.Arrival.value=="") 
  		{		
  		rfref=document.getElementById("Date of arrival");
		xp = findPosX(rfref) ;
		yp = findPosY(rfref) ; 
		window.scrollTo(xp,yp);
  		alert ("Please give the Date of Arrival !");
    	Gwarning +=1;
  		} 
  		else {
		var inp = cform.Arrival.value;
		aDay = parseInt(inp.substring(0, inp.indexOf("/")), 10);
		aMo = parseInt(inp.substring((inp.indexOf("/") + 1), inp.lastIndexOf("/")), 10);
		aYr = parseInt(inp.substring((inp.lastIndexOf("/") + 1), inp.length), 10);
		aDay = PadDigits(aDay, 2); 
		aMo = PadDigits(aMo, 2);
		aYr = PadDigits(aYr, 4);
	   inp = aDay +"/" + aMo +"/"+ aYr;
	   cform.Arrival.value=inp;
      }   
checkContactPerson(cform);
checkTravellers();
checkRooms(cform);
/*
Check Additional Information
*/
rfref=document.getElementById("Additional Information");
xp = findPosX(rfref) ;
yp = findPosY(rfref) ; 
 if (cform.AdditionalInfo.value.match(illegalSpReqChars)) 
	{
	window.scrollTo(xp,yp) ;
	alert("Error: Additional information text contains invalid characters!"); 
	Gwarning +=1; 
	} 
 cform.AdditionalInfo.value=cform.AdditionalInfo.value.replace(/^\s+|\s+$/g, '');
 cform.AdditionalInfo.value=cform.AdditionalInfo.value.replace(/\s+/g, ' ');
 if (cform.AdditionalInfo.value.length > 1024) 
  {
  window.scrollTo(xp,yp);
  alert ("The total lenght of Additional information text "+ cform.AdditionalInfo.value.length  + " is more than 1024 characters! ");
  var sreq = cform.AdditionalInfo.value.substring(0,1024);
  cform.AdditionalInfo.value = sreq;
   Gwarning +=1;
  }
/*
Check Travel Agreement
*/
rfref=document.getElementById("DConditions");
xp = findPosX(rfref) ;
yp = findPosY(rfref) ; 
  if (!cform.Conditions.checked )  
  {
  var cond=document.getElementById("CAgree");
	cond.disabled=true ;
  window.scrollTo(xp,yp);
  alert (" Please read the Conditions of Travel !");
  Gwarning +=1;
  }    
  else { cform.A_Conditions.value = "I have read and understand and agree with the Special Tours conditions of travel";  }
rfref=document.getElementsByName("RESERVATION FORM");
xp = findPosX(rfref) ;
yp = findPosY(rfref) ; 
window.scrollTo(xp,yp);
if (Gwarning ==0) 
{
makeSPRHins(NumberofParticipants);
return true;
}
else { return false;}
}

function addDelimiter(inputString) {
    var inString = inputString;
    // IF '?' NOT FOUND, THEN THIS IS THE FIRST NAME/VALUE PAIR
    if (inString.indexOf("?") == -1) {
        inString += "?";
    }
    // ELSE IT'S A SUBSEQUENT NAME/VALUE PAIR, SO ADD THE '&' CHARACTER
    else {
        inString += "&";
    }
    return inString;
}

function printChildren(bodyNode)  {
   var msg = "";
   childCount = bodyNode.childNodes.length;
   msg += "bodyNode.childNodes.length = " + bodyNode.childNodes.length + "\n" ;
   for(var i = 0; i < childCount; i++)  
   {
   msg += "bodyNode.childNodes[" + i  +  " ].nodeName = " + bodyNode.childNodes[i].nodeName + "\n";
   }
   alert(msg);
}

function initSPR(i) {
A_SPR[i]=0;
A_AH_transfer[i]="";
A_HA_transfer[i]="";
A_SecureParking[i]="";
A_RoomType[i]="";
A_HotelUpgrade[i]="";
A_UpgradeType[i]=""; 
A_ExtraNights[i]="";
A_NightsAnumber[i]="";
A_NightsAdate[i]="";
A_NightsAlocation[i]="";
A_NightsBnumber[i]="";
A_NightsBdate[i]="";
A_NightsBlocation[i]="";
A_NightsCnumber[i]="";
A_NightsCdate[i]="";
A_NightsClocation[i]="";
A_VegetarianMeal[i]="";
A_OnlyBreakfast[i]="";
A_CycleRental[i]="";
A_CycleRentalBikeType[i]="";
A_CycleRentalBikeforHeight[i]="";
A_Other[i]="";
}

function addRow(tableId){
var nTable = document.getElementById(tableId);
var nTableBody=nTable.getElementsByTagName('tbody')[0];
var nRows = nTableBody.getElementsByTagName('tr');
if  ( nRows.length > 98)
	{
	alert ("Travellers number exceed 99! Please give more details about your large group  in the special request field below!" );
	return;
	}
var nClone = nRows[0].cloneNode(true);
var nFloor = nRows[nRows.length - 1];
nTableBody.appendChild(nClone);
var nhCell = nClone.getElementsByTagName('th') ;
var myref = nClone.getElementsByTagName('a') ;
myref[0].firstChild.nodeValue = nRows.length + "." ;
myref[0].id = "PLrow" + nRows.length;
myref[0].style.background = colbgrnd ;
var nCell = nClone.getElementsByTagName('td') ;
for ( var j=0; j<nCell.length; j++)
{
cin = nCell[j].getElementsByTagName('input') ;
var str= cin[0].name;
var newstr =  str.replace(/(\d+)/g , "");     
cin[0].name = newstr + nRows.length;
cin[0].value = "";
cin[0].id =  newstr + nRows.length;
cin[0].Id =  newstr + nRows.length;
}

initSPR(nRows.length-1);  
return nRows;

}

function deleteRow(tableId){
var tableElem = document.getElementById(tableId);
var lastRow = tableElem.rows.length-1;
if (lastRow > 1)
	 {
	tableElem.deleteRow(lastRow);
	initSPR(lastRow);
 	}
}

function displaySPR(i) {
// Display Transfer from Airport to first Hotel
var  elem= document.getElementsByName("AH_transfer");
elem[0].checked = (A_AH_transfer[i] == 0) ? "" : "1";
// Display Transfer from last Hotel to Airport
elem= document.getElementsByName("HA_transfer");
elem[0].checked = (A_HA_transfer[i] == 0) ? "" : "1";
// Display Car parking at first Hotel
elem= document.getElementsByName("SecureParking");
elem[0].checked = (A_SecureParking[i] == 0) ? "" : "1";
// Display Double bedroom or Twin bedroom or Single room
var radioelem= document.getElementsByName("RoomType");
radioelem[0].checked = (A_RoomType[i] == "Double bedroom") ? "1" : "";
radioelem[1].checked = (A_RoomType[i] == "Twin bedroom") ? "1" : "";
radioelem[2].checked = (A_RoomType[i] == "Single room") ? "1" : "";
// Display Upgrade to 4* or 5* Hotel
elem= document.getElementsByName("HotelUpgrade");
elem[0].checked = (A_HotelUpgrade[i] == 0) ? "" : "1";
//Upgrade "four star" , "five star" or ""
radioelem= document.getElementsByName("Upgrade");
radioelem[0].checked = (A_UpgradeType[i] == "four star") ? "1" : "";
radioelem[1].checked = (A_UpgradeType[i] == "five star") ? "1" : "";
// Display Extra nights before or after or during the Tour 
elem= document.getElementsByName("ExtraNightsABC");
if (A_ExtraNights[i] == 0) {
		elem[0].checked  = "";
		hidediv("DivExtraNight");
		} 
else {
		elem[0].checked  = "1";
		showdiv("DivExtraNight");
		}
//Nights A
elem = document.getElementsByName("NightsA");
elem[0].value = A_NightsAnumber[i];
//from date
elem = document.getElementsByName("ExNightDateA");
elem[0].value = A_NightsAdate[i];
//in location
elem = document.getElementsByName("NightsALoc");
elem[0].value = A_NightsAlocation[i];
//Nights B
elem = document.getElementsByName("NightsB");
elem[0].value = A_NightsBnumber[i];
//from date
elem = document.getElementsByName("ExNightDateB");
elem[0].value = A_NightsBdate[i];
//in location
elem = document.getElementsByName("NightsBLoc");
elem[0].value = A_NightsBlocation[i];
//Nights C
elem = document.getElementsByName("NightsC");
elem[0].value = A_NightsCnumber[i];
//from date
elem = document.getElementsByName("ExNightDateC");
elem[0].value = A_NightsCdate[i];
//in location
elem = document.getElementsByName("NightsCLoc");
elem[0].value = A_NightsClocation[i];
// Display Vegetarian meal
elem= document.getElementsByName("VegetarianMeal");
elem[0].checked = (A_VegetarianMeal[i] == 0) ? "" : "1";
// Display Prefere only breakfast included
elem= document.getElementsByName("Dinner");
elem[0].checked = (A_OnlyBreakfast[i] == 0) ? "" : "1";
// Display Cycle rental: tracking bike for  man or  women, fit for height:  cm 
elem= document.getElementsByName("CycleRental");
if (A_CycleRental[i] == 0) {
					elem[0].checked="";
					document.getElementById("DivCycleRent").style.display = 'none';
					}
		else 	{
					elem[0].checked="1";
					document.getElementById("DivCycleRent").style.display = 'inline';
					}
radioelem= document.getElementsByName("biketype");
// Man or Women or ""
radioelem[0].checked = (A_CycleRentalBikeType[i] == "man") ? "1" : "";
radioelem[1].checked = (A_CycleRentalBikeType[i] == "women") ? "1" : "";
elem= document.getElementsByName("Bikerheight");
elem[0].value = A_CycleRentalBikeforHeight[i];
// Display Other
elem= document.getElementsByName("OtherR");
if  (! A_Other[i]  ) {
	elem[0].checked = "";
	document.getElementById("DivOtherR").style.display = 'none';
		}
else {
		elem[0].checked = "1";
		document.getElementById("DivOtherR").style.display = 'inline';
       }
elem= document.getElementsByName("OtherRdescr");
elem[0].value = A_Other[i];
}

function ResetStateVars() {
ToggleSPR=0;
NumberofParticipants=0;
Gwarning = 0;
Twarning =0;
Duplicate = 0;
}

function ResetSPR()
{
var tableElem = document.getElementById("tblTravellers");
var lastRow = tableElem.rows.length-1;
for (var i=0; i<=lastRow; i++)
	{
	initSPR(i);
	}
hideSPR();
reset_rownclick_effect(); 
}

function ReqReset() {
ResetStateVars();
ResetSPR();
ResetConditions();
}

function RoomTypecontrol() {
var radioelem= document.getElementsByName("RoomType");
radioelem[0].checked ="";
radioelem[1].checked ="";
radioelem[2].checked ="";
}

function Hupcontrol() {
elem= document.getElementsByName("HotelUpgrade");
radioelem= document.getElementsByName("Upgrade");
if  (! elem[0].checked) 
    {
     radioelem[0].checked ="";
     radioelem[1].checked ="";
     radioelem[0].disabled=true;
     radioelem[1].disabled=true;
    }
    else {
     radioelem[0].disabled=false;
     radioelem[1].disabled=false;
     radioelem[0].checked ="1";
    }
}

function Hup5control() {
elem= document.getElementsByName("HotelUpgrade");
radioelem= document.getElementsByName("Upgrade");
if  (! elem[0].checked) 
    {
     radioelem[0].checked ="";
     radioelem[1].checked ="";
     radioelem[0].disabled=true;
     radioelem[1].disabled=true;
    }
    else {
     radioelem[1].checked ="1";
     radioelem[0].checked ="";
    }
}

function ExtraNightcontrol() {
elem= document.getElementsByName("ExtraNightsABC");
if  (! elem[0].checked) 
	{
	document.getElementsByName("NightsA")[0].value="";
	document.getElementsByName("NightsA")[0].disabled=true;
	document.getElementsByName("ExNightDateA")[0].value="";
	document.getElementsByName("ExNightDateA")[0].disabled=true;
	document.getElementsByName("NightsALoc")[0].value="";
	document.getElementsByName("NightsALoc")[0].disabled=true;
	document.getElementsByName("NightsB")[0].value="";
	document.getElementsByName("NightsB")[0].disabled=true;
	document.getElementsByName("ExNightDateB")[0].value="";
	document.getElementsByName("ExNightDateB")[0].disabled=true;
	document.getElementsByName("NightsBLoc")[0].value="";
	document.getElementsByName("NightsBLoc")[0].disabled=true;
	document.getElementsByName("NightsC")[0].value="";
	document.getElementsByName("NightsC")[0].disabled=true;
	document.getElementsByName("ExNightDateC")[0].value="";
	document.getElementsByName("ExNightDateC")[0].disabled=true;
	document.getElementsByName("NightsCLoc")[0].value="";
	document.getElementsByName("NightsCLoc")[0].disabled=true;
	hidediv("DivExtraNight");
	}
else {
	document.getElementsByName("NightsA")[0].disabled=false;
	document.getElementsByName("ExNightDateA")[0].disabled=false;
	document.getElementsByName("NightsALoc")[0].disabled=false;
	document.getElementsByName("NightsB")[0].disabled=false;
	document.getElementsByName("ExNightDateB")[0].disabled=false;
	document.getElementsByName("NightsBLoc")[0].disabled=false;
	document.getElementsByName("NightsC")[0].disabled=false;
	document.getElementsByName("ExNightDateC")[0].disabled=false;
	document.getElementsByName("NightsCLoc")[0].disabled=false;
	showdiv("DivExtraNight");
	}
}

function CycleRentcontrol() {
elem= document.getElementsByName("CycleRental");
radioelem= document.getElementsByName("biketype");
hob=document.getElementsByName("Bikerheight");
if  (! elem[0].checked) 
    {
     radioelem[0].checked ="";
     radioelem[1].checked ="";
     radioelem[0].disabled=true;
     radioelem[1].disabled=true;
     hob[0].value="";
     hob[0].disabled=true;
     document.getElementById("DivCycleRent").style.display = 'none';
    }
    else {
     radioelem[0].disabled=false;
     radioelem[1].disabled=false;
     hob[0].disabled=false;
     radioelem[0].checked ="1";
     document.getElementById("DivCycleRent").style.display = 'inline';
    }
}

function CycleTypecontrol() {
elem= document.getElementsByName("CycleRental");
radioelem= document.getElementsByName("biketype");
if  (! elem[0].checked) 
    {
     radioelem[0].checked ="";
     radioelem[1].checked ="";
     radioelem[0].disabled=true;
     radioelem[1].disabled=true;
     hob[0].value="";
     hob[0].disabled=true;
    }
    else {
     radioelem[1].checked ="1";
     radioelem[0].checked ="";
     hob[0].disabled=false;
    }
}

function OtherControl() {
elem= document.getElementsByName("OtherR");
if (! elem[0].checked ) {
	document.getElementById("DivOtherR").style.display = 'none';
	document.getElementsByName("OtherRdescr")[0].value = "";
	}
else {
	document.getElementById("DivOtherR").style.display = 'inline';
	}
}

function scrolltoElemId(elemid)
{
xpos = findPosX(elemid) ;
ypos = findPosY(elemid) - posUp ;
window.scrollTo(xpos,ypos) ; 
}

function firstP_Row() {
scrolltoElemId( document.getElementById("PLrow1") );
}

function saveSpecReq(i) {
var Z_SPR = A_SPR[i]; 
var Z_AH_transfer=A_AH_transfer[i]; 
var Z_HA_transfer=A_HA_transfer[i];
var Z_SecureParking=A_SecureParking[i]; 
var Z_RoomType=A_RoomType[i]; 
var Z_HotelUpgrade=A_HotelUpgrade[i]; 
var Z_UpgradeType=A_UpgradeType[i];  
var Z_ExtraNights=A_ExtraNights[i]; 
var Z_NightsAnumber= A_NightsAnumber[i]; 
var Z_NightsAdate= A_NightsAdate[i]; 
var Z_NightsAlocation=A_NightsAlocation[i];  
var Z_NightsBnumber= A_NightsBnumber[i]; 
var Z_NightsBdate = A_NightsBdate[i];
var Z_NightsBlocation=A_NightsBlocation[i]; 
var Z_NightsCnumber=A_NightsCnumber[i]; 
var Z_NightsCdate=A_NightsCdate[i]; 
var Z_NightsClocation=A_NightsClocation[i]; 
var Z_VegetarianMeal= A_VegetarianMeal[i]; 
var Z_OnlyBreakfast=A_OnlyBreakfast[i];  
var Z_CycleRental=A_CycleRental[i]; 
var Z_CycleRentalBikeType=A_CycleRentalBikeType[i]; 
var Z_CycleRentalBikeforHeight=A_CycleRentalBikeforHeight[i]; 
var Z_Other=A_Other[i]; 
//Save Transfer from Airport to first Hotel
var  elem= document.getElementsByName("AH_transfer");
Z_AH_transfer= (! elem[0].checked ) ? "0" : "1";
//Save  Transfer from last Hotel to Airport
elem= document.getElementsByName("HA_transfer");
Z_HA_transfer= (! elem[0].checked ) ? "0" : "1";
//Save Car parking at first Hotel
elem= document.getElementsByName("SecureParking");
Z_SecureParking= (! elem[0].checked ) ? "0" : "1";
//Save Double bedroom or Twin bedroom or Single room
var radioelem= document.getElementsByName("RoomType");
Z_RoomType="";
if  (radioelem[0].checked) Z_RoomType="Double bedroom";
if (radioelem[1].checked ) Z_RoomType="Twin bedroom";
if (radioelem[2].checked ) Z_RoomType="Single room";
// Save Upgrade to 4* or 5* Hotel
elem= document.getElementsByName("HotelUpgrade");
radioelem= document.getElementsByName("Upgrade");
Z_HotelUpgrade= (! elem[0].checked ) ? "0" : "1";
if ( radioelem[0].checked ) Z_UpgradeType= "four star"; else "0";
if ( radioelem[1].checked )Z_UpgradeType= "five star"; else "0";
// Save Extra nights before or after or during the Tour 
elem= document.getElementsByName("ExtraNightsABC");
Z_ExtraNights= (! elem[0].checked ) ? "" : "1";
//Nights A
elem = document.getElementsByName("NightsA");
var nights = parseInt (elem[0].value);
if  ((  isNaN(nights) ) && (Z_ExtraNights) && (elem[0].value) )
	{
	scrolltoElemId (document.getElementById("NightsA"));
	alert ("Invalid number of Nights value !");
	Gwarning +=1;
	}
Z_NightsAnumber= elem[0].value;
//from date
elem = document.getElementsByName("ExNightDateA");
Z_NightsAdate=  elem[0].value; 
//in location
elem = document.getElementsByName("NightsALoc");
if  (elem[0].value.match(illegalNameChars))
   {
   scrolltoElemId (document.getElementById("NightsA"));
   alert("Error: Location text contains invalid characters!"); 
   Gwarning +=1; 
    }
else {
	elem[0].value = elem[0].value.replace(/^\s+|\s+$/g, '');
	elem[0].value = elem[0].value.replace(/\s+/g, ' ');
   }
Z_NightsAlocation= elem[0].value;
if  ( Z_ExtraNights&& ( ! (Z_NightsAnumber && Z_NightsAdate&& Z_NightsAlocation) ) )
{
scrolltoElemId (document.getElementById("NightsA"));
alert ("Please complete your 1st extra Nights entry !");
Gwarning +=1;
}
//Nights B
elem = document.getElementsByName("NightsB");
nights = parseInt (elem[0].value);
if  ((  isNaN(nights) ) && (Z_ExtraNights) && (elem[0].value) )
	{
	scrolltoElemId (document.getElementById("NightsB"));
	alert ("Invalid number of Nights value !");
	Gwarning +=1;
	}
Z_NightsBnumber= elem[0].value;
//from date
elem = document.getElementsByName("ExNightDateB");
Z_NightsBdate= elem[0].value;
//in location
elem = document.getElementsByName("NightsBLoc");
if  (elem[0].value.match(illegalNameChars))
   {
   scrolltoElemId (document.getElementById("NightsB"));
   alert("Error: Location text contains invalid characters!"); 
   Gwarning +=1; 
    }
else {
	elem[0].value = elem[0].value.replace(/^\s+|\s+$/g, '');
	elem[0].value = elem[0].value.replace(/\s+/g, ' ');
   }
Z_NightsBlocation= elem[0].value;
if ( (Z_ExtraNights)  && ( Z_NightsBnumber || Z_NightsBdate|| Z_NightsBlocation) && !( 
Z_NightsBnumber &&  Z_NightsBdate&& Z_NightsBlocation) )
{
scrolltoElemId (document.getElementById("NightsB"));
alert ("Please complete your 2nd extra Nights entry !");
Gwarning +=1;
}
//Nights C
elem = document.getElementsByName("NightsC");
nights = parseInt (elem[0].value);
if  ((  isNaN(nights) ) && Z_ExtraNights && (elem[0].value) )
	{
	scrolltoElemId (document.getElementById("NightsC"));
	alert ("Invalid number of Nights value !");
	Gwarning +=1;
	}
Z_NightsCnumber= elem[0].value;
//from date
elem = document.getElementsByName("ExNightDateC");
Z_NightsCdate= elem[0].value;
//in location
elem = document.getElementsByName("NightsCLoc");
if  (elem[0].value.match(illegalNameChars))
   {
   scrolltoElemId (document.getElementById("NightsC"));
   alert("Error: Location text contains invalid characters!"); 
   Gwarning +=1; 
    }
else {
	elem[0].value = elem[0].value.replace(/^\s+|\s+$/g, '');
	elem[0].value = elem[0].value.replace(/\s+/g, ' ');
   }
Z_NightsClocation= elem[0].value ;
if  (Z_ExtraNights  && ( Z_NightsCnumber || Z_NightsCdate|| Z_NightsClocation) && !( 
Z_NightsCnumber &&  Z_NightsCdate&& Z_NightsClocation))
{
scrolltoElemId (document.getElementById("NightsC"));
alert ("Please complete your 3rd extra Nights entry !");
Gwarning +=1;
}
// Save Vegetarian meal
elem= document.getElementsByName("VegetarianMeal");
Z_VegetarianMeal= (! elem[0].checked ) ? "0" : "1";
// Save Prefere only breakfast included
elem= document.getElementsByName("Dinner");
Z_OnlyBreakfast= (! elem[0].checked ) ? "0" : "1";
// Save Cycle rental: tracking bike for  man or  women, fit for height:  cm 
elem= document.getElementsByName("CycleRental");
radioelem= document.getElementsByName("biketype");
// Man or Women or ""
Z_CycleRental= (! elem[0].checked ) ? "0" : "1";
if ( radioelem[0].checked ) Z_CycleRentalBikeType= "man"; else "0";
if ( radioelem[1].checked ) Z_CycleRentalBikeType= "women" ; else "0";
//Height
elem= document.getElementsByName("Bikerheight");
if ((elem[0].value) && (Z_CycleRental)) 
  {
	var height = parseInt (elem[0].value);
		if  (  isNaN(height) ) 
		{
		scrolltoElemId (document.getElementById("CycleRental"));
		alert ("Invalid Bikerheight value !");
		Gwarning +=1;
		}
		if  (( height > 220) || (height <150))  
		{
		scrolltoElemId (document.getElementById("CycleRental"));
		alert ("Our bikes do not fit for height " + height + " cm !");
		Gwarning +=1;
		}
	}
Z_CycleRentalBikeforHeight= elem[0].value;
// Save Other
elem= document.getElementsByName("OtherR");
var descr= document.getElementsByName("OtherRdescr");
Z_Other= ( !  elem[0].checked ) ? "" :  descr[0].value;
if  ( descr[0].value.match(illegalSpReqChars))     
      {
      scrolltoElemId (document.getElementById("OtherR"));
   	alert("Error: Other text contains invalid characters!"); 
   	Gwarning +=1; 
      }
else {
 			descr[0].value = descr[0].value.replace(/^\s+|\s+$/g, '');
 			descr[0].value = descr[0].value.replace(/\s+/g, ' ');
			Z_Other= descr[0].value;
        }
if (Twarning == Gwarning) 
 	{ 
	A_SPR[i] = Z_SPR; 
	A_AH_transfer[i] = Z_AH_transfer; 
	A_HA_transfer[i] = Z_HA_transfer; 
	A_SecureParking[i] = Z_SecureParking; 
	A_RoomType[i] = Z_RoomType; 
	A_HotelUpgrade[i] = Z_HotelUpgrade;
	A_UpgradeType[i] = Z_UpgradeType;
	A_ExtraNights[i]  = Z_ExtraNights;
	A_NightsAnumber[i] = Z_NightsAnumber;
	A_NightsAdate[i] = Z_NightsAdate; 
	A_NightsAlocation[i] = Z_NightsAlocation;
	A_NightsBnumber[i] = Z_NightsBnumber;
	A_NightsBdate[i] = Z_NightsBdate; 
	A_NightsBlocation[i] = Z_NightsBlocation; 
	A_NightsCnumber[i] =  Z_NightsCnumber;
	A_NightsCdate[i] = Z_NightsCdate;
	A_NightsClocation[i] = Z_NightsClocation ;
	A_VegetarianMeal[i] = Z_VegetarianMeal;
	A_OnlyBreakfast[i] =  Z_OnlyBreakfast;
	A_CycleRental[i] =  Z_CycleRental; 
	A_CycleRentalBikeType[i] =  Z_CycleRentalBikeType;
	A_CycleRentalBikeforHeight[i] = Z_CycleRentalBikeforHeight; 
	A_Other[i] = Z_Other; 
	}
}

function hideSPR() {
ToggleSPR=0;
hidediv("ParticipantSpecialRequest");
showdiv("HLParticipant");
}

function checkandsetSPR() {
checkTravellers();
if (NumberofParticipants==0)
	{
	alert("before you enter a special request, please correct the details of your participants") ;
	return false;
	}	
var SRPHdiv= document.getElementById("SRPH");
var 	str=SRPHdiv.firstChild.nodeValue;
var plistindex =  str.replace(/(\D+)/g , ""); 
var i = plistindex-1;
Twarning = Gwarning ;    		
saveSpecReq(i);
if (Twarning == Gwarning) 
   {
   hideSPR();
   document.getElementById("PLrow"+plistindex).style.background = colbgrnd;
   }   
return true;
}

function reset_rownclick_effect() 
{
 var tableElem = document.getElementById("tblTravellers");
 for (var k=1; k < tableElem.rows.length; k++)
  { 
   document.getElementById("PLrow"+k).style.background =  colbgrnd;
  }
}

function rownclick_effect(myth, index, bgcol) 
{
 var tableElem = document.getElementById("tblTravellers");
 for (var k=1; k < tableElem.rows.length; k++)
  { 
   if  (k != index )  document.getElementById("PLrow"+k).style.background =  colbgrnd;
  }
  myth.style.background = bgcol;
}

function AddSPR(myform) 
{
var 	str=  myform.firstChild.nodeValue;
var plistindex =  str.replace(/(\D+)/g , ""); 
checkTravellers();
if (NumberofParticipants==0)
	{
	alert("before you enter a special request, please correct the details of your participants") ;
	hideSPR();
	rownclick_effect(myform, plistindex, colbgrnd);
	return false;
	}
if (ToggleSPR == plistindex) 
	{
	//after 2.nd click
	hideSPR();
	rownclick_effect(myform, plistindex,  colbgrnd);
	return;
	}
ToggleSPR= plistindex;
var FnameID="FN"+plistindex;
var SnameID="SN"+plistindex;
var Fname = document.getElementsByName(FnameID);
var Sname = document.getElementsByName(SnameID);
var SRPHdiv= document.getElementById("SRPH");
SRPHdiv.firstChild.nodeValue= "Other requirements of Participant #"+ plistindex+".: " + Fname[0].value+" " + Sname[0].value;
hidediv("HLParticipant");
showdiv("ParticipantSpecialRequest");
rownclick_effect(myform, plistindex,"red" );
var i = plistindex-1;
displaySPR(i);
}

function CrHInputArr(size, name, inarr) {
    var container = document.getElementById('MyContainer');
    for (var loop=0; loop<size; loop++) 
        {
        var newInput = document.createElement('input');
        newInput.type = 'hidden';
        newInput.id = name + (loop+1); 
         newInput.name = name + (loop+1); 
        newInput.value =  inarr[loop]; 
        container.appendChild(newInput);       
        }
}

function makeSPRHins(size) {
CrHInputArr( size, "I_AH_transfer", A_AH_transfer);
CrHInputArr( size, "I_HA_transfer", A_HA_transfer);
CrHInputArr( size, "I_SecureParking", A_SecureParking);
CrHInputArr( size, "I_RoomType", A_RoomType);
// CrHInputArr( size, "I_RoomSmooking", A_RoomSmooking);
CrHInputArr( size, "I_HotelUpgrade", A_HotelUpgrade);
CrHInputArr( size, "I_UpgradeType", A_UpgradeType);
CrHInputArr( size, "I_ExtraNights", A_ExtraNights);
CrHInputArr( size, "I_NightsAnumber", A_NightsAnumber);
CrHInputArr( size, "I_NightsAdate", A_NightsAdate);
CrHInputArr( size, "I_NightsAlocation", A_NightsAlocation);
CrHInputArr( size, "I_NightsBnumber", A_NightsBnumber);
CrHInputArr( size, "I_NightsBdate", A_NightsBdate);
CrHInputArr( size, "I_NightsBlocation", A_NightsBlocation);
CrHInputArr( size, "I_NightsCnumber", A_NightsCnumber);
CrHInputArr( size, "I_NightsCdate", A_NightsCdate);
CrHInputArr( size, "I_NightsClocation", A_NightsClocation);
CrHInputArr( size, "I_VegetarianMeal", A_VegetarianMeal);
CrHInputArr( size, "I_OnlyBreakfast",  A_OnlyBreakfast);
CrHInputArr( size, "I_CycleRental",  A_CycleRental);
CrHInputArr( size, "I_CycleRentalBikeType", A_CycleRentalBikeType);
CrHInputArr( size, "I_CycleRentalBikeforHeight", A_CycleRentalBikeforHeight);
CrHInputArr( size, "I_Other", A_Other);
}
