function maskInput(thisObj, isEnabled) {
	var strHtml, strHref, inputValue;
	//if (false) {
	if (thisObj.outerHTML) { //IE
		strHtml = thisObj.outerHTML;
		inputValue = thisObj.value;
		if (isEnabled) {
			if (strHtml.indexOf('type=') >= 0) { //replace
				strHtml = strHtml.replace('type="text"','type="password"');
			} else { //add (default is text)
				strHtml = strHtml.replace('name=','type="password" name=');
			}
		} else {
			strHtml = strHtml.replace('type="password"','type="text"');
			strHtml = strHtml.replace('type=password','type="text"');
			strHtml = strHtml.replace('value=""','value="' + inputValue + '"');
		}
		thisObj.outerHTML = strHtml;
	} else { //Netscape m.fl.
		strHref = document.location.href;
		//first time?
		if (strHref.indexOf('mask=') < 0) {
			if (strHref.indexOf('?') < 0) {
				strHref += '?mask=true';
			} else {
				strHref += '&mask=true';
			}
		} else { //switch
			if (strHref.indexOf('mask=' + !isEnabled) >= 0) {
				strHref = strHref.replace('mask=' + !isEnabled,'mask=' + isEnabled);
			} else {
				strHref = strHref.replace('mask=' + isEnabled,'mask=' + !isEnabled);
			}
		}
		document.location.href = strHref;
	}
}

function chkInputField(field, len, nextfield)
{
	if (field.value.length >= len)
	{
		nextfield.focus()
		nextfield.select();
	}
}
