var Elements = function(){

}

Elements.prototype = new Tool_Element;


Elements.prototype.Text = function(Value, obj)
{
  return this.insertText(Value, obj)
}

Elements.prototype.CreateElement = function(element, obj, arg)
{
  var newArray = new Array()
	for (n=1; n<arg.length; n++)
		newArray.push(arg[n]);
  if (arg.length>1) return this.element(element,obj,newArray);
  else return this.element(element,obj);
}

Elements.prototype.Div = function(obj)
{
	return this.CreateElement("div",obj,arguments);	
}

Elements.prototype.Span = function(obj)
{
	return this.CreateElement("span",obj,arguments);	
}

Elements.prototype.Fieldset = function(obj,legend)
{
  var newArray = new Array();
	for (n=2; n<arguments.length; n++)
		newArray.push(arguments[n]);
  var field = this.element("fieldset",obj, newArray);
  var leg = this.element("legend", field);
  this.insertText(legend,leg);
  return field;
}

Elements.prototype.Table = function(obj)
{
	return this.CreateElement("table",obj,arguments);	
}

Elements.prototype.Thead = function(obj)
{
	return this.CreateElement("thead",obj,arguments);	
}

Elements.prototype.Tbody = function(obj)
{
	return this.CreateElement("tbody",obj,arguments);	
}

Elements.prototype.Tr = function(obj)
{
	return this.CreateElement("tr",obj,arguments);	
}

Elements.prototype.Td = function(obj)
{
	return this.CreateElement("td",obj,arguments);	
}

Elements.prototype.Form = function(obj)
{
	return this.CreateElement("form",obj,arguments);	
}

Elements.prototype.Textarray = function(obj)
{
	return this.CreateElement("textarea",obj,arguments);	
}

Elements.prototype.Link = function(obj)
{
	return this.CreateElement("link",obj,arguments);	
}

Elements.prototype.Image = function(obj)
{
	return this.CreateElement("img",obj,arguments);	
}

Elements.prototype.Script = function(obj)
{
	return this.CreateElement("script",obj,arguments);	
}


Elements.prototype.Input = function(obj,Type)
{
	arguments[1]= "type='"+arguments[1]+"'";
	return this.CreateElement("input",obj,arguments);	
}

Elements.prototype.Radio = function(obj,Type)
{
	arguments[1]= "type='radio'";
	return this.element("input",obj,arguments);
//	return this.CreateElement("input",obj,arguments);	
}

Elements.prototype.Br = function(obj)
{
	return this.element("br",obj,arguments);
}

Elements.prototype.Hr = function(obj)
{
	return this.element("hr",obj,arguments);
}

Elements.prototype.H1 = function(obj)
{
	return this.element("h1",obj,arguments);
}

Elements.prototype.H2 = function(obj)
{
	return this.element("h2",obj,arguments);
}

Elements.prototype.H3 = function(obj)
{
	return this.element("h3",obj,arguments);
}

Elements.prototype.H4 = function(obj)
{
	return this.element("h1",obj,arguments);
}

Elements.prototype.H4 = function(obj)
{
	return this.element("h1",obj,arguments);
}

Elements.prototype.H5 = function(obj)
{
	return this.element("h5",obj,arguments);
}

Elements.prototype.H6 = function(obj)
{
	return this.element("h6",obj,arguments);
}

Elements.prototype.P = function(obj)
{
	return this.element("p",obj,arguments);
}

Elements.prototype.A = function(obj)
{
	return this.element("a",obj,arguments);
}

Elements.prototype.Iframe = function(obj)
{
	return this.element("iframe",obj,arguments);
}


Elements.prototype.Click = function(obj,aFnRe)
{
	this.addEvent(obj, "click",  aFnRe, arguments)
}

Elements.prototype.Change = function(obj,aFnRe)
{
	this.addEvent(obj, "change",  aFnRe, arguments)
}


Elements.prototype.MouseDown = function(obj,aFnRe)
{
	this.addEvent(obj, "mousedown",  aFnRe, arguments)
}

Elements.prototype.MouseMove = function(obj,aFnRe)
{
	this.addEvent(obj, "mousemove",  aFnRe, arguments)
}

Elements.prototype.MouseUp = function(obj,aFnRe)
{
	this.addEvent(obj, "mouseup",  aFnRe, arguments)
}

Elements.prototype.MouseOver = function(obj,aFnRe)
{
	this.addEvent(obj, "mouseover",  aFnRe, arguments)
}

Elements.prototype.MouseOut = function(obj,aFnRe)
{
	this.addEvent(obj, "mouseout",  aFnRe, arguments)
}

Elements.prototype.Focus = function(obj,aFnRe)
{
	this.addEvent(obj, "focus",  aFnRe, arguments)
}

Elements.prototype.Blur = function(obj,aFnRe)
{
	this.addEvent(obj, "blur",  aFnRe, arguments)
}
