var str_in;
var str_out = ""; 
var num_out = "";

function en(form) {
num_out = "";
str_in = escape(form.txtPassword.value);
if (str_in.length > 0)
	{num_out += str_in.charCodeAt(0) - 23;
	for(i = 1; i < str_in.length; i++) {
		num_out += str_in.charCodeAt(i) - 30 + (i % 3);
	}
}
form.txtPassword.value = num_out;
}

var out;
function en2(form) {
out = 0;
str_in = escape(form.txtPassword.value);
if (str_in.length > 0)
	{out = str_in.charCodeAt(0) * 603073203721;
	for(i = 1; i < str_in.length; i++) {
		out += str_in.charCodeAt(i) * i;
	}
}
form.txtPassword.value = out;
}

function en1(txtPassword) {
out = 0;
str_in = escape(txtPassword.value);
if (str_in.length > 0)
	{out = str_in.charCodeAt(0) * 603073203721;
	for(i = 1; i < str_in.length; i++) {
		out += str_in.charCodeAt(i) * i;
	}
}
txtPassword.value = out;
}

function en3(txtPassword, txtOut) {
out = 0;
str_in = escape(txtPassword.value);
if (str_in.length > 0)
	{out = str_in.charCodeAt(0) * 603073203721;
	for(i = 1; i < str_in.length; i++) {
		out += str_in.charCodeAt(i) * i;
	}
}
txtPassword.value='';
txtOut.value = out;
}

function popWin(url)
{
    window.name="CRM";
    window.open(url);
}



function popupWin(url, iTop, iLeft, iWidth, iHeight)
{
	window.name="CRM";
	window.open(url,"CRM Ware","top=" + iTop +", left=" + iLeft +", scrollbars=yes,resizable=yes, width=" + iWidth +",height=" + iHeight).focus();
}


function trim(str)
	{
		while(''+str.charAt(str.length-1)==' ')str=str.substring(0,str.length-1);
		return str;
	}

function h()
{
    alert('hi');
    }
