function ca_get_metros(Width)
{
	return '<select name="metroSelect" id="metroSelect"' + 'style="width:'+Width + '">\
				<option value="-">Select a City</option>\
				<option value="Cal">Calgary</option>\
				<option value="ED">Edmonton</option>\
				<option value="abb">Abbotsford</option>\
				<option value="kaml">Kamloops</option>\
				<option value="kelo">Kelowna</option>\
				<option value="prin">Prince George</option>\
				<option value="saa">Saanich</option>\
				<option value="VA">Vancouver area</option>\
				<option value="VI">Vancouver Island</option>\
				<option value="vern">Vernon</option>\
				<option value="vict">Victoria</option>\
				<option value="8">Winnipeg</option>\
				<option value="FDRC">Fredericton</option>\
				<option value="mton">Moncton</option>\
				<option value="sjn">Saint John</option>\
				<option value="CPB">Cape-Breton</option>\
				<option value="hali">Halifax</option>\
				<option value="barr">Barrie</option>\
				<option value="chtk">Chatham-Kent</option>\
				<option value="gue">Guelph</option>\
				<option value="Ham">Hamilton</option>\
				<option value="KIT">Kitchener</option>\
				<option value="LDON">London - St Thomas area</option>\
				<option value="niag">Niagara Falls area</option>\
				<option value="osh">Oshawa</option>\
				<option value="OTT">Ottawa</option>\
				<option value="pete">Peterborough</option>\
				<option value="sdy">Sudbury</option>\
				<option value="thb">Thunder-Bay</option>\
				<option value="To">Toronto</option>\
				<option value="wat">Waterloo</option>\
				<option value="wds">Windsor</option>\
				<option value="ChJo">Chicoutimi-Jonquiere</option>\
				<option value="mont">Montreal</option>\
				<option value="OTT">Ottawa</option>\
				<option value="QUEB">Quebec</option>\
				<option value="sgy">Saguenay</option>\
				<option value="She">Sherbrooke</option>\
				<option value="TR">Trois-Rivieres</option>\
				<option value="Reg">Regina</option>\
				<option value="SAS">Saskatoon</option>\
				<option value="Stj">St John\'s</option>\
			</select>';
}

function get(id)
{
	return document.getElementById(id);
}



function submit_frm(name)
{
	with(document.getElementById(name))
	{
		if(metroSelect.options[metroSelect.selectedIndex].value != '-'){
			if(choice[0].checked)
			{//need, preview
				window.open('http://ca.easyroommate.com/default.aspx?pt=L&lc=7&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else if(choice[1].checked)
			{//have
				window.open('http://ca.easyroommate.com/default.aspx?at=H&lc=7&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else
			{
				alert("Suchen Sie ein Zimmer oder einen Mitbewohner ? Bitte anklicken");
			}
		}
		else
			alert("Please select a city");
	}
}



function go(name)
{
	with(document.getElementById(name))
	{
		if(metroSelect.options[metroSelect.selectedIndex].value != '-'){
			if(choice[0].checked)
			{
				window.open('http://ca.easyroommate.com/default.aspx?at=L&lc=' + document.getElementById('language').value + '&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else if(choice[1].checked)
			{
				window.open('http://ca.easyroommate.com/default.aspx?at=H&lc=' + document.getElementById('language').value + '&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else
			{
				alert("Please select if you are looking or offering a flatshare");	
			}
		}
		else
			alert("Please select a city");
	}
}


function prev(name)
{
	with(document.getElementById(name))
	{
		if(metroSelect.options[metroSelect.selectedIndex].value != '-'){
			if(choice[0].checked)
			{
				window.open('http://ca.easyroommate.com/default.aspx?pt=L&lc=' + document.getElementById('language').value + '&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else if(choice[1].checked)
			{
				window.open('http://ca.easyroommate.com/default.aspx?pt=H&lc=' + document.getElementById('language').value + '&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else
			{
				alert("Please select if you are looking or offering a flatshare");	
			}
		}
		else
			alert("Please select a city");
	}
}

function change(name)
{
	if(name == "need")
	{
		document.getElementById('bplace').value = 'Inscription gratuite';
		document.getElementById('bprev').value = 'Quelques colocataires';
	}
	else if(name == "have")
	{
		document.getElementById('bplace').value = 'Déposez votre annonce';
		document.getElementById('bprev').value = 'Quelques annonces';
		
	}
}