function setMeUp(type,mylocation,code)
{
			//alert('setup');
			var id = code + "_ticket";
			element = document.getElementById(id);
			element.style.height = "auto";		
			var details_id = code + "_details";
			element = document.getElementById(details_id);
			element.style.display = "";	
}
		
		
function dotheForm(formtype, myLocation, code)
{
			var today = new Date();
			var myid = code + "_form";
			
			var agent_code = APHScriptLibrary.ReadCookie('ref');
			var ur = APHScriptLibrary.ReadCookie('ur');
			if (!agent_code) agent_code = 'aph';
			
			if (formtype == 'parking') { 			
			//alert(agent_code);
			var mybookingform = "";
			
			mybookingform += '<br><form action="http://booking.aph.com/aph/aphbook.asp?p=p"'; 
			mybookingform += 'method="get" name="frmc_parking_offer" id="frmc_parking_offer" onsubmit="javascript:FormValueConverter(this, \'parking\');return GoogleCrossDomainConverter(this, \'parking\', null);" style="margin:0;">';
			mybookingform += '<div id="setdates_p"></div>';
			mybookingform += '<div id="fields_p">';
			mybookingform += '<label><b>Arrival date at car park</b></label><br>';
			mybookingform += '<select id="ddd" class="date" title="Arrival date at the Car Park (day)" name="ddd" onchange="UpdateReturnDate();">';
			mybookingform += PrintDays();
			mybookingform += '</select><label></label><select id="ddm" class="date" title="Arrival date at the Car Park (month)" name="ddm" onchange="UpdateReturnDate();">';
			mybookingform += PrintMonths(1);
			mybookingform += '</select><label></label><select id="ddy" class="date" title="Arrival date at the Car Park (year)" name="ddy" onchange="UpdateReturnDate();">';
			mybookingform += PrintYears();
			mybookingform += '</select>';
			mybookingform += '<span></span><img id="DepCalBttnXML" class="hand" onclick="APHScriptLibrary.Calendar.Show(this, \'myCalendar\', \'S\', \'L\');" src="images/frame/cal.jpg" alt="" style="border-style:none; margin:0 1px 0 1px"><select name="dtime" id="dtime" class="time">';
			mybookingform += GetTimesMerged('dep');
			mybookingform += '</select><br><label><b>Return date / landing time</b></label><br><select id="rdd" class="date" title="Return date at the Car Park (day)" name="rdd" onchange="UpdateReturnDate();">';
			mybookingform += PrintDays();
			mybookingform += '</select><label></label><select id="rdm" class="date" title="Return date at the Car Park (month)" name="rdm" onchange="UpdateReturnDate();">';
			mybookingform += PrintMonths(1);
			mybookingform += '</select><label></label><select id="rdy" class="date" title="Return date at the Car Park (year)" name="rdy" onchange="UpdateReturnDate();">';
			mybookingform += PrintYears();
			mybookingform += '</select>';
			mybookingform += '<span></span><img id="RetCalBttnXML" class="hand" onclick="APHScriptLibrary.Calendar.Show(this, \'myCalendar\', \'S\', \'L\');" src="images/frame/cal.jpg" alt="" style="border-style:none; margin:0 1px 0 1px">';
			mybookingform += '<select name="rtime" id="rtime" class="time">';
			mybookingform += GetTimesMerged('ret');
			mybookingform += '</select><br><label for="px"><b>Passengers</b></label><br><select name="px"><option value="1" selected>1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>';
			mybookingform += '<input type="hidden" name="quote_type" value="parking">';
			mybookingform += '<input type="hidden" name="agent" value="' + agent_code + '">';
			mybookingform += '<input type="hidden" name="tmp" value="' + agent_code + '">';
			mybookingform += '<input type="hidden" id="dth" name="dth" value="">';
			mybookingform += '<input type="hidden" id="dtm" name="dtm" value="">';
			mybookingform += '<input type="hidden" id="rth" name="rth" value="">';
			mybookingform += '<input type="hidden" id="rtm" name="rtm" value="">';
			mybookingform += '<input type="hidden" id="product_code" name="cp" value="'+code+'">';	
			mybookingform += '<input type="hidden" id="ap" name="ap" value="'+myLocation+'">';
			mybookingform += '<input type="hidden" id="ur" name="ur" value="'+ur+'">';	
			mybookingform += '</div>';					
			mybookingform += '<br><img id="upd_bttn_p" src="images/frame/update_bttn.gif" onclick="javascript: var form = document.getElementById(\'frmc_parking_offer\'); FormValueConverter(form, \'parking\'); ReQuoteParking(form);">';
			mybookingform += '<a href="http://www.parking-quote.co.uk/parking/profpark.ASP?WCI=CPInfo2&WCE='+code+'" target="_blank"><img style="display:none;" id="moreinfo_bttn_p" src="images/frame/moreinfo_bttn.gif" border="0"></a><input style="display:none" type="image" id="sbm_bttn_p" src="images/frame/book_now_bl.gif">';		
			mybookingform += '<hr></form>';
	
			document.getElementById(myid).innerHTML = "</div>" + mybookingform;
			
			}
			
			if (formtype == 'hotel') { 			
			var mybookingform = "";
	
			mybookingform = '<form action="http://booking.aph.com/aph/aphbook.asp?p=h" method="get" name="frmc_hotel_offer" id="frmc_hotel_offer" onsubmit="javascript:FormValueConverter(this, \'hotel\');return GoogleCrossDomainConverter(this, \'hotel\', null);">';
			mybookingform += '<div id="setdates_h"></div>';
			mybookingform += '<div id="fields_h">';			
			mybookingform += '<label for="txtDDate"><b>Night of Stay</b></label><br>';
			mybookingform += '<select id="ddd" class="date" title="Arrival date at the Hotel (day)" name="ddd" onchange="UpdateReturnDate();">';
			mybookingform += PrintDays();
			mybookingform += '</select><label></label><select id="ddm" class="date" title="Arrival date at the Hotel (month)" name="ddm" onchange="UpdateReturnDate();">';
			mybookingform += PrintMonths(1);
			mybookingform += '</select><label></label><select id="ddy" class="date" title="Arrival date at the Hotel (year)" name="ddy" onchange="UpdateReturnDate();">';
			mybookingform += PrintYears();
			mybookingform += '</select><span></span><img id="dep_hot_calXML" class="hand" onclick="APHScriptLibrary.Calendar.Show(this, \'myCalendar\', \'S\', \'L\');" src="images/frame/cal.jpg" alt="" style="border-style:none; margin:0 1px 0 1px">';
			mybookingform += '<br><label for="txtRDate"><b>Pickup Vehicle</b></label><br><select id="rdd" class="date" title="Return to pick up car (day)" name="rdd" onchange="UpdateReturnDate();">';
			mybookingform += PrintDays();
			mybookingform += '</select><label></label><select id="rdm" class="date" title="Return to pick up car (month)" name="rdm" onchange="UpdateReturnDate();">';
			mybookingform += PrintMonths(1);
			mybookingform += '</select><label></label><select id="rdy" class="date" title="Return to pick up car (year)" name="rdy" onchange="UpdateReturnDate();">';
			mybookingform += PrintYears();
			mybookingform += '</select>';
			mybookingform += '<span></span><img id="ret_hot_calXML" class="hand" onclick="APHScriptLibrary.Calendar.Show(this, \'myCalendar\', \'S\', \'L\');" src="images/frame/cal.jpg" alt="" style="border-style:none; margin:0 1px 0 1px">';			
			mybookingform += '<input type="hidden" name="zn" value="PKG">';
			mybookingform += '<input type="hidden" name="quote_type" value="hotel">';
			mybookingform += '<input type="hidden" name="agent" value="' + agent_code + '">';
			mybookingform += '<input type="hidden" name="tmp" value="' + agent_code + '">';
			mybookingform += '<input type="hidden" id="product_code" name="prod" value="'+code+'">';
			mybookingform += '<input type="hidden" id="ap" name="ap" value="'+myLocation+'">';		
			mybookingform += '<input type="hidden" name="WCE" value="HotelAvailabilitySubmit">';
			mybookingform += '<input type="hidden" id="ur" name="ur" value="'+ur+'">';	
			//mybookingform += '<br><input type="image" name="submit" src="images/frame/book_now_bl.gif">';
			mybookingform += '</div>';
			mybookingform += '<br><img id="upd_bttn_h" src="images/frame/update_bttn.gif" onclick="javascript: var form = document.getElementById(\'frmc_hotel_offer\'); FormValueConverter(form, \'hotel\'); ReQuoteHotel(form);">';
			mybookingform += '<a href="http://www.parking-quote.co.uk/parking/profpark.ASP?WCI=CPInfo2&WCE='+code+'" target="_blank"><img style="display:none;" id="moreinfo_bttn_h" src="images/frame/moreinfo_bttn.gif" border="0"></a><input style="display:none" type="image" name="submit" id="sbm_bttn_h" src="images/frame/book_now_bl.gif">';		
			
			mybookingform += '<hr></form>';			
			
		    //alert('<input type="hidden" id="product_code" name="prod" value="'+code+'"><input type="hidden" id="ap" name="ap" value="'+myLocation+'">');
			document.getElementById(myid).innerHTML = "<div id=\"" + code + "_calendar\"></div>" + mybookingform;
			}	
					
}
		
function HideThis(id)
{
			//alert('hidethis');
			var element = document.getElementById(id); 
			element.style.display = "none";
}
		
function ShowThis(id)
{
			//alert('showthis');
			var element = document.getElementById(id); 
			element.style.display = "";
}		
		
function CheckRes()
{
			//alert('checkres');
			if (screen.width <= 1024) 
			{
				//alert(screen.width);
				document.getElementById("canvas").style.margin = "0";
				document.getElementById("canvas").style.position = "absolute";
				document.getElementById("canvas").style.top = "0";
				document.getElementById("canvas").style.left = "-15px";
				document.getElementById("left_backgr").style.display = "";
				document.getElementById("right_backgr").style.display = "none";				
			}
}
		
		
