function montre(id) {
var d = document.getElementById(id);
 for (var i = 1; i<=10; i++) {
  if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
 }
if (d) {d.style.display='block';}
}

function checkFields() {
missinginfo = "";
if (document.pedsec.nombre.value == "") {
missinginfo += "\n     -  No digitó su nombre";
}
if ((document.pedsec.email.value == "") || 
(document.pedsec.email.value.indexOf('@') == -1) ||
(document.pedsec.email.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Email incorrecto o en blanco";
}

if (document.pedsec.ciudad.value == "") {
missinginfo += "\n     -  Se requiere la ciudad donde vive";
}

if (document.pedsec.tel.value == "") {
missinginfo += "\n     -  Se requiere su teléfono";
}

if (document.pedsec.numwes.value == "") {
missinginfo += "\n     -  Se requiere el código de Paypal";
}

if (document.pedsec.pedido.value == "") {
missinginfo += "\n     -  Se requiere el listado de Midis";
}

/*
if ((document.pedsec.website.value == "") ||
(document.pedsec.website.value.indexOf("http://") == -1) ||
(document.pedsec.website.value.indexOf(".") == -1)) {
missinginfo += "\n     -  Web site";
}

if(document.pedsec.comments.value == "") {
missinginfo += "\n     -  Comentarios";
}
*/

/*
str = new String("document.pedsec.numwes")
if (str.search(/(0-9)+/) == -1)
{
missinginfo += "\n     -  Número de Wertern Union incorrecto o en blanco";
}*/


if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"Información inválida:\n" +
missinginfo + "\n_____________________________" +
"\nPor favor, corrija e intente de nuevo!";
alert(missinginfo);
return false;
}
else return true;
}

function limitText(limitField, limitCount, limitNum) {
 if (limitField.value.length > limitNum) {
  limitField.value = limitField.value.substring(0, limitNum);
 } else {
  limitCount.value = limitNum - limitField.value.length;
 }
}


function IsNumeric(sText)
{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;

   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }

/*function checkData() {
var correct = true
if (document.pedsec.nombre.value == "") {correct = false; alert("No ingresó su nombre.")}
if (document.pedsec.email.value == "") {correct = false; alert("No ingresó su email.")}
if (document.pedsec.numwes.value.length == 10) {correct = true;}
else {correct= false;alert("El número de WU no es válido.")}
if (correct){alert("Datos completos. Pulse OK para enviar la forma")}
return correct
}*/

function tocar(nombre){
nueva = window.open ("", "Crescendo", "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizeable=no,copyhistory=no,width=230,height=100")
nueva.document.open()
nueva.document.write("<center>")
nueva.document.write("<body bgcolor='#FFFFFF'  text='#000000'></body>")
nueva.document.write("<table border='0'>")
nueva.document.write("<tr>")
nueva.document.write("<td valign='middle' align='center' bgcolor='oldlace'>")
nueva.document.write("<embed name=ac_tema src=" + nombre + " width=200 height=50 autostart=true loop =false >")
nueva.document.write("</td>")
nueva.document.write("</tr>")
nueva.document.write("</table>")
nueva.document.write("</center>")
nueva.document.close()
}

function nover(){
objeto["divtag"].objHide()
}

/*
//Escrito por Jorge Villamizar
var strfecha=""
//Array meses y días
meses=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre",
"Octubre","Noviembre","Diciembre"];
dias=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]
fecha=new Date()
mes=fecha.getMonth()
dia=fecha.getDate()
ds=fecha.getDay()
ano=fecha.getFullYear()
eldia=dias[ds]

//Poner nombres en español
for (j=0;j<meses.length;j++){
if (mes==j) {elmes=meses[j]}
}

strfecha="&#160;&#160;&#160;&#160;" + eldia  + " " + dia + " de " + elmes + " de " + ano + ". Este sitio está diseñado para resolución 1280x1024 y Explorer 5.0+"
document.write(strfecha)
// End hiding -->*/

function tema(nombre){
document.location.href=nombre
}

function nuevaven(url){
nueva=window.open(url,"ventana","menubar=yes,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,height=480,width=640")
}

function webmaster() {
document.write ("<div class=\"copyr\">\r\n");
document.write ("Derechos reservados. (c) Jorge Villamizar 2010. Webmaster: <a href=\"http://www.prolatin.com\">Prolatin</a>\r\n");
document.write ("</div>\r\n");
}

function mp3(nombre,rpt,width,heigth){
if (GetBrowser() == "Netscape")
 NE(nombre,rpt,width,heigth);  
if (GetBrowser() == "IE") 
 IE(nombre,rpt,width,heigth);
if (navigator.appName.substring(0,5) == "WebTV")
 WTV(nombre,rpt,width,heigth)
}

function IE(nombre,rpt,width,height){
CodeGen = "" 
var mediaURL,rpt,width,height
nueva = window.open ("", "Crescendo", "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizeable=no,copyhistory=no,width=370,height=130,top=120,left=0")
nueva.document.open()
nueva.document.write("<html><head><title>" + "Super Midi Latino" + "</title>")
nueva.document.write("<center>")
nueva.document.write("<body bgcolor='#669999'  text='#000000'></body>")
nueva.document.write("<table border='0' align='center'>")
nueva.document.write("<tr>")
nueva.document.write("<td valign='middle' align='center' bgcolor='oldlace' ")
CodeGen = '<object id=Player' + '\n' ;
CodeGen += 'codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902' + '\n' ;
CodeGen += 'type=application/x-oleobject height=' + height + ' width=' + width + '\n' ;
CodeGen += ' standby="Loading Microsoft® Windows® Media Player components..." ' + '\n' ;
CodeGen += 'classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"> ' + '\n' ;
CodeGen += '<param NAME="Filename" VALUE="' + nombre + '">' + '\n' ;
CodeGen += '<param NAME="ShowStatusBar" VALUE= "true">';
CodeGen += '<param NAME="autoStart" VALUE="true"><param NAME="Volume" VALUE="0">' + '\n' ;
CodeGen += '<param NAME="playCount" VALUE=' + rpt + '></object>'
nueva.document.write("</td>")
nueva.document.write("</tr>")
nueva.document.write("</table>")
nueva.document.write("</center>")
nueva.document.write(CodeGen)
nueva.document.close()
}

function NE(nombre,rpt,width,height){
CodeGen = "" 
var mediaURL,rpt,width,height
nueva = window.open ("", "Crescendo", "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizeable=no,copyhistory=no,width=370,height=130,top=120,left=0")
nueva.document.open()
nueva.document.write("<html><head><title>" + "Super Midi Latino" + "</title>")
nueva.document.write("<center>")
nueva.document.write("<body bgcolor='#669999'  text='#000000'></body>")
nueva.document.write("<table border='0' align='center'>")
nueva.document.write("<tr>")
nueva.document.write("<td valign='middle' align='center' bgcolor='oldlace' ")
CodeGen = '<embed type="application/x-mplayer2" ' + '\n' ;
CodeGen = CodeGen + ' pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" ' + '\n' ;
CodeGen = CodeGen + 'Name="MediaPlayer" ' + 'src="' + nombre + '" ' + '\n' ;
CodeGen = CodeGen + 'autoStart=1 ' ;
CodeGen = CodeGen + 'ShowStatusBar=1 '; 
CodeGen = CodeGen + 'playCount=' + rpt + ' ' ;
CodeGen = CodeGen + 'volume=0 ' ;
CodeGen = CodeGen + 'WIDTH=' + width + ' HEIGHT=' + height + '>'
nueva.document.write("</td>")
nueva.document.write("</tr>")
nueva.document.write("</table>")
nueva.document.write("</center>")
nueva.document.write(CodeGen)
nueva.document.close()
}

function WTV(nombre,rpt,width,heigth){
CodeGen = ""
var nombre,rpt,width,height
nueva = window.open ("", "Crescendo", "toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizeable=no,copyhistory=no,width=370,height=130,top=120,left=0")
nueva.document.open()
nueva.document.write("<html><head><title>" + "Demos Super Midi Latino" + "</title>")
nueva.document.write("<center>")
nueva.document.write("<body bgcolor='#669999'  text='#000000'></body>")
nueva.document.write("<table border='0' align='center'>")
nueva.document.write("<tr>")
nueva.document.write("<td valign='middle' align='center' bgcolor='oldlace' ")
CodeGen = '<embed src="' + nombre + '"' + '\n' ;
CodeGen += ' height=' + height + ' width=' + width + ' autostart="true"' + '\n'
CodeGen += ' LOOP=' + rpt + '>'
nueva.document.write("</td>")
nueva.document.write("</tr>")
nueva.document.write("</table>")
nueva.document.write("</center>")
nueva.document.write(CodeGen)
nueva.document.close()
}

function GetBrowser(){
   var agt=navigator.userAgent.toLowerCase();
   if( ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)) )
       return "IE";
   else if( ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
         && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
         && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)) )
       return "Netscape";
   else
       return "unknown";
}

