(function(){function _$(els){this.elements=[];for(var i=0;i<els.length;i++){var element=els[i];if(typeof element=='string'){element=document.getElementById(element);}
this.elements.push(element);}
return this;}
_$.prototype={each:function(fn){for(var i=0,len=this.elements.length;i<len;++i){fn.call(this,this.elements[i]);}
return this;},setStyle:function(prop,val){this.each(function(el){el.style[prop]=val;});return this;},getStyle:function(prop){var el=this.elements[0];if(!el.style[prop]){return'';}
return el.style[prop];},addClass:function(className){this.each(function(el){el.className+=' '+className;});return this;},on:function(type,fn){var listen=function(el){if(window.addEventListener){el.addEventListener(type,fn,false);}else if(window.attachEvent){el.attachEvent('on'+type,function(){fn.call(el,window.event);});}};this.each(function(el){listen(el);});return this;},css:function(o){var that=this;this.each(function(el){for(var prop in o){that.setStyle(prop,o[prop]);}});return this;}};window.el_w_props=function(){return new _$(arguments);}})();function toggle(e){e=e||window.event;var target=e.target||e.srcElement;var close_img_uri="images/contul-tau.gif";var open_img_uri="images/contul-tau-open.gif";if(target.id!='menu-login-link-img'){el_w_props('login_container').setStyle('display','none');document.getElementById('menu-login-link-img').src=close_img_uri;}else{var element=el_w_props('login_container');if(element.getStyle('display')=='block'){element.setStyle('display','none');document.getElementById('menu-login-link-img').src=close_img_uri;}else{element.setStyle('display','block');document.getElementById('nick').focus();document.getElementById('menu-login-link-img').src=open_img_uri;if(window.event){window.event.returnValue=false;}else{e.preventDefault();}}}
preventBubble(e);return false;}
function preventBubble(e){(!e)?e=window.event:0;if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble=true;}
return false;}

