function _confirm_msg_show2(msg, click_ok, click_no, title, width, height){
    click_ok = click_ok ? click_ok : ' ';
    click_no = click_no ? click_no : ' ';
    title = title ? title : '科技紫微提示您：';
    dg=new dialog();
    dg.init();
    //dg.set('src', get_icon(''));
    dg.set('title', title);
	  if (width){ dg.set('width', width);}
    if (height){ dg.set('height', height);}
    dg.event(msg, click_ok, click_no, click_no);
	  $id("dialogOk").value="确认送出";
	  $id("dialogCancel").value="返回修改";
}


var _sending = false;

function goNextPage(){
  if ($("#_BackForm").length > 0){
  	 $("#_BackForm")[0].submit(); 
  }else{  	 	
    var tBackPage = ((BackPage != '')?BackPage:'/index.php');
    window.location.href = tBackPage;
  } 	
}
 

$(function(){
	 $("#_LINK_ShowRight").click(function(){
	 	  if($("#_TXT_Right").css('display') == 'none'){$("#_TXT_Right").css('display','');}
	 	  else{$("#_TXT_Right").css('display','none');}
	 });
	 
   $("#_iEMail").blur(function(){
          if (!/^\S+$/.test($("#_iEMail")[0].value)){
           	  $("#_C_iEMail").html('&nbsp;<font color="#ff0000">*E-mail还没有填写哦！</font>');                    	              	
          }else if (!/^.+@.+\..+$/.test($("#_iEMail")[0].value)){
          	  $("#_C_iEMail").html('&nbsp;<font color="#ff0000">*E-mail输入错误哦！</font>');
          }else {
          	  $("#_C_iEMail").html(''); 
          }              
   });
   $("#_iEMail").focus(function(){$("#_C_iEMail").html('');});
                
   $("#_iName").blur(function(){
          if (!/^\S+$/.test($("#_iName")[0].value)){
          	 $("#_C_iName").html('&nbsp;<font color="#ff0000">*姓名还没有填写哦！</font>');
          }else if(!/^\S{1,20}$/.test($("#_iName")[0].value)){
          	 $("#_C_iName").html('&nbsp;<font color="#ff0000">*姓名填写的长度太长哦！</font>');            	
          }else {               	
          	 $("#_C_iName").html('');
          }             	            
   }); 
   $("#_iName").focus(function(){$("#_C_iName").html('');});
   
   $("#_iNickName").blur(function(){
          if (!/^\S+$/.test($("#_iNickName")[0].value)){
          	 $("#_C_iNickName").html('&nbsp;<font color="#ff0000">*昵称还没有填写哦！</font>');
          }else if(!/^\S{1,20}$/.test($("#_iNickName")[0].value)){
          	 $("#_C_iNickName").html('&nbsp;<font color="#ff0000">*昵称填写的长度太长哦！</font>');            	
          }else {               	
          	 $("#_C_iNickName").html('');
          }             	            
   }); 
   $("#_iNickName").focus(function(){$("#_C_iNickName").html('');}); 
   
   $("#_iPassWord1").blur(function(){
          if (!/^\S+$/.test($("#_iPassWord1")[0].value)){
          	 $("#_C_iPassWord").html('&nbsp;<font color="#ff0000">*密码还没有填写哦！</font>');
          }else if(!/\S{4}/.test($("#_iPassWord1")[0].value)){        	 
          	 $("#_C_iPassWord").html('&nbsp;<font color="#ff0000">*密码长度不足4个字符哦！</font>');
          }else{               	
          	 $("#_C_iPassWord").html('');
          }             	            
   });
   $("#_iPassWord2").blur(function(){
          if (!/^\S+$/.test($("#_iPassWord2")[0].value) || ($("#_iPassWord1").val() != $("#_iPassWord2").val())){
          	 $("#_C_iPassWord").html('&nbsp;<font color="#ff0000">*两次输入的密码不一致哦！</font>');
          }else {               	
          	 $("#_C_iPassWord").html('');
          }             	            
   }); 
   $("#_iPassWord1").focus(function(){$("#_C_iPassWord").html('');});
   $("#_iPassWord2").focus(function(){$("#_C_iPassWord").html('');});    
   
   $("#_iHour").focus(function(){ $("#_iInputHour_1").attr('checked','true');});
   
	 $("#_BT_SignIn_Submit").click( function(){
       var _errMsg = '';

       checkDate({"Year":"_iYear","Month":"_iMonth","Day":"_iDay","Calendar":"_Calendar","LeapMonth":"_LeapMonth"}) || (_errMsg = '您选择的出生日期有误哦，请重新确认！')  && (_nextFocusId = '_Calendar') && $("#_Calendar")[0].focus();    
       !/^\S{4,8}$/.test($("#_iPassWord1")[0].value) && (_errMsg = '请输入4~8字之间的密码！') && (_nextFocusId = '_iPassWord1') && $("#_iPassWord1")[0].focus();  
       ($("#_iPassWord1").val() != $("#_iPassWord2").val()) && (_errMsg = '两次输入的密码不一致哦，请重新确认密码！') && (_nextFocusId = '_iPassWord2') && $("#_iPassWord2")[0].focus(); 
       !/^\s*\S+@\S+\.\S+\s*$/.test($("#_iEMail").val()) && (_errMsg = 'E-mail输入不正确哦，请重新输入，谢谢！') && (_nextFocusId = '_iEMail') && $("#_iEMail")[0].focus();
       /[^\x00-\xff]/.test($('#_iEMail').val()) && (_errMsg = '请勿输入中文！') && (_nextFocusId = '_iEMail') && $("#_iEMail")[0].focus();
       !/^\S+$/.test($("#_iEMail").val()) && (_errMsg = '请输入E-mail，谢谢！') && (_nextFocusId = '_iEMail') && $("#_iEMail")[0].focus();
       !/\s*\S{1,20}\s*$/.test($("#_iNickName").val()) && (_errMsg = '昵称长度过长，请重新输入，谢谢！') && (_nextFocusId = '_iNickName') && $("#_iNickName")[0].focus();
       !/\S+/.test($("#_iNickName").val()) && (_errMsg = '请输入昵称，谢谢！') && (_nextFocusId = '_iNickName') && $("#_iNickName")[0].focus();
       !/\s*\S{1,20}\s*$/.test($("#_iName").val()) && (_errMsg = '姓名长度过长，请重新输入，谢谢！') && (_nextFocusId = '_iName') && $("#_iName")[0].focus();
       !/\S+/.test($("#_iName").val()) && (_errMsg = '请输入姓名，谢谢！') && (_nextFocusId = '_iName') && $("#_iName")[0].focus();
       !/\S+/.test($("#_iSignInValidCode").val()) && (_errMsg = '请输入验证码，谢谢！') && (_nextFocusId = '_iSignInValidCode') && $("#_iSignInValidCode")[0].focus();
       $("#_checkbox")[0].checked || (_errMsg = '您还没有勾选"详读并同意会员服务之相关条款"!');
          
       var _iHour=($("#_iInputHour_1")[0].checked == true) ? ($("#_iHour" )[0].options[$("#_iHour" )[0].selectedIndex].value) : '????';
       document.getElementById('_iHour2').value=_iHour;
       if(_errMsg == ''){
       	  $("#_SignForm")[0].submit();      	   	
        }else  alert(_errMsg);      
        return false;
	 });
	 $("#_BT_SignIn_Reset").click( function(){
  	   $("#_SignForm")[0].reset();         	
       return false;
	 });	         	   	 
	 
});
