function checkstage1form (){// room stuff now at the end as we need a return confirm when checking room prices are correctif ( document.theform.scp.value != "Y" )	{ // this is really for one beds - we should have an alternative version for 2 bed + scp		var userconfirmedprice = false;		for (var r=1; r<=document.theform.roomcount.value; r++)		{		var price = eval( "document.theform.roomprice"+r+".value");		var per = eval( "document.theform.roomper"+r+".options[document.theform.roomper"+r+".selectedIndex].value");						if ( !per )			{			alert( "please select whether the rental for room "+r+" is per week or per month");			eval( "document.theform.roomper"+r+".focus()");			return false;			}		else if ( price < 1 )			{			alert( "please enter the rent for room "+r);			eval( "document.theform.roomprice"+r+".focus()");			return false;			}		else			{			// make sure week/month selected correctly			var pw = price;			if ( per && per == "pcm" )				{				pw = price / 4.333333333333;				}			var expected_min = document.theform.expected_min_price_pw.value;			var expected_max = document.theform.expected_max_price_pw.value;			if ( expected_min && expected_max && !userconfirmedprice )				{				// if they have been set				if ( pw < expected_min && per =="pcm" && price<expected_max)// maybe they have selected pcm instead of pw					{										userconfirmedprice = confirm( "Are you sure you meant "+price+" "+per+" instead of PER WEEK?");					if (!userconfirmedprice )						{						eval( "document.theform.roomper"+r+".focus()");						return false;						}					}				else if( pw > expected_max && per =="pw" && (pw/4.333333333333)>expected_min )// maybe they have selected pw instead of pcm					{					userconfirmedprice = confirm( "Are you sure you meant "+price+" "+per+" instead of PER MONTH?");					if (!userconfirmedprice )						{						eval( "document.theform.roomper"+r+".focus()");						return false;						}					}				else					{					//alert( expected_max + ": "+pw + " :"+per+":" );					}				}						}		}	}		if ( !document.theform.neighbourhood_id.options[document.theform.neighbourhood_id.selectedIndex].value )	{	alert("please select an area from the drop down list");	return false;	}else if ( !document.theform.ad_title.value )	{	alert("please enter a title for your advert");	document.theform.ad_title.focus();	return false;	}else if ( !document.theform.ad_text.value )	{	alert("please enter your advert text");	document.theform.ad_text.focus();	return false;	}// log in / new user stuffif ( document.theform.is_loggedin.value )	{	return true;	}else	{	if ( document.theform.email.value && document.theform.password.value && !document.theform.inagreement.checked )		{		alert("You must agree to our terms and privacy policy before proceeding - please tick the box by 'Your agreement'");		// ie new user		document.theform.inagreement.focus();		return false;		}	else		{		return true;		}	}		}function checkstage2form (){if ( !document.optionsform.roomprice1.value )	{	alert("please enter the price of the room");	document.optionsform.roomprice1.focus();	return false;	}else if ( !document.optionsform.rooms_in_property.value )	{	alert("please enter the total number of bedrooms in the property");	document.optionsform.rooms_in_property.focus();	return false;	}	}