//This is the class that is used to draw windows.

//Constructor.
function blogWindow(windowID) 
{ 
	
	//Create the DIV and set it as an attribute.
	this.DIVObject = document.createElement('div');
	this.DIVObject.setAttribute('id', windowID);
	this.DIVObject.setAttribute('class', "blogWindow");
}

//Create the properties in the prototype....thing.
blogWindow.prototype.DIVObject = 'blogWindow DIVObject';

blogWindow.prototype.showWindow = function()
{
	this.DIVObject.style.display='';
};

blogWindow.prototype.createWindow = function(windowOffset,windowHeader,windowText,windowDate)
{
	document.body.appendChild(this.DIVObject);
	$(this.DIVObject).draggable();
	this.DIVObject.innerHTML = "";
	this.DIVObject.innerHTML += "<div class='blogTitleDiv'><font class='blogTitleFont'>" + windowHeader + "</font></div>";
	this.DIVObject.innerHTML += "<div class='blogTitleMenu'><a href='#' onclick='minimizeWindow();'>[-]</a>&nbsp;<a href='#' onclick='closeWindow();'>[X]</a></div><br /><br /><br />";
	this.DIVObject.innerHTML += "<font class='blogDate'>" + windowDate + "</font><br /><br />";
	this.DIVObject.innerHTML += "<font class='blogTextFont'>" + windowText + "</font>";
	this.DIVObject.style.left = this.DIVObject.style.left + windowOffset;
	this.DIVObject.style.top = this.DIVObject.style.top + windowOffset;
};

