
function masServicios(){	
	$("#content_masservicios").slideToggle("slow");
}

var cliente = navigator.userAgent.toLowerCase();
var SO,navegador,version,total,lacadena;


function cliente() {
	if ( comprobar('konqueror')) {
		navegador = "Konqueror";
		SO = "Linux";
	}
	else if ( comprobar('safari')) navegador 	= "Safari"
	else if ( comprobar('omniweb')) navegador 	= "OmniWeb"
	else if ( comprobar('opera')) navegador 	= "Opera"
	else if ( comprobar('webtv')) navegador 	= "WebTV";
	else if ( comprobar('icab')) navegador 		= "iCab"
	else if ( comprobar('msie')) navegador 		= "Internet Explorer"
	else if (! comprobar('compatible')) {
		navegador = "Netscape Navigator"
		version = cliente.charAt(8);
	}
	else navegador = "An unknown navegador";

	if (!version) version = cliente.charAt(place + lacadena.length);

	if (!SO) {
		if ( comprobar('linux')) 	SO 	= "Linux";
		else if ( comprobar('x11')) SO 	= "Unix";
		else if ( comprobar('mac')) SO 	= "Mac"
		else if ( comprobar('win')) SO 	= "Windows"
		else SO 						= "an unknown operating system";
	}
}

function  comprobar(cadena) {
	indice = cliente.indexOf(cadena) + 1;
	lacadena = cadena;
	return indice;
}

var yPos = 0;

function mostrarCapaFlotante(flotante, caja) {
	getScroll();
	if (comprobar('msie 6')){
		
		prepararIE("100%", "visible");
		document.getElementById(flotante).style["height"] = screen.availHeight;
		document.getElementById(flotante).style["width"] = screen.availWidth-25;
		setScroll(0, 0);
	}
	visibilidadCapas("block", flotante, caja);
}

function ocultarCapaFlotante(flotante, caja) {
	
	setScroll(0, yPos);
	if (comprobar('msie 6')){
		prepararIE("auto", "auto");
	}
	visibilidadCapas("none", flotante, caja);

}

function visibilidadCapas(opcion, flotante, caja){
	document.getElementById(flotante).style["display"] = opcion;
	document.getElementById(caja).style["display"] = opcion;
}
function getScroll(){
	if (self.pageYOffset) {
		yPos = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){
		yPos = document.documentElement.scrollTop; 
	} else if (document.body) {
		yPos = document.body.scrollTop;
	}
}

function setScroll(x, y){
	window.scrollTo(x, y); 
}

function mostrarCapaCondiciones(){
	
	$("#floRegistro").css("position","absolute");
  $("#floRegistro").css("top", ( $(window).height() - $("#floRegistro").height() ) / 3+$(window).scrollTop() + "px");
  $("#floRegistro").css("left", ( $(window).width() - $("#floRegistro").width() ) / 3+$(window).scrollLeft() + "px");
  
  $("#floRegistroCaja").css("position","absolute");  
  $("#floRegistroCaja").css("top", ( $(window).height() - $("#floRegistroCaja").height() ) / 3+$(window).scrollTop() + "px");
  $("#floRegistroCaja").css("left", ( $(window).width() - $("#floRegistroCaja").width() ) / 3+$(window).scrollLeft() + "px");
	
	$("#floRegistro").show();
	$("#floRegistroCaja").show();
	
}

function ocultarCapaCondiciones(){
	$("#floRegistro").hide();
	$("#floRegistroCaja").hide();
}
