function createRequestObject(){
	var request_o; //declare the variable to hold the object.
	var browser = navigator.appName; //find the browser name
	if(browser == "Microsoft Internet Explorer"){
		/* Create the object using MSIE's method */
		request_o = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		/* Create the object using other browser's method */
		request_o = new XMLHttpRequest();
	}
	return request_o; //return the object
}
var curr_type='';
function startReleases(type, index){
	curr_type = type;
	getReleases(type);
	getReleaseInfo(index);
}
function getReleases(type) {
	document.getElementById('release_info').innerHTML='';
	for(i=1; i<4; i++){
		document.getElementById('l'+i).style.fontSize = '14';
		document.getElementById('l'+i).style.fontWeight = 'normal';
	}
	document.getElementById('l'+type).style.fontSize = '16';
	document.getElementById('l'+type).style.fontWeight = 'bold';
	curr_type = type;
	http = createRequestObject(); 
	var myurl = 'http://www.agitpoprecords.com/scripts/getReleases.php'; 
	http.open("GET", myurl+"?typ="+type);
	http.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	http.onreadystatechange = useHttpResponse;
	http.send(null);
} 

function useHttpResponse() {
    if (http.readyState == 4) {
      var textout = http.responseText;
	  document.getElementById('releases_list').innerHTML=textout;
    }
}

function getReleaseInfo(index){
	http_1 = createRequestObject(); 
	var myurl = 'http://www.agitpoprecords.com/scripts/getReleaseInfo.php'; 
	http_1.open("GET", myurl+"?index="+index+"&typ="+curr_type);
	http_1.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	http_1.onreadystatechange = useHttpResponse_1;
	http_1.send(null);
}

function useHttpResponse_1() {
  if (http_1.readyState == 4) {
    var textout = http_1.responseText;
	document.getElementById('release_info').innerHTML=textout;
  }
}

function setSize(){
	if(navigator.appName == "Microsoft Internet Explorer"){
		document.getElementById('releases_list').style.height='310';
		document.getElementById('release_info').style.height='350';
	}
	else{
		document.getElementById('releases_list').style.height='';
		document.getElementById('release_info').style.height='';
	}
}