/*
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| 
//-=-=-=-=-=-=-=||  BeatLocker JS
//-=-=-=-=-=-=-=||  version 1.0
//-=-=-=-=-=-=-=||  developed by Ralph Ferrara
//-=-=-=-=-=-=-=||  05/12/2008
//-=-=-=-=-=-=-=||  
//-=-=-=-=-=-=-=||  file: /_js/public.js
//-=-=-=-=-=-=-=|| 
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
*/		


//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Site Variables
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	var string = window.location.href;
	var dom_array = string.split("//");
	var second_dom_array = dom_array[1].split("/");
	var final = second_dom_array[0];
	var siteURL 	= 'http://' + final;
	var ajaxCache	= true;
	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| httpObject
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function httpObject() {    
		xmlhttp=null;
		if (window.XMLHttpRequest) {// code for all new browsers
			xmlhttp=new XMLHttpRequest();
		} else if (window.ActiveXObject) {// code for IE5 and IE6
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		return xmlhttp;
	}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Javascript Variables
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	var failed = '';
	var httpObj = httpObject();


//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Ajax Special Request
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function ajaxSpecialRequest(url, divName1, divName2) {	
		if (ajaxCache) url = url + "&x=" + new Date().getTime();
		httpObj = httpObject();
		httpObj.open("GET", url , true);                
		httpObj.onreadystatechange = function(){ajaxSpecialResponse(divName1, divName2);}		
		httpObj.send(null);
		failed1 = document.getElementById(divName1).innerHTML;
		failed2 = document.getElementById(divName1).innerHTML;
		document.getElementById(divName1).innerHTML = '<div id="loading"><img src="/_images/loading.gif"></div>';
		document.getElementById(divName2).innerHTML = '<div id="loading"><img src="/_images/loading.gif"></div>';
	}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Ajax Special Response
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function ajaxSpecialResponse(divName1, divName2) {   
		var content;
		var cont_array = new Array();
		if (httpObj.readyState == 4) {        
			if (httpObj.status == 200) {
				content = httpObj.responseText;
				cont_array = content.split('<!--||-->');
				div1 = document.getElementById(divName1);
				div2 = document.getElementById(divName2);
				div1.innerHTML = "";
				div1.innerHTML = cont_array[0];  
				div2.innerHTML = "";
				div2.innerHTML = cont_array[1];  
			} else {            
				div1 = document.getElementById(divName1);            
				div1.innerHTML = "";
				div1.innerHTML = failed;        
				div2 = document.getElementById(divName2);            
				div2.innerHTML = "";
				div2.innerHTML = failed;     
			}    
		}
	}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Ajax Request
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function ajaxRequest(url, divName) {	
		if (ajaxCache) url = url + "&x=" + new Date().getTime();
		httpObj = httpObject();
		httpObj.open("GET", url , true);                
		httpObj.onreadystatechange = function(){ajaxResponse(divName);}		
		httpObj.send(null);
		failed = document.getElementById(divName).innerHTML;
		document.getElementById(divName).innerHTML = '<div id="loading"><img src="/_images/loading.gif"></div>';
	}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Ajax Response
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function ajaxResponse(divName) {   
		var content;
		if (httpObj.readyState == 4) {        
			if (httpObj.status == 200) {
				content = httpObj.responseText;
				div = document.getElementById(divName);
				div.innerHTML = "";
				div.innerHTML = content;        
			} else {            
				div = document.getElementById(divName);            
				div.innerHTML = "";
				div.innerHTML = failed;        
			}    
		}
	}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Music Box
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function musicbox(tab) {
		if (tab == "genre"){
			document.getElementById('genre-scroll').style.display = "block";
			document.getElementById('releases-scroll').style.display = "none";
			document.getElementById('category-scroll').style.display = "none";
			document.getElementById('first').className = 'inactive';
			document.getElementById('second').className = 'active';
			document.getElementById('third').className = 'inactive';
			
		}
		if (tab == "category"){
			document.getElementById('genre-scroll').style.display = "none";
			document.getElementById('releases-scroll').style.display = "none";
			document.getElementById('category-scroll').style.display = "block";
			document.getElementById('first').className = 'active';
			document.getElementById('second').className = 'inactive';
			document.getElementById('third').className = 'inactive';
			
		}
		if (tab == "releases"){
			document.getElementById('genre-scroll').style.display = "none";
			document.getElementById('releases-scroll').style.display = "block";
			document.getElementById('category-scroll').style.display = "none";
			document.getElementById('first').className = 'inactive';
			document.getElementById('second').className = 'inactive';
			document.getElementById('third').className = 'active';
			
		}			
	}				

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Search
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadSearch(search_str) {
		document.getElementById('header-main').innerHTML = 'Search Results For: "'+ search_str+'"';
		ajaxRequest(siteURL + '/_includes/ajax-topsongs.php?seltab=search&str=' + search_str, 'scroll');
	}	

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load Genre
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadGenre(id, header) {
		document.getElementById('header-main').innerHTML = header;
		ajaxRequest(siteURL + '/_includes/ajax-topsongs.php?seltab=genre&genre=' + id, 'scroll');
	}				

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load For Sale
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadForSale(id) {		
		document.getElementById('header-main').innerHTML = 'Songs For Sale';
		ajaxRequest(siteURL + '/_includes/ajax-topsongs.php?seltab=forsale', 'scroll');
}				

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load For License
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadForLicense(id) {
		document.getElementById('header-main').innerHTML = 'Songs For License';		
		ajaxRequest(siteURL + '/_includes/ajax-topsongs.php?seltab=forlicense', 'scroll');
	}				

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load For License
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadAlbum(id, genre) {
		document.getElementById('header-main').innerHTML = 'Artist/Album Information';		
		ajaxRequest(siteURL + '/_includes/ajax-album.php?seltab=genre&genre='+genre+'&type=album&id_album=' + id, 'right');
	}	
	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load For License
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadAlbumFor(id, seltab) {
		document.getElementById('header-main').innerHTML = 'Artist/Album Information';		
		ajaxRequest(siteURL + '/_includes/ajax-album.php?seltab='+seltab+'&type=album&id_album=' + id, 'right');
	}
	
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load Album For Search
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadAlbumSearch(id, str) {
		document.getElementById('header-main').innerHTML = 'Artist/Album Information';		
		ajaxRequest(siteURL + '/_includes/ajax-album.php?seltab=search&type=album&id_album=' + id+'&str=' + str, 'right');
	}

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load For License
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadSong(id, type) {
		document.getElementById('header-main').innerHTML = 'Artist/Album Information';		
		ajaxRequest(siteURL + '/_includes/ajax-album.php?seltab='+type+'&type=song&id_song=' + id, 'right');
	}				

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| Load Navigation Menu 
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

	function loadNavigation() {
		ajaxRequest(siteURL + '/_includes/ajax-musicbox.php?seltab=genre', 'flash-musicplayer');
	}	


//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||
//-=-=-=-=-=-=-=|| 
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=||

