	//------------------------------------------------------------------------------
	//File Name:		YV_Common.JS
	//Description:	This file is having client side commmon functions.
	//Author:		Raj
	//Last modified:	08/06/2000
	//------------------------------------------------------------------------------

	//--------------------------------------------------------------------------
	//Procedure:		NavigateToURL
	//Input parameters: FormName,ElementName,URL,Value		
	//Output parameters:	
	//Synopsis:			This procedure for posting the form with single value.
	//--------------------------------------------------------------------------
	function NavigateToURL(strFormName,strElementName,strURL,strValue)
	{
		var objForm;
		var objElement;	
	
		objForm = document.forms[strFormName];
		if (strElementName!=""){
			objElement = objForm.elements[strElementName];
		}
		
		if (strValue != ""){
			objElement.value = strValue;
		}
		
		objForm.action = strURL;
		objForm.method = "POST"
		objForm.submit();
	}
		

	// this routine for validating the string
	function IsValidString(strElementValue, strInvalidChars, blnAllowSpaces)
	{
		var blnAllSpaces;
		
		blnAllSpaces = true;

		if (strElementValue=="")
		{
			return false;
		}
		
		if (blnAllowSpaces == false)
			strInvalidChars = strInvalidChars + " ";

		for (i=0; i < strElementValue.length; i++)
		{
			chrElementChar = strElementValue.substring(i, i+1);
			if (strInvalidChars.indexOf(chrElementChar, 0) != -1)
					return false;
			if (chrElementChar != " ")
				blnAllSpaces = false;
		}
		
		if (blnAllSpaces)
			return false;
			
		return true;
	}

