function setImage(doc, name, url) {
	var _o = null;
	_o = getObject(doc, name);
	if (_o) _o.src = url;
}

function getObject(d, n) {
	var p,i,x;
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
	}
	if(!d) {	// start at first doc in full tree...
		if(parent.frames.length) {
			d = top.frames[0].document;
		} else {
			d = top.document;
		}
	}
	if(!(x=d[n])&&d.all) {
		x=d.all[n];
	}
	for (i=0;!x&&i<d.forms.length;i++)
		x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++)
		x=getObject(d.layers[i].document, n);
	if(!x && d.getElementById)
		x=d.getElementById(n);

	return x;
}


function visi(nr)
{

if (document.layers)
	{
		vista = (document.layers[nr].visibility == 'hide') ? 'show' : 'hide'
		document.layers[nr].visibility = vista;
	}
	else if (document.all)
	{
		vista = (document.all[nr].style.visibility == 'hidden') ? 'visible'	: 'hidden';
		document.all[nr].style.visibility = vista;
	}
	else if (document.getElementById)
	{
		vista = (document.getElementById(nr).style.visibility == 'hidden') ? 'visible' : 'hidden';
		document.getElementById(nr).style.visibility = vista;

	}
}

 function getXML(url) {
 this.url = url;
}
 
getXML.prototype.setVariables = function(v) {
 this.variables = v;
}
 
getXML.prototype.onreadystatechange = function(o) {
 
 if (o.req.readyState == 4) { // ready
  if (o.req.status == 200) { // OK
    
   try { // all except of ie will do this when no xml/text header is present
    o.onReady(o.req.responseXML);
   } catch (e) {
 
    try {        //   old
     o.req.responseXML.async = "false";
     o.req.responseXML.loadXML(o.req.responseText);
     o.req.responseXML.loadXML(o.req.responseText);
     return o.onReady(o.req.responseXML);
    } catch (e) { }
   } 
  }
 }
}
 
getXML.prototype.execute = function() {
 
 if (window.XMLHttpRequest) {
  this.req = new XMLHttpRequest();
 } else if (window.ActiveXObject) {    // if IE
 
  var activeX = ["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];
  for(var i=0; i<activeX.length; i++){
   try {
    this.req = new ActiveXObject(activeX[i]);
   } catch(e) {
   }
  }
 }
 
 if (this.req) {
  var self = this; // onduidelijk waarom...
  this.req.onreadystatechange = function() { self.onreadystatechange(self);  }
  this.req.open('POST', this.url, true);
  try { this.req.overrideMimeType('text/xml'); } catch(e) { }; // override for firefox
  this.req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  this.req.send(this.variables);
 } else {
  alert('XMLHttpRequest is not supported on this platform');
 }
 
} 
