// JavaScript Document - ONTV

var totalFlashHighlights = 0;
var baseDir = "http://images.gactv.com/ribbon_pages/ontv/highlights/"

function flashHighlight (fileURL,redirectURL){
this.fileURL = fileURL;
this.redirectURL = redirectURL;
totalFlashHighlights++
}

// Input all the slide data

flashHighlight1 = new flashHighlight ("top50_09.swf", "http://www.gactv.com/top50");  //Top 50
flashHighlight2 = new flashHighlight ("soundstage_kennychesney_072909.swf", "http://www.gactv.com/gac/shows_gccon/");  //Soundstage
flashHighlight3 = new flashHighlight ("backstory_traceadkins100609.swf", "http://www.gactv.com/gac/shows_spl/episode/0,3038,GAC_26200_65734,00.html");  //Backstory
flashHighlight4 = new flashHighlight ("martina_liveinconcert100609.swf", "http://www.gactv.com/gac/shows_spl/episode/0,3038,GAC_26200_65886,00.html");  //Martina

















function writeFlashHighlight(){
	
// Gather the variables to pass into the movie
var jsVars = 'totalFlashHighlights=' + totalFlashHighlights;
for (i=1;i<=totalFlashHighlights;i++) {
jsVars += '&fileURL' + i + '=' + baseDir + eval('flashHighlight' + i + '.fileURL');
jsVars += '&redirectURL' + i + '=' + eval('flashHighlight' + i + '.redirectURL');
}
// alert(jsVars); // Show the variables being passed

// HTML to append the variables and embed the movie onto the page
var oeTag = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
+ 'WIDTH="455" HEIGHT="300"'
+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">'
+ '<PARAM NAME="MOVIE" VALUE="' + baseDir + 'wrapper.swf?' + jsVars + '">'
+ '<PARAM NAME="allowScriptAccess" VALUE="always">'
+ '<PARAM NAME="QUALITY" VALUE="high">'
+ '<param name="wmode" value="transparent">'
+ '<PARAM NAME="MENU" VALUE="false">'
+ '<EMBED SRC="' + baseDir + 'wrapper.swf?' + jsVars + '" '
+ 'WIDTH="455" HEIGHT="300"'
+ 'allowScriptAccess="always"'
+ 'QUALITY="high"'
+ 'wmode="transparent"'
+ 'MENU="false"'
+ 'TYPE="application/x-shockwave-flash"'
+ 'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">'
+ '</EMBED>'
+ '</OBJECT>';
// alert(oeTag); // Show the html being written to the page
document.write(oeTag);   // Write the HTML onto the page
}


// Write the Movie
writeFlashHighlight();