var html_quick_login = '<FORM METHOD="POST" name="login_form" action="/login.php">' +
'    <table width="100%" border="0">' +
'      <tr>' +
'        <td width="25%" align="right">会员名称：</td>' +
'        <td width="50%"><input name="username" type="text" id="username" style="width:136px; height: 18px;border: #bfbfbf 1px solid;font-family:宋体; font-size:14px;" maxlength="60" /></td>' +
'        <td width="25%"><a href="javascript:goto_do_action3(\'submit_login\', 0);"><img src="/images/dll.gif" width="55" height="21" border="0" /></a></td>' +
'      </tr>' +
'      <tr>' +
'        <td align="right">密&nbsp;码：</td>' +
'        <td width="50%"><input name="userpasswd" type="password" id="userpasswd" style="width:136px; height: 18px;border: #bfbfbf 1px solid;font-family:宋体; font-size:14px;" maxlength="60" /></td>' +
'        <td><a href="javascript:void(0);" onclick="goto_do_action3(\'hidden_div\', 0, 0);"><img src="/images/dll1.gif" width="55" height="21" border="0" /></a></td>' +
'      </tr>' +
'      <tr>' +
'        <td align="right" colspan="3"><img src="/images/key.gif" width="14" height="14" align="absmiddle" /><a href="javascript:void(0);" onclick="goto_do_action3(\'to_register_user\', 0); return false;">我还不是会员，马上注册</a></td>' +
'      </tr>' +
'    </table>' +
'<input type="hidden" name="login" value="1">' +
'<input type="hidden" name="url" value="domain_register.php">' +
'</FORM>';

function goto_do_action3(action, val){
	var valsa;
	switch(action){
		case 'quick_custom':
			iClickAct2(309, 135, html_quick_login, '登录');
			document.login_form.url.value = val;
			break;
		case 'quick_cret_print':
		case 'quick_domain_manage':
			if(!val.match(/^([a-z0-9-]{1,}.)?[a-z0-9-]{2,}.([a-z0-9-]{1,}.)?[a-z0-9]{2,}$/i)){
				alert('请正确输入域名');
			}else{
				iClickAct2(309, 135, html_quick_login, '登录');
				document.login_form.url.value = 'domain_manage.php?qd=' + val;
			}
			break;
		case 'quick_trial_vhost':
			iClickAct2(309, 135, html_quick_login, '登录');
			document.login_form.url.value = 'service_trial.php?type=standard';
			break;
		case 'quick_buy_vhost':
			iClickAct2(309, 135, html_quick_login, '登录');
			document.login_form.url.value = 'service_dredge.php?type=standard';
			break;
		case 'quick_reg_domain':
			valsa = val.split('|');
			iClickAct2(309, 135, html_quick_login, '登录');
			document.login_form.url.value = 'domain_register.php?qd=' + valsa[0] + '&si=' + valsa[1];
			break;
		case 'submit_login':
			if(document.login_form.username.value==''){
				alert("请输入用户名");
			}else if(document.login_form.userpasswd.value==''){
				alert('请输入密码');
			}else{
				document.login_form.submit();
			}
			break;
		case 'to_register_user':
			var url = document.login_form.url.value;
			print2close();
			goto_do_action('quick_register');
			document.signup_form.url.value = url;
			break;
		case 'hidden_div': 
			print2close();
			break;
	}
}

