//Images
var tImage=new Array()
tImage["hhrPanel"]="/images/news/thumb_hhr.jpg";
tImage["businessChoice"]="/images/news/thumb_choice.jpg";
tImage["incentives"]="/images/news/thumb_current.jpg";
tImage["fvx"]="/images/news/thumb_purchase.jpg";
tImage["findDealer"]="/images/news/thumb_dealers_chevy_gmc.jpg";
tImage["svm"]="/images/news/thumb_locator.jpg";
tImage["fae"]="/images/news/thumb_account.jpg";
tImage["sierra"]="/images/news/thumb_sierra.jpg";
tImage["silverado"]="/images/news/thumb_silverado.jpg";
tImage["gmnews"]="/images/news/thumb_gm.jpg";
tImage["onstar"]="/images/news/thumb_onstar.jpg";
tImage["AstroBody"]="/images/news/thumb_astro.jpg";
tImage["MidBox"]="/images/news/thumb_midbox.jpg";
tImage["PromoCoaching"]="/images/news/thumb_stabilitrak.gif";
tImage["VanSafety"]="/images/news/thumb_van_safety.jpg";
tImage["TechnicalTips"]="/images/news/thumb_tech.jpg";
tImage["toolbox"]="/images/news/thumb_tech.jpg";
tImage["mobility"]="/images/news/thumb_mobility.jpg";
tImage["mobilityCarYear"]=tImage["mobility"];
tImage["fuels"]="/images/news/thumb_fuels.jpg";
tImage["ecosmart"]="/images/news/thumb_ecosmart.jpg";
tImage["gmreinvention"]="/images/news/thumb_re_invention.gif";
tImage["carTruckGuide"]="/images/news/thumb_car_Truck_Guide_2010.jpg";
tImage["policeCaprice"]="/images/news/thumb_police.jpg";

//Titles
var tTitle=new Array()
tTitle["hhrPanel"]="New HHR Panel";
tTitle["businessChoice"]="Business Choice";
tTitle["incentives"]="Retail Alternative";
tTitle["fvx"]="Fleet Purchase Program (FVX)";
tTitle["findDealer"]="Business Central Dealers";
tTitle["svm"]="SVM Locator";
tTitle["fae"]="Commercial &amp; Government Sales";
tTitle["sierra"]="All-New GMC Sierra";
tTitle["silverado"]="All-New Chevy Silverado";
tTitle["gmnews"]="GM News";
tTitle["onstar"]="OnStar";
tTitle["AstroBody"]="AstroBody";
tTitle["MidBox"]="MidBox";
tTitle["PromoCoaching"]="StabiliTrak with traction control";
tTitle["VanSafety"]="Passenger Van Safety";
tTitle["TechnicalTips"]="Technical Tips";
tTitle["toolbox"]="Fleet Service Toolbox";
tTitle["mobility"]="GM Mobility Reimbursement Program";
tTitle["mobilityCarYear"]=tTitle["mobility"];
tTitle["fuels"]="GM Alternative Fuels";
tTitle["ecosmart"]="Lower Your Fleet Costs";
tTitle["gmreinvention"]="Watch Our Progress";
tTitle["carTruckGuide"]="2010 Car and Truck Guide";
tTitle["policeCaprice"]="All-New 2011 Chevrolet Caprice PPV";

//Copies
var tCopy=new Array()
tCopy["hhrPanel"]="Take something cool to work. Introducing the new 2007 Chevy HHR Panel.";
tCopy["businessChoice"]="GM Business Choice offers four great options to equip your eligible new Chevy or GM vehicles.";
tCopy["incentives"]="Find great cash-back deals on the latest GM models.";
tCopy["fvx"]="Get allowances on select GM models for varied uses (for qualified fleet customers).";
tCopy["findDealer"]="The one-stop shop for business owner's vehicle needs.";
tCopy["svm"]="GM Special Vehicle Manufacturers provide quality upfit products to enhance your GM chassis and vans.";
tCopy["fae"]="Get support for your government vehicle needs.";
tCopy["sierra"]="A heavy-duty breakthrough: The all-new 2007 GMC Sierra.";
tCopy["silverado"]="The new standard in full-size pickups: The all-new 2007 Chevy Silverado.";
tCopy["gmnews"]="Get the latest news and current offers.";
tCopy["onstar"]="Gain greater productivity and efficiency by using OnStar features like Turn-by-Turn navigation.";
tCopy["AstroBody"]="Learn how to upfit your vehicle with AstroBody features & options.";
tCopy["MidBox"]="Learn how to upfit your vehicle with MidBox features & options.";
tCopy["PromoCoaching"]="Watch the video about GM passenger van safety features.";
tCopy["VanSafety"]="The most comprehensive standard safety package ever offered on a GM full-size van.";
tCopy["TechnicalTips"]="Discover ways to lower your fleet maintenance and repair expenses.";
tCopy["toolbox"]="Find the right tools to maintain your fleet.";
tCopy["mobility"]="Get two added years of OnStar&dagger; and up to $1000&sect; on eligible equipment installed in new eligible GM vehicles.";
tCopy["mobilityCarYear"]="Get two added years of OnStar&sect; and up to $1000** on eligible equipment installed in new eligible GM vehicles.";
tCopy["fuels"]="Gas-friendly ways to move your business.";
tCopy["ecosmart"]="Innovative online training to help you lower fleet operating costs.";
tCopy["gmreinvention"]="We're reinventing the automobile and our company. Follow our progress, see our latest innovations and join our reinvention.";
tCopy["carTruckGuide"]="For more information about any of our 2010 GM vehicles, ";
tCopy["policeCaprice"]="Investigate the powerful, intelligent and spacious police patrol vehicle.";

//urls
var tURL=new Array()
tURL["hhrPanel"]="/pdf/HRRPanel.pdf";
tURL["businessChoice"]="/businessChoice/gmfleet/index.jsp?cmp=BusChoice_Fleet ";
tURL["incentives"]="/sitemap/incentives/currentOffers.jsp";
tURL["fvx"]="/smallbusiness/incentives/2010fvx.jsp?from=CO";
tURL["findDealer"]="/business-central-dealers/index.jsp";
tURL["svm"]="/sitemap/svmlocator_landing.jsp";
tURL["fae"]="/government/ordering/commercial-government-police-sales-managers.jsp";
tURL["sierra"]="/pages/submodelOverview/2007_GMC_Sierra_1500.jsp";
tURL["silverado"]="/pages/submodelOverview/2007_Chevrolet_Silverado_1500.jsp";
tURL["gmnews"]="/sitemap/newsOffers.jsp";
tURL["onstar"]="javascript:omniOnstar('promo tile'); flashPopUp('http://www.onstar.com/us_english/jsp/services/index.jsp?make=gmFleet&model=gmFleet&deepLink=overview','ONSTAR','width=695,height=500,scrollbars=yes')";
tURL["AstroBody"]="/pdf/Astro_Body_Hero_Card.pdf";
tURL["MidBox"]="/pdf/Midbox_Storage.pdf";
tURL["PromoCoaching"]="/sitemap/stabiliTrak/stabiliTrak.jsp";
tURL["VanSafety"]="javascript:flashPopUp('/flash/van-safety-video/vansafetyvideo.jsp','Safety','width=420,height=340')";
tURL["TechnicalTips"]="/service-maintenance/maintenance-info/technicaltips.jsp";
tURL["toolbox"]="/pdf/Toolboxvr2.pdf";
tURL["mobility"]="http://www.gm.com/shop/services/gm_mobility/";
tURL["mobilityCarYear"]=tURL["mobility"];
tURL["fuels"]="http://www.gmaltfuel.com";
tURL["ecosmart"]="http://gmfleet.com/ecosmart";
tURL["gmreinvention"]="http://www.gmreinvention.com/?brandId=fc&src=hom&evar24=div_oth_reinventland_fleet";
tURL["carTruckGuide"]="/pdf/GM_Fleet_and_Commercial_Car_and_Truck_Guide_-_2010.pdf";
tURL["policeCaprice"]="http://www.chevroletcapriceppv.com";

//target
var tOpenResult=new Array()
tOpenResult["hhrPanel"]="_blank";
tOpenResult["businessChoice"]="_blank";
tOpenResult["incentives"]="_self";
tOpenResult["fvx"]="_self";
tOpenResult["findDealer"]="_self";
tOpenResult["svm"]="_self";
tOpenResult["fae"]="_self";
tOpenResult["sierra"]="_self";
tOpenResult["silverado"]="_self";
tOpenResult["gmnews"]="_self";
tOpenResult["onstar"]="";
tOpenResult["AstroBody"]="_blank";
tOpenResult["MidBox"]="_blank";
tOpenResult["PromoCoaching"]="_self";
tOpenResult["VanSafety"]="";
tOpenResult["TechnicalTips"]="_self";
tOpenResult["toolbox"]="_blank";
tOpenResult["mobility"]="_blank";
tOpenResult["mobilityCarYear"]=tOpenResult["mobility"];
tOpenResult["fuels"]="_blank";
tOpenResult["ecosmart"]="_blank";
tOpenResult["gmreinvention"]="_blank";
tOpenResult["carTruckGuide"]="_blank";
tOpenResult["policeCaprice"]="_blank";

//additional information
var tAdditional=new Array()
tAdditional["hhrPanel"]="Learn More";
tAdditional["businessChoice"]="Learn More";
tAdditional["incentives"]="Learn More";
tAdditional["fvx"]="Learn More";
tAdditional["findDealer"]="Learn More";
tAdditional["svm"]="Learn More";
tAdditional["fae"]="Learn More";
tAdditional["sierra"]="Learn More";
tAdditional["silverado"]="Learn More";
tAdditional["gmnews"]="Learn More";
tAdditional["onstar"]="Learn More";
tAdditional["AstroBody"]="Learn More";
tAdditional["MidBox"]="Learn More";
tAdditional["PromoCoaching"]="Learn More";
tAdditional["VanSafety"]="Watch the Video";
tAdditional["TechnicalTips"]="Learn More";
tAdditional["toolbox"]="Learn More";
tAdditional["mobility"]="Learn More";
tAdditional["mobilityCarYear"]=tAdditional["mobility"];
tAdditional["fuels"]="Learn More";
tAdditional["ecosmart"]="Learn More";
tAdditional["gmreinvention"]="Learn More";
tAdditional["carTruckGuide"]="download the 2010 Car and Truck Guide";
tAdditional["policeCaprice"]="Learn More";

//Promotiles Omnitures
var tRel=new Array()
tRel["hhrPanel"]="";
tRel["businessChoice"]="";
tRel["incentives"]="";
tRel["fvx"]="";
tRel["findDealer"]="";
tRel["svm"]="";
tRel["fae"]="omni-FAEPROMOTILE";
tRel["sierra"]="";
tRel["silverado"]="";
tRel["gmnews"]="";
tRel["onstar"]="";
tRel["AstroBody"]="";
tRel["MidBox"]="";
tRel["PromoCoaching"]="";
tRel["VanSafety"]="";
tRel["TechnicalTips"]="";
tRel["mobility"]="omni-MobilityPROMOTILE";
tRel["toolbox"]="omni-ServiceToolboxPROMOTILE";
tRel["mobilityCarYear"]=tRel["mobility"];
tRel["fuels"]="omni-AltFuelsPROMOTILE";
tRel["ecosmart"]="";
tRel["gmreinvention"]="";
tRel["policeCaprice"]="omni-POLICECAPRICE";


function Tile(){
	this.tImages=tImage;
	this.tTitles=tTitle;
	this.tTexts=tCopy;
	this.tURLs=tURL;	
	this.getPageTiles=getPageTiles;
	this.tOpenResult=tOpenResult;
	this.tAdditional=tAdditional;
	this.tRel=tRel;
}

function getPageTiles(pTile1, pTile2){
	
	var cTileHead;
	var cTileEnd;
	if(pTile1 == "mobility"){
		cTileHead = "<div id=\"toolNews\" style=\"margin-top:16px;\">";
	}else{
		cTileHead = "<div id=\"toolNews\">";
	}			
	if(pTile1 == "carTruckGuide"){
		cTileEnd = "</a> <p class=\"promotileCT\">(PDF, 10.2 MB).</p>";
	}else{
		cTileEnd = "&gt;&gt;</a>";
	}
	var cTilesContent	=	cTileHead +
							"<div class=\"toolNewItem\">" +
								"<a rel=\"" + this.tRel[pTile1] +"\" name=\"" + pTile1 +"\" href=\""+ this.tURLs[pTile1] +"\" target=\""+ this.tOpenResult[pTile1] +"\"><img src=\""+ this.tImages[pTile1] +"\"/></a>" +
								"<h1>"+ this.tTitles[pTile1] +"</h1>" +
								"<p>"+ this.tTexts[pTile1] +"</p>" +
								"<a rel=\"" + this.tRel[pTile1] +"\" name=\"" + pTile1 +"\" href=\""+ this.tURLs[pTile1] +"\" target=\""+ this.tOpenResult[pTile1] +"\">"+ this.tAdditional[pTile1] + cTileEnd +
							"</div>"; 
		if (pTile2 != undefined){					
			cTilesContent= cTilesContent + "<div class=\"toolNewItem\">" +
								"<a rel=\"" + this.tRel[pTile2] +"\" name=\"" + pTile2 +"\" href=\""+ this.tURLs[pTile2] +"\" target=\""+ this.tOpenResult[pTile2] +"\"><img src=\""+ this.tImages[pTile2] +"\"/></a>" +
								"<h1>"+ this.tTitles[pTile2] +"</h1>" +
								"<p>"+ this.tTexts[pTile2] +"</p>" +
								"<a rel=\"" + this.tRel[pTile2] +"\" name=\"" + pTile2 +"\" href=\""+ this.tURLs[pTile2] +"\" target=\""+ this.tOpenResult[pTile2] +"\">"+ this.tAdditional[pTile2] +" &gt;&gt;</a>" +
							"</div>";	
		}
		cTilesContent= cTilesContent + 	"</div>";			
	return cTilesContent;	
}

function PageTiles(pTiles1, pTiles2){
	this.tiles1=pTiles1;
	this.tiles2=pTiles2;
}

function getRotationTiles(pfileName, pRotation1, pRotation2){
	var aTiles1,aTiles2,aTilesContainer,pTitles;
	pTitles=info[pfileName];
	aTiles1=pTitles.tiles1;
	aTiles2=pTitles.tiles2;	
	aTilesContainer = new Array (aTiles1[pRotation1], aTiles2[pRotation2]);
	return aTilesContainer;
}

function getLength(fileName){
	var cont;
	if(info[fileName]){
		var i = new PageTiles(info[fileName].tiles1, info[fileName].tiles2);
		cont = new Array(i.tiles1.length, i.tiles2.length);			
	}
	return cont;
}
function flashPopUp(URL,winName,params){
	//**
	window.open(URL,winName,params);
	//**
}