/*
setform.js
©2001 Aurora Interactive Ltd.
www.aiuk.net
*/

function setform()
{
	var args = new Array();
	string = "" + location.search;
	var query = string.substring(1,string.length);
	var pairs = query.split("&");
	for(var i = 0; i < pairs.length; i++)
	{
		var pos = pairs[i].indexOf('=');
		if (pos == -1) continue;
		var argname = pairs[i].substring(0,pos);
		var value = pairs[i].substring(pos+1);
		args[argname] = value;
	}
	
	if (args['number_in_group']) document.refineform.number_in_group.value = args['number_in_group'];
	if (args['maximum_rent']) document.refineform.maximum_rent.value = args['maximum_rent'];
	if (args['region']) document.refineform.region.value = args['region'];
	if (args['number_of_rooms']) document.refineform.number_of_rooms.value = args['number_of_rooms'];
	if (args['accomodationtype']) document.refineform.accomodationtype.value = args['accomodationtype'];
	
	document.searchform.number_in_group.value = document.refineform.number_in_group.value;
	document.searchform.maximum_rent.value = document.refineform.maximum_rent.value;
	document.searchform.region.value = document.refineform.region.value;
	document.searchform.number_of_rooms.value = document.refineform.number_of_rooms.value;
	document.searchform.accomodationtype.value = document.refineform.accomodationtype.value;
	
}

onload=setform;



