function getParm(string,parm) {
    var startPos = string.indexOf(parm + "=");
    if (startPos > -1) {
        startPos = startPos + parm.length + 1;
        var endPos = string.indexOf("&",startPos);
        if (endPos == -1)
            endPos = string.length;
        return unescape(string.substring(startPos,endPos));
    }
    return '';
}

var passed = location.search.substring(1);

document.frmRealEstate.Item_1_1.selectedIndex = parseInt(getParm(passed,'Property'))
document.frmRealEstate.Item_1_6.selectedIndex = parseInt(getParm(passed,'City'))

if (frmRealEstate.Item_1_1.value != ""){
	document.getElementById("Bostadstyp").style.display = "block";
}
else {
	document.getElementById("Bostadstyp").style.display = "none";
}
	
if (frmRealEstate.Item_1_6.value != ""){
	document.getElementById("Omrade").style.display = "block";
}
else {
	document.getElementById("Omrade").style.display = "none";
}

