function if_ToObject(id) {
		if(document.layers){
			return (document.layers[id])?eval(document.layers[id]):null;
		}
		else if(document.all && !document.getElementById){
			return (eval("window."+id))?eval("window."+id):null;
		}
		else if(document.getElementById && document.body.style) {
			return (document.getElementById(id))?eval(document.getElementById(id)):null;
		}
	}
  
function if_FlashWrite(string){
  document.write(string);
  }

function if_FlashInnerHTML(htmlElementId,code){
  var x=if_ToObject(htmlElementId);
  if(x){
    if(document.getElementById||document.all){
      x.innerHTML='';
      x.innerHTML=code;
      }
    else if(document.layers){
      x.document.open();
      x.document.write(code);
      x.document.close();
      }
    }
  }

function AbrirVentana(theURL,winName,features)
{
	var camb = features;
	if (camb.indexOf('top',0) < 0) {
		camb = camb + ',top=216';
	} 
	if (camb.indexOf('left',0) < 0) {
		camb = camb + ',left=159';
	} 
	if (camb.indexOf('width',0) < 0) {
		camb = camb + ',width=500';
	} 
	if (camb.indexOf('height',0) < 0) {
		camb = camb + ',height=350';
	} 
	
	neu=window.open(theURL,winName,camb);
	neu.focus()
	
}

