function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function getObj(name)
    {
      if (document.getElementById)
      {
      	this.obj = document.getElementById(name);
    		this.style = document.getElementById(name).style;
      }
      else if (document.all)
      {
    		this.obj = document.all[name];
    		this.style = document.all[name].style;
      }
      else if (document.layers)
      {
       	this.obj = document.layers[name];
       	this.style = document.layers[name];
      }
    }

function show(element) {
	var elemid = new getObj(element);
	elemid.style.display = 'inline';
} 

function hide(array) {
	for (i=0;i<array.length;i++){
		var elemid = new getObj('ship'+array[i]);
		elemid.style.display = 'none';
	}
} 


var http = createRequestObject();



function createRequestObject() {
   	var req;
	if(window.XMLHttpRequest){
      	req = new XMLHttpRequest();
   	} else if(window.ActiveXObject) {
    	req = new ActiveXObject("Microsoft.XMLHTTP");
   	} else {
		alert('Problem creating the XMLHttpRequest object');
   	}
   	return req;
}



function handleDivTag(divtag)
{
	var divtag;
	return divtag;
}



var http = createRequestObject();
var divhandler = new handleDivTag(null);

function sendRequest( action , act , divtag ) {
	http.open( action , 'http://www.boomsmashipping.nl/site/js/ajax.inc.php'+act , true);
	http.onreadystatechange = handleResponse;
	divhandler.divtag = divtag;
  http.send(null);
}

function handleResponse() {
	if(http.readyState == 4 && http.status == 200){
		var response = http.responseText;
		if(response) {
   		document.getElementById(divhandler.divtag).innerHTML = response;
   	}
 	}
} 








function load_ship_top( id ) {
	sendRequest( 'GET' , '?ship='+id , 'top' );
}