var passwordField = null;
var softkeyboard = null;

//用户按下键，添加到输入域中
function addChar(newValue){
	if( passwordField.value.length < passwordField.maxLength ){
			passwordField.value = passwordField.value + newValue;
	}
}
	
//用户按下backspace键，往回删一个字符
function backspace(){
	var len = passwordField.value.length;
	if( len > 0){
			passwordField.value = passwordField.value.substr(0, len-1);
	}
}
	
//关闭软件盘
function closekeyboard()
{
	document.getElementById("softkeyboard").style.display="none";
}
//打开软件盘
function showSoftKeyboard(event){	
	passwordField = event;
	softkeyboard = document.getElementById('softkeyboard');
    softkeyboard.style.display="block";
	passwordField.readOnly=1;
	passwordField.blur();
}
	
 function changeBg(element,flag)
{
	if(flag ==1){
		
	}else{
		element.style.display="none";
		element.style.display="block";
	}
}

function changeQueren(element,flag)
{
	if(flag ==1)
		element.src=imgPath +'j_qr_2.jpg';
	else
		element.src=imgPath +'j_qr.jpg';
}

function changeShanchu(element,flag)
{
	if(flag ==1)
		element.src=imgPath +'j_sc_2.jpg';
	else
		element.src=imgPath +'j_sc.jpg';
}