function CardColor(){}

CardColor.BLACK = "black";
CardColor.BLUE = "blue";
CardColor.GREEN = "green";
CardColor.ORANGE = "orange";
CardColor.PINK = "pink";
CardColor.RED = "red";
CardColor.WHITE = "white";

function Card(/*String*/ title_optional, /*CardColor*/ color_optional) {
	if (onorex.isUndefined(color_optional)) color_optional = "white";
	var _color = color_optional;
	
	if (onorex.isUndefined(title_optional)) title_optional = "";
	var _title = title_optional;
	
	var _id = "CARD_"+random();
	
	this.open = function()
	{
		var _html="";
		_html+="<div class='card' id='"+_id+"'><div class='card_header_"+_color+"'>"
		_html+="<div class='card_header_left_"+_color+"'><div class='card_header_right_"+_color+"'>"
		_html+="<div class='card_header_center'>";
		_html+=_title;
		_html+="</div>";
		_html+="</div></div></div>";
		_html+="<div class='card_content_"+_color+"'>"
		document.write(_html);
	}

	this.close = function()
	{
		var _html="";
		_html+="</div></div>"
		document.write(_html);
	}
	
	this.getID = function() 
	{
		return _id;
	}
	
	this.getId = function() 
	{
		return this.getID();
	}
}
