// Abre ventana

var sW=800;
function js_openSplash(url, windowName, width, height,features) {
  var errMsg = "js_openSplash\n- Verificar llamado";
  var nArgs = js_openSplash.arguments.length;
  var left = "", top="";
  var windowCenter = "", widtheight = ""
  var windowFeatures="";
  
  if(nArgs==4 || nArgs==5) {
    if(isNaN(width)) {
      alert(errMsg); return false; 
    }
    else {
      left = parseInt((sW/2) - (width/2));
      top = parseInt((screen.availHeight/2) - (height/2));
      if(left<0){left=0;width=screen.availWidth-10}
      if(top<0){top=0;height=screen.availHeight-25}
      windowCenter ="left="+left+",top="+top+",screenX="+left+",screenY="+top;
      widtheight = "width="+width + ",height="+height;
    }    
  }

  switch(nArgs) {
    case 1: return (window.open(url));
            break;
    case 2: return (window.open(url, windowName));
            break;
    case 3: windowFeatures = js_openSplash.arguments[2];
            break;
    case 4: windowFeatures="location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no"
            windowFeatures += "," + widtheight + "," + windowCenter;
            break;
    case 5: windowFeatures = features + "," + widtheight + "," + windowCenter;
            break;
    default: alert(errMsg); return false;
  }
  return (window.open(url, windowName, windowFeatures));
}

var MicroWidth = 1779; var MicroHeight = 500;
var FlashWidth = 790; var FlashHeight = 615;
var SplashWidth = 1440; var SplashHeight = 324; 

var pDId="0";
var defaultWinName = "SPLASH"; 

var promoMicro="MICROSITIO";
var promoFlash="FLASH";

function js_abrePromocion(url, windowName) {
  var promo;
 var featuresS ="location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no";
  var features ="location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no";

  windowName = (js_abrePromocion.arguments.length==1)?defaultWinName:windowName.toUpperCase();
  if(windowName==promoMicro) {
      promo = js_openSplash(url, promoMicro, MicroWidth, MicroHeight, features);  
  } else if(windowName==promoFlash) {
      promo = js_openSplash(url, promoFlash, FlashWidth, FlashHeight, features);  
  } else {
      promo = js_openSplash(url,defaultWinName,SplashWidth,SplashHeight, featuresS);
  }
  return promo;
}

