// JavaScript Document

function submit_action(addr)
{
	 document.form1.action=addr;
}
	   
function test()
{
	 document.getElementById("checkinfo").innerHTML="延时1秒";
}


function check_pass1(str)
{
     var abc;
	 var table1="!@#$%^&*()";
	 var table2="ABCDEFDHIJKLMNOPQRSTUVWXYZ";
	 var table3="1234567890"
	 
	
	for(i=1;i<10;i++)
	{
	  abc=str.indexOf(table1.charAt(i));
	  //alert(table1.charAt(i));
	  if (abc>0)
	  {
		document.getElementById('p1').innerHTML="<font color=#ff00ff size=-1>混合特殊字符</font>";  
	  }
	}
	
	for(i=1;i<10;i++)
	{
	  abc=str.indexOf(table2.charAt(i));
	  //alert(table1.charAt(i));
	  if (abc>0)
	  {
		document.getElementById('p1').innerHTML="<font color=#FF0000 size=-1>混合大写密码</font>";  
	  }
	}
	
	for(i=1;i<10;i++)
	{
	  //abc=str.indexOf(table3.charAt(i));
	  //alert(table1.charAt(i));
	  if (abc>0)
	  {
		//document.getElementById('tip').innerHTML="<font color=#ff0000 size=-1>低密码强度</font>";  
	  }
	}
	
	if (document.form1.pass1.value.length<=3)
	 {
		 document.getElementById('p1').innerHTML="<font color=#ff0000 size=-1><b>提示：密码强度低</b></font>";
	 }
	
	 if ((document.form1.pass1.value.length>3) && (document.form1.pass1.value.length<=6) )
	 {
		 document.getElementById('p1').innerHTML="<font color=#ff0000 size=-1><b>提示：密码强度中</b></font>";
	 }
	 
	 if (document.form1.pass1.value.length>6) 
	 {
		 document.getElementById('p1').innerHTML="<font color=#ff0000 size=-1><b>提示：密码强度高</b></font>";
	 }
	
	 
	 if (form1.pass1.value!=form1.pass2.value)
	 {
		 document.getElementById('p2').innerHTML="<font color=#ff0000 size=-1><b>提示：密码前后不一致</b></font>";
	 }
	 
	 if (form1.pass1.value==form1.pass2.value)
	 {
		 document.getElementById('p2').innerHTML="<font color=#009966 size=-1><b>提示：密码前后一致，请点击[修改]按钮</b></font>";
		 
	 }
		 
}




function check_pass2(str)	 
{
	 	
	if (form1.pass1.value!=form1.pass2.value)
	 {
		 document.getElementById('p2').innerHTML="<font color=#ff0000 size=-1><b>提示：密码前后不一致</b></font>";
	 }
	 
	 if (form1.pass1.value==form1.pass2.value)
	 {
		 document.getElementById('p2').innerHTML="<font color=#009966 size=-1><b>密码前后一致,请点击[修改]按钮.</b></font>";
		 
	 }
	
}



function check_submit()
{
	
	if (document.form1.pass1.value=="")
	{
		alert('请输入密码.');
		document.form1.pass1.focus();
		return false;
	}
	else if (document.form1.pass2.value=="")
	{
		alert('请输入密码.');
		document.form1.pass2.focus();
		return false;
	}
	else
	  submit_action("change_pass_process.php");
	
}








