// JavaScript Document
val = new Array(4);
tblVal = new Array(4);
// ouvintes
val[0] = new Array(2); // 100
val[1] = new Array(2); // 200
val[2] = new Array(2); // 400
val[3] = new Array(2); // 1000
// 100 ouvintes
val[0][0] = "R$ 50,00
Auto DJ: 1500 MB"; // 100/64
val[0][1] = "R$ 75,00
Auto DJ: 1500 MB"; // 100/96
val[0][2] = "R$ 100,00
Auto DJ: 1500 MB"; // 100/128
// 200 ouvintes
val[1][0] = "R$ 50,00
Auto DJ: 3000 MB"; // 200/48
val[1][1] = "R$ 75,00
Auto DJ: 3000 MB"; // 200/64
val[1][2] = "R$ 100,00
Auto DJ: 3000 MB"; // 200/96
val[1][3] = "R$ 150,00
Auto DJ: 3000 MB"; // 200/128
// 400 ouvintes
val[2][0] = "R$ 50,00
Auto DJ: 5000 MB"; // 400/32
val[2][1] = "R$ 75,00
Auto DJ: 5000 MB"; // 400/48
val[2][2] = "R$ 100,00
Auto DJ: 5000 MB"; // 400/64
val[2][3] = "R$ 150,00
Auto DJ: 5000 MB"; // 400/96
val[2][4] = "R$ 200,00
Auto DJ: 5000 MB"; // 400/128
// 1000 ouvintes
val[3][0] = "R$ 125,00
Auto DJ: 10000 MB"; // 1000/32
val[3][1] = "R$ 150,00
Auto DJ: 10000 MB"; // 1000/48
val[3][2] = "R$ 200,00
Auto DJ: 10000 MB"; // 1000/64
val[3][3] = "R$ 250,00
Auto DJ: 10000 MB"; // 1000/96
val[3][4] = "R$ 350,00
Auto DJ: 10000 MB"; // 1000/128
// ##################### TABELA ############################
// ouvintes
tblVal[0] = new Array(2); // 100
tblVal[1] = new Array(2); // 200
tblVal[2] = new Array(2); // 400
tblVal[3] = new Array(2); // 1000
// 100 ouvintes
tblVal[0][0] = "R$ 50,00"; // 100/64
tblVal[0][1] = "R$ 75,00"; // 100/96
tblVal[0][2] = "R$ 100,00"; // 100/128
// 200 ouvintes
tblVal[1][0] = "R$ 50,00"; // 200/48
tblVal[1][1] = "R$ 75,00"; // 200/64
tblVal[1][2] = "R$ 100,00"; // 200/96
tblVal[1][3] = "R$ 150,00"; // 200/128
// 400 ouvintes
tblVal[2][0] = "R$ 50,00"; // 400/32
tblVal[2][1] = "R$ 75,00"; // 400/48
tblVal[2][2] = "R$ 100,00"; // 400/64
tblVal[2][3] = "R$ 150,00"; // 400/96
tblVal[2][4] = "R$ 200,00"; // 400/128
// 1000 ouvintes
tblVal[3][0] = "R$ 125,00"; // 1000/32
tblVal[3][1] = "R$ 150,00"; // 1000/48
tblVal[3][2] = "R$ 200,00"; // 1000/64
tblVal[3][3] = "R$ 250,00"; // 1000/96
tblVal[3][4] = "R$ 350,00"; // 1000/128
function calcula( valor )
{
var elSel = document.getElementById("ouvintes");
var qlSel = document.getElementById("qualidade");
document.getElementById("valor").innerHTML = val[elSel.selectedIndex][qlSel.selectedIndex];
}
function testQuality(port)
{
parent.frameteste.location.href = "http://www.maxrevenda.com.br/player.php?porta=" + port + "";
}
function abreAssinatura( max )
{
var id = document.getElementById("ouvintes").options[document.getElementById("ouvintes").selectedIndex].value;
switch(id){
case "2": document.location.href="http://central."+ max +".com.br/radio.asp?id=18"
break
case "3": document.location.href="http://central."+ max +".com.br/radio.asp?id=19"
break
case "4": document.location.href="http://central."+ max +".com.br/radio.asp?id=20"
break
default : document.location.href="http://central."+ max +".com.br/radio.asp?id=17"
}
}
function insereQualidade()
{
var elSel = document.getElementById("qualidade");
var olSel = document.getElementById("ouvintes");
var valor = olSel.options[olSel.selectedIndex].value;
var i;
var optsel = elSel.selectedIndex;
var opval = elSel.options[elSel.selectedIndex].value;
for ( i = elSel.length - 1; i >= 0; i-- )
{
elSel.remove(i);
}
var elOptNew32 = document.createElement("option");
elOptNew32.text = "32k";
elOptNew32.value = "32";
var elOptNew48 = document.createElement("option");
elOptNew48.text = "48k";
elOptNew48.value = "48";
var elOptNew64 = document.createElement("option");
elOptNew64.text = "64k";
elOptNew64.value = "64";
var elOptNew96 = document.createElement("option");
elOptNew96.text = "96k";
elOptNew96.value = "96";
var elOptNew128 = document.createElement("option");
elOptNew128.text = "128k";
elOptNew128.value = "128";
var elOptOld = elSel.options[0];
try {
if ( valor > 2 )
{
elSel.add(elOptNew32, elOptOld);
elSel.add(elOptNew48, elOptOld);
}
if ( valor == 2 )
{
elSel.add(elOptNew48, elOptOld);
}
elSel.add(elOptNew64, elOptOld);
elSel.add(elOptNew96, elOptOld);
elSel.add(elOptNew128, elOptOld);
}
catch(ex) {
if ( valor > 2 )
{
elSel.add(elOptNew32, 0); // IE only
elSel.add(elOptNew48, 1);
}
if ( valor == 2 )
{
elSel.add(elOptNew48, 2);
}
elSel.add(elOptNew64, 3);
elSel.add(elOptNew96, 4);
elSel.add(elOptNew128, 5);
}
for ( var j=0; j