/* Search Results parser*/
function parseTitle(title,key)
{
	mi_path= "";
	artist = "";
	song = "";
	var str= title;
	switch (key)
	{
	case "www.azlyrics.com":
	  var linkId=1;
	  break;

	case "www.mp3lyrics.org":
	  var linkId=1;
	  break;

	case "www.completealbumlyrics.com":
	  var linkId=2;
	  break;

	case "www.lyricsmania.com":
	  var linkId=2;
	  break;

	case "www.lyricsandsongs.com":
	  var linkId=3;
	  break;

	case "www.elyrics.net":
	  var linkId=4;
	  break;

	case "www.metrolyrics.com":
	  var linkId=5;
	  break;

	default:
	  var linkId=0;
	}
if(linkId!=0)
	{
	
	if(linkId ==1)
		{
		if(str.search("-") != -1) //Artist and Song in Title
			{
			
			str = str.toLowerCase();
			var pos1 = str.indexOf(" lyrics");
			artist = str.substring(0,pos1);
			artist = artist.replace(/ /g,"_");
			
			var pos2 = str.indexOf(" - ", pos1);
			song = str.substring(pos2+3);
			song = song.replace(/ /g,"_");

			}else
			{
				str = str.toLowerCase()
				var pos1 = str.indexOf(" lyrics")
				artist = str.substring(0,pos1)
				artist = artist.replace(/ /g,"_");
				
			}
		}
	if(linkId ==2)
		{
		if(str.search("-") != -1)
		{
		str = str.toLowerCase()
		var pos1 = str.indexOf(" lyrics")
		str = str.substring(0,pos1)
		var pos2 = str.indexOf(" - ")
		artist = str.substring(0,pos2);
		artist = artist.replace(/ /g,"_");
		

		var pos3 = str.indexOf(" - ", pos3)
		song = str.substring(pos3+3)
		song = song.replace(/ /g,"_");
		
		}else
			{
				str = str.toLowerCase()
				var pos1 = str.indexOf(" lyrics")
				artist = str.substring(0,pos1)
				artist = artist.replace(/ /g,"_");
				
			}
		}
	if(linkId ==3)
		{
		str = str.toLowerCase()
		var pos1 = str.indexOf(" lyrics")
		song = str.substring(0,pos1)
		song = song.replace(/ /g,"_");
		var pos2 = str.indexOf(" - by ")
		var pos3 = str.indexOf(" from")
		artist = str.substring(pos2+6,pos3);
		artist = artist.replace(/ /g,"_");
		
		}
	if(linkId ==4)
		{
		if(str.search("-") != -1)
		{
		str = str.toLowerCase()
		var pos1 = str.indexOf(" lyrics")
		song = str.substring(0,pos1)
		var pos2 = str.indexOf(" - ")
		song= song.substring(0,pos2);
		song = song.replace(/ /g,"_");
		

		var pos3 = str.indexOf(" - ", pos3);
		artist = str.substring(pos3+3)
		artist= artist.replace(/ /g,"_");
		}else
			{
				str = str.toLowerCase()
				var pos1 = str.indexOf(" lyrics")
				artist = str.substring(0,pos1)
				artist = artist.replace(/ /g,"_");
				
			}
		}

	if(linkId ==5)
		{
		if(str.search("-") != -1)
		{
		str = str.toLowerCase()
		var pos1 = str.indexOf(" lyrics")
		str = str.substring(0,pos1)
		var pos2 = str.indexOf(" - ")
		artist= str.substring(0,pos2);
		artist= artist.replace(/ /g,"_");
		var pos3 = str.indexOf(" - ", pos3)
		song = str.substring(pos3+3)
		song= song.replace(/ /g,"_");
		
		}else
			{
				str = str.toLowerCase()
				var pos1 = str.indexOf(" lyrics")
				artist = str.substring(0,pos1)
				artist = artist.replace(/ /g,"_");
				
			}
		}
	mi_path="?artist="+artist+"&title="+song;
		}//endif
	}
	
