/**
 * Doc.Js Framework
 * @Author Bruno Dias  contact@diasbruno.com.br
 **/
 
var Doc;

Doc = {
	
	Title : function (strTitle) { document.title = unescape(strTitle); },
	Goto : function (strGoto) { document.location = escape(strGoto); }
	
};

/**
 * Doc.Element - Select an object.
 * 
 * @param id <String>Object Id</String>
 */
Doc.Element = function(id)
{
	if(typeof (id) == "string") this.id = id; id = null;
	
	this.e = function(id)
	{
		if(document.getElementById) return document.getElementById(id);
	};
	
	return this.e(this.id);
};

/**
 * Object style functions.
 */

/**
 * Doc.Element.border - Set the border style.
 * 
 * @param int <Number />
 */
Doc.Element.prototype.borderWidth = function(it,il,ir,ib)
{ 
	var e = this.e(this.id).style;
	e.border = int;
	if(e) 
	{
		if(it) alert(it); e.borderTopWidth = it;
		if(il) alert(il); e.borderLeftWidth = il;
		if(ir) alert(ir); e.borderRightWidth = ir;
		if(ib) alert(ib); e.borderBottomWidth = ib;
	}
};

/**
 * Doc.Element.txtColor - Set the text style.
 * 
 * @param clr <#Hex>Color Hex</#Hex>
 */
Doc.Element.prototype.borderColor = function(t,l,r,b)
{ 
	var e = this.e(this.id).style;
	e.border = "1px";

	if(t) alert(t); e.borderTopColor = t;
	if(l) alert(l); e.borderLeftColor = l;
	if(r) alert(r); e.borderRightColor = r;
	if(b) alert(b); e.borderBottomColor = b;
};

/**
 * Doc.Element.txtColor - Set the text style.
 * 
 * @param clr <#Hex>Color Hex</#Hex>
 */
Doc.Element.prototype.txtColor = function(clr)
{
	var e = this.e(this.id);
	if(e) e.style.color = clr;
};

/**
 * Object functions.
 */

/**
 * Doc.Element.type - Returns the type of Html Object.
 * 
 * @return type <String>Object type</String>
 */
Doc.Element.prototype.type = function()
{
	var e = this.e(this.id);
	if(e) { return e; }
};

/**
 * Doc.Element.isElement - If it is really a Html Object, return true, else, false.
 * 
 * @return <Boolean />
 */
Doc.Element.prototype.isElement = function()
{
	if(typeof (e) != ("string"||"number")) return true;
};


Doc.Platform = {};

Doc.Object = {};

Doc.Ajax = {};