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_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 MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) {;
       v=args[i+2];
       if (obj.style) {;
          obj=obj.style;
          v=(v=='show')?'visible':(v='hide')?'hidden':v;
    }
    obj.visibility=v; }
}

function menulateral(el_menu) { //v3.0
   var menuvisible=("menu" + el_menu + "?FR_LATERAL");

   MM_showHideLayers('menuempresa?FR_LATERAL','','hide',
                     'menuarquitectura?FR_LATERAL','','hide',
                     'menuinternet?FR_LATERAL','','hide',
                     'menumultimedia?FR_LATERAL','','hide',
                     'menucontacto?FR_LATERAL','','hide') ;

   MM_showHideLayers(menuvisible,'','show');
}


function rollover(el_boton) { //v3.0
   var elgif=("image/btn" + el_boton + "_on.gif");
   var elroll=el_boton.substring(3)

   MM_swapImage(elroll,'',elgif,1);

}


function MM_changeProp(objStrNS,objStrIE,theProp,theValue) { //v2.0
  var NS = (navigator.appName == 'Netscape');
  var objStr = (NS)?objStrNS:objStrIE;
  if (( NS && (objStr.indexOf('document.layers[')!=0 || document.layers!=null)) ||
      (!NS && (objStr.indexOf('document.all[')   !=0 || document.all   !=null))) {
    var obj = eval(objStr);
    if ((obj != null) && (theProp.indexOf("style.") != 0 || obj.style != null)) {
      eval(objStr+'.'+theProp + '="'+theValue+'"');
  } }
}

function menu_lateral(la_URL) {
    window.top.FR_MAIN.location=(la_URL+'_main.htm');
}



function c_pri(la_URL) {
    window.top.FR_PRINCIPAL.location=(la_URL + '_principal.htm');
}

function c_gen(la_URL) {
    window.top.FR_PRINCIPAL.location=(la_URL + '_generico.htm');
}


function CalculoPrecio() {
       var Precio_u = 2756;
       var cantidad_d = 0;

       cantidad_d = document.all.cantidad.value;
       precio_t = cantidad_d * Precio_u;

       document.all.pvp.value = precio_t;
}

var v1=window;
v1.width=0;

function MM_Mapa(theURL,winName,features) { //v2.0
//alert(v1.name)
  if ((v1.closed==true)||(v1.name != 'exposiciones_2')){
      v1=window.open('theURL','exposiciones_2','status=no,scrollbars=no,resizable=no,width=405,height=310');
      v1.moveTo(330,230);
     }{
      v1.focus();
  }
  v1.document.location=theURL;
}

function printPage() {
  var da = (document.all) ? 1 : 0;
  var pr = (window.print) ? 1 : 0;

  if (pr) // NS4, IE5
          window.print()
  else if (da)    // IE4 (Windows)
          vbPrintPage()
  else // other browsers
  {
          alert("Lo sentimos, su navegador no admite esta opción.");
          return ;
  }

  if (da) with (document)
  {
           if (!pr) with (document)
          {
                    writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
                    writeln(''<'' + 'script LANGUAGE="VBScript">');
                    writeln('Sub window_onunload');
                    writeln('  On Error Resume Next');
                    writeln('  Set WB = nothing');
                    writeln('End Sub');
                    writeln('Sub vbPrintPage');
                    writeln('  OLECMDID_PRINT = 6');
                    writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 32');
                    writeln('  OLECMDEXECOPT_PROMPTUSER = 0');
                    writeln('  On Error Resume Next');
                    writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
                    writeln('End Sub');
                    writeln(''<'' + '/script>');
          }
  }
}

function Tarifas()
{
  Tarifasjs =
  window.open('tarifasjs.html', 'Tarifas', 'toolbar=0,menubar=0,location=0,scrollbars=1,width=670,height=300,RESIZABLE=1');
  Tarifasjs.focus();
}


function CalculoPrecio()
{
   var precio_01 = 0
   var precio_02 = 0
   var precio_03 = 0
   var precio_04 = 0
   var precio_05 = 0
   var precio_06 = 0
   var precio_t = 0
   var iva = 0 ;
   var total_d = 0;

   if (document.all.ped_esc.checked==true) {precio_01=5560}
   if (document.all.ped_cub.checked==true) {precio_02=3125}
   if (document.all.ped_pla.checked==true) {precio_03=2750}
   if (document.all.ped_ren.checked==true) {precio_04=6800}
   if (document.all.ped_aco.checked==true) {precio_05=4500}
   if (document.all.ped_sup.checked==true) {precio_06=4200}

   precio_t =  Math.ceil(precio_01 + precio_02 + precio_03 + precio_04 + precio_05 + precio_06 ) ;
   iva = Math.ceil(precio_t / 100 * 16);

   total_d = Math.ceil(precio_t + iva);

   document.all.PVP.value = precio_t;
   document.all.IVA.value = iva;
   document.all.TOTAL_A_PAGAR.value = total_d;
}

