 function func_login()
	 {
	
	 	var obj_user = document.loginform.uname
		if(func_trim(obj_user.value) == "")
		{
			alert("Please enter the email");
			obj_user.focus();
			return false;
		}
		var obj_pwd = document.loginform.pwd
		if(func_trim(obj_pwd.value) == "")
		{
			alert("Please enter the password");
			obj_pwd.focus();
			return false;
		}
		document.loginform.action="https://www.lincroft.co.uk/client_login_check.asp"
		document.loginform.submit();
		
	 }
function check() 
{
var obj_comp_type = document.searchform.comservice

	

	if (document.searchform.companyname.value == "") 
	{
		alert("Please input company name ....");
		document.searchform.companyname.focus();
		return false;
	}
	
	
	
	
	/* *************************************************** */
	winWidth="400"
	winheight="25"
	
	//y= screen.height/2+18
    //x= (screen.width/2)-winWidth
	thetext="<B>Company name validation is processing.Please wait</B>..."
	
	
	//alert("asdfasdf")
	thename = "msg"
	theobj=document.getElementById(thename)
	
	theobj.visibility = "visible"
	theobj.style.width=winWidth
	theobj.style.height=winheight
	
	
	//theobj.style.left=x
	//theobj.style.top=y
	     
	//theobj.innerHTML = ""
	theobj.insertAdjacentHTML("BeforeEnd","<table cellspacing=0 cellpadding=3 width="+winWidth+" border=1 height=10><tr><td width=100% valign=bottom><font class='redtx'>"+thetext+"</font></td></tr></table>")
	
	    
	/* ************************************************* */
	
	//document.searchform.submit();
	
}

function popupWindow(theURL,winName,width,height) { 
  window.open(theURL,winName,'scrollbars=yes,width='+width+',height='+height);
}
function func_trim(par_text)
{
	var stext = new String(par_text);
	var sresult = "";
	//Remove leading spaces
	for (var i=0; i<stext.length; i++)
	{
		if (stext.charAt(i) != " ")
		{
			sresult = stext.substr(i, (stext.length - i));
			break;
		}
	}
	stext = sresult;
	//Remove trailing spaces
	for (var j=(stext.length - 1); j>=0; j--)
	{
		if (stext.charAt(j) != " ")
		{
			sresult = stext.substr(0, (j + 1));
			break;
		}
	}
	return sresult;
}


