//---------------------------------------------------------------------------------
//  (c) 2007 Guardian Networks, Inc
//---------------------------------------------------------------------------------

GNgui.InputBox = Class.create();
GNgui.InputBox.prototype =
{
	initialize : function ( parentElement, left, top, id, text, buffer, positioning )
	{
		if ( parentElement == null ){	alert('euInputBox: parentElement not specified' );}	
		if ( left == null )	{ alert('euInputBox: left not specified' );	}
		if ( top == null ) { alert('euInputBox: top not specified' ); }
		if ( id == null ) {	alert('euInputBox: id not specified' ); }
		if ( text == null )	{	alert('euInputBox: text not specified' );	}
	
		this.textelement = new GNgui.TextSpan(parentElement, left, top, id+'TextSpan', text, positioning);
		
		this.inputelement = $ce('input');
		$ac($e(parentElement),this.inputelement);
		this.inputelement.setAttribute('id',id);	

		  this.inputelement.style.position = 'absolute';

		$el(id,left+buffer);
		$et(id,top);
		//No CSS class assigned to input tag itself
		//Some form data wrapper functions? For accessing value and such.
	},
	
	ID : function ()
	{
		return this.inputelement.id;
	},
	
	SetRelative : function()
	{
	  this.inputelement.style.position = 'relative';
	  this.textelement.SetRelative();
	}	
}