// JavaScript Document


			// when performing a search, redirect the user to the API version of the application
			// URL + query = etc
			function doRedirect() {
					window.location = '?q=' + encodeURI(document.getElementById('txtQuery').value) + 
										'&lang=' + encodeURI(document.getElementById('txtLocale').value);
				}
				
			function getParameterByName( name ) {  
					name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
					var regexS = "[\\?&]"+name+"=([^&#]*)";  
					var regex = new RegExp( regexS );  
					var results = regex.exec( window.location.href );  
					
					if( results == null )    
						return "";  
					else    
						return results[1];
				}