function getElementPosition(el){ var x=0; var y=0; while(el.offsetParent){ x+=el.offsetLeft; y+=el.offsetTop; el=el.offsetParent; } x+=el.offsetLeft; y+=el.offsetTop; return { x:x, y:y }; }
function showcreditos(abrir){
	var obj=document.getElementById("creditosIframe");
	if(abrir){
		var pos=getElementPosition(document.getElementById("_creditosBox")).y;
		obj.style.top=(pos-130)+"px";
		obj.style.left=(pos-0)+"px";
		obj.style.display="block";
		//window.scrollTo(0, pos-332);
	}else{
		obj.style.display="none";
	}
}

document.write("<iframe id=\"creditosIframe\" name=\"creditosIframe\" width=\"250\" height=\"110\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" scrolling=\"no\"></iframe>");


document.write("<link href=\"http://miguelmartini.com/css/creditos.css\" type=\"text/css\" rel=\"stylesheet\" />\
<div class=\"creditos_box_rss\" id=\"_creditosBox\">\
<div class=\"creditos_topo\">\
<div class=\"creditos_botoes\"><a href=\"#\" onclick=\"showcreditos(true); return false;\">Créditos</a></div><div class=\"creditos_topobox\">Copyright © - Deputado Federal Miguel Martini <br />Todos os direitos reservados</div>\
</div>\
</div>\
</div>");
var boxHTML="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html><head><link href=\"http://miguelmartini.com/css/creditos.css\" type=\"text/css\" rel=\"stylesheet\" />\
<style>html, body{ width: 100%; height: 100%; margin: 0px; padding: 0px; }</style></head><body>\
<div id=\"creditosOque\"><h1>\
<a href=\"#\" onclick=\"parent.showcreditos(false); return false;\">fechar</a>\
Créditos miguelmartini.com\
</h1>\
<div>\
Sistemas em PHP, diagramação, estrutura em tableless e design gráfico:<br /><strong> Maurício Lafourcade</strong>\
<br /><br />Conteúdo:<br /><strong> Gabinete Dep. Miguel Martini</strong>\
</div>\
</div>\
</body></html>";

try{
	var win=document.frames.creditosIframe;
}catch(e){
	var win=window.creditosIframe;
}
win.document.open();
win.document.write(boxHTML);
win.document.close();