function deleteRecord(question, href)
{
	if (window.confirm(question))
		document.location.href = href;
}

function chkGenPswdChange()
{
	document.getElementById('txtPassword').disabled = document.getElementById('chkGenPswd').checked;
}

function insertValueQuery(allusers)
{
	var listAdd = document.getElementById('objectListAdd');
	var listIn = document.getElementById('objectListIn');
	var listAddLen = listAdd.length;

	for (i=0; i<listAddLen; i++)
	{
		if (allusers == false && listAdd.options[i].selected == true )
		{
			listInLen = listIn.length;
			listIn.options[listInLen]= new Option(listAdd.options[i].text, listAdd.options[i].value);
		} else if(allusers == true) {
			listInLen = listIn.length;
			listIn.options[listInLen]= new Option(listAdd.options[i].text, listAdd.options[i].value);
		}
	}

	for (i = (listAddLen-1); i>=0; i--)
	{
		if (allusers == false && listAdd.options[i].selected == true )
			listAdd.options[i] = null;
		else if(allusers == true)
			listAdd.options[i] = null;
	}
}

function deleteValueQuery(allusers)
{
	var listAdd = document.getElementById('objectListAdd');
	var listIn = document.getElementById('objectListIn');
	var listInLen = listIn.length;

	for ( i=0; i<listInLen ; i++)
	{
		if (allusers == false && listIn.options[i].selected == true )
		{
			listAddLen = listAdd.length;
			listAdd.options[listAddLen]= new Option(listIn.options[i].text, listIn.options[i].value);
		} else if(allusers == true) {
			listAddLen = listAdd.length;
			listAdd.options[listAddLen]= new Option(listIn.options[i].text, listIn.options[i].value);
		}
	}

	for (i=(listInLen-1); i>=0; i--)
	{
		if (allusers == false && listIn.options[i].selected == true )
			listIn.options[i] = null;
		else if(allusers == true)
			listIn.options[i] = null;
	}
}

function selectAllUsers()
{
	var listIn = document.getElementById('objectListIn');

	for (i=0; i<listIn.length; i++)
	{
		listIn.options[i].selected = true;
	}
}