if (funcionesajax!=1)
{
 var funcionesajax=1;


function load_content(file,elemento,tipo){
	var xmlDoc = null ;
    if (typeof window.ActiveXObject != 'undefined' ) {
          xmlDoc = new ActiveXObject("Microsoft.XMLHTTP");
          xmlDoc.onreadystatechange = process ;
     }
     else {
     xmlDoc = new XMLHttpRequest();
     xmlDoc.onload = process;
     }
 	 xmlDoc.open( "GET", file, true );
     xmlDoc.send( null );

      function process()
        {

        if ( xmlDoc.readyState != 4 ) return ;
		change_content(xmlDoc.responseText);
      }


	function change_content(content)
	{
		if (tipo == 0){
			var d = document.getElementById(elemento);
			d.value=content;
		}
		if (tipo == 1){
		var d = document.getElementById(elemento);
		d.innerHTML=content;

		executeEmbeddedScripts(d);
		//executeEmbeddedScripts(d,content);

		}
		if (tipo == 2){
		
		//executeEmbeddedScripts(d,content);

		}
		if (tipo == 3){
		var d = parent.document.getElementById(elemento);
		d.innerHTML=content;
		executeEmbeddedScripts(d);
		//executeEmbeddedScripts(d,content);

		        	//d.innerHTML=content;
		//d.childNodes[0].nodeValue=content;
		}
		if (tipo == 4){
		var d = document.getElementById(elemento);
		d.innerHTML=content;

		executeEmbeddedScripts(d);
		
		Scroller.updateAll();
		
		//executeEmbeddedScripts(d,content);

		}
		
		
	}
}

//execute_embedded_scripts
 function executeEmbeddedScripts(div){
var x = div.getElementsByTagName("script");


var scriptBlocks = [];
//alert (x.length);

for(var i=0; i<x.length; i++)
{
//append the script to the div body,
//note that simply doing an eval() would not work as the script would not be stored in the DOM
var oScript = document.createElement('script');
oScript.text = x[i].text;
scriptBlocks[i] = oScript;
}

//we could have added the scripts to the div directly above, but then we'd trigger an infinite loop
for(var i=0; i <scriptBlocks.length; i++) {
div.appendChild(scriptBlocks[i]);
}

 }
 function myBindexOf(myObject,mySearch,myPos){
   if (myPos==null) myPos=0;
   if (typeof(myObject)!='object') return -1;
   if(!myObject.indexOf) {
     for(var i=myPos; i < myObject.length; i++) if(myObject[i]==mySearch) return i;
     return -1;
   } else return myObject.indexOf(mySearch,myPos);
 }

// opacity filters
function opacity(id, opacStart, opacEnd, millisec) { 
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
		millisec=millisec/3;
		}
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 
 
    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 
 
//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 
//fin de opacity filters
}
