function FNenviarVar(peli,variable,args){
//   eval("window.document."+peli).SetVariable(variable.toString(), args);
   cbeGetElementById(peli).SetVariable(variable.toString(), args);
   
}

function FNpopup(p_url,p_id,p_ancho,p_alto,p_carac){
	car="width="+p_ancho+",height="+p_alto+",left="+((screen.width/2)-(parseInt(p_ancho)/2))+",top="+((screen.height/2)-(parseInt(p_ancho)/2))+","+p_carac
	window.open(p_url,p_id,car)
}



//Muestra de capas (Generales)
function FNmostrar_capa(p_id_capa,p_ancla){
	if(!p_ancla){
		if(cbeGetElementById(p_id_capa)!=null){
			cbeGetElementById(p_id_capa).cbe.show()
		}
	}else{ //SI TIENE ANCLA AJUSTA
		if(cbeGetElementById(p_id_capa)!=null){
			cbeGetElementById(p_id_capa).cbe.moveTo(cbeGetElementById(p_ancla).cbe.pageX(),cbeGetElementById(p_ancla).cbe.pageY())
			cbeGetElementById(p_id_capa).cbe.show()
		}
	}
}

function FNocultar_capa(p_id_capa,p_inicio,p_final)	{
	if(p_inicio==undefined || p_final==undefined){
		if(cbeGetElementById(p_id_capa)!=null){
			cbeGetElementById(p_id_capa).cbe.hide()
		}
	}else{
		v_inicio=parseInt(p_inicio);v_final=parseInt(p_final)
		for(k=v_inicio;k<=v_final;k++){
			if(cbeGetElementById(p_id_capa+k)!=null){
				cbeGetElementById(p_id_capa+k).cbe.hide()
			}
		}
	}

}

function FNmostrar_DIV(p_id_div){
//	window.status=p_id_div
	if(cbeGetElementById(p_id_div)){
		cbeGetElementById(p_id_div).cbe.showBlock()
		cbeGetElementById(p_id_div).cbe.show()
	}
}

function FNocultar_DIV(p_id_div,p_inicio,p_final){
//	window.status=p_id_div
	if(p_inicio==undefined || p_final==undefined){
		if(cbeGetElementById(p_id_div)){
			cbeGetElementById(p_id_div).cbe.hideBlock()
			cbeGetElementById(p_id_div).cbe.hide()
		}
	}else{
		v_inicio=parseInt(p_inicio);v_final=parseInt(p_final)
		for(k=v_inicio;k<=v_final;k++){
			if(cbeGetElementById(p_id_div+k)){
				cbeGetElementById(p_id_div+k).cbe.hideBlock()
				cbeGetElementById(p_id_div+k).cbe.hide()
			}
		}
	}
}


 function FNtd_OnRollOver(_this,p_col){
 	if(_this.press==null){_this.press=false} //Si no se ha definido en el ambito _this
 	if(!_this.press){
		_this.id	
		_this.bgColor=p_col
	}
 }
 function FNtd_onRollOut(_this,p_col){
 	if(_this.press==null){_this.press=false} //Si no se ha definido en el ambito _this
 	if(!_this.press){
		_this.id	
		_this.bgColor=p_col
	}
 }
 function FNtd_onPress(_this,p_col_rel,p_col_fuera){
 var objetos=_this.id.substr(0,_this.id.length-1)
	 n=1;while(cbeGetElementById(objetos+n)){
	 	subObj=cbeGetElementById(objetos+n)
		subObj.press=false		
		subObj.bgColor=p_col_fuera
	 n++
	 }
 	_this.press=true
	_this.bgColor=p_col_rel
 }


