function rememberMe() {

		var the_form = document.loginFrm;

		var email = checkBlankField(the_form.email.value);

		var pass = checkBlankField(the_form.password.value);

		var state = 0;

		if(the_form.remember_me.checked)

		var state=1;

		//var state = true;
		if(email && pass) {
		
			email=trim(the_form.email.value);
			pass=trim(the_form.password.value);
			// login name, password, is valid login (set to 'true' in panel_users) 
			// Changes By Synapse Due to Server Transfer
			//if(state==1)
			setCookie('emailC', email +'|'+ pass +'|'+state, 30);			
		} else {

			alert("Please enter Email and password.");			

			return false;

			//deleteCookie('email');
		}
		

		return true;

	}


	// member login cookie functions

	function setCookie(c_name,value,expiredays)

	{

	var exdate=new Date()

	exdate.setDate(exdate.getDate()+expiredays)

	document.cookie=c_name+ "=" +escape(value)+

	((expiredays==null) ? "" : ";expires="+exdate.toGMTString())

	}
	//////////////////////////////////////////////
// For valid field (blank check + space check)
//////////////////////////////////////////////
function checkBlankField (txt)
{
	var mint_txt = txt.length;
	var mstr_txt = txt;
	var mint_count = 0;
    for (var iloop = 0; iloop<mint_txt; iloop++)
    {
        if (mstr_txt.charAt(iloop) == " ")
        {
           mint_count = mint_count+1;
        }
	 }    
	// if nothing entered in the field
   	if (txt == "")
   	{
		return false;
	}
	else if (mint_count == mint_txt)
	{
		return false;
	}
	return true;
}
function trim(inputString) 

	{

	   inputString=inputString.replace(/^\s+/g,"");

	   inputString=inputString.replace(/\s+$/g,"");

	   return inputString;

	}


