﻿    $().ready(function() 
	{
		
		$("#btnSearch").click (function() 
		{	
			$sKeyword =  $("#txtSearch").val();
			
			if ($sKeyword.length ==0) {
				alert("Please enter keyword");
			}
			else {
				var $pathname = "http://" + window.location.hostname + "/SearchResults.aspx?Search="+ $sKeyword;
				window.location = $pathname;
			}
		});		
			
	});
	
	    function validateformlogin()
        {
		    errmsg = "";
		    var username =  $("#txtUsername").val();
		    var password =  $("#txtPassword").val();
			
			if (username.length ==0)
			{		      
				errmsg = errmsg + "Your username is required.\n";
				alert(errmsg);
			}
			else if(password.length ==0) {
				errmsg = errmsg + "Your username is required.\n";
				alert(errmsg);
			}
		
		    if (errmsg == ""){
				return true}
			else{
				return false;}
       }

	
	





