function equalcol() 
{

var leftcol = document.getElementById('navcol');
var contentcol = document.getElementById('contentcol');
var leftcolh = leftcol.offsetHeight;
var contentcolh = contentcol.offsetHeight;


if (leftcolh > contentcolh)
{
contentcol.style.height = leftcolh + "px"; 
}

else
{
leftcol.style.height = contentcolh + "px";
}

}

function artistselect()
{
var artistid = document.getElementById('artistselect').value;
var newlocation = 'artistdisplay.php?id='+artistid
window.location = newlocation
}



function createRequestObject() 
{
 var req;
 if(window.XMLHttpRequest)
 {
  // Firefox, Safari, Opera...
  req = new XMLHttpRequest();
 }
 else if(window.ActiveXObject) 
 {
  // Internet Explorer 5+
  req = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else 
 {
  // There is an error creating the object,
  // just as an old browser is being used.
  alert('There was a problem creating the XMLHttpRequest object');
 }
 return req;
}

// Make the XMLHttpRequest object
var http = createRequestObject();


function sendRequestPost(id, url, variable, div) 
{
 // Open PHP script for requests
 globaldiv = div;
 http.open('post', url);
 http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
 http.onreadystatechange = handleResponsePost;
 http.send(variable+'='+id);
}


function handleResponsePost() 
{
 if (http.readyState == 4 && http.status == 200)
 {
  // Text returned from PHP script
  var response = http.responseText;
  if(response) 
  {
   // Update ajaxTest2 content
   document.getElementById(globaldiv).innerHTML = response;
  }
 }
}




function cleardiv()
{
alert;
var response = "";
document.getElementById("navbox").innerHTML = response;

}


function opacity()
{
 var opacityval = 100;
 for (i = 0; i <= 25; i++)
 {
  opacityval = opacityval - 3;
  setTimeout('changeopacity('+opacityval+')',7*i);
 }
 setTimeout('document.getElementById("overlay").style.display = "block"',100);
}

function changeopacity(opacityval)
{
 document.getElementById("back").style.opacity = opacityval / 100
}

function enlarge(id)
{
url = "imagedisplay.php?id="+id;
window.open(url, '', 'scrollbars=yes, toolbar=no, width=800, height=2000')
}

function enlargetest(id, width)
{
sendRequestPost(id, "imagedisplay.php", "id", "overlay")
document.getElementById("artistselect").style.visibility = "hidden";
document.getElementById("overlay").style.visibility = "visible";
document.getElementById("box").style.opacity = .2
document.getElementById("box").style.filter = "alpha(opacity=20)"
document.getElementById("body").style.background = "#000000";
}

function closeimage()
{
document.getElementById("artistselect").style.visibility = "visible";
document.getElementById("overlay").style.visibility = "hidden";
document.getElementById("box").style.opacity = 1
document.getElementById("box").style.filter = "alpha(opacity=100)"
document.getElementById("body").style.background = "#5c5c5c";
var response = "";
document.getElementById("overlay").innerHTML = response;
}

function displaybio(imagename)
{
 var response = "<img src='artistimage/previewimage/"+imagename+"'>";
 document.getElementById("navbox").innerHTML = response;
}

function hoverover()
{
document.getElementById("controls").style.opacity = 1
document.getElementById("controls").style.filter = "alpha(opacity=100)"
}

function hoverout()
{
document.getElementById("controls").style.opacity = .65
document.getElementById("controls").style.filter = "alpha(opacity=65)"
}











