
/*-----------------THIS IS NEW STAFF HERE which we have to remove later--------------------------------*/ 
 function contact()
       {
        /*
         document.body.style.backgroundColor='#FFFFEA'; 
         var tables=document.getElementsByTagName("table") 
         for(i=0;i<tables.length;i++){
            //alert(tables[i].width); 
         if (tables[i].width==755 && tables[i].border==3) 
            {
             tables[i].style.borderColor="#DF1129";
             
            }
         }      
         */
         document.getElementById('cont').style.display='none';
         document.getElementById('reservation').style.display='none';
       }
 

function prepareForm() {
    if (vform = document.formSearch) {
        var nextDate = new Date();
        nextDate.setDate(nextDate.getDate() + 21);
        toDay = nextDate.getDate();
        toMon = nextDate.getMonth() + 1;
        toYea = nextDate.getYear();
        for (i = 0; i < vform.chinmonth.length; i++) {
            if (vform.chinmonth.options[i].value == toMon) vform.chinmonth.options[i].selected = true;
        }
        for (i = 0; i < vform.chinday.length; i++) {
            if (vform.chinday.options[i].value == toDay) vform.chinday.options[i].selected = true;
        }
        for (i = 0; i < vform.chinyear.length; i++) {
            if (vform.chinyear.options[i].value == toYea) vform.chinyear.options[i].selected = true;
        }
    }
}

 
 

 /*----------------------------AJAX GET CONTENT----------------------------*/
	function content()
	{
	     /*here will be hotel id*/
		 
		//var url = 'http://www.prague-hotels.org.uk/get_content.php?id_hotel='+id_hotel;
	     
	    var url = 'http://www.prague-hotels.org.uk/prague-hotels/search_form_inside.php';
         
		if(typeof XMLHttpRequest != "undefined")
		{ /* Code for: IE 7 Firefox, Mozilla etc Safari Opera */ 
		  httpRequest = new XMLHttpRequest(); 
		} 
		else if(typeof window.ActiveXObject != "undefined")
		{ /*  Code for: IE 5 IE 6 */ 
		  httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); 
		}
		httpRequest.open("GET", url, true);
		httpRequest.onreadystatechange= function () {contentprocessRequest('hotel_booking_frame'); } ;
		httpRequest.send(null);
	}
	
			
	function contentprocessRequest(mistoZobrazenivec)
	{
		if (httpRequest.readyState == 4)
		{
			if(httpRequest.status == 200)
			{
				var mistoZobrazeni = document.getElementById(mistoZobrazenivec);
				/*
                var mistomapa = document.getElementById('location_detail');
				var reservation_link=document.getElementById('reservation');
				var location_html='';
				
				if (use_location) { location_html='<div style=\"margin-top:3px; \">'+location_str+'</div>';}
				if (use_map) { location_html=location_html+'<div style=\"margin-bottom:3px; \"><a href=\"map.html\"><b>show in map</b></a></div>';}
				//if (use_tel) { location_html=location_html+'<div style=\"margin-top:3px; \"><b>(UK) '+tel+'</b></div><br>';}
				reservation_link.innerHTML='';
				mistomapa.innerHTML =location_html; // Location and map
				mistoZobrazeni.innerHTML = httpRequest.responseText; // booking form
				//getPrice(); // get actual price
				setCookie('counter',id_hotel,365);*/
				mistoZobrazeni.innerHTML = httpRequest.responseText;
				prepareForm();
				contact();
			}
		}
	}

