// JavaScript Document
function setCookie(sName,sValue){
	var dtmExpires=new Date(2015,9,21,12,0,0);
	document.cookie=sName+"="+escape(sValue)+"; expires="+dtmExpires.toGMTString();
}
function changeLanguage(oElement){
	setCookie("language",oElement[oElement.selectedIndex].value); // SET COOKIE
}
function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}
function selectItem(oElement,sValue){
	if(oElement&&sValue){for(var i=0;i<oElement.length;i++){if(oElement[i].value.toLowerCase()==sValue.toLowerCase()){oElement[i].selected=true;}}}
}

