// JavaScript Document
<!--
FRAMESET_TEMPLATE =
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">\
<html>\
<head>\
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\
<title>CEAMEG :: Sistema Gr&aacute;fico Georeferenciado de Indicadores de G&eacute;nero</title>\
<script language="JavaScript">\
window.name="ParentWindow";\
</script>\
</head>\
<frameset rows="*,610,*" frameborder="no" border="0" framespacing="0">\
  <frame src="IDF/FRM/FMTP.htm" name="FMTP" frameborder="no" scrolling="no" noresize id="FMTP">\
  <frameset cols="*,1010,*" frameborder="no" border="0" framespacing="0">\
		<frame src="IDF/FRM/FMLF.htm" name="FMLF" frameborder="no" scrolling="no" noresize id="FMLF">\
		<frame src="__CONTENT_FRAME_URL__" name="FMMain" frameborder="no" scrolling="no" noresize id="FMMain">\
		<frame src="IDF/FRM/FMRG.htm" name="FMRG" frameborder="no" scrolling="no" noresize id="FMRG">\
  </frameset>\
  <frame src="IDF/FRM/FMBT.htm" name="FMBT" frameborder="no" scrolling="no" noresize id="FMBT">\
</frameset>\
</html>';

PARENTED_FLAG = "?a";

if( location.search != PARENTED_FLAG ){
   if (location.href.search(/#/i)==-1) {
	 var FMMainUrl = location.href + PARENTED_FLAG;
   }
   else {
	 var theLink = location.href.substring(location.href.lastIndexOf("/") + 1,location.href.lastIndexOf("#"));
	 var theMarca = location.href.substring(location.href.lastIndexOf("#"),location.href.length);
	 var FMMainUrl = theLink + PARENTED_FLAG + theMarca;
   }
   var framesetHtml = FRAMESET_TEMPLATE.
       replace(/__CONTENT_FRAME_URL__/, FMMainUrl);
   document.write(framesetHtml);
   document.close();
}
//-->

