function formcheck(formobj)

{



var alertMsg = "Please complete the following fields:\n";



var l_Msg = alertMsg.length;



	if (formobj.username.value == "")

	{	alertMsg += " - " + " User Name " + "\n";

	}



	if(formobj.password.value == ""){

		alertMsg += " - " + " Password " + "\n";}



	

	if (alertMsg.length == l_Msg){

		usrpass=formobj.username.value + "|" + formobj.password.value;

		SetCookie("usrpass", usrpass , null, "/");

		SetCookie("navtype", 'first' , null, "/");
		
		return true;

	}else{

		alert(alertMsg);

		return false;

	}



alert(alertMsg);





}

function SetCookie (name,value,expires,path,domain,secure) {

   document.cookie = name + "=" + escape (value) +

                     ((expires) ? "; expires=" + expires.toGMTString() : "") +

                     ((path) ? "; path=" + path : "") +

                     ((domain) ? "; domain=" + domain : "") +

                     ((secure) ? "; secure" : "");

}


function formchecknew(searchform)

{
	
	words=searchform.name_search.value;

	SetCookie("words", words , null, "/");
	  		
		return true;
	

}

function formchecknew2(searchform2)

{
	
	words=searchform2.address_search.value;

	SetCookie("words", words , null, "/");
	  		
		return true;
	

}

	
function setnavid(navtype,id1,id2)

{

SetCookie("navtype", navtype , null, "/");

SetCookie("thispg", id1 , null, "/");

SetCookie("totpg", id2 , null, "/");

return true;	

}



