
var xmlhttp
var value
function loadXMLDoc(url)
{
// code for Mozilla, etc.
if (window.XMLHttpRequest)
  {
  xmlhttp=new XMLHttpRequest()
  xmlhttp.onreadystatechange=xmlhttpChange
  xmlhttp.open("GET",url,true)
  xmlhttp.send(null)
  }
// code for IE
else if (window.ActiveXObject)
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
    if (xmlhttp)
    {
    xmlhttp.onreadystatechange=xmlhttpChange
    xmlhttp.open("GET",url,true)
    xmlhttp.send()
    }
  }
}

function xmlhttpChange()
{
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4)
  {
  // if "OK"
  if (xmlhttp.status==200)
    {
    // ...some code here...
		  document.getElementById('tempContent').value = xmlhttp.responseText;
    }
  else
    {
    alert("Problem retrieving XML data")
    }
  }
}



function setArtist(){
  if (document.getElementById('tempContent').value == ""){
		 window.setTimeout("setArtist()", 2);
	}else{
	  document.getElementById('divContent').innerHTML = document.getElementById('tempContent').value;
		populate();
	}
		 document.getElementById('divContent').style.overflow = "hidden";
}

function loadArtistInfo(artist){
  document.getElementById('divContent').style.padding = "";
  document.getElementById('tempContent').value = "";
	 document.getElementById('divContent').style.overflow = "hidden";
	loadXMLDoc('getArtistInfo.php?ARTWORKS=1&artist='+artist);
		 document.getElementById('divContent').style.overflow = "hidden";
	setArtist();
}


function loadArtistInfoDetail(artist, artwork){
  document.getElementById('divContent').style.padding = "";
  document.getElementById('tempContent').value = "";
	 document.getElementById('divContent').style.overflow = "hidden";
	loadXMLDoc('getArtistInfo.php?ARTWORKINFO=1&artist='+artist+'&artwork='+artwork);
	setArtist();
}

function loadImageInfo(photo){
//  document.getElementById('divContent').style.padding = "";
//document.getElementById('tempContent').value = "";
//alert(photosH);
	
document.getElementById('photoMedium').src = photo;
//document.getElementById('photoMedium').setAttribute("onclick", "alert('d')");
//movableObject.setAttribute("class", "window");	

	//loadXMLDoc('getArtistInfo.php?IMAGEINFO=1&artist='+artist+'&artwork='+artwork+'&photo='+photo);
	//setArtist();
}



function loadLarge(url, LW, LH){
  url = url.replace("medium", "large");
	 windowOpen(LW, LH, url);
//	alert(url);
//	alert(photosW);
//	alert(photosH);
	
}

function windowOpen(width, height, url){
  var sw = parseInt(screen.width);
	var sh = parseInt(screen.height);
	
	var width = parseInt(width);
	var height = parseInt(height);
	
	windowHeight = height + 35;
	windowWidth = width + 25;	
		
	
	
	mid_sw = (sw / 2) - (width / 2);
	mid_sh = (sh / 2) - (height / 2);	
	
	
  myWindow = window.open("", "tinyWindow", 'toolbar=no,width='+windowWidth+',height='+windowHeight);
		 		 
  myWindow.document.write('<a href="javascript:window.close();" style="color:white;font-size:10px;font-weight:bold;"><img style="border:1px solid white;" src="'+url+'" width="'+width+'" height="'+height+'" border="0" alt=""><br>Sluiten</a>');
  myWindow.document.bgColor="black";
  myWindow.window.moveTo(mid_sw,mid_sh);
  myWindow.document.close();
}




/*
Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/

//Specify the marquee's width (in pixels)
var marqueewidth="200px"
//Specify the marquee's height
var marqueeheight="150px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=10
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='test'


////NO NEED TO EDIT BELOW THIS LINE////////////

marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
var actualheight=''
var cross_marquee, ns_marquee
var lefttime;
var loopt=0;

function leeg(){

}

function populate(){
 marqueewidth="200px"
//Specify the marquee's height
 marqueeheight="150px"
//Specify the marquee's marquee speed (larger is faster 1-10)
 marqueespeed=2
 marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
 copyspeed=marqueespeed;
 pausespeed=(pauseit==0)? copyspeed: 0
 actualheight='';
 cross_marquee='';
 ns_marquee='';

lefttime=setInterval("leeg()",20);
if (iedom){
  cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
  cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
  //cross_marquee.innerHTML=marqueecontent
  actualheight=cross_marquee.offsetHeight
}
else if (document.layers){
  ns_marquee=document.ns_marquee.document.ns_marquee2
  ns_marquee.top=parseInt(marqueeheight)+8
  ns_marquee.document.write(marqueecontent)
  ns_marquee.document.close()
  actualheight=ns_marquee.document.height
}
//clearTimeout('lefttime');
lefttime=setTimeout("scrollmarquee()",40)
}




function scrollmarquee(){

if (iedom){
  if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
     cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
  else
    cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
  }
else if (document.layers){
if (ns_marquee.top>(actualheight*(-1)+8))
ns_marquee.top-=copyspeed
else
ns_marquee.top=parseInt(marqueeheight)+8
}
lefttime=setTimeout("scrollmarquee()",40);
}


