function setVariables()
{
	if (navigator.appName == "Netscape")
	{
		v1=".top=";
		dS1="document.";
		sD1="";
		y1="window.pageYOffset";

		v2=".left=";
		dS2="document.";
		sD2="";
		x2="window.pageXOffset";
	}
	else
	{
		v1=".pixelTop=";
		dS1="";
		sD1=".style";
		y1="document.body.scrollTop";

		v2=".pixelLeft=";
		dS2="";
		sD2=".style";
		x2="document.body.scrollLeft";
	}
}

function checkLocation()
{
	object1="ruler1";
	yy=eval(y1);
	eval(dS1+object1+sD1+v1+yy);

	object2="ruler2";
	xx=eval(x2);
	eval(dS2+object2+sD2+v2+xx);

	setTimeout("checkLocation()",10);
}

function showMap(i, url)
{
	window.open("/harti/index.aspx?id=" + i + "&url=" + url, "harta", "top=10,left=100,width=750,height=570,statusbar=yes,menubar=nu,scrollbars=no,toolbar=no,resizable=no");
}

function mapScroll(x,y)
{
	document.frames["map"].scrollBy(x,y);
}

function mapReset(x,y)
{
	document.frames["map"].scrollTo(x - 250,y - 250);
}

function mapPosition(e)
{
	// If it is not IE, we assume that the browser is NS.
	var IE = document.all?true:false;

	// Temporary variables to hold mouse x-y pos.s
	var tempX = 0;
	var tempY = 0;
	
  if (IE)
  { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;
  }
  else
  {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX;
    tempY = e.pageY;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}
  
  alert(tempX + "px, " + tempY + "px");
}