function get_cookie(b){var c=b+"=";var a="";if(document.cookie.length>0){offset=document.cookie.indexOf(c);if(offset!=-1){offset+=c.length;end=document.cookie.indexOf(";",offset);if(end==-1){end=document.cookie.length}a=unescape(document.cookie.substring(offset,end))}}return a}function set_cookie(d,c,e){var a=new Date();var b=new Date();b.setTime(a.getTime()+e);document.cookie=d+"="+escape(c)+";path=/;expires="+b.toGMTString()}function remove_cookie(a){if(get_cookie(a)==""){return}document.cookie=a+"=;path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT"}function isLoggedIn(a){var b=get_cookie("user");if(b==""){if(a){window.location="/login"}return false}return true}function changeLanguage(a){set_cookie("lang",a,31536000);window.location.reload()}function logout(){remove_cookie("user");window.location.reload()}$.fn.serializeObject=function(){var c={};var b=this.serializeArray();$.each(b,function(){if(c[this.name]){if(!c[this.name].push){c[this.name]=[c[this.name]]}c[this.name].push(this.value||"")}else{c[this.name]=this.value||""}});return c};jQuery.fn.center=function(){this.css("position","absolute");this.css("top",($(window).height()-this.height())/2+$(window).scrollTop()+"px");this.css("left",($(window).width()-this.width())/2+$(window).scrollLeft()+"px");return this};function userLoginCancel(){$("ctl00_ContentMain_Username").value="";$("ctl00_ContentMain_Password").value=""}function xssCheck(a,b){var c=b.Value;b.IsValid=(c.match(/<.*?>/))?false:true};