/* Simple functions to handle the locale selector */


function setLocale(locale) {

  // append the new locale to the request and reload the page
  // NOTE: This will override all other locale selection
  // processes.
  // @requires jquery.url plugin
  
  var redirect = jQuery.url.attr("path") +"?lang="+ locale;
  window.location = redirect;
} 


function setCookie(c_name,value,expiredays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString() +"; path=/");
}