//VICTOR 2.0
//FNT : FNT-034
//This javascript file will include all function related to user on key press event

//VICTOR 2.0
//FNT : FNT-034
//this function check if the user press on the ENTER key. If it is the case then fire the submit button passed in parameter.
var bDoNotSubmitAtAll = false;
function CheckButtonSubmit(sSubmitButtonName) 
{
	if (event.keyCode == 13) 
	{
		if(sSubmitButtonName != '')
		{
			if(!bDoNotSubmitAtAll)
			{
			document.getElementById(sSubmitButtonName).focus();
			document.getElementById(sSubmitButtonName).click();
			}
		}
	}
}

//VICTOR 2.0
//FNT : FNT-034
//this function check if the user press on the ENTER key. If it is the case then fire the submit button passed in parameter.
function CheckLinkButtonSubmit(sSubmitButtonName) 
{
	if (event.keyCode == 13) 
	{
		if(sSubmitButtonName != '')
		{
			if(!bDoNotSubmitAtAll)
			{
			document.getElementById("_keypress").value = "1";
			document.getElementById(sSubmitButtonName).click();
			}
		}
	}
}

function LinecodetextBoxKeyPress(sSubmitButtonName)
{
	if (event.keyCode == 13) 
	{
		if(sSubmitButtonName != '')
		{
			if(!bDoNotSubmitAtAll)
			{
				HiddenField = document.getElementById("LinecodeEnterKeyPress");
				if(HiddenField != null)
				{
					HiddenField.value = 'true';
				}
				document.getElementById(sSubmitButtonName).click();
			}
		}
	}
}	

function DescriptiontextBoxKeyPress(sSubmitButtonName)
{
	if (event.keyCode == 13) 
	{
		if(sSubmitButtonName != '')
		{
			if(!bDoNotSubmitAtAll)
			{
				HiddenField = document.getElementById("DescriptionEnterKeyPress");
				if(HiddenField != null)
				{
					HiddenField.value = 'true';
				}
				document.getElementById(sSubmitButtonName).click();
			}
		}
	}
}	





