﻿// JScript File

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 changeFontSize( oDiv, newSize ) {
    obj = MM_findObj(oDiv);
	obj.style.fontSize = newSize + "px" ;
}

function getTotal(txtQuantidade, txtValor, txtDesconto, txtTotal) {
    Quantidade = getElementById(txtQuantidade);
    Valor = getElementById(txtValor);
    Desconto = getElementById(txtDesconto);
    Total = getElementById(txtTotal);

    Total.value = (Quantidade.value * Valor.value) - Desconto.value;
    

}

function  mostra_flash(id, src, width, height){
document.write ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="'+id+'">');
document.write ('<param name="allowScriptAccess" value="sameDomain" />');
document.write ('<param name="movie" value="'+src+'" />');
document.write ('<param name="quality" value="high" />');
document.write ('<param name="scale" value="noscale" />');
document.write ('<param name="wmode" value="transparent" />');
document.write ('<param name="devicefont" value="true" />');
document.write ('<param name="bgcolor" value="#ffffff" />');
document.write ('<embed src="'+src+'" quality="high" scale="noscale" wmode="transparent" devicefont="true" bgcolor="#ffffff" width="'+width+'" height="'+height+'" id="'+id+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write ('</object>')
}
function favoritos(){
var browser = navigator.appName
var bookmarkurl="http://www.pacaluz.com.br/"
var bookmarktitle="PACA LUZ"
if(browser=="Netscape"){
alert ("Press Control + D to add the site of PACA LUZ. in your bookmark")
}
else if(browser=="Microsoft Internet Explorer"){
window.external.AddFavorite(bookmarkurl,bookmarktitle)}
}



