function get_metros(Width)
{
	return '<select name="metroSelect" id="metroSelect"' + 'style="width:'+Width + '">\
	<option selected="selected" value="0">Select Province/Territory</option>\
	<option value="810225">Alberta</option>\
	<option value="810191">British Columbia</option>\
	<option value="810283">Manitoba</option>\
	<option value="810401">New Brunswick</option>\
	<option value="810298">Newfoundland</option>\
	<option value="810389">Nova Scotia</option>\
	<option value="810302">Ontario</option>\
	<option value="810294">Prince Edward Island</option>\
	<option value="809997">Qu&#233;bec</option>\
	<option value="810278">Saskatchewan</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=1&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=1&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else
			{
				alert("Vous avez oublié de nous dire si vous Recherchez ou si vous Proposez une colocation");
			}
		}
		else
			alert("Choisissez une ville");
	}
}



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=1&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=1&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else
			{
				alert("Vous avez oublié de nous dire si vous Recherchez ou si vous Proposez une colocation");	
			}
		}
		else
			alert("Choisissez une ville");
	}
}


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=1&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=1&mc='+metroSelect.options[metroSelect.selectedIndex].value+'&ac=' + document.getElementById('partner').value);
			}
			else
			{
				alert("ous avez oublié de nous dire si vous Recherchez ou si vous Proposez une colocation");				}
		}
		else
			alert("Choisissez une ville");
	}
}

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';
		
	}
}
