
function landing_newWindow(url, properties)
{
	var newWindow;
	var sProperties = '';

	if (properties == '')
		{
			sProperties = 'scrollBars=no,resizable=no,toolbar=no,menubar=no,location=no,directories=no,width=500,height=500';
		}
	else
		sProperties = properties;
		
	window.open(url, 'landing', sProperties);
}

function createURL()
{
	var minPrice = getElementById_s('minPrice').value;
	var maxPrice = getElementById_s('maxPrice').value;
	var propertyType = getElementById_s('propType').value;
	var minBed = getElementById_s('beds').value;
	var propHttp = getElementById_s('httpstring').value;

	propHttp = propHttp.replace(/<minPrice>/gi,minPrice);
	propHttp = propHttp.replace(/<maxPrice>/gi,maxPrice);
	propHttp = propHttp.replace(/<minBed>/gi,minBed);
	propHttp = propHttp.replace(/<propType>/gi,propertyType);
	
	window.location.href = propHttp;
}

function dltypeof( vExpression )
{
    var sTypeOf = vExpression.type

    return sTypeOf;
}


	
function removeNonDigits(field) 
{
	if(fieldHasValue(field)) 
	{
		field.value = field.value.replace(/[^0-9]/gi,"");
	}
}

function fieldHasValue(field)
{
	return (field != null && field.value != null && field.value.length > 0);
}

function getElementById_s(id)
{
	var obj = null;
		
	obj = document.getElementsByName(id)[0];

	return obj;
}
