function thisURL(url) {
	localurl = "/kidzworld";
	s = window.location.pathname;
	s = s.replace(/\/[A-Z]?:/i, "");
	s = s.replace(/\\/g, "/");
	if (s.slice(0, localurl.length) != localurl)
		return url;
	else {
		if (url.indexOf("/") == 0)		// relative to root
			s = s.slice(0, s.indexOf("/", localurl.length));
		else {												// relative to current directory
			s = s.slice(0, s.lastIndexOf("/") + 1);
			while (url.indexOf("../") == 0) {
				url = url.slice(3, url.length);
				if (s.lastIndexOf("/", s.length-2) >= localurl.length)
					s = s.slice(0, s.lastIndexOf("/", s.length-2) + 1);
			}
		}
		if (window.location.host == "")
			return (s + url);
		else
			return (window.location.protocol + "//" + window.location.host + s + url);
	}
}
function menuover(obj) {
  obj.style.background = "#006600";
}
function menuout(obj) {
  obj.style.background = "#FF9900";
}
function gotoURL(url) {
  window.location = thisURL(url);  
}
function GE_printPage(url)
{
  printWin = window.open(thisURL(url), 'printableWin','width=570,height=400,menubar=yes,toolbar=yes,scrollbars=yes');
  printWin.focus();
}
function viewPhoto(url) {
  url = "/gallery/" + url;
  swin = window.open(thisURL(url), "Gallery", "width=450,height=390,scrollbars=no,dependent=yes");
  swin.moveTo((screen.width-450)/2, (screen.height-390)/2);
  swin.focus();
}
function GE_findObj(obj, d) {
  var i, x; if (!d) d=document;
  x = d[obj]; for (i=0; !x && d.layers && i < d.layers.length; i++) x = GE_findObj(obj, d.layers[i].document);
  if (!x && d.getElementById) x = d.getElementById(obj); return x;
}
function gotoLink(obj) {
	obj = GE_findObj(obj.id + "b");
	window.location = obj.href;
}
function flashfix() {
  objects = document.getElementsByTagName("object");
  for (var i = 0; i < objects.length; i++) {
    objects[i].outerHTML = objects[i].outerHTML;
  }
}
