function PintarFlash(aSrc,aNameObj,aWidth,aHeight){Object(aNameObj).innerHTML="<object codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+aWidth+"\" height=\""+aHeight+"\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ><param name=\"movie\" value=\""+aSrc+"\" /> <param name=\"quality\" value=\"high\" /> <embed width=\""+aWidth+"\" height=\""+aHeight+"\" src=\""+aSrc+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed></object>";}
function Object(aName){
 if(document.getElementById) 
  return document.getElementById(aName);
 else if(document.all) 
  return document.all[aName];
 else if(document.layers) 
  return document.layers[aName];}
function logoutXML() {return "<Params><Process>Logout</Process><ProcessParams></ProcessParams></Params>";}
function abrir(url,wW,hW){
var wS=screen.width;var hS=screen.height;
x=(wS-wW)/2;y=(hS-hW)/2;
P="width="+wW;P+=",height="+hW;
P+=",top="+y;P+=",left="+x;
P+=",resizable=yes,scrollbars=yes";
v=window.open(url,"",P);v.focus;}
function verimagen(url_imagen,t,w,h){
var img = new Image();img.src = url_imagen;
win=window.open('','','width='+w+',height='+h+',scrollbars=auto,resizable=1,toolbar=0');
win.document.write ('<html>\n');win.document.write ('<head><title>'+t+'</title></head>');
win.document.write ('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\n');
win.document.write ('<img src="' + url_imagen + '" height='+h+' width='+w+'>\n');
win.document.write ('</body>\n');win.document.write ('</html>\n'); return true;}
function Left(str, n){
if (n <= 0) 
 return "";
else if (n > String(str).length)
 return str;
else
 return String(str).substring(0,n);}
function Right(str, n){
 if (n <= 0)
  return "";
 else if (n > String(str).length)
  return str;
 else {
  var iLen = String(str).length;
  return String(str).substring(iLen, iLen - n);}}
function GetParametro(aStr){
 lParams=window.location.search;
 if(lParams.indexOf("?")>=0) lParams=lParams.replace("?","");
 lP=lParams.split("&");
 for(i=0;i<lP.length;i++){
  if (lP[i].split("=")[0]==aStr){ return lP[i].split("=")[1]}}}
function openNewWindowFx(valor){
 switch(valor){
  case 1:
    window.location="/Public/Forms/View.aspx?Tipo=Oficinas";
   break;
  case 2:
    window.location="/Public/Forms/Grid.aspx?Tipo=Noticias";
   break;
  default:
   break;}}
function addToBolsa(aTipo,aWhere) {return "<Params><Process>AddToBolsa</Process><ProcessParams><Tipo>"+aTipo+"</Tipo><Id>"+aWhere+"</Id></ProcessParams></Params>";}
function removeFromBolsa(aTipo,aWhere) {return "<Params><Process>RemoveFromBolsa</Process><ProcessParams><Tipo>"+aTipo+"</Tipo><Id>"+aWhere+"</Id></ProcessParams></Params>";}