
function OpenImg(path,id) {

 if (path=='') return;

 var win = open('',id,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width=100,height=100');

 win.document.write("<html> \n");
 win.document.write("<head><title>Imagem Ampliada</title> \n");
 win.document.write("<style> \n");
 win.document.write("body{margin:10px;background-color:#e9eef4;} \n");
 win.document.write("</style> \n");
 win.document.write("<script language=\"JavaScript\"> \n");
 win.document.write("var isNN,isIE; \n");
 win.document.write("if (parseInt(navigator.appVersion.charAt(0))>=4){ \n");
 win.document.write("isNN=(navigator.appName==\"Netscape\")?1:0; \n");
 win.document.write("isIE=(navigator.appName.indexOf(\"Microsoft\")!=-1)?1:0;} \n");
 win.document.write("function reSizeToImage() { \n");
 win.document.write("   if (isIE){ \n");
 win.document.write("      window.resizeTo(100,100); \n");
 win.document.write("      width=860; \n");
 win.document.write("      height=640; \n");
 win.document.write("      window.resizeTo(width,height); \n");
 win.document.write("	  } \n");
 win.document.write("   if (isNN){ \n");
 win.document.write("      window.innerWidth=860; \n");
 win.document.write("      window.innerHeight=640;} \n");
 win.document.write("	  } \n");
 win.document.write("</script> \n");
 win.document.write("</head> \n");
 win.document.write("<body onload='reSizeToImage();'> \n");
 win.document.write('<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td height="100%" align="center" valign="middle">');
 win.document.write("<img name=\"id"+id+"\" src=\""+path+"\" alt=\"\" />\n");
 win.document.write('</td></tr></table>');
 win.document.write("</body> \n");
 win.document.write("</html> \n");

 win.document.close();
 win.focus();

 }

function OpenWin(url,id, w, h) {

  var win = open(url,id,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width='+w+',height='+h);
  win.focus();

 }

function SimpleSwap(el,which){
  el.src=el.getAttribute(which || "origsrc");
}

function SimpleSwapSetup(){
  var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++){
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
      
    // preload image
    // comment the next two lines to disable image pre-loading
    x[i].oversrc_img = new Image();
    x[i].oversrc_img.src=oversrc;
    // set event handlers
    x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    x[i].onmouseout = new Function("SimpleSwap(this);");
    // save original src
    x[i].setAttribute("origsrc",x[i].src);
  }
}

var PreSimpleSwapOnload =(window.onload)? window.onload : function(){};
window.onload = function(){PreSimpleSwapOnload(); SimpleSwapSetup();}

function incFSize() {
  var className = getClassName();
  if ('txt11' == className) {
    getObj('content').className = 'txt12';
  }
  else if ('txt12' == className) {
    getObj('content').className = 'txt13';
  }
  else if ('txt13' == className) {
    getObj('content').className = 'txt14';
  }
}

function decFSize() {
  var className = getClassName();
  if ('txt12' == className) {
    getObj('content').className = 'txt11';
  }
  else if ('txt13' == className) {
    getObj('content').className = 'txt12';
  }
  else if ('txt14' == className) {
    getObj('content').className = 'txt13';
  }
}

function getClassName() {
  return getObj('content').className;
}

function getObj(id) {
  return document.getElementById(id);
}