document.include = function (url) 
  {
	if ('undefined' == typeof(url)) return false;
	var p,rnd;
	if (document.all){
		// For IE, create an ActiveX Object instance 
		p = new ActiveXObject("Microsoft.XMLHTTP");
	} else if (netscape){
		// For Netscape, create an instance of XMLHttpRequest.
		p = new XMLHttpRequest();
	} else {
		return false;
	}
	// Prevent browsers from caching the included page by appending a random number
	rnd = Math.random().toString().substring(2);
	url = url.indexOf('?')>-1 ? url+'&rnd='+rnd : url+'?rnd='+rnd;
	// Open the url and write out the response
	p.open("GET",url,false);
	p.send(null);
	document.write( p.responseText );
  }

// Netscape 4 doesn't not support XMLHttpRequest. 
// The following functions simulate its methods.
if (document.layers) {
	function open (method,url) {
	  this.url = url;
	  this.method = method;
	}
	
	function send () {
	  var line,buffer;
	  this.responseText = "";
	  buffer = new java.io.BufferedReader(new java.io.InputStreamReader(new java.net.URL("http",location.hostname, this.url).openStream()));
	  while ((line = buffer.readLine())!=null) this.responseText+=line + "\n";
	  if (buffer!=null) buffer.close();
	}

	function XMLHttpRequest() {
	  this.url = "";
	  this.responseText = "";
	  this.open = open;
	  this.send = send;
	}
}

	//document.include('test.html');
   