﻿
var divID = ''; 
var preloadFlag = true;

			function getFile(pURL, tDivID) 
			{
				//alert ("get file?" +pURL);
				divID = tDivID;
				if (window.XMLHttpRequest) 
				{ // code for Mozilla, Safari, etc
					xmlhttp=new XMLHttpRequest();
					xmlhttp.onreadystatechange=postFile;
					xmlhttp.open("GET", pURL, true);
					xmlhttp.send(null);
				} 
				else if (window.ActiveXObject) 
				{ //IE
					xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
					if (xmlhttp) 
					{
						xmlhttp.onreadystatechange=postFile;
						xmlhttp.open('GET', pURL, true);
						xmlhttp.send();
					}
				}

			}
			function postFile() 
			{
			if (xmlhttp.readyState==4) 
				{
				//alert (divID);
					//if (xmlhttp.status==200) 
					//{
						document.getElementById(divID).innerHTML=xmlhttp.responseText;
					//}
				}
			}
			


			// Array used to hold song info
			// Song title, featuring, lyrics, image, audio
			var songArray = new Array (14);
				
				//1. Leaving You Behind
				songArray [1] = new Array (5);
				
				songArray [1][0] = 'Leaving You Behind';	//Song title
				songArray [1][1] =  'feat. Tomi Swick';	//Featuring
				songArray [1][2] =  'An open road draws flame<br>';	//Lyrics 
					songArray [1][2] += 'All my breath falls away<br>';
					songArray [1][2] += 'So tired, so strained<br>';
					songArray [1][2] += 'I need this courage,<br>';
					songArray [1][2] += 'I need to say...';
				songArray [1][3] = 'LeavingYouBehind.jpg';	//Image
				songArray [1][4] = 'LeavingYouBehind.mp3'; 	//Audio

				//2. Still Be There
				songArray [2] = new Array (5);
				
				songArray [2][0] = 'Still Be There';	//Song title
				songArray [2][1] = 'feat. Alastair';	//Featuring
				songArray [2][2] = 'Know I have seen you around before<br>';	//Lyrics
					songArray [2][2] += 'Hope it&#39;s not the last I&#39;m sure';	
				songArray [2][3] = 'StillBeThere.jpg';
				songArray [2][4] = 'StillBeThere.mp3';

				//3. You Gotta Hold On Me
				songArray [3] = new Array (5);
				
				songArray [3][0] = 'You Gotta Hold On Me';	//Song title
				songArray [3][1] = 'feat. Kobe James';	//Featuring
				songArray [3][2] = 'Every little smile,<br>';	//Lyrics
					songArray [3][2] += 'Every little wink,<br>';	
					songArray [3][2] += 'Everything I think you gotta hold on me.<br>';	
					songArray [3][2] += 'Every little touch,<br>';	
					songArray [3][2] += 'Every little taste,<br>';	
					songArray [3][2] += 'Make no mistake you gotta hold on me.....';	
				songArray [3][3] = 'YouGottaHoldOnMe.jpg';
				songArray [3][4] = 'YouGottaHoldOnMe.mp3';

				//4. My Last Day
				songArray [4] = new Array (5);
				
				songArray [4][0] = 'My Last Day';	//Song title
				songArray [4][1] = 'feat. Jully Black';	//Featuring
				songArray [4][2] = 'Strolling down the boulevard of pain<br>';	//Lyrics	
					songArray [4][2] += 'It seems I&#39;ve always wanted more<br>';	
					songArray [4][2] += 'But broken dreams<br>';	
					songArray [4][2] += 'Seen and unseen<br>';	
					songArray [4][2] += 'Keep getting in the way<br>';	
				songArray [4][3] = 'MyLastDay.jpg';
				songArray [4][4] = 'MyLastDay.mp3';
				
				//5. Skipping Stone
				songArray [5] = new Array (5);
				
				songArray [5][0] = 'Skipping Stone';	//Song title
				songArray [5][1] = 'feat. Mike Eastick and Tara Slone';	//Featuring
				songArray [5][2] = 'Now it&#39;s different that it was before <br>';	//Lyrics
					songArray [5][2] += 'I get the feeling that you just don&#39;t care anymore';	
				songArray [5][3] = 'SkippingStone.jpg';
				songArray [5][4] = 'SkippingStone.mp3';

				//6. Disaster Strikes Back
				songArray [6] = new Array (5);
				
				songArray [6][0] = 'Disaster Strikes Back';	//Song title
				songArray [6][1] = 'feat. Simon Wilcox';	//Featuring
				songArray [6][2] = 'I loved you, I did <br>';	//Lyrics
					songArray [6][2] += 'You were dangerously pretty<br>';	
					songArray [6][2] += 'You were just another face in the city.';	
				songArray [6][3] = 'DisasterStrikesBack.jpg';
				songArray [6][4] = 'DisasterStrikesBack.mp3';
				
				//7. Where Did All The Time Go
				songArray [7] = new Array (5);
				
				songArray [7][0] = 'Where Did All The Time Go';	//Song title
				songArray [7][1] = 'feat. Kobe James';	//Featuring
				songArray [7][2] = 'I see your face on the mantle in the picture frame<br>';	//Lyrics
					songArray [7][2] += 'I remember the days clearly in the most vivid of ways<br>';	
					songArray [7][2] += 'And all the sweet nothings we would exchange<br>';	
					songArray [7][2] += 'Not so long ago';	
				songArray [7][3] = 'WhereDidAllTheTimeGo.jpg';
				songArray [7][4] = 'WhereDidAllTheTimeGo.mp3';
				
				//8. Perfect Day
				songArray [8] = new Array (5);
				
				songArray [8][0] = 'Perfect Day';	//Song title
				songArray [8][1] = 'feat. Andy Stochanksy';	//Featuring
				songArray [8][2] = 'For those Sunday mornings<br>';	//Lyrics
					songArray [8][2] += 'Stars fade so slowly<br>';	
					songArray [8][2] += 'For singing to our favorite song<br>';	
					songArray [8][2] += 'The world was nothing till you came along';	
				songArray [8][3] = 'PerfectDay.jpg';
				songArray [8][4] = 'PerfectDay.mp3';

				//9. You'll Come Around
				songArray [9] = new Array (5);
				
				songArray [9][0] = 'You&#39;ll Come Around';	//Song title
				songArray [9][1] = 'feat. Lindy';	//Featuring
				songArray [9][2] = 'Cause nothing is worth it<br>';	//Lyrics
					songArray [9][2] += 'Time won&#39;t make it right<br>';	
					songArray [9][2] += 'And love keeps on burning out<br>';	
					songArray [9][2] += 'Into the endless night';	
				songArray [9][3] = 'YoullComeAround.jpg';
				songArray [9][4] = 'YoullComeAround.mp3';

				//10. Pawn Kings
				songArray [10] = new Array (5);
				
				songArray [10][0] = 'Pawn Kings';	//Song title
				songArray [10][1] = 'feat. Joel Parisian ';	//Featuring
				songArray [10][2] = 'What kind of weaponry has been brought to light?<br>';	//Lyrics
					songArray [10][2] += 'What are they telling the thousands of soldiers risking there lives to fight?<br>';	
					songArray [10][2] += 'What kind of lesson is this in wrong and right<br>';	
					songArray [10][2] += 'Bomb the cities and storm the capital while children sleep at night.';	
				songArray [10][3] = 'PawnKings.jpg';
				songArray [10][4] = 'PawnKings.mp3';

				//11. Dear Prudence
				songArray [11] = new Array (5);
				
				songArray [11][0] = 'Dear Prudence';	//Song title
				songArray [11][1] = 'feat. Mike, Tomi, Tara, Andy Stochansky, and Haydain Neale';	//Featuring
				songArray [11][2] = 'The sun is up, the sky is blue<br>';	//Lyrics
					songArray [11][2] += 'It&#39;s beautiful and so are you<br>';	
					songArray [11][2] += 'Dear Prudence won&#39;t you come out to play';	
				songArray [11][3] = 'DearPrudence.jpg';
				songArray [11][4] = 'DearPrudence.mp3';
				
				//12. I Need
				songArray [12] = new Array (5);
				
				songArray [12][0] = 'I Need';	//Song title
				songArray [12][1] = 'feat. Lindi Ortega';	//Featuring
				songArray [12][2] = 'I need a hand to help me stand<br>';	//Lyrics
					songArray [12][2] += 'Someone to help me get along';	
				songArray [12][3] = 'INeed.jpg';
				songArray [12][4] = 'INeed.mp3';
				
				//13. This Way To Heaven
				songArray [13] = new Array (5);
				
				songArray [13][0] = 'This Way To Heaven';	//Song title
				songArray [13][1] = 'feat. Haydain Neale';	//Featuring
				songArray [13][2] = 'Too damn hot to stop for water<br>';	//Lyrics
					songArray [13][2] += 'Way too famished to think of food<br>';	
					songArray [13][2] += 'Too much soul for preachers daughter<br>';	
					songArray [13][2] += 'Just too much of you - too much of you....<br>';	
				songArray [13][3] = 'ThisWayToHeaven.jpg';
				songArray [13][4] = 'ThisWayToHeaven.mp3';
	
				

				

				


								

				//
//				songArray [] = new Array (5);
//				
//				songArray [][0] = '';	//Song title
//				songArray [][1] = '';	//Featuring
//				songArray [][2] = '<br>';	//Lyrics
//					songArray [][2] += '<br>';	
//					songArray [][2] += '<br>';	
//					songArray [][2] += '';	
//				songArray [][3] = '.jpg';
//				songArray [][4] = '.mp3';
				

			function listSongs()
			{
				var list = '';
				var listHTML = '';
				
				listHTML += "<p style='margin-top: 10px; font-size: 0;'></p><ol>";
				for (var a= 1; a < 14; a++)
				{
			//			alert ("<p style='text-transform:lowercase; font-size:100% font-weight: bolder; padding-bottom: 20px; pading-top: 0px;'><a onmousedown='displayInfo(" +a +");'>" + songArray [a][0] + "</a></p>");				
					
					listHTML += "<li>";
						listHTML += "<p style=' text-decoration: underline; font-size:110%; font-weight: bolder; margin-bottom: 0; margin-top: 0; cursor: pointer;'><a onmousedown='displayInfo(" +a +", " +'true' +");'>"
						listHTML += songArray [a][0] + "</a>";
						listHTML += "<p style='font-size:95%; margin-bottom: 0; margin-top: 0;'>";
						listHTML += songArray [a][1];
					listHTML += "</li>";
					
				} 

				document.getElementById("songList").innerHTML = listHTML;
			}			

			function displayInfo (songID, autoplay)
			{
				var lyricsHTML = '';
				var mp3HTML = '';
				
				lyricsHTML += "<p style=' font-size:130%; font-weight: bold; margin-top: 5px;'>";
				lyricsHTML += songArray [songID][0] + "</p>";
				lyricsHTML += "<p style='margin-bottom: 0px;'>"+ songArray[songID][2] +"</p>"
				
				mp3HTML += "<object type='application/x-shockwave-flash' width='557' height='15'";
				mp3HTML += " data='mp3Player/xspf_player_slim.swf?";
				mp3HTML += "song_url=audio/" +songArray [songID][4];
				if (autoplay == true)
				{
					mp3HTML += "&autoplay=true";
				}
				mp3HTML += "&song_title=" +songArray [songID][0];
				mp3HTML += "&player_title=Year of the Monkey'";
				mp3HTML += " >";
				
				mp3HTML += "<param name='movie'"; 
				mp3HTML += " value='mp3Player/xspf_player_slim.swf?";
				mp3HTML += "song_url=audio/" +songArray [songID][4];
				if (autoplay == true)
				{
					mp3HTML += "&autoplay=true";
				}

				mp3HTML += "&song_title=" +songArray [songID][0];

				mp3HTML += "&player_title=Year of the Monkey'";
				mp3HTML += " ></object>";
				//alert (mp3HTML);
				document.getElementById("songPhoto").innerHTML = "<img src='images/" +songArray[songID][3] +"' style='border: solid 1pt #666666; margin-top: 5px;'>";
				document.getElementById("songText").innerHTML = lyricsHTML;
				document.getElementById("musicPlayer").innerHTML = mp3HTML;
				//alert ("<object type='application/x-shockwave-flash' width='557' height='15' data='mp3Player/xspf_player_slim.swf?song_url=audio/" +songArray[songID][4] +"&player_title=Year Of The Monkey&song_title=" +songArray[songID][0] +"&autoplay=true&autoload=true'>" +"<param name='movie'" +"value='mp3Player/xspf_player_slim.swf?song_url=audio/" +songArray[songID][4] +"&player_title=Year Of The Monkey&song_title=" +songArray[songID][0] +"&autoplay=true&autoload=true' />" +"</object>")
			}

