function i(vvr, vve) {
	try {
    	http = new XMLHttpRequest();
	    } catch(e) {
    	  try {
	    	  http = new ActiveXObject("Msxml2.XMLHTTP");
    	  } catch (e1) {
	        try {
        		http = new ActiveXObject("Microsoft.XMLHTTP");
    	    } catch (e2) {
		         http = false;
        	}
    	}
    }
	myRand = parseInt(Math.random()*999999999999999);
	var url = "../class/dkluio3uoi676298743l.php?pvi2="+vvr+"&rand="+myRand;
    http.onreadystatechange = function() { rsNT(vve); };
    http.open("GET",url,true);
    http.send(null);
}

function rsNT(lm) {
   var resultado = '';
   if(http.readyState == 4) {
	  	if(http.status == 200) {
	        resultado = http.responseText;
    	    document.getElementById(lm).innerHTML = resultado;
      	} 
    } else {
		document.getElementById(lm).innerHTML = http.readyState + " - "+ http.status ;
	}
}
function cargando(){
	if (document.getElementById("GaleriaMain"))
	{
		var main = document.getElementById("GaleriaMain");
		var wait = document.getElementById("wait");
		main.className = "visible";
		wait.className = "inv";
	}

}
function hd_NOS(){
	var max = 10;
	for (var i=1; i<=max; i++){		
		var ar=document.getElementById("men" + i);
		var subObj = document.getElementById("men"+ i +"_sub");
		ar.style.background ="none";
		subObj.className = "menSubOff";
	}
}
function sh_NOS(i){
	var ar=document.getElementById("men" + i);
	var subObj = document.getElementById("men"+ i +"_sub");
	ar.style.background ="";
	subObj.className = "menSubOn";
}

function hd_NOS_foot(o){
	var ar=document.getElementById(o);
	var subObj = document.getElementById(o +"_");
	ar.style.background ="none";
	subObj.className = "menSubOff_foot";
}
function sh_NOS_foot(i){
	var ar=document.getElementById(i);
	var subObj = document.getElementById(i +"_");
	ar.style.background ="#16a";
	subObj.className = "menSubOn_foot";
}

function sh_mvCls(i,e,u,k){
	var ar=document.getElementById(u);
	if(e == "topMenOn"){
		document.getElementById("men"+ i +"_td1").className = "eq1_";
		document.getElementById("men"+ i +"_td2").className = "eq8_";
		document.getElementById("men"+ i +"_td3").className = "eq7_";	
	}else{
		if(e == "topMenOff"){
			document.getElementById("men"+ i +"_td1").className = "";
			document.getElementById("men"+ i +"_td2").className = "";
			document.getElementById("men"+ i +"_td3").className = "";	
		}else{
			i.className = e;
		}
	}
	ar.className = k;
}
function putWidth(element,val){
	var ar=document.getElementById(element);
	ar.width = val+"px";
}
function sh_mv_smp(i,e){
	i.className = e;
}
var persistclose=0;
var startX = 0;
var startY = 3; //3
var verticalpos="frombottom";

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function staticbar(){
	barheight=document.getElementById("topbar").offsetHeight
	var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
	var d = document;
	function ml(id){
		var el=d.getElementById(id);
		if (!persistclose || persistclose && get_cookie("remainclosed")=="")
		el.style.visibility="visible"
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
		el.x = startX;
		if (verticalpos=="fromtop")
		el.y = startY;
		else{
		el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
		el.y -= startY;
		}
		return el;
	}
	window.stayTopLeft=function(){
		if (verticalpos=="fromtop"){
		var pY = ns ? pageYOffset : iecompattest().scrollTop;
		ftlObj.y += (pY + startY - ftlObj.y)/8;
		}
		else{
		var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
		ftlObj.y += (pY - startY - ftlObj.y)/8;
		}
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 10);
	}
	ftlObj = ml("topbar");
	stayTopLeft();
}
function votarEncuesta(val){
	var el = document.getElementById("formEncuesta");
	var op;
	for (var intCounter = 0; intCounter < el.length - 1; intCounter++)  {  
		if(el[intCounter].checked){
			op = el[intCounter].value;
		}
	}
	try {
	   	httpEnc = new XMLHttpRequest();
	    } catch(e) {
    	  try {
	    	  httpEnc = new ActiveXObject("Msxml2.XMLHTTP");
    	  } catch (e) {
	        try {
        		httpEnc = new ActiveXObject("Microsoft.XMLHTTP");
    	    } catch (E) {
		         httpEnc = false;
        	}
    	}
    }
	myRand = parseInt(Math.random()*999999999999999);
	var url = "../class/MRS2_val.php?mr2_id=" + op + "&mr2_back="+val+"&rand="+myRand;
    httpEnc.onreadystatechange = function() { respuestahttpEnc("divEncuesta"); };
    httpEnc.open("GET",url,true);
    httpEnc.send(null);
}
function respuestahttpEnc(elementoPag) {
   var resultado = '';
   if(httpEnc.readyState == 4) {
	  	if(httpEnc.status == 200) {
	        resultado = httpEnc.responseText;
    	    document.getElementById(elementoPag).innerHTML = resultado;
      	} else { 
			alert(httpEnc.status);
		}
   } else {
	    document.getElementById(elementoPag).innerHTML = '<img src="../be/wait_16.gif" />';
   }
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar


