var previousSelectedSign="",cookieName="Horoscope",NULL=null,txtUndefined="undefined";Horoscope=function(){var n="_horoscope",j="_hrscpdrpdwn",i="#",b="",a=$(i+horoscopeParams.uniqueId+n),g=$("form",a);g.removeAttr("action");g.removeAttr("method");var d=$(i+horoscopeParams.uniqueId+j);d.change(k);var c=$(".hrscperr",a);if(c!=NULL)$(c).hide();var e=m(cookieName);if(e!=NULL){f(e,horoscopeParams.culture);h(e)}else if(horoscopeParams.defaultSign!=NULL){f(horoscopeParams.defaultSign,horoscopeParams.culture);h(horoscopeParams.defaultSign)}function k(){var a=d.val();if(a!=b&&a!=previousSelectedSign){if(c!=NULL)$(c).hide();previousSelectedSign=a;f(a,horoscopeParams.culture)}return false}function f(a){var b=$.get(horoscopeParams.serviceProxyUrl,{zodiacsign:a,LCID:horoscopeParams.culture},l,horoscopeParams.resultFormat)}function l(q){var e=$(q);if(e==NULL||e.find("item").length==0){if(c!=NULL)$(c).show()}else{var l="http://www.msn.com",m=e.find("item > title").text(),p=e.find("item > description").text(),g=e.find("msn\\:daterange").text(),f=e.find("msn\\:link").text();if(g==b||g==NULL)try{g=e[0].getElementsByTagNameNS(l,"daterange")[0].childNodes[0].nodeValue}catch(s){}if(f==b||f==NULL)try{f=e[0].getElementsByTagNameNS(l,"link")[0].childNodes[0].nodeValue}catch(s){}var i=$(".hrscptitle",a),k=$(".hrscpdesc",a),j=$(".hrscpdate",a),h=$(".hrscpimg",a);if(horoscopeParams.showZodiacImage&&f!=b&&h!=NULL){var n=$("<img src='"+f+"' alt='"+m+"'/>");h.empty();n.appendTo(h)}if(i!=NULL)i.html(m);if(j!=NULL&&g!=b)j.html("("+g+")");if(k!=NULL)k.html(p);o(cookieName,d.val())}}function h(a){if(d!=NULL)d.val(a)}function m(e){var d=e+"=",b=document.cookie.split(";");if(b.length>0)for(var c=0;c<b.length;c++){var a=b[c];while(a.charAt(0)==" ")a=a.substring(1,a.length);if(a.indexOf(d)==0)return a.substring(d.length,a.length)}return NULL}function o(e,d,c){var a;if(c!=NULL||c!=b){a=new Date;a.setYear(a.getFullYear()+5)}else a=c;if(typeof document!=txtUndefined){document.cookie=e+"="+d+";expires="+a.toGMTString();return true}return false}};