function ValidateLogin(str1, str2)
{
		xmlHttpCourses=GetXmlHttpObject();
		if (xmlHttpCourses==null)
		{
		alert ("Browser does not support HTTP Request");
		return;
		}

		document.getElementById("Frm_Show").disabled=true;
		document.getElementById("LoadingMsg").innerHTML = 'Loading&hellip;';
		document.getElementById("LoadingBar").style.display="";
		document.getElementById("EmailIDErrorText").innerHTML = "&nbsp;";
		document.getElementById("PasswordErrorText").innerHTML = "&nbsp;";
		document.getElementById("InvalidLoginText").innerHTML = "&nbsp;";

		var url="http://www.indb2b.com/Ajax.php";
		var parameters="fuse=1&EmailID="+str1+"&Password="+encodeURI(str2);

		xmlHttpCourses.onreadystatechange= function ()
			{
			if (xmlHttpCourses.readyState==4 || xmlHttpCourses.readyState=="complete")
				{
					if (xmlHttpCourses.responseText == 1)
					{
					document.getElementById("EmailIDError").className="fld_ERROR";
					document.getElementById("EmailIDErrorText").innerHTML = 'Enter a Valid Email ID.';
					document.getElementById("InvalidLoginText").innerHTML = 'Login Failed Invalid Username.';
					}
					else if (xmlHttpCourses.responseText == 2)
					{
					document.getElementById("PasswordError").className="fld_ERROR";
					document.getElementById("PasswordErrorText").innerHTML = 'Enter a Your Password.';
					document.getElementById("InvalidLoginText").innerHTML = 'Login Failed Invalid Password.';
					}
					else if (xmlHttpCourses.responseText == 3)
					{
					document.getElementById("InvalidLoginText").innerHTML = 'Login Failed Invalid username or password.';
					}
					else
					{
						string = xmlHttpCourses.responseText.split("_____________");
						if (string[0] == 4)
						{
							alert ("Welcome "+string[1] + "\n\nLogging you in Please Click OK");
							window.location=string[2];
						}
						else
						{
							document.getElementById("InvalidLoginText").innerHTML = 'Oops Unknown Error Occurs.. Please Close your Browser and Try After Some Time..';
						}
					}
					document.getElementById("LoadingBar").style.display="none";
					document.getElementById("LoadingMsg").innerHTML = '&nbsp;';
					document.getElementById("Frm_Show").disabled=false;

				}
			}

		xmlHttpCourses.open('POST', url, true);
		xmlHttpCourses.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlHttpCourses.setRequestHeader("Content-length", parameters.length);
		xmlHttpCourses.setRequestHeader("Connection", "close");
		xmlHttpCourses.send(parameters);
}
