function doPassVar(args)
{
	var sendText = args;
	//document.Test.caseRotation(sendText);
	document.version2.caseRotation(sendText);
}

function TvObject(OfferEnd, OfferEndX, OfferEndY, OfferEndColor, TvImages)
{
	this.OfferEnd = OfferEnd;
	this.OfferEndX = OfferEndX;
	this.OfferEndY = OfferEndY;
	this.OfferEndColor = OfferEndColor;
	this.TvImages = TvImages;
}

function TvImage(Identity, BigImage, SmallImage, LinkUrl, Target)
{
	this.Identity = Identity;
	this.BigImage = BigImage;
	this.SmallImage = SmallImage;
	this.LinkUrl = LinkUrl;
	this.Target = Target;
}

function getFlexInstance(target)
{
	var flexInstance = (window.document.getElementById(target) || document.getElementById(target));
	return flexInstance;
}

function GetTvObject()
{;
	//var flex = getFlexInstance('Test');
	var flex = getFlexInstance('nb_lobby_20100528');
	//console.log(flex);
	if (typeof flex.SendTvObject == "function")
	{
		//console.log(1);
		flex.SendTvObject(tvobj);
		//console.log(2);
	}
}

function BuildTvWall() 
{

	var d0 = new TvImage('Details_0', 'NB_lobby/P170HM.jpg', 'NB_lobby/P170HM.jpg', 'http://www.ibuypower.com/Store/Configurators.aspx?mid=947', '_self');
	var d1 = new TvImage('Details_1', 'NB_lobby/CZ-12-TV.jpg', 'NB_lobby/CZ-12-TV.jpg', 'http://www.ibuypower.com/Store/Configurators.aspx?mid=875', '_self');
	var d2 = new TvImage('Details_2', 'NB_lobby/W170HN.jpg', 'NB_lobby/W170HN.jpg', 'http://www.ibuypower.com/Store/Configurators.aspx?mid=821');
	var d3 = new TvImage('Details_3', 'NB_lobby/tv-P151HM1.jpg', 'NB_lobby/tv-P151HM1.jpg', 'http://www.ibuypower.com/Store/Configurators.aspx?mid=883', '_self');
	var d4 = new TvImage('Details_4', 'NB_lobby/W150HRQ.jpg', 'NB_lobby/W150HRQ.jpg', 'http://www.ibuypower.com/Store/Configurators.aspx?mid=822');
	var d5 = new TvImage('Details_5', 'NB_lobby/battalion-x7200-2.jpg', 'NB_lobby/battalion-x7200-2.jpg', 'http://www.ibuypower.com/Store/Battalion_101_X7200_Gaming_Laptop', '_self');
	var d6 = new TvImage('Details_6', 'NB_lobby/CZ-12-TV.jpg', 'NB_lobby/CZ-12-TV.jpg', 'http://www.ibuypower.com/Store/Configurators.aspx?mid=875', '_self');
	var d7 = new TvImage('Main', 'NB_lobby/P150HM-amd.jpg', 'NB_lobby/P150HM-amd.jpg', 'http://www.ibuypower.com/Store/Configurators.aspx?mid=946', '_self');
	return new Array(d0,d1,d2,d3,d4,d5,d6,d7);
	
}


var tvobj = new TvObject('04/21/10 11:59 PM', '50', '338', '#FFFFFF', BuildTvWall());
