// JavaScript Document
function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

<!--
function FindObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=FindObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ChangeProp(objName,x,theProp,theValue) { //v6.0
var obj = FindObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
if (theValue == true || theValue == false)
eval("obj."+theProp+"="+theValue);
else eval("obj."+theProp+"='"+theValue+"'");
}
}
// FUNCION PARA AUMENTAR EL CUERPO DEL TEXTO //
function LoadActualFontSize() {
tempArray = document.cookie.split(";");
for (tA = 0; tA < tempArray.length; tA++){
if (tempArray[tA].indexOf('fontSize') > -1){
fontSizeValue = tempArray[tA].split("=")
FUENTE_ACTUAL = parseInt(fontSizeValue[1]);
}
}
}
function SaveActualFontSize() {
var expire = new Date ();
expire.setTime (expire.getTime() + (6000 * 24 * 3600000));
expire = expire.toGMTString();
document.cookie="fontSize="+FUENTE_ACTUAL+"; path=/; expires="+expire;
}
function MasTxt() {
FUENTE_ACTUAL = FUENTE_ACTUAL+2;
if (FUENTE_ACTUAL > FUENTE_MASGRANDE) { FUENTE_ACTUAL = FUENTE_MASGRANDE }
ChangeProp('texto','','style.fontSize',FUENTE_ACTUAL,'SPAN');
SaveActualFontSize();
}
function MenosTxt() {
FUENTE_ACTUAL = FUENTE_ACTUAL-2
if (FUENTE_ACTUAL < FUENTE_MASPEQUENA) { FUENTE_ACTUAL = FUENTE_MASPEQUENA }
ChangeProp('texto','','style.fontSize',FUENTE_ACTUAL,'SPAN');
SaveActualFontSize();
}
function IgualTxt() {
FUENTE_ACTUAL = FUENTE_DEFAULT
ChangeProp('texto','','style.fontSize',FUENTE_ACTUAL,'SPAN');
SaveActualFontSize();
}
FUENTE_DEFAULT = 13;
FUENTE_ACTUAL = 13;
FUENTE_MASPEQUENA = 9;
FUENTE_MASGRANDE = 21;
//-->
	sAgent = navigator.userAgent;
	bIsMac = sAgent.indexOf("Mac") > -1;    
	bIsIE = sAgent.indexOf("MSIE") > -1;
	bIsNN = sAgent.indexOf("MSNN") > -1;
	bIsIE4 = sAgent.indexOf("IE 4") > -1;
	bIsIE5 = sAgent.indexOf("IE 5")  > -1;
	bIsIE6 = sAgent.indexOf("IE 6")  > -1;
	bIsNav = sAgent.indexOf("Mozilla") > -1 && !bIsIE;
	bDoesAll = (bIsIE4 || bIsIE5 || bIsIE6) && !bIsMac && !bIsNN;

function tabela(objMenu) {
			if (bDoesAll | bIsMac) {
					if (objMenu.style.display == "none") {
							objMenu.style.display = "";
				
					}
					else {
							objMenu.style.display = "none";
					}
			}
	}
function popDiscador(){
		window.open('http://www.viavale.com.br/gaz/discador','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=240,height=264,top=0,left=0');
	}

function mkact(form)
	{
		form.action+=form.edicao.options[form.edicao.options.selectedIndex].value
		form.submit()
	}
function imageLoad(imageLocation, title)
{
	if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
	if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";


	var ImageWindow = window.open("", "imageWindow", "toolbar=0,location=0,directories=0,status=0,menubar=0,width=450,height=50,top=50,left=50,resizable=no")

	ImageWindow.document.close()
	ImageWindow.resizeTo(450,50)
	ImageWindow.focus()

	ImageWindow.document.write("<HTML>\n")
	ImageWindow.document.write("<TITLE>"+title+"</TITLE>\n\n")
	ImageWindow.document.write("<HEAD>\n\n")

	ImageWindow.document.write("<SCRIPT LANGUAGE=\"JavaScript\">\n")
	ImageWindow.document.write("<!--\n")
	ImageWindow.document.write("function resizeOnLoad(imageLocation)\n")
	ImageWindow.document.write("{\n")
	if(OSName == "Windows")
	{
		ImageWindow.document.write("	picture = new Image()\n")
		ImageWindow.document.write("	picture.src = \""+imageLocation+"\"\n")
		ImageWindow.document.write("	picHeight = picture.height + 65\n")
		ImageWindow.document.write("	picWidth = picture.width + 30\n")
		ImageWindow.document.write("	window.resizeTo(picWidth,picHeight)\n")
		ImageWindow.document.write("	document.close()\n")
		ImageWindow.document.write("	document.write(\"<HTML>\")\n")
		ImageWindow.document.write("	document.write(\"<TITLE>"+title+"</TITLE>\")\n")
		ImageWindow.document.write("	document.write(\"<BODY BGCOLOR='FFFFFF'>\")\n")
		ImageWindow.document.write("	document.write(\"<FONT FACE='Verdana'\>\")\n")
		ImageWindow.document.write("	document.write(\"<IMG SRC='"+imageLocation+"'>\")\n")
	}
	else
	{
		ImageWindow.document.write("	  imageHeight = document.images[0].height + 30\n")
		ImageWindow.document.write("	  imageWidth = document.images[0].width + 20\n")
		ImageWindow.document.write("	  document.close()\n")
		ImageWindow.document.write("	  document.write(\"<HTML>\")\n")
		ImageWindow.document.write("	  document.write(\"<TITLE>"+title+"</TITLE>\")\n")
		ImageWindow.document.write("	  document.write(\"<BODY BGCOLOR='FFFFFF'>\")\n")
		ImageWindow.document.write("	  document.write(\"<IMG SRC='"+imageLocation+"'>\")\n")
		ImageWindow.document.write("	  resizeTo(imageWidth, imageHeight)\n")
	}
	ImageWindow.document.write("}\n")
	ImageWindow.document.write("-->\n\n")
	ImageWindow.document.write("</"+"SCRIPT>\n")
	ImageWindow.document.write("</HEAD>\n\n")

	ImageWindow.document.write("<BODY BGCOLOR=\"ffffff\">\n")
	ImageWindow.document.write("<FONT FACE=\"Verdana\" COLOR=\"ffffff\" SIZE=\"2\">\n")
	ImageWindow.document.write("<B>Espere alguns segundos até finalizar a carga da imagem</B>\n")
	ImageWindow.document.write("<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>\n")
	ImageWindow.document.write("<IMG SRC=\""+imageLocation+"\" onLoad=\"resizeOnLoad('"+imageLocation+"')\">\n")
	ImageWindow.document.write("</BODY>\n")
	ImageWindow.document.write("</HTML>\n")

}
