//Lógica para la sección de soporte
 var node1,root;
 var idsel= -1;

function show(){
   //Traer imagenes
    ims = new Array(10);

   for(y=0;y<ims.length;y++)
      ims[y] = new Image();
  
    ims[3].src = path + "/images/eu.jpg";
    ims[4].src = path + "/images/co.jpg";
    ims[5].src = path + "/images/cl.jpg";
    ims[6].src = path + "/images/sp1.gif";
    ims[7].src = path + "/images/mw.gif";
    ims[8].src = path + "/images/mw2.gif";


  try{
     var ly1 = document.getElementById("sup1");
     node1 = ly1.cloneNode(true);
     root = ly1.parentNode;
     var new_node = ly1.cloneNode(false);

     //Construir nuevo documento
     var span = document.createElement("span");
         span.setAttribute("id","tit");
         span.appendChild(document.createTextNode("Clic en el país donde se encuentra:"));
         new_node.appendChild(span);
    for(i=0;i<3;i++){
     var txt1 = (i==0)?"eu.jpg":(i==1)?"co.jpg":"cl.jpg";
     var txt2 = (i==0)?"Estados Unidos":(i==1)?"Colombia":"Chile";
     var div = document.createElement("div");
         if(document.all){
               div.style.backgroundImage = "url(" + path + "/images/" + txt1 + ")";
               div.style.backgroundRepeat = "no-repeat";  
         }
         else{
              div.setAttribute("style","background:url(" + path + "/images/" + txt1 + ") no-repeat");
         }


     var a = document.createElement("a");
         a.setAttribute("href","javascript:showPhone(" + i + ");");
         a.setAttribute("title",txt2);
         a.setAttribute("id","co" + i);
         a.appendChild(document.createTextNode(txt2));
         div.appendChild(a); 
         new_node.appendChild(div); 
     }

     var img = document.createElement("img");
         img.setAttribute("src", path + "/images/sp1.gif");
         img.style.marginBottom = "0px";
         new_node.appendChild(img);
     var a = document.createElement("a");
         a.setAttribute("href","javascript:back();");
         a.setAttribute("title","Regresar");   
         img = document.createElement("img"); 
         img.setAttribute("src",path + "/images/mw2.gif");
         img.setAttribute("id","b0");
         img.style.display="inline";
         a.appendChild(img);
         new_node.appendChild(a);

         img = document.createElement("img");
         img.setAttribute("src",path + "/images/mw.gif");
         img.setAttribute("id","b1");
         img.style.display="inline";
         new_node.appendChild(img);

        root.replaceChild(new_node,ly1);

        ims[0].src = path + "/images/dt0.gif";
        ims[1].src = path + "/images/dt1.gif";
        ims[2].src = path + "/images/dt2.gif";
        ims[9].src = path + "/images/sp2.gif"; 
   }
   catch(exc){
       alert("Ocurrio el siguiente error interno: " + exc.message);
   }

}


 function showPhone(id){
   if(idsel>-1)document.getElementById("co"+idsel).style.color="#666";
   document.getElementById("b0").src = ims[9].src
   idsel = id;
   document.getElementById("co"+id).style.color = "#999";
   document.getElementById("b1").src = ims[id].src
 }

function back(){
     root.replaceChild(node1,document.getElementById("sup1"));
     root = null;
     node1 = null;
}