YAHOO.namespace("Youniverse");

YAHOO.Youniverse.compare = function()
{
	
	/*
	* Initialise class when window dom loaded
	*/
	this.initClass = function ()
	{
	}
	
	/*
	* calculates necessary height of lines and creates them
	*/
	this.createCompareLines = function()
	{
		var yHeight;
		var y1;
		
		var lastRowRegion = YAHOO.util.Dom.getRegion('lastPicRow');
    /**
     * Check that there really is a lastPicRow element.
     */
		if(lastRowRegion == false)
		{
			return;
		}

		var y2 	= (lastRowRegion.top + lastRowRegion.bottom) / 2;
		
		if(document.getElementById("pageOwnerNameOuter")) {
		  var y1 = YAHOO.util.Dom.getRegion('pageOwnerNameOuter').bottom;
		  yHeight = y2 - y1;
			var ownerLineDiv = document.createElement('div');
			ownerLineDiv.className = 'tallLineDiv';
			ownerLineDiv.style.display = 'block';
			ownerLineDiv.innerHTML = '&nbsp;';
			ownerLineDiv.style.height = yHeight + "px";
		
			document.getElementById("pageOwnerNameOuter").appendChild(ownerLineDiv);
		}
		
		if(document.getElementById("visitorNameOuter")){
		  var y1 = YAHOO.util.Dom.getRegion('visitorNameOuter').bottom;
		  yHeight = y2 - y1;
			var visitorLineDiv = document.createElement('div');
			visitorLineDiv.className = 'tallLineDiv';
			visitorLineDiv.style.display = 'block';
			visitorLineDiv.innerHTML = '&nbsp;';
			visitorLineDiv.style.height = yHeight + "px";
			
			document.getElementById("visitorNameOuter").appendChild(visitorLineDiv);
		}
		
		if(document.getElementById("mostPopularHeadingOuter")){
		  var y1 = YAHOO.util.Dom.getRegion('mostPopularHeadingOuter').bottom;
		  yHeight = y2 - y1;
			var popularLineDiv = document.createElement('div');
			popularLineDiv.className = 'tallLineDiv';
			popularLineDiv.style.display = 'block';
			popularLineDiv.innerHTML = '&nbsp;';
			popularLineDiv.style.height = yHeight + "px";
			document.getElementById("mostPopularHeadingOuter").appendChild(popularLineDiv);
		}

	};
	
}