<!--
/*************************************************************************
*BuildInputBox															*
*************************************************************************
*Description:															*
*      Generates Input Box HTML based on supplied arguments				*
*Arguments:																*
*       inpName:		The name for the input box.						*
*		inpAllowEdit:	True if input should be editable, False if not	*
*		inpVisible:		True if input should be visible, False if not	*
*		inpLength:		Number of characters the input box should allow	*
*						to be typed (maxlength property)				*
*		inpSize:		The number of characters long the input box		*
*						should be (size property)						*
*		inpValue:		The value the input should be set to			*
*		inpClass		A style class to be assigned to the input.  Set	*
*						to "" if no class								*
*		inpOnChange:	The name of the on change function for the		*
*						input.											*
*						Set to "" if none.								*
*Returns:																*
*      HTML for the input box											*
*																		*
*Created/Modified:														*
* User Name		Date		Description									*
* STJOBE		1999		Original Version							*
* STJOBE		9/20/2000	Added Comments and inpClass argument.		*
* STJOBE		10/02/2000  Changed inpOnChange to take "" if no		*
*							on change function should be set to make	*
*							consistant with other functions.			*
* STJOBE		10/16/2000  Made same changes as to Server version.		*
* STJOBE		06/08/2001  Added onpropertychange to be the same as	*
*							the onchange event.  This is the event that	*
*							fires when a user users AutoComplete.		*
*************************************************************************/
function BuildInputBox (inpName, inpAllowEdit, inpVisible, inpLength, inpSize, inpValue, inpClass, inpOnChange){
	var tempHTML;
	
	if (inpVisible == false)
		{
		tempHTML = "<input type=hidden id=" + inpName;
		tempHTML = tempHTML + " name =" + inpName;
		tempHTML = tempHTML + " value=\"" + inpValue + "\"";
		tempHTML = tempHTML + ">";
		}
	else
		{	
		tempHTML = "<input type=text id=" + inpName;
		tempHTML = tempHTML + " name =" + inpName;
		tempHTML = tempHTML + " value=\"" + inpValue + "\"";
		tempHTML = tempHTML + " size=" + inpSize; 
		tempHTML = tempHTML + " maxlength=" + inpLength;
	
		if (inpClass != "")
			{
			tempHTML = tempHTML + " class=\"FormControl\"" //+ inpClass;
			}
			
		if (inpAllowEdit == false)
			{
			tempHTML = tempHTML + " tabIndex=-1";
			tempHTML = tempHTML + " style=\"background:transparent;border-style:none;\" readonly";
			}
				
		if (inpOnChange != "")
			{
			tempHTML = tempHTML + " onchange=\"return " + inpOnChange + "()\"";
			tempHTML = tempHTML + " onpropertychange=\"return " + inpOnChange + "()\"";
			}
		tempHTML = tempHTML + " onfocus=\"select()\""
		tempHTML = tempHTML + ">";
		}
	
	return tempHTML;
}

/************************************************************************
*expand																	*
*************************************************************************
*Description:															*
*      Increases or Decreases the size of a text area.  This function	*
*	   is the ondoubleclick event oftext areas created with the			*
*	   BuildTextArea function when the inpAllowExpand argument is		*
*	   set to True.														*
*Arguments:																*
*       None															&
*Returns:																*
*       None															*
*																		*
*Created/Modified:														*
* User Name		Date		Description									*
* BRIOS			2000		Original Version							*
* STJOBE		10/9/2000	Comments Added								*
*************************************************************************/
function expand()
{
	//alert(event.srcElement.style.height);
	if (event.srcElement.style.height!= "250px")
	{
		event.srcElement.style.height= "250px";	
	}
	else
	{
		event.srcElement.style.height= "38px";	
	}
}

function popup(mylink, windowname){
	var href;
	
	if (! window.focus)
		{
		return true;
		}
	
	if (typeof(mylink) == "string")
		{
		href = mylink;
		}
	else
		{
		href = mylink.href;
		}
	window.open(href, windowname, "width=800,height=400,scrollbars=yes");
	return false;
}

function popup2(mylink, windowname, strStyle){
	var href;
	
	if (! window.focus)
		{
		return true;
		}
	
	if (typeof(mylink) == "string")
		{
		href = mylink;
		}
	else
		{
		href = mylink.href;
		}
	window.open(href, windowname, strStyle);
	return false;
}

//Stops user from continuing to type if have reached size limit
function check_textarea(limit) {
	var tmp;
	tmp = event.srcElement.value;
	
	if (Number(tmp.length) >= Number(limit))
		{
		event.returnValue = false;
		}	
}
//-->


