function setLanguage(language) { var expire = new Date(); var today = new Date(); expire.setTime(today.getTime() + 3600000*24*30); document.cookie = "lg="+language+"; expires="+expire.toGMTString()+"; path=/; domain=.shfamily.com"; document.location.reload(); } function addTag(tag,eid) { elem=document.getElementById(eid); elem.value=elem.value + ',' + tag; } function dig(id,category,action) { $.get("dig.php",{'id':id,'category':category,'action':action},function(msg){$('#dig').html(msg);}); } function ReadCookie(cookieName) { var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName); if (ind==-1 || cookieName=="") return ""; var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length; return unescape(theCookie.substring(ind+cookieName.length+1,ind1)); }