function getX(obj){ return (obj.x) ? obj.x : getPos(obj,"Left"); }
function getY(obj){ return (obj.y) ? obj.y : getPos(obj,"Top"); }

function getPos(obj,which) {
	iPos = 0;
		  while (obj != null) {
		  iPos += obj["offset" + which];
		  obj = obj.offsetParent;
		 } 
 	return iPos;
}

function getXY(img){ 
	
	var tmargin = 0;
	var lmargin = 0;
	
	if ((version.indexOf('Mac') != -1) && (browser == "Microsoft Internet Explorer")) {
		tmargin =  eval(document.body.topMargin);
		lmargin =  eval(document.body.leftMargin);
		myObject = document.getElementById(img);
		x_coord = xPos = getX(myObject) + lmargin;
		y_coord = yPos = getY(myObject) + tmargin;
	}	

	else if (document.getElementById){
		myObject = document.getElementById(img);
		x_coord = xPos = getX(myObject);
		y_coord = yPos = getY(myObject);
	}

	else if (document.all) {
		var doc =eval('document.all.'+img);
		myObject=doc;
		x_coord = xPos = getX(myObject);
		y_coord = yPos = getY(myObject);
	}  
	 
	else if (document.layers){
	   x_coord = xPos = document.images[img].x;
	   y_coord = yPos = document.images[img].y;
	}
}

getXY("img_a");

if (document.layers){
window.captureEvents(Event.RESIZE) ;
window.onresize = WinResized ;
}
else if (document.all){
window.onresize = WinResized ;
}
else if (window.addEventListener){
window.addEventListener("resize" , WinResized , false);
}

function WinResized() { location.reload(); }

