function decode(encoded) {
	return decodeURIComponent(encoded.replace(/\+/g,  " "));
}


var func = window.onload;
window.onload = function()
{
	func();
	
	var urlObj = new Object();

	window.location.search.replace(
	
	new RegExp( "([^?=&]+)(=([^&]*))?", "g" ),
	
	function( $0, $1, $2, $3 ){
	urlObj[ $1 ] = $3;
	}
	);
	
	if(document.forms.length > 0)
	{
		var frm = document.forms[document.forms.length-1];
		
		for (var strKey in urlObj)
		{
			//alert(strKey + " - " + urlObj[strKey]);
			
			if(typeof frm[strKey] != "undefined" && strKey != "Id")
			{
				frm[strKey].value = decode(urlObj[strKey]);
			}
		}
	}
}
