
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}	


function roundedMapNoTitle(ttop,tleft,twidth,theight,tspace,tname,tsrc, bgColor)
{
	var result = "";
	
	var htcorner = 52;
	var hbcorner = 12;
	var wcorner = 10;
	var hline = 3;
	var bHeight = 0;
	var xWidth = 6;
	
	result += "<table border='0' cellspacing='0' cellpadding='0' style='position: absolute; width:"+(twidth+xWidth)+"px; height:"+theight+"px; margin-top: "+ttop+"px; margin-left: "+tleft+"px' >";
	
  result += "<tr valing='bottom'>";
  result += "<td class='mtl' width='"+wcorner+"px' height='"+htcorner+"px'></td>";
  result += "<td valign='bottom' class='mtc' ></td>";
  result += "<td class='mtr' width='"+wcorner+"px'></td>";
  result += "</tr>";

  result += "<tr>";
  result += "<td class='mbll' height='"+hline+"px'></td >";
  result += "<td class='mblc'></td>";
  result += "<td class='mblr'></td>";
  result += "</tr>";
  
	result += "<tr>";
	result += "<td class='mll' height='"+(theight-(htcorner+hbcorner+2*hline)-tspace)+"px'></td>";
	result += "<td class='mlc'>&nbsp;</td>";
	result += "<td class='mlr'></td>";
	result += "</tr>";
	
	result += "<tr>";
	result += "<td class='mbl' width='"+wcorner+"px' height='"+hbcorner+"px'></td>";
	result += "<td class='mbc'></td>";
	result += "<td width='"+wcorner+"px' class='mbr'></td>";
	result += "</tr>";
	
	result += "</table>";
	
  bHeight = (theight-(htcorner+hbcorner+2*hline)+tspace);
  bWidth = (twidth-2*wcorner);	
	
	result += "<iframe id='"+tname+"'name='"+tname+"' style='position:absolute;top:"+(ttop+htcorner-tspace)+"px;left:"+(tleft+wcorner)+"px;border: 5px solid #"+bgColor+";  background-color:"+bgColor+" ' width='"+bWidth+"px' height='"+bHeight+"px' src='"+tsrc+"' frameborder='0' scrolling='no' allowtransparency='true'></iframe>";	
	
	return result;
}

  function get_map_object() {
		try {
  		if (parent.map==null) {
  			if (window.opener.map!=null) return window.opener.myMap.map;
  		} else {
  			return parent.map.myMap.map;
  		}
    } catch(e) { return null; }
	}
	
