/* JavaScript Document */

/* Funciones para obtener las variables de sesion por cookies para el header */
function getCookie(name)
	{
	  var cookie, offset, end;
	  cookie  = " "+document.cookie;
	  offset  = cookie.indexOf(" "+name+"=");
	  if (offset == -1)
	  {
		  return undefined;
	  }
	  offset += name.length+2;
	  end     = cookie.indexOf(";", offset);
	  if (end    == -1)
	  {
		  end = cookie.length;
	  }
	  return unescape(cookie.substring(offset, end));
	}
	var user_data=null;
	user_data=getCookie("user_data");
	var token=null;
	token=getCookie("token");
	if (typeof(token)== "undefined")
	{
		token=false;
	}
	var prereg=null;
	prereg=getCookie("reg_nuevo");
	if (typeof(prereg)== "undefined")
	{
		prereg=null;
	}
	var name=null;
	name=getCookie("nombre");
	
	var OnlyRMSession = null;
	OnlyRMSession = getCookie("OnlyRMSession");
	if(typeof(OnlyRMSession) == "undefined"){
		OnlyRMSession = false;	
	}
	
	if (user_data!=null)
	{
		var info=user_data.split("|");
		if (info[0]!=null) {
			webname=info[0];
		}
		if (info[1]!=null) {
			sexo=info[1];
		}
		if (info[3]!=null) {
			nickname=info[3];
		}
		if (info[4]!=null) {
			thumbnail=info[4];
		}
	}
	
	<!-- JAVASCRIPT para el menú DROPDOWN-->
	<!--//--><![CDATA[//><!--
	sfHover = function() {
	if (!document.getElementsByTagName) return false;
	var sfEls = document.getElementById("nav").getElementsByTagName("li");

	for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);
	//--><!]]>
	
	
	/* Para el buscador */
		function enviaBusqueda()
		{
			var bus=document.getElementById('Expression').value;
			bus=bus.replace(" ","+");
			if (bus=="")
			{
				bus="+";
			}
			var url="http://match.templeo.com/Vacante-B%c3%basqueda/" + bus + "/Search.aspx";
			document.getElementById('BuscadorForma').action=url;
			document.getElementById('BuscadorForma').submit();
		}
		function enviaBusqueda2(bus)
		{
			bus=bus.replace(" ","+");
			if (bus=="")
			{
				bus="+";
			}
			document.getElementById('Expression').value=bus;
			var url="http://match.templeo.com/Vacante-B%c3%basqueda/" + bus + "/Search.aspx";
			document.getElementById('BuscadorForma').action=url;
			document.getElementById('BuscadorForma').submit();
		}
		function limpiaVariable (variable)
		{
			document.getElementById(variable).value='';
//			alert ("asdasd");
		}
		function llevaVariable (variable,valor)
		{
			if  (document.getElementById(variable).value=="")
				document.getElementById(variable).value=valor;
		}
		
		
	/* Para el menu de esmas */	
			function closeMenu()
	{
		document.getElementById("HDR_mainMenu").style.display="none";
	}
	
	
	
	jQuery(document).ready(
		function()
		{
			jQuery("#pageflip").hover(
				function() 
				{
					jQuery("#pageflip img , .msg_block").stop()
					.animate({
					width: '214px', 
					height: '112px'
			}, 500); 
		} , function() {
		jQuery("#pageflip img").stop() 
			.animate({
				width: '33px', 
				height: '34px'
			}, 220);
		jQuery(".msg_block").stop() 
			.animate({
				width: '33px', 
				height: '33px'
			}, 200);
	});
});