// -----------------------------------------------------------------------------------------------
// Define Wallpaper Data Array
// -----------------------------------------------------------------------------------------------

var wpDataArray = new Array(

			"aaron_tippin",
			"alabama",
			"alan_jackson",
			"andy_griggs",	
			"big_and_rich",
			"billy_currington",
			"blaine_larsen",
			"blake_shelton",
			"brad_paisley",
			"brooks_and_dunn",
			"carrie_underwood",
			"chris_cagle",
			"chris_ledoux",
			"craig_morgan",
			"danielle_peck",
			"darryl_worley",
			"deana_carter",
			"diamond_rio",
			"dierks_bentley",
			"dixie_chicks",
			"dolly_parton",
			"dwight_yoakam",
			"eddy_arnold",
			"emerson_drive",
			"faith_hill",
			"garth_brooks",
			"gary_allan",
			"george_jones",
			"george_strait",
			"gretchen_wilson",
			"hank_williams_jr",
			"hot_apple_pie",
			"jace_everett",
			"jamey_johnson",
			"jamie_oneal",
			"jason_aldean",
			"jeff_bates",
			"jimmy_wayne",
			"joe_nichols",
			"josh_turner",
			"julie_roberts",
			"keith_anderson",
			"keith_urban",
			"kenny_chesney",
			"kenny_rogers",
			"leann_rimes",
			"lee_ann_womack",
			"little_big_town",
			"lonestar",
			"loretta_lynn",
			"mark_chesnutt",
			"martina_mcbride",
			"marty_stuart",
			"merle_haggard",
			"miranda_lambert",
			"montgomery_gentry",
			"neal_mccoy",
			"patty_loveless",
			"phil_vassar",
			"rascal_flatts",
			"reba_mcentire",
			"rodney_carrington",
			"sara_evans",
			"shania_twain",
			"shannon_brown",
			"shedaisy",
			"sugarland",
			"taylor_swift",
			"terri_clark",
			"tim_mcgraw",
			"toby_keith",
			"trace_adkins",
			"tracy_lawrence",
			"travis_tritt",
			"trent_tomlinson",
			//"trent_willmon",
			"trick_pony",
			"trisha_yearwood",
			"vince_gill",
			"willie_nelson",
			"wynonna_judd"

)


// -----------------------------------------------------------------------------------------------
// Build the wp Objects (wallpaper)
// -----------------------------------------------------------------------------------------------
	
function wp(artist, path){
		this.artist = artist;
		this.path = path;
}

aaron_tippin = new wp("Aaron Tippin",
				"aaron_tippin");
				
alabama = new wp("Alabama",
				"alabama");

alan_jackson = new wp("Alan Jackson",
				"alan_jackson");
				
andy_griggs = new wp("Andy Griggs",
				"andy_griggs");
		
big_and_rich = new wp("Big & Rich",
				"big_and_rich");
		
billy_currington = new wp("Billy Currington",
				"billy_currington");
		
blaine_larsen = new wp("Blaine Larsen",
				"blaine_larsen");
		
blake_shelton = new wp("Blake Shelton",
				"blake_shelton");
		
brad_paisley = new wp("Brad Paisley",
				"brad_paisley");
		
brooks_and_dunn = new wp("Brooks & Dunn",
				"brooks_and_dunn");
		
carrie_underwood = new wp("Carrie Underwood",
				"carrie_underwood");
		
chris_cagle = new wp("Chris Cagle",
				"chris_cagle");
		
chris_ledoux = new wp("Chris Ledoux",
				"chris_ledoux");
		
craig_morgan = new wp("Craig Morgan",
				"craig_morgan");
		
danielle_peck = new wp("Danielle Peck",
				"danielle_peck");
		
darryl_worley = new wp("Darryl Worley",
				"darryl_worley");
		
deana_carter = new wp("Deana Carter",
				"deana_carter");
		
diamond_rio = new wp("Diamond Rio",
				"diamond_rio");
		
dierks_bentley = new wp("Dierks Bentley",
				"dierks_bentley");
		
dixie_chicks = new wp("Dixie Chicks",
				"dixie_chicks");
		
dolly_parton = new wp("Dolly Parton",
				"dolly_parton");
		
dwight_yoakam = new wp("Dwight Yoakam",
				"dwight_yoakam");
		
eddy_arnold = new wp("Eddy Arnold",
				"eddy_arnold");
		
emerson_drive = new wp("Emerson Drive",
				"emerson_drive");
		
faith_hill = new wp("Faith Hill",
				"faith_hill");
		
garth_brooks = new wp("Garth Brooks",
				"garth_brooks");
		
gary_allan = new wp("Gary Allan",
				"gary_allan");
		
george_jones = new wp("George Jones",
				"george_jones");
		
george_strait = new wp("George Strait",
				"george_strait");
		
gretchen_wilson = new wp("Gretchen Wilson",
				"gretchen_wilson");
		
hank_williams_jr = new wp("Hank Williams Jr.",
				"hank_williams_jr");
		
hot_apple_pie = new wp("Hot Apple Pie",
				"hot_apple_pie");
		
jace_everett = new wp("Jace Everett",
				"jace_everett");
		
jamey_johnson = new wp("Jamey Johnson",
				"jamey_johnson");
		
jamie_oneal = new wp("Jamie O'Neal",
				"jamie_oneal");
		
jason_aldean = new wp("Jason Aldean",
				"jason_aldean");
		
jeff_bates = new wp("Jeff Bates",
				"jeff_bates");
		
jimmy_wayne = new wp("Jimmy Wayne",
				"jimmy_wayne");
		
joe_nichols = new wp("Joe Nichols",
				"joe_nichols");
		
josh_turner = new wp("Josh Turner",
				"josh_turner");
		
julie_roberts = new wp("Julie Roberts",
				"julie_roberts");
		
keith_anderson = new wp("Keith Anderson",
				"keith_anderson");
		
keith_urban = new wp("Keith Urban",
				"keith_urban");
		
kenny_chesney = new wp("Kenny Chesney",
				"kenny_chesney");
		
kenny_rogers = new wp("Kenny Rogers",
				"kenny_rogers");
		
leann_rimes = new wp("Leann Rimes",
				"leann_rimes");
		
lee_ann_womack = new wp("Lee Ann Womack",
				"lee_ann_womack");
		
little_big_town = new wp("Little Big Town",
				"little_big_town");
		
lonestar = new wp("Lonestar",
				"lonestar");
		
loretta_lynn = new wp("Loretta Lynn",
				"loretta_lynn");
		
mark_chesnutt = new wp("Mark Chesnutt",
				"mark_chesnutt");
		
martina_mcbride = new wp("Martina McBride",
				"martina_mcbride");
		
marty_stuart = new wp("Marty Stuart",
				"marty_stuart");
		
merle_haggard = new wp("Merle Haggard",
				"merle_haggard");
		
miranda_lambert = new wp("Miranda Lambert",
				"miranda_lambert");
		
montgomery_gentry = new wp("Montgomery Gentry",
				"montgomery_gentry");
		
neal_mccoy = new wp("Neal McCoy",
				"neal_mccoy");
		
patty_loveless = new wp("Patty Loveless",
				"patty_loveless");
		
phil_vassar = new wp("Phil Vassar",
				"phil_vassar");
		
rascal_flatts = new wp("Rascal Flatts",
				"rascal_flatts");
		
reba_mcentire = new wp("Reba Mcentire",
				"reba_mcentire");
		
rodney_carrington = new wp("Rodney Carrington",
				"rodney_carrington");
		
sara_evans = new wp("Sara Evans",
				"sara_evans");
		
shania_twain = new wp("Shania Twain",
				"shania_twain");
		
shannon_brown = new wp("Shannon Brown",
				"shannon_brown");
		
shedaisy = new wp("SheDAISY",
				"shedaisy");
		
sugarland = new wp("Sugarland",
				"sugarland");
		
taylor_swift = new wp("Taylor Swift",
				"taylor_swift");
		
terri_clark = new wp("Terri Clark",
				"terri_clark");
		
tim_mcgraw = new wp("Tim McGraw",
				"tim_mcgraw");
		
toby_keith = new wp("Toby Keith",
				"toby_keith");
		
trace_adkins = new wp("Trace Adkins",
				"trace_adkins");
		
tracy_lawrence = new wp("Tracy Lawrence",
				"tracy_lawrence");
		
travis_tritt = new wp("Travis Tritt",
				"travis_tritt");
		
trent_tomlinson = new wp("Trent Tomlinson",
				"trent_tomlinson");
		
//trent_willmon = new wp("Trent Willmon",
		//		"trent_willmon");
		
trick_pony = new wp("Trick Pony",
				"trick_pony");
		
trisha_yearwood = new wp("Trisha Yearwood",
				"trisha_yearwood");
		
vince_gill = new wp("Vince Gill",
				"vince_gill");
		
willie_nelson = new wp("Willie Nelson",
				"willie_nelson");
		
wynonna_judd = new wp("Wynonna Judd",
				"wynonna_judd");
				

		
// -----------------------------------------------------------------------------------------------
// Randomize for wallpapers
// -----------------------------------------------------------------------------------------------


// how many wallpapers exist
	var wpTotal = (wpDataArray.length-1);

// randomize
	do
		{
		wpPos1 = Math.round(Math.random()*((wpDataArray.length-1)));
		}
	while (wpPos1 == 0)
	
	do
		{
		wpPos2 = Math.round(Math.random()*((wpDataArray.length-1)));
		}
	while ((wpPos1 == 0)||(wpPos2 == wpPos1))
		
				
// -----------------------------------------------------------------------------------------------
// Define the Base Hrefs
// -----------------------------------------------------------------------------------------------

var BaseUrl = "http://images.gactv.com/artist/";


// -----------------------------------------------------------------------------------------------
// Pull out the specific text from the wp object
// -----------------------------------------------------------------------------------------------

var wpArtist1 = eval(wpDataArray[wpPos1] + ".artist");
var wpPath1 = eval(wpDataArray[wpPos1] + ".path");
var wpArtist2 = eval(wpDataArray[wpPos2] + ".artist");
var wpPath2 = eval(wpDataArray[wpPos2] + ".path");



// -----------------------------------------------------------------------------------------------
// Write the html
// -----------------------------------------------------------------------------------------------

function writeWallpapers() {
	document.write ('<div class="wp_pos1">');
	document.write ('<div class="title">'+ wpArtist1 +'</div>');
	document.write ('<p><img src="http://images.gactv.com/artist/'+wpPath1+'/wallpapers/01_th.jpg"></p>');
	document.write ('<p><a href="http://images.gactv.com/artist/wallpapers.html?artist='+wpPath1+'&file=01_800x600" target="_blank">800 x 600</a><br />');
	document.write ('<a href="http://images.gactv.com/artist/wallpapers.html?artist='+wpPath1+'&amp;file=01_1024x768" target="_blank">1024 x 768</a><br />');
	document.write ('<a href="http://images.gactv.com/artist/wallpapers.html?artist='+wpPath1+'&amp;file=01_1280x1024" target="_blank">1280 x 1024</a></p>');
	document.write ('</div>');
	document.write ('<div class="wp_pos2">');
	document.write ('<div class="title">'+ wpArtist2 +'</div>');
	document.write ('<p><img src="http://images.gactv.com/artist/'+wpPath2+'/wallpapers/01_th.jpg"></p>');
	document.write ('<p><a href="http://images.gactv.com/artist/wallpapers.html?artist='+wpPath2+'&file=01_800x600" target="_blank">800 x 600</a><br />');
	document.write ('<a href="http://images.gactv.com/artist/wallpapers.html?artist='+wpPath2+'&amp;file=01_1024x768" target="_blank">1024 x 768</a><br />');
	document.write ('<a href="http://images.gactv.com/artist/wallpapers.html?artist='+wpPath2+'&amp;file=01_1280x1024" target="_blank">1280 x 1024</a></p>');
	document.write ('</div>');
}
