function read_url(url) {
    var res = '';
    if (url[0] != '/') url = '/' + url;
    url = location.protocol + "//" + location.host + url;
	if (typeof(java) == 'object') {
		//if (location.host == '' && url.indexOf(location.protocol) == -1 || url.indexOf(location.host) == -1)  {
			//netscape.security.PrivilegeManager.enablePrivilege('UniversalConnect');
		//	return "";
		//}
		var dest = new java.net.URL(url);
		var dis = new java.io.DataInputStream(dest.openStream());
		while ((line = dis.readLine()) != null) {
			res += line;
			res += java.lang.System.getProperty('line.separator');
		}
		dis.close();
      dis = null;
      dest = null;
	} else {
		var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
   		xmlhttp.open("GET", url, false);
		xmlhttp.send(null);
		res = xmlhttp.responseText;
	}
	return res;
}

