function setFocus()
{
	if(document.optionsForm.user_name)
		document.optionsForm.user_name.focus();
}
function goOn()
{
	if(document.optionsForm)
		document.optionsForm.submit();
}
function confirmAction(message)
{
	if(confirm(message))
		return true;
	return false;
}
function changeSelect(obj, url)
{
    var val = obj.value;
	url += val;
    location.replace(url);
}
function setValue(sourceId, targetId)
{
	var oSource = document.getElementById(sourceId);
	var oTarget = document.getElementById(targetId);
	oTarget.value = oSource.value;
}
function setControlValue(targetId, value)
{
	var oTarget = document.getElementById(targetId);
	oTarget.value = value;
}
function checkEmail(oSource)
{
  	var reg = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
	if(reg.test(oSource.value))
	{
	  return true;
	}
	else
	{
	  return false;
	}	
}
/* Verify signed float decimal optional
 * ignoring leading and trailing spaces
 * Return boolean
 */
function isFloat2(oSource)
{
	var str = oSource.value;
    str = str.replace(/^\s+|\s+$/g, '');
    return /^[-+]?\d+(\.\d+)?$/.test(str);
}
