// JavaScript Document


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="#dce6ef;";

            }
         }

         document.getElementById('cont').style.display='none';

}

 function reservations()
       {
         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;
        }
    }
}



function content()
	{
	     /*here will be hotel id*/
		 
		var url = 'http://www.prague-hotels.org.uk/search_form.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_search'); } ;
		httpRequest.send(null);
	}
	
			
	function contentprocessRequest(mistoZobrazenivec)
	{
		if (httpRequest.readyState == 4)
		{
			if(httpRequest.status == 200)
			{
				 var mistoZobrazeniVar = document.getElementById(mistoZobrazenivec);
				     mistoZobrazeniVar.innerHTML = httpRequest.responseText;
                                        prepareForm();
					 contact();
			}
		}
	}
	
