//<!-- JavaScript Document
var posx;
var posy;	
var panes = new Array();

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_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_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 ocultamenu(subm) {
    var menu = document.getElementById(subm);
    var i = 0;
    if ( menu!= null )  menu.style.display = "block";    
    nul = 12;
    for ( i = 1; i <= nul; i++ ) { 
        var submenu="sub" + i;             
        var menu1 = document.getElementById(submenu);
        if (menu1 != null && submenu!=subm) {
            menu1.style.display = "none";            
        }
    }//for
}

function despliega(subm) {
    var menu = document.getElementById(subm);    
    if(menu.style.display == "none"){
      menu.style.display = "block";
    }
    else{
        menu.style.display = "none";
    }
    //Cantidad de Submenus
    nul = 12;
    for (i = 1; i <= nul; i++) {
	var submenu="sub" + i;        
	var menu1 = document.getElementById(submenu);
	if (menu1 != null && submenu!=subm){        
            menu1.style.display = "none";       
	}
    }//for
}

function setuppanes(containerId, defaultTabId) {
    // go through the DOM, find each tab-container
    // set up the panes array with named panes
    // find the max height, set tab-panes to that height
    panes[containerId] = new Array();
    var maxHeight = 0; var maxWidth = 0;

//containerId
    var container = document.getElementById(containerId);
    var paneContainer = container.getElementsByTagName("div")[0];
    var paneList = paneContainer.childNodes;
    for (var i=0; i < paneList.length; i++ ) {
        var pane = paneList[i];
        if (pane.nodeType != 1) continue;
        if (pane.offsetHeight > maxHeight) maxHeight = pane.offsetHeight;
        if (pane.offsetWidth  > maxWidth ) maxWidth  = pane.offsetWidth;
        panes[containerId][pane.id] = pane;
        pane.style.display = "none";
    }
    paneContainer.style.height = maxHeight + "px";
    paneContainer.style.width  = maxWidth + "px";
	if (defaultTabId!="")
	    document.getElementById(defaultTabId).onclick();
}

function showpane(paneId, activeTab) {
    // make tab active class
    // hide other panes (siblings)
    // make pane visible
    // work out which container this tab is part of. could also bounce on parent node
    for (var con in panes) {                
        if (panes[con][paneId] != null) { // tab and pane are members of this container
            var pane = document.getElementById(paneId);
            pane.style.display = "block";
            var container = document.getElementById(con);
          /*  var tabs = container.getElementsByTagName("ul")[0];
            var tabList = tabs.getElementsByTagName("a")
            for (var i=0; i<tabList.length; i++ ) {
                var tab = tabList[i];
                if (tab != activeTab) tab.className = "tab-disabled";
            }*/
            for (var i in panes[con]) {
                var pane = panes[con][i];
                if (pane == undefined) continue;
                if (pane.id == paneId) continue;
                pane.style.display = "none"
            }
        }
    }
    return false;    
}


function go(panel) {
    showpane(panel, this);	
}

function ventana(ref,targ) {
    window.open(ref,targ,"width=640,height=480,top=0,left=0,resizable=1");    
}

function ventanaTarifario (ref,targ,ancho,alto) {    
    window.open(ref,targ,"width="+ancho+",height="+alto+",top=0,left=0,resizable=1,scrollbars=1");
}

function showTarjeta (ruta) {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="420" height="295">');
    document.write('<param name="movie" value="'+ruta+'flash/tarjeta/tarjeta.swf">');
    document.write('<param name="quality" value="high">');                                                                    
    document.write('<embed src="'+ruta+'flash/tarjeta/tarjeta.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="420" height="295"></embed> ');
    document.write('</object>');
}

function showMapaAgencias(ruta) {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="425" height="410">');
    document.write('<param name="movie" value="'+ruta+'flash/agencia/MapaGrande.swf">');
    document.write('<param name="quality" value="high">');                                                                    
    document.write('<embed src="'+ruta+'flash/agencia/MapaGrande.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="425" height="410"></embed> ');
    document.write('</object>');
}

function showSorteo(ruta) {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="400" height="300">');
    document.write('<param name="movie" value="'+ruta+'prom/sorteo.swf">');
    document.write('<param name="quality" value="high">');                                                                    
    document.write('<embed src="'+ruta+'prom/sorteo.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="400" height="300"></embed> ');
    document.write('</object>');
}

function showDiaMadre(ruta) {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="420" height="300">');
    document.write('<param name="movie" value="'+ruta+'prom/diamadre.swf">');
    document.write('<param name="quality" value="high">');                                                                    
    document.write('<embed src="'+ruta+'prom/diamadre.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="420" height="300"></embed> ');
    document.write('</object>');
}

function showObjetoFlash(pathObjetoFlash, ancho, alto) {    
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=' +									
        '"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ' + 
        'width="' + ancho + '" height="' + alto + '" align="middle">' +
        '<param name="allowScriptAccess" value="sameDomain" />' +
        '<param name="movie" value="'+ pathObjetoFlash +'" /><param name="quality" value="high" /><param name="bgcolor" ' +
        'value="#ffffff" /><embed src="'+ pathObjetoFlash +'" quality="high" bgcolor="#ffffff" width="' + ancho + '" height="' + alto + '" ' +
        'align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" ' +
        'pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
        '</object>');
}

/*function showcabecera(ruta){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="710" height="100">');
    //document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="710" height="100">');
    document.write('<param name="movie" value="'+ruta+'flash/cabecera/cab_carg.swf">');
    document.write('<param name=quality value=high>');
    //document.write('<embed src="'+ruta+'flash/cabecera/cab_carg.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="710" height="100"></embed> ');
    document.write('<embed src="'+ruta+'flash/cabecera/cab_carg.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="710" height="100"></embed> ');
    document.write('</object>');    
}*/

//-->
