/*
This script enables web page to include text from other files.
*/

// Defining new prototype
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 {
   // For Mozilla, create an instance of XMLHttpRequest.
   p = new XMLHttpRequest();
 }
 // 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 );
}
