/**
 * Top City Application Framework JavaScript
 *
 * @package Application
 * @category JavaScript
 * @subpackage resend active email
 * @author Rick
 * @version $0.3$
 * @copyright 2006-11-22 9:23:32
 */
function infotip(ow,cw,msg)
{	ow.className=cw;
	ow.innerHTML=msg;
	return (cw=='p_tip') ? true:false;
}
function chk_email(force)
{	if (getx('i_email').value.length == 0)
	{	return infotip(getx('w_email'),'f_tip',getJs(1885));	}
	else if (!/^\w+(\.[\w-]+)*@([a-z0-9]+\.)+[a-z0-9]{2,4}$/i.test(getx('i_email').value))
	{	return infotip(getx('w_email'),force?'f_tip':'i_tip',getJs(1888));	}
	else
	{	return infotip(getx('w_email'),'p_tip',getJs(1890));	}
}
function chk_pass(force)
{	if (getx('i_password').value == '')
	{	return infotip(getx('w_password'),'f_tip',getJs(1891));	}
	else
	{	return infotip(getx('w_password'),'p_tip',getJs(1890));	}
}
function checkCaptcha(force)
{	if (getx('i_captcha').value == '')
	{	return infotip(getx('w_captcha'),'f_tip',getJs(1897));	}
	else if (getx('i_captcha').value.length !== 8)
	{	return infotip(getx('w_captcha'),force?'f_tip':'i_tip',getJs(1898));	}
	else
	{	return infotip(getx('w_captcha'),'p_tip',getJs(1890));	}
}
function checkForm()
{	var mail = chk_email(true);
	var pass = chk_pass(true);
	return (mail && pass);
}