n_divs='7';
c=0;
du="";
function escondediv(dv,n){		
	
   for(i=1;i<=n;i++){			
	   if(i==dv ){
		   if(du!=dv){
			  document.getElementById('mdiv'+i).style.display="inline"
			   du=dv
			}else{
			   du=""
			   document.getElementById('mdiv'+i).style.display="none"
			}
	   }else{
			 document.getElementById('mdiv'+i).style.display="none"		
	   }				
		
	}		
}


function vProcurar(proc)
{
	if(proc < 3) 
	{
		alert("Necesita 3 caracteres");
		return false;
	}
	return true   
}

function changeCountry(){
	which = document.getElementById('select_country').value;
	function set_cookie(which){
		var expiry = new Date();
		var oneYearFromNow = expiry.getTime() + (365 * 24 * 60 * 60 * 1000);
		expiry.setTime(oneYearFromNow);
		newCookieInfo = "userCountry="+which+";expires="+expiry.toGMTString()+";path=/;";
		document.cookie=newCookieInfo;
	
	}
	if ( window.location.hostname == 'www.smartconsumer.ws' ){
		point_to = 'www.consumointeligente.org';	
	} else {
		point_to = window.location.hostname;	
	}
	if (which=='EN'||which=='EN2'){
		location.href = "http://"+point_to+"?fwd=EN";
	} else if (which=='BR'||which=='BR2'){
		location.href = "http://"+point_to+"?fwd=BR";
	} else {
		location.href = "http://"+point_to+"?fwd="+which;
	}
}