function ipsclass(){this.cookies=new Array();this.ignore_cookies=new Array(ipb_var_cookieid+'ipb_stronghold',ipb_var_cookieid+'session_id',ipb_var_cookieid+'ipb_admin_session_id',ipb_var_cookieid+'member_id',ipb_var_cookieid+'pass_hash');this.settings={'do_linked_resize':0,'resize_percent':50};this.init=function(){var _tmp=document.cookie.split(';');if(_tmp.length){for(i=0;i<_tmp.length;i++){if(_tmp[i].match(new RegExp(ipb_var_cookieid+".*$"))){var _data=_tmp[i].split('=');var _key=this.trim(_data[0]);var _value=unescape(this.trim(_data[1]));if(_key&&(!this.in_array(_key,this.ignore_cookies))){this.cookies[_key.replace(ipb_var_cookieid,'')]=_value;}}}}_tmp=null;};this.trim=function(text){if(typeof(text)=='undefined'){return'';}text=text.replace(/^\s+/,'');return text.replace(/\s+$/,'');};this.html_entity_decode=function(text){if(typeof ca=='undefined'){var ca=document.createElement('textarea');}ca.innerHTML=text.replace(/</g,'&lt;').replace(/>/g,'&gt;');return ca.value;};this.in_array=function(needle,haystack){if(!haystack.length){return false;}for(var i=0;i<haystack.length;i++){if(haystack[i]===needle){return true;}}return false;};this.htmlspecialchars=function(text){text=text.replace(/</g,'&lt;');text=text.replace(/>/g,'&gt;');text=text.replace(/"/g,'&quot;');return text;};this.un_htmlspecialchars=function(text){text=text.replace(/&lt;/g,'<');text=text.replace(/&gt;/g,'>');text=text.replace(/&quot;/g,'"');return text;};this.get_editor_contents=function(editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){if(typeof(aIPS_editor[i])!='object'){continue;}editor_id=i;break;}}return aIPS_editor[editor_id].editor_get_contents;};this.add_editor_contents=function(text,editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){if(typeof(aIPS_editor[i])!='object'){continue;}editor_id=i;break;}}return aIPS_editor[editor_id].insert_text(text);};this.convert_saved_tags_to_display_tags=function(text){text=text.replace(/(<|&lt;|&#60;)!--/,"{");text=text.replace(/--(>|&gt;|&#62;)/,"}");return text;};this.include_javascript=function(_file,div_id){var _doc=(div_id)?document.getElementById(div_id):document.getElementsByTagName('head').item(0);var _js=document.createElement('script');_js.setAttribute('language','javascript');_js.setAttribute('type','text/javascript');_js.setAttribute('src',_file);_doc.appendChild(_js);return false;};this.fade_in_element=function(div){var hash='#';var color_items="0123456789abcdef";var start_color='#ffff66';var orig_color=document.getElementById(div).style.backgroundColor;var temp_end='#ffffff';var iter=20;var time=80;var rbeg=color_items.indexOf(start_color.substr(1,1))*16+color_items.indexOf(start_color.substr(2,1));var gbeg=color_items.indexOf(start_color.substr(3,1))*16+color_items.indexOf(start_color.substr(4,1));var bbeg=color_items.indexOf(start_color.substr(5,1))*16+color_items.indexOf(start_color.substr(6,1));var rend=color_items.indexOf(temp_end.substr(1,1))*16+color_items.indexOf(temp_end.substr(2,1));var gend=color_items.indexOf(temp_end.substr(3,1))*16+color_items.indexOf(temp_end.substr(4,1));var bend=color_items.indexOf(temp_end.substr(5,1))*16+color_items.indexOf(temp_end.substr(6,1));for(i=1,r=rbeg,g=gbeg,b=bbeg;i<=iter;r=Math.round(rbeg+i*((rend-rbeg)/(iter-1))),g=Math.round(gbeg+i*((gend-gbeg)/(iter-1))),b=Math.round(bbeg+i*((bend-bbeg)/(iter-1))),i++){hstr='#'+color_items.charAt(Math.floor(r/16))+color_items.charAt(r%16)+color_items.charAt(Math.floor(g/16))+color_items.charAt(g%16)+color_items.charAt(Math.floor(b/16))+color_items.charAt(b%16);setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+hstr+'";',i*time);}setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+orig_color+'";',(i+1)*time);};this.lang_build_string=function(){if(!arguments.length||!arguments){return;}var string=arguments[0];for(var i=1;i<arguments.length;i++){var match=new RegExp('<%'+i+'>','gi');string=string.replace(match,arguments[i]);}return string;};this.get_id_from_text=function(id){return id.replace(/.*(\-|_)(\S+)/,"$2");};this.get_name_from_text=function(id){return id.replace(/(.*)(\-|_)(\S+)/,"$1");};this.location_jump=function(url,full){url=url.replace(/&amp;/g,'&');if(full){window.location.href=url;}else{window.location.href=ipb_var_base_url+url;}};this.confirm_action=function(url,msg){if(!msg){msg='PLEASE CONFIRM:\nOK to proceed?';}if(url){url=url.replace('&amp;','&');}else{url='';}if(confirm(msg)){window.location.href=url;}else{alert(ipb_global_lang['action_cancelled']);return false;}};this.pop_up_window=function(url,width,height,name){if(!name){var mydate=new Date();name=mydate.getTime();}var Win=window.open(url.replace('&amp;','&'),name,'width='+width+',height='+height+',resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no');Win.focus();return false;};this.set_unselectable=function(obj){if(!is_ie4&&typeof(obj.tagName)!='undefined'){if(obj.hasChildNodes()){for(var i=0;i<obj.childNodes.length;i++){this.set_unselectable(obj.childNodes[i]);}}obj.unselectable='on';}};this.get_obj_leftpos=function(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}else if(obj.x){curleft+=obj.x;}return curleft;};this.get_obj_toppos=function(obj){var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}else if(obj.y){curtop+=obj.y;}return curtop;};this.cancel_bubble=function(obj,extra){if(extra!==false){extra=true;}if(!obj||is_ie){if(extra){window.event.returnValue=false;}window.event.cancelBubble=true;return window.event;}else{obj.stopPropagation();if(extra){obj.preventDefault();}return obj;}};this.cancel_bubble_all=function(obj){return ipsclass.cancel_bubble(obj,true);};this.cancel_bubble_low=function(obj){return ipsclass.cancel_bubble(obj,false);};this.my_getcookie=function(name){return this.cookies[name];};this.my_setcookie=function(name,value,sticky){expire="";domain="";path="/";if(sticky){expire="; expires=Wed, 1 Jan 2020 00:00:00 GMT";}if(ipb_var_cookie_domain!=""){domain='; domain='+ipb_var_cookie_domain;}if(ipb_var_cookie_path!=""){path=ipb_var_cookie_path;}document.cookie=ipb_var_cookieid+name+"="+value+"; path="+path+expire+domain+';';this.cookies[name]=value;};this.array_stacksize=function(thearray){for(i=0;i<thearray.length;i++){if((thearray[i]=="")||(thearray[i]==null)||(thearray=='undefined')){return i;}}return thearray.length;};this.array_pushstack=function(thearray,newval){var arraysize=this.array_stacksize(thearray);thearray[arraysize]=newval;};this.array_popstack=function(thearray){var arraysize=this.array_stacksize(thearray);var theval=thearray[arraysize-1];delete thearray[arraysize-1];return theval;};}
var input_red='input-warn';var input_green='input-ok';var input_ok_box='input-ok-content';var input_warn_box='input-warn-content';var img_blank='blank.gif';var img_tick='aff_tick.gif';var img_cross='aff_cross.gif';var uagent=navigator.userAgent.toLowerCase();var is_safari=((uagent.indexOf('safari')!=-1)||(navigator.vendor=="Apple Computer, Inc.")||(uagent.indexOf('konqueror')!=-1)||(uagent.indexOf('khtml')!=-1));var is_opera=(uagent.indexOf('opera')!=-1);var is_webtv=(uagent.indexOf('webtv')!=-1);var is_ie=((uagent.indexOf('msie')!=-1)&&(!is_opera)&&(!is_safari)&&(!is_webtv));var is_ie4=((is_ie)&&(uagent.indexOf("msie 4.")!=-1));var is_ie7=((is_ie)&&(uagent.indexOf("msie 7.")!=-1));var is_moz=(navigator.product=='Gecko');var is_ns=((uagent.indexOf('compatible')==-1)&&(uagent.indexOf('mozilla')!=-1)&&(!is_opera)&&(!is_webtv)&&(!is_safari));var is_ns4=((is_ns)&&(parseInt(navigator.appVersion)==4));var is_win=((uagent.indexOf("win")!=-1)||(uagent.indexOf("16bit")!=-1));var is_mac=((uagent.indexOf("mac")!=-1)||(navigator.vendor=="Apple Computer, Inc."));var ua_vers=parseInt(navigator.appVersion);var ipb_pages_shown=0;var ipb_pages_array=new Array();var ipb_skin_url=ipb_skin_url?ipb_skin_url:ipb_var_image_url;function gbl_check_search_box(){try{var _cb=document.getElementById('gbl-search-checkbox');var _fd=document.getElementById('gbl-search-forums');if(_cb.checked&&ipb_input_f){_fd.value=ipb_input_f;}else{_fd.value='all';}}catch(error){}};function show_inline_messages(){var _string=window.location.toString();var _msg_box=null;if(_string.indexOf('?___msg=')!=-1||_string.indexOf(';___msg=')!=-1||_string.indexOf('&___msg=')!=-1){try{if(parent.document.getElementById('ipd-msg-text')){_msg_box=parent.document.getElementById('ipd-msg-text');}else{_msg_box=document.getElementById('ipd-msg-text');}}catch(error){alert(error);}var message=_string.replace(/^.*[\?;&]___msg=(.+?)(&.*$|$)/,"$1");message=unescape(message);if(message_pop_up_lang[message]){try{_msg_box.innerHTML=message_pop_up_lang[message];centerdiv=new center_div();centerdiv.divname='ipd-msg-wrapper';centerdiv.move_div();var _this_to=setTimeout("hide_inline_messages_instant()",2000);}catch(anerror){alert(message_pop_up_lang[message]);}}}};function show_inline_messages_instant(msg){_msg_box=document.getElementById('ipd-msg-text');_msg_box.innerHTML=message_pop_up_lang[msg];centerdiv=new center_div();centerdiv.divname='ipd-msg-wrapper';centerdiv.move_div();var _this_to=setTimeout("hide_inline_messages_instant()",2000);};function hide_inline_messages_instant(){try{document.getElementById('ipd-msg-wrapper').style.display='none';parent.document.getElementById('ipd-msg-wrapper').style.display='none';}catch(acold){}};function iframe_include(){this.iframe_id=null;this.iframe_obj=null;this.iframe_add_to_div=null;this.iframe_add_to_div_obj=null;this.iframe_main_wrapper=null;this.iframe_classname='GBL-component-iframe';this.ok_to_go=1;this.iframe_height=300;this.ajax='';};iframe_include.prototype.init=function(){try{this.iframe_add_to_div_obj=document.getElementById(this.iframe_add_to_div);}catch(error){this.ok_to_go=0;}};iframe_include.prototype.include=function(url){if(!this.ok_to_go){return false;}var iheight=parseInt(this.iframe_add_to_div_obj.style.height);var iwidth=parseInt(this.iframe_add_to_div_obj.style.width);if(this.iframe_obj){this.iframe_add_to_div_obj.removeChild(this.iframe_obj);}this.iframe_obj=document.createElement('IFRAME');this.iframe_obj.src=url;this.iframe_obj.id=this.iframe_id;this.iframe_obj.name=this.iframe_id;this.iframe_obj.scrolling='no';this.iframe_obj.frameBorder='no';this.iframe_obj.border='0';this.iframe_obj.className=this.iframe_classname;this.iframe_obj.style.width=iwidth?iwidth+'px':'100%';this.iframe_obj.style.height=iheight?iheight-5+'px':this.iframe_height+'px';this.iframe_obj.style.overflow='hidden';this.iframe_obj.style.padding='0px';this.iframe_obj.style.margin='0px';this.ajax=new ajax_request();this.iframe_add_to_div_obj.style.padding='0px';this.iframe_add_to_div_obj.style.margin='0px';if(is_ie&&!is_ie7){this.iframe_add_to_div_obj.style.paddingLeft='6px';this.iframe_add_to_div_obj.style.paddingRight='6px';}this.iframe_obj.iframe_loaded=0;this.iframe_obj.iframe_init=0;this.iframe_obj._this=this;this.iframe_add_to_div_obj.style.overflow='';this.iframe_add_to_div_obj.appendChild(this.iframe_obj);this.ajax.show_loading(ajax_load_msg);if(is_ie){this.iframe_obj.allowTransparency=true;this.iframe_obj.onreadystatechange=this.iframe_on_load_ie;}else{this.iframe_obj.onload=this.iframe_onload;}};iframe_include.prototype.iframe_onload=function(e){var _document=this._this.iframe_obj.contentDocument;if(is_safari){_document=window.frames[this.id].document;}if(!this.iframe_init){this.iframe_init=1;this.iframe_loaded=1;_document.onmousedown=menu_action_close;}else{this.iframe_loaded=1;_document.onmousedown=menu_action_close;}this._this.ajax.hide_loading();try{_document.getElementsByTagName('body')[0].style.padding='0px';_document.getElementsByTagName('body')[0].style.margin='0px';}catch(error){}var _new_height=parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetHeight);if(_new_height>0){if(is_safari){_new_height+=3;}this._this.iframe_obj.style.height=_new_height+"px";this._this.iframe_add_to_div_obj.style.height=_new_height+"px";}var style=document.getElementsByTagName('style');var _new_style='';for(i in style){_new_style+="\n"+style[i].innerHTML;}try{_document.getElementsByTagName('style')[0].innerHTML=_new_style;}catch(error){}};iframe_include.prototype.iframe_on_load_ie=function(e){if(this.readyState=='complete'){var _document='';if(this._this.iframe_obj.contentWindow){_document=this._this.iframe_obj.contentWindow.document;}else if(this._this.iframe_obj.document){_document=this._this.iframe_obj.document;}else{_document=window.frames[this.id].document;}if(!this.iframe_init){this.iframe_init=1;this.iframe_loaded=1;_document.onmousedown=menu_action_close;}else{this.iframe_loaded=1;_document.onmousedown=menu_action_close;}var style=document.getElementsByTagName('style');var _new_style='';for(i in style){if(style[i].innerHTML){_new_style+="\n"+style[i].innerHTML;}}var _urls=_new_style.match(/@import\s+?url\(\s+?['"](.+?)['"]\s+?\);/ig);if(_urls&&_urls.length){for(i=0;i<=_urls.length;i++){if(typeof(_urls[i])!='undefined'){_urls[i]=_urls[i].replace(/@import\s+?url\(\s+?['"](.+?)['"]\s+?\);/ig,"$1");if(typeof(_urls[i])!='undefined'){_document.createStyleSheet(_urls[i]);}}}}this._this.ajax.hide_loading();try{_document.getElementsByTagName('body')[0].style.padding='0px';_document.getElementsByTagName('body')[0].style.margin='0px';}catch(error){}var _new_height=parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetHeight);var _new_width=parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetWidth);if(_new_height>0){this._this.iframe_obj.style.height=_new_height+"px";this._this.iframe_add_to_div_obj.style.height=_new_height+"px";}if(_new_width>0){this._this.iframe_obj.style.width=_new_width+"px";this._this.iframe_add_to_div_obj.style.width=_new_width+"px";}}};function ie_fix_png(){if(is_ie){document.onreadystatechange=ie_fix_png_do;}}function ie_fix_png_do(){if(document.readyState=='complete'){var pos=navigator.userAgent.indexOf("MSIE ");var version=navigator.userAgent.substring(pos+5);var blanky=ipb_skin_url+"/blank.gif";var _sw=screen.width*(parseInt(ipsclass.settings['resize_percent'])/100);if(pos==-1){return false;}if(!((version.indexOf("5.5")==0)||(version.indexOf("6")==0))&&(navigator.platform==("Win32"))){return;}var images=document.getElementsByTagName('IMG');var _len=images.length;if(_len){for(var i=0;i<_len;i++){if(images[i].src.match(/\.png$/)){var element=images[i];var _width=0;var _height=0;var _src=0;element._width=element._width?parseInt(element._width):0;element._resized=parseInt(element._resized);if(!element.style.width){_width=element.width;}if(!element.style.height){_height=element.height;}_src=element.src;if(_width<_sw&&!element._resized&&element._width<_sw){element.src=blanky;if(_width){element.style.width=_width+"px";}if(_height){element.style.height=_height+"px";}element.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_src+"',sizingMethod='scale')";}else{}}}}}}function add_onload_event(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();};func();};}}function add_shadow(wrapname,divname){var divobj=document.getElementById(divname);var wrapobj=document.getElementById(wrapname);if(is_ie){wrapobj.className='shadow-ie';wrapobj.style.width=divobj.offsetWidth+1+'px';wrapobj.style.height=divobj.offsetHeight+1+'px';}else{wrapobj.className='shadow-moz';wrapobj.style.width=divobj.offsetWidth+0+'px';wrapobj.style.height=divobj.offsetHeight+0+'px';}}function global_dst_check(tzo,dst){var thisoffset=tzo+dst;var dstoffset=Math.abs(new Date().getTimezoneOffset()/60);var dstset=0;var url=ipb_var_base_url+'act=xmlout&do=dst-autocorrection&md5check='+ipb_md5_check;if(Math.abs(thisoffset-dstoffset)!=0){try{xml_dst_set(url+'&xml=1');dstset=1;}catch(e){dstset=0;}if(dstset==0){window.location=url;}}}function my_getcookie(name){return ipsclass.my_getcookie(name);}function my_setcookie(name,value,sticky){return ipsclass.my_setcookie(name,value,sticky);}function lang_build_string(){if(!arguments.length||!arguments){return;}var string=arguments[0];for(var i=1;i<arguments.length;i++){var match=new RegExp('<%'+i+'>','gi');string=string.replace(match,arguments[i]);}return string;}function friends_pop(extra_url){ipb_var_base_url=ipb_var_base_url.replace('&amp;','&');if(extra_url){extra_url=extra_url.replace('&amp;','&');}else{extra_url='';}ipsclass.pop_up_window(ipb_var_base_url+'act=profile&CODE=friends_list_popup'+extra_url,450,400,'Friends');}function buddy_pop(){var not_loaded_yet=0;if(use_enhanced_js){try{xml_myassistant_init();not_loaded_yet=1;}catch(e){not_loaded_yet=0;}}if(!not_loaded_yet){ipb_var_base_url=ipb_var_base_url.replace('&amp;','&');window.open(ipb_var_base_url+'act=buddy','BrowserBuddy','width=250,height=500,resizable=yes,scrollbars=yes');}}function check_enter(pages_id,e){var keypress=e.keyCode?e.keyCode:e.which?e.which:e.charCode;if(keypress==13){do_multi_page_jump(pages_id);}}function do_multi_page_jump(pages_id){var pages=1;var cur_st=ipb_var_st;var cur_page=1;var total_posts=ipb_pages_array[pages_id][2];var per_page=ipb_pages_array[pages_id][1];var url_bit=ipb_pages_array[pages_id][0];var userPage=parseInt(document.getElementById('st-'+pages_id).value);var st_type=document.getElementById('st-type-'+pages_id).value;st_type=st_type?st_type:'st';url_bit=url_bit.replace(new RegExp("&amp;","g"),'&');if(total_posts%per_page==0){pages=total_posts/per_page;}else{pages=Math.ceil(total_posts/per_page);}if(cur_st>0){cur_page=cur_st/per_page;cur_page=cur_page-1;}if(userPage>0){if(userPage<1){userPage=1;}if(userPage>pages){userPage=pages;}if(userPage==1){start=0;}else{start=(userPage-1)*per_page;}if(start){window.location=url_bit+"&"+st_type+"="+start;}else{window.location=url_bit;}return false;}}function pages_st_focus(pages_id){document.getElementById('st-'+pages_id).focus();}function ShowHide(id1,id2){if(id1!='')toggleview(id1);if(id2!='')toggleview(id2);}function my_getbyid(id){itm=null;if(document.getElementById){itm=document.getElementById(id);}else if(document.all){itm=document.all[id];}else if(document.layers){itm=document.layers[id];}return itm;}function toggleview(id){if(!id)return;if(itm=my_getbyid(id)){if(itm.style.display=="none"){my_show_div(itm);}else{my_hide_div(itm);}}}function my_hide_div(itm){if(!itm)return;itm.style.display="none";}function my_show_div(itm){if(!itm)return;itm.style.display="";}function change_cell_color(id,cl){itm=my_getbyid(id);if(itm){itm.className=cl;}}function togglecategory(fid,add){saved=new Array();clean=new Array();if(tmp=ipsclass.my_getcookie('collapseprefs')){saved=tmp.split(",");}for(i=0;i<saved.length;i++){if(saved[i]!=fid&&saved[i]!=""){clean[clean.length]=saved[i];}}if(add){clean[clean.length]=fid;my_show_div(my_getbyid('fc_'+fid));my_hide_div(my_getbyid('fo_'+fid));}else{my_show_div(my_getbyid('fo_'+fid));my_hide_div(my_getbyid('fc_'+fid));}ipsclass.my_setcookie('collapseprefs',clean.join(','),1);}function locationjump(url){window.location=ipb_var_base_url+url;}function chooseskin(obj){choosebox=obj.options[obj.selectedIndex].value;extravars='';if(choosebox!=-1&&!isNaN(choosebox)){if(document.skinselectorbox.skinurlbits.value){extravars='&'+document.skinselectorbox.skinurlbits.value;extravars=extravars.replace(/setskin=\d{1,}/g,'');extravars=extravars.replace(/skinid=\d{1,}/g,'');extravars=extravars.replace(/cal_id=&/g,'');extravars=extravars.replace(/&{1,}/g,'&');extravars=extravars.replace(/s=&/g,'');}locationjump('setskin=1&skinid='+choosebox+extravars);}}function chooselang(obj){choosebox=obj.options[obj.selectedIndex].value;extravars='';if(document.langselectorbox.langurlbits.value){extravars='&'+document.langselectorbox.langurlbits.value;extravars=extravars.replace(/setlanguage=\d{1,}/g,'');extravars=extravars.replace(/cal_id=&/g,'');extravars=extravars.replace(/langid=\w{1,}/g,'');extravars=extravars.replace(/&{1,}/g,'&');extravars=extravars.replace(/s=&/g,'');}locationjump('setlanguage=1&langid='+choosebox+extravars);}function PopUp(url,name,width,height,center,resize,scroll,posleft,postop){showx="";showy="";if(posleft!=0){X=posleft}if(postop!=0){Y=postop}if(!scroll){scroll=1}if(!resize){resize=1}if((parseInt(navigator.appVersion)>=4)&&(center)){X=(screen.width-width)/2;Y=(screen.height-height)/2;}if(X>0){showx=',left='+X;}if(Y>0){showy=',top='+Y;}if(scroll!=0){scroll=1}var Win=window.open(url,name,'width='+width+',height='+height+showx+showy+',resizable='+resize+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no');}function stacksize(thearray){for(i=0;i<thearray.length;i++){if((thearray[i]=="")||(thearray[i]==null)||(thearray=='undefined')){return i;}}return thearray.length;}function pushstack(thearray,newval){arraysize=stacksize(thearray);thearray[arraysize]=newval;}function popstack(thearray){arraysize=stacksize(thearray);theval=thearray[arraysize-1];delete thearray[arraysize-1];return theval;}function innerhtml_template_to_html(t){t=t.replace(/&lt;%(\d+?)&gt;/ig,"<%$1>");t=t.replace(/%3C%(\d+?)%3E/ig,"<%$1>");return t;}function global_cancel_bubble(obj,extra){if(!obj||is_ie){if(extra){window.event.returnValue=false;}window.event.cancelBubble=true;return window.event;}else{obj.stopPropagation();if(extra){obj.preventDefault();}return obj;}}function _get_obj_leftpos(obj){var left=obj.offsetLeft;while((obj=obj.offsetParent)!=null){left+=obj.offsetLeft;}return left;}function _get_obj_toppos(obj){var top=obj.offsetTop;while((obj=obj.offsetParent)!=null){top+=obj.offsetTop;}return top;}function center_div(){this.divname='';this.divobj='';this.shimobj='';}center_div.prototype.move_div=function(){try{if(parent.document.getElementById(this.divname)){this._document=parent.document;this._window=parent.window;}}catch(e){return;}this.divobj=this._document.getElementById(this.divname);var my_width=0;var my_height=0;if(typeof(this._window.innerWidth)=='number'){my_width=this._window.innerWidth;my_height=this._window.innerHeight;}else if(this._document.documentElement&&(this._document.documentElement.clientWidth||this._document.documentElement.clientHeight)){my_width=this._document.documentElement.clientWidth;my_height=this._document.documentElement.clientHeight;}else if(this._document.body&&(this._document.body.clientWidth||this._document.body.clientHeight)){my_width=this._document.body.clientWidth;my_height=this._document.body.clientHeight;}this.divobj.style.position='absolute';this.divobj.style.display='block';this.divobj.style.zIndex=-1;if(is_ie){var layer_html=this.divobj.innerHTML;var full_html="<iframe id='"+this.divname+"-shim' src='about:blank' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+layer_html;this.divobj.innerHTML=full_html;}var divheight=parseInt(this.divobj.style.height)?parseInt(this.divobj.style.height):parseInt(this.divobj.offsetHeight);var divwidth=parseInt(this.divobj.style.width)?parseInt(this.divobj.style.width):parseInt(this.divobj.offsetWidth);divheight=divheight?divheight:200;divwidth=divwidth?divwidth:400;var scrolly=this.getYscroll();var setX=(my_width-divwidth)/2;var setY=(my_height-divheight)/2+scrolly;setX=(setX<0)?0:setX;setY=(setY<0)?0:setY;this.divobj.style.left=setX+"px";this.divobj.style.top=setY+"px";this.divobj.style.zIndex=99;};center_div.prototype.hide_div=function(){try{if(!this.divobj){return;}else{this.divobj.style.display='none';}}catch(e){return;}};center_div.prototype.getYscroll=function(){var scrollY=0;if(this._document.documentElement&&this._document.documentElement.scrollTop){scrollY=this._document.documentElement.scrollTop;}else if(this._document.body&&this._document.body.scrollTop){scrollY=this._document.body.scrollTop;}else if(this._window.pageYOffset){scrollY=this._window.pageYOffset;}else if(this._window.scrollY){scrollY=this._window.scrollY;}return scrollY;};ipsmenu=new ips_menu();function ips_menu(){this.menu_registered=new Array();this.menu_openfuncs=new Array();this.menu_over_css=new Array();this.menu_out_css=new Array();this.menu_open_event=new Array();this.dynamic_register=new Array();this.menu_cur_open=null;this.dynamic_html=null;}ips_menu.prototype.register=function(cid,callback,menu_over_css,menu_out_css,event_type){if(event_type){this.menu_open_event[cid]=(event_type=='onmouseover')?'onmouseover':'onclick';}this.menu_registered[cid]=new ips_menu_class(cid);if(callback){this.menu_openfuncs[cid]=callback;}if(menu_over_css&&menu_out_css){this.menu_over_css[cid]=menu_over_css;this.menu_out_css[cid]=menu_out_css;}return this.menu_registered[cid];};ips_menu.prototype.close=function(){if(this.menu_cur_open){this.menu_registered[this.menu_cur_open].close();}};function ips_menu_class(cid){this.cid=cid;this.initialized=false;this.init_control_object();this.init_menu();};ips_menu_class.prototype.init_control_object=function(){this.cid_obj=document.getElementById(this.cid);try{this.cid_obj.style.cursor="pointer";}catch(e){this.cid_obj.style.cursor="hand";}this.cid_obj.unselectable=true;if(ipsmenu.menu_open_event[this.cid]=='onmouseover'){this.cid_obj.onmouseover=ips_menu_events.prototype.event_onclick;}else{this.cid_obj.onclick=ips_menu_events.prototype.event_onclick;this.cid_obj.onmouseover=ips_menu_events.prototype.event_onmouseover;}this.cid_obj.onmouseout=ips_menu_events.prototype.event_onmouseout;};ips_menu_class.prototype.init_menu=function(){this.cid_menu_obj=document.getElementById(this.cid+'_menu');if(this.cid_menu_obj){if(this.initialized){return;}this.cid_menu_obj.style.display="none";this.cid_menu_obj.style.position="absolute";this.cid_menu_obj.style.left="0px";this.cid_menu_obj.style.top="0px";this.cid_menu_obj.onclick=ipsclass.cancel_bubble_low;this.cid_menu_obj.zIndex=50;this.initialized=true;}};ips_menu_class.prototype.open=function(obj){if(!this.cid_menu_obj){this.initialized=false;this.init_menu();}if(ipsmenu.menu_cur_open!=null){ipsmenu.menu_registered[ipsmenu.menu_cur_open].close();}if(ipsmenu.menu_cur_open==obj.id){return false;}ipsmenu.menu_cur_open=obj.id;var left_px=ipsclass.get_obj_leftpos(obj);var top_px=ipsclass.get_obj_toppos(obj)+obj.offsetHeight;var ifid=obj.id;this.cid_menu_obj.style.zIndex=-1;this.cid_menu_obj.style.display="";var width=parseInt(this.cid_menu_obj.style.width)?parseInt(this.cid_menu_obj.style.width):this.cid_menu_obj.offsetWidth;if((left_px+width)>=document.body.clientWidth){left_px=left_px+obj.offsetWidth-width;}if(is_moz){top_px-=1;}this.cid_menu_obj.style.left=left_px+"px";this.cid_menu_obj.style.top=top_px+"px";this.cid_menu_obj.style.zIndex=100;if(ipsmenu.menu_openfuncs[obj.id]){eval(ipsmenu.menu_openfuncs[obj.id]);}if(is_ie){try{if(!document.getElementById('if_'+obj.id)){var iframeobj=document.createElement('iframe');iframeobj.src='javascript:;';iframeobj.id='if_'+obj.id;document.getElementsByTagName('body').appendChild(iframeobj);}else{var iframeobj=document.getElementById('if_'+obj.id);}iframeobj.scrolling='no';iframeobj.frameborder='no';iframeobj.className='iframeshim';iframeobj.style.position='absolute';iframeobj.style.width=parseInt(this.cid_menu_obj.offsetWidth)+'px';iframeobj.style.height=parseInt(this.cid_menu_obj.offsetHeight)+'px';iframeobj.style.top=this.cid_menu_obj.style.top;iframeobj.style.left=this.cid_menu_obj.style.left;iframeobj.style.zIndex=99;iframeobj.style.display="block";}catch(error){}}if(is_safari){try{mlinks=this.cid_menu_obj.getElementsByTagName('a');for(var i=0;i<=mlinks.length;i++){if(mlinks[i]!=null&&mlinks[i].href!=null&&mlinks[i].href&&(mlinks[i].href.indexOf('#',0)!=(mlinks[i].href.length-1))){mlinks[i].onmousedown=ips_menu_events.prototype.event_safari_onclick_handler;mlinks[i].id='saf-link-'+this.cid+i;}}}catch(error){}}if(this.cid_obj.editor_id){this.cid_obj.state=true;IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj,'mousedown');}return false;};ips_menu_class.prototype.close=function(){if(this.cid_menu_obj!=null){this.cid_menu_obj.style.display="none";}else if(ipsmenu.menu_cur_open!=null){ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid_menu_obj.style.display='none';}ipsmenu.menu_cur_open=null;if(this.cid_obj){if(ipsmenu.menu_out_css[this.cid_obj.id]){this.cid_obj.className=ipsmenu.menu_out_css[this.cid_obj.id];}}if(is_ie){try{document.getElementById('if_'+this.cid).style.display="none";}catch(error){}}if(this.cid_obj.editor_id){this.cid_obj.state=false;IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj,'mouseout');}};ips_menu_class.prototype.hover=function(e){if(ipsmenu.menu_cur_open!=null){if(ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid!=this.id){this.open(e);}}};function ips_menu_events(){};ips_menu_events.prototype.event_safari_onclick_handler=function(){if(this.id){window.location=document.getElementById(this.id).href;}};ips_menu_events.prototype.event_onmouseover=function(e){e=ipsclass.cancel_bubble(e,true);ipsmenu.menu_registered[this.id].hover(this);if(ipsmenu.menu_over_css[this.id]){this.className=ipsmenu.menu_over_css[this.id];}};ips_menu_events.prototype.event_onmouseout=function(e){e=ipsclass.cancel_bubble(e,true);if(ipsmenu.menu_out_css[this.id]&&ipsmenu.menu_cur_open!=this.id){this.className=ipsmenu.menu_out_css[this.id];}};ips_menu_events.prototype.event_onclick=function(e){e=ipsclass.cancel_bubble(e,true);if(ipsmenu.menu_cur_open==null){if(ipsmenu.menu_over_css[this.id]){this.className=ipsmenu.menu_over_css[this.id];}ipsmenu.menu_registered[this.id].open(this);}else{if(ipsmenu.menu_cur_open==this.id){ipsmenu.menu_registered[this.id].close();if(ipsmenu.menu_out_css[this.id]){this.className=ipsmenu.menu_out_css[this.id];}}else{if(ipsmenu.menu_over_css[this.id]){this.className=ipsmenu.menu_over_css[this.id];}ipsmenu.menu_registered[this.id].open(this);};}};function menu_do_global_init(){document.onclick=menu_action_close;if(ipsmenu.dynamic_html!=null&&ipsmenu.dynamic_html!=''){}if(ipsmenu.dynamic_register.length){for(var i=0;i<ipsmenu.dynamic_register.length;i++){if(ipsmenu.dynamic_register[i]){ipsmenu.register(ipsmenu.dynamic_register[i]);}}}};function menu_action_close(e){try{if(e.button==2||e.button==3){return;}}catch(acold){};ipsmenu.close(e);};var css_mainwrap='popupmenu';var css_menusep='popupmenu-item';var css_menusep_last='popupmenu-item-last';var img_item="<img src='"+ipb_var_image_url+"/menu_item.gif' border='0' alt='V' style='vertical-align:middle' />";var img_action="<img src='"+ipb_var_image_url+"/menu_item2.gif' border='0' alt='V' />";function make_image(img)
{return"<img src='"+ipb_var_image_url+"/"+img+"' border='0' alt='-' class='ipd' />";}
function menu_build_menu(cid,menuinput,complexmenu)
{var html="\n<div class='"+css_mainwrap+"' id='"+cid+"_menu' style='display:none;z-index:100'>\n";if(!complexmenu)
{len=parseInt(menuinput.length);if(len>0)
{for(var i in menuinput)
{t=parseInt(i)+1;thisclass=(t==len)?css_menusep_last:css_menusep;if(menuinput[i].match(/^~~NODIV~~/))
{html+=menuinput[i].replace(/^~~NODIV~~/,'');}
else
{html+="<div class='"+thisclass+"'>\n"+menuinput[i]+"\n</div>\n";}}}}
else
{html+=menuinput;}
html+="\n</div>\n";if(is_ie)
{html+="\n"+'<iframe id="if_'+cid+'" src="about:blank" scrolling="no" frameborder="1" style="position:absolute;top:0px;left:0px;display:none;"></iframe>'+"\n";}
if(html!='')
{document.getElementById(cid).parentNode.innerHTML+=html;}
ipsmenu.dynamic_register[ipsmenu.dynamic_register.length+1]=cid;}
var message_pop_up_lang={'error':'An Error Occurred','no_permission':'You do not have permission for that action','cannot_cont':'Cannot continue with this request','settings_updated':'Settings Updated','pp_date_error':'Date must be a legal valid date','pp_comment_error':'You cannot post empty comments','pp_friend_exist':'That member does not appear to exist','pp_friend_already':'You already have that member as your friend','pp_friend_removed':'Friend(s) Removed','pp_icq_error':'Your ICQ identity must be numeric','pp_friend_added':'Your friend(s) have been added to your list!','pp_friend_added_mod':'Your friend must approve your request','pp_friend_approved':'Friend request approved','pp_comments_updated':'Comments updated','pp_comment_added_mod':"Comment must be approved before it's shown",'already_voted':'You have already voted','rating_updated':'Your rating has been updated','rating_added':'Your rating has been added','rating_already':'You have rated this article already'};var ipb_global_lang={'action_cancelled':'OK, action cancelled!','post_upload_not_empty':'You have an item to be uploaded. Click the UPLOAD button to upload it or click OK to continue without uploading','editor_enter_url':'Please enter the full URL','editor_enter_title':'Please enter the title for this item','editor_enter_email':'Please enter the email address','editor_enter_image':'Please enter the URL for this image','editor_enter_list':'Enter a list item','general_error':'Error','general_ok':'OK','image_resized':'Reduced: <%1>% of original size [ <%2> x <%3> ] - Click to view full image','image_attach_percent':'Reduced <%1>%','image_attach_no_percent':'Image Reduced','image_attach_dims':'<%1> x <%2>','image_attach_size':' (<%1>)','click_to_view':'Click to view full image','view_full_size':'View full size image','visit_my_website':'Visit My Website'};function ajax_request(){this.isIE=false;this.allow_use=use_enhanced_js?true:false;this.xmlhandler=null;this.error_string='';this.nocache=true;this.do_request_functon=function(){};this.loading_fired=0;this.centerdiv=null;}ajax_request.prototype.xml_init=function(){try{this.xmlhandler=new XMLHttpRequest();this.ie=false;this.allow_use=true;return true;}catch(e){try{this.xmlhandler=new ActiveXObject('Microsoft.XMLHTTP');this.ie=true;this.allow_use=true;return true;}catch(e){this.ie=true;this.allow_use=false;return false;}}};ajax_request.prototype.process=function(url,type,post){type=type=="POST"?"POST":"GET";if(this.nocache==true&&type=='GET'){url=this.nocache_url(url);}if(!this.xmlhandler){this.xml_init();}if(!this.readystate_not_ready()){this.xmlhandler.open(type,url,true);if(type=="GET"){this.xmlhandler.send(null);}else{if(typeof(this.xmlhandler.setRequestHeader)!="undefined"){this.xmlhandler.setRequestHeader('Content-Type','application/x-www-form-urlencoded');}this.xmlhandler.send(post);}if(this.xmlhandler.readyState==4&&this.xmlhandler.status==200){return true;}}return false;};ajax_request.prototype.get_element_text_ns=function(prefix,local,parentElem,index){var result="";if(prefix&&this.isIE){result=parentElem.getElementsByTagName(prefix+":"+local)[index];}else{result=parentElem.getElementsByTagName(local)[index];}if(result){if(result.childNodes.length>1){return result.childNodes[1].nodeValue;}else{return result.firstChild.nodeValue;}}else{return"n/a";}};ajax_request.prototype.nocache_url=function(url){var sep=(-1<url.indexOf("?"))?"&":"?";var mydate=new Date();var newurl=url+sep+"__="+mydate.getTime();return newurl;};ajax_request.prototype.format_for_post=function(arrayfields){var str='';try{for(var i in arrayfields){str+=i+'='+this.encodeurl(arrayfields[i])+'&';}}catch(e){}return str;};ajax_request.prototype.encodeurl=function(url){url=url.toString();var regcheck=url.match(/[\x90-\xFF]/g);if(regcheck){for(var i=0;i<i.length;i++){url=url.replace(regcheck[i],'%u00'+(regcheck[i].charCodeAt(0)&0xFF).toString(16).toUpperCase());}}return escape(url).replace(/\+/g,"%2B");};ajax_request.prototype.readystate_not_ready=function(){return(this.xmlhandler.readyState&&(this.xmlhandler.readyState<4));};ajax_request.prototype.readystate_ready_and_ok=function(){return(this.xmlhandler.readyState==4&&this.xmlhandler.status==200)?true:false;};ajax_request.prototype.onreadystatechange=function(event){if(!this.xmlhandler){this.xml_init();}if(typeof(event)=='function'){this.xmlhandler.onreadystatechange=event;}};ajax_request.prototype.show_loading=function(message){if(!this.loading_fired){this.loading_fired=1;if(message){document.getElementById('loading-layer-text').innerHTML=message;}this.centerdiv=new center_div();this.centerdiv.divname='loading-layer';this.centerdiv.move_div();add_shadow('loading-layer-shadow','loading-layer-inner');}return;};ajax_request.prototype.hide_loading=function(){try{if(this.centerdiv&&this.centerdiv.divobj){this.centerdiv.hide_div();}}catch(e){}this.loading_fired=0;return;};ajax_request.prototype.execute_javascript=function(source_code){var text_blocks=new Array();var max_iteration=50;var i=0;while(_match=source_code.match(new RegExp("<script\\s+?type=['\"]text/javascript['\"]>([^`]+?)</script>","i"))){i++;if(i>=max_iteration){break;}else{text_blocks[text_blocks.length]=_match[1];source_code=source_code.replace(_match[0],'');}}try{if(text_blocks.length){for(i=0;i<text_blocks.length;i++){eval(text_blocks[i]);}}}catch(error){}};try{if(use_enhanced_js){use_enhanced_js=ajax_request.prototype.xml_init()?1:0;}}catch(error){var use_enhanced_js=0;}
var gnp_div='get-new-posts_menu';var msg_div='get-new-msgs_menu';var mem_div='get-members';var divobj;var divopen=0;var xmlobj;var reg_img='';var myass_main;var myass_loaded=0;var pm_cycle_count=0;var search_cache={};var posts_st=0;function xml_show_new_posts(st){posts_st=st;xml_myassistant_init('posts');}function xml_myassistant_init(tab){myass_main=document.getElementById('get-myassistant');myass_drag=document.getElementById('myass-drag');myass_content=document.getElementById('myass-content');do_request_function=function(){if(!xmlobj_myass.readystate_ready_and_ok()){return;}var html=xmlobj_myass.xmlhandler.responseText;if(is_ie){html="<iframe id='myass-shim' src='about:blank' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+html;}myass_content.innerHTML=html;if(is_ie){drag_html=myass_drag.innerHTML;main_drag_html="<iframe id='myass-shim-two' src='about:blank' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+drag_html;myass_drag.innerHTML=main_drag_html;}if(is_ie){myass_shim=document.getElementById('myass-shim');myass_shim.style.width=myass_content.offsetWidth;myass_shim.style.height=myass_content.offsetHeight;myass_shim.style.zIndex=myass_content.style.zIndex-1;myass_shim.style.top=myass_content.style.top;myass_shim.style.left=myass_content.style.left;myass_shim.style.display="block";myass_shim_d=document.getElementById('myass-shim-two');myass_shim_d.style.width=myass_drag.offsetWidth;myass_shim_d.style.height=myass_drag.offsetHeight;myass_shim_d.style.zIndex=myass_drag.style.zIndex-1;myass_shim_d.style.top=myass_drag.style.top;myass_shim_d.style.left=myass_drag.style.left;myass_shim_d.style.display="block";}};xmlobj_myass=new ajax_request();xmlobj_myass.onreadystatechange(do_request_function);if(!tab){xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1');}else if(tab=='newpms'){var limit_a=0;pm_cycle_count++;if(pm_cycle_count<=ipb_new_msgs){limit_a=pm_cycle_count-1;}else{pm_cycle_count=1;}xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&limit='+limit_a);myass_content.style.width='398px';myass_content.style.overflow='auto';myass_content.style.overflowX='hidden';}else if(tab=='posts'){xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&st='+posts_st);}else{xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab);}myass_main.style.position='absolute';myass_main.style.display='block';myass_main.style.zIndex=99;if(!myass_loaded){var my_width=0;var my_height=0;if(typeof(window.innerWidth)=='number'){my_width=window.innerWidth;my_height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){my_width=document.documentElement.clientWidth;my_height=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){my_width=document.body.clientWidth;my_height=document.body.clientHeight;}var divheight=parseInt(myass_main.style.Height);var divwidth=parseInt(myass_main.style.Width);divheight=divheight?divheight:400;divwidth=divwidth?divwidth:400;var divxy=my_getcookie('ipb-myass-div');var co_ords;if(divxy&&divxy!=null){co_ords=divxy.split(',');if(co_ords.length){var final_width=co_ords[0];var final_height=co_ords[1];if(co_ords[0]>my_width){final_width=my_width-divwidth;}if(co_ords[1]>my_height){final_height=my_height-divheight;}myass_main.style.left=final_width+'px';myass_main.style.top=final_height+'px';}}else{myass_main.style.left=my_width/2-(divwidth/2)+'px';myass_main.style.top=my_height/2-(divheight/2)+'px';}Drag.cookiename='ipb-myass-div';Drag.init(myass_drag,myass_main);myass_loaded=1;}};function xml_myassistant_search(url){var keywords=document.getElementById('myass-search-input').value;var msg_field=document.getElementById('myass-search-message');var url=ipb_var_base_url+'act=Search&CODE=01&forums=all&cat_forum=forum&joinname=1&search_in=posts&result_type=topics&xml=1&keywords='+escape(keywords);if(keywords.length<4){msg_field.innerHTML=ipb_myass_chars_lang;return false;}if(search_cache[keywords]){msg_field.innerHTML=search_cache[keywords];return;}do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading();return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;msg_field.innerHTML=html;search_cache[keywords]=html;};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);};function xml_dst_set(url){do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;if(html=='error'){window.location=url.replace('&xml=1','&xml=0');}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);};function init_gd_image(){var reg_img=document.getElementById('gd-antispam');try{reg_img.style.cursor='pointer';}catch(e){reg_img.style.cursor='hand';};reg_img._ready=1;reg_img.onclick=do_change_img;};function do_change_img(){var rc='';var act='Reg';var code='image';var reg_img=document.getElementById('gd-antispam');var qparts=reg_img.src.split("?");if(!reg_img._ready){return false;}if(qparts.length>1){var qvars=qparts[1].split("&");for(var i=0;(i<qvars.length);i++){var qparts=qvars[i].split("=");if(qparts[0]=='rc'){rc=qparts[1];};if(qparts[0]=='act'){act=qparts[1];};if(qparts[0]=='CODE'){code=qparts[1];};};};var url=ipb_var_base_url+'act=xmlout&do=change-gd-img&img='+rc;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;reg_img.src=ipb_var_base_url+'act='+act+'&CODE='+code+'&rc='+html;var reg_field=document.getElementById('regid');reg_field.value=html;reg_img._ready=1;};reg_img._ready=0;xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);}
var Drag={obj:null,fx:null,fy:null,cookiename:null,keeponscreen:true,init:function(o,oRoot,minX,maxX,minY,maxY,bSwapHorzRef,bSwapVertRef,fXMapper,fYMapper){o.onmousedown=Drag.start;o.onmouseover=Drag.cursorchange;o.hmode=bSwapHorzRef?false:true;o.vmode=bSwapVertRef?false:true;o.root=oRoot&&oRoot!=null?oRoot:o;if(o.hmode&&isNaN(parseInt(o.root.style.left)))o.root.style.left="0px";if(o.vmode&&isNaN(parseInt(o.root.style.top)))o.root.style.top="0px";if(!o.hmode&&isNaN(parseInt(o.root.style.right)))o.root.style.right="0px";if(!o.vmode&&isNaN(parseInt(o.root.style.bottom)))o.root.style.bottom="0px";o.minX=typeof minX!='undefined'?minX:null;o.minY=typeof minY!='undefined'?minY:null;o.maxX=typeof maxX!='undefined'?maxX:null;o.maxY=typeof maxY!='undefined'?maxY:null;o.xMapper=fXMapper?fXMapper:null;o.yMapper=fYMapper?fYMapper:null;if(Drag.keeponscreen){Drag.my_width=0;Drag.my_height=0;if(typeof(window.innerWidth)=='number'){Drag.my_width=window.innerWidth;Drag.my_height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){Drag.my_width=document.documentElement.clientWidth;Drag.my_height=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){Drag.my_width=document.body.clientWidth;Drag.my_height=document.body.clientHeight;}}o.root.onDragStart=new Function();o.root.onDragEnd=new Function();o.root.onDrag=new Function();},cursorchange:function(e){var o=Drag.obj=this;o.style.cursor='move';},start:function(e){var o=Drag.obj=this;e=Drag.fixE(e);var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);o.root.onDragStart(x,y);o.lastMouseX=e.clientX;o.lastMouseY=e.clientY;if(o.hmode){if(o.minX!=null)o.minMouseX=e.clientX-x+o.minX;if(o.maxX!=null)o.maxMouseX=o.minMouseX+o.maxX-o.minX;}else{if(o.minX!=null)o.maxMouseX=-o.minX+e.clientX+x;if(o.maxX!=null)o.minMouseX=-o.maxX+e.clientX+x;}if(o.vmode){if(o.minY!=null)o.minMouseY=e.clientY-y+o.minY;if(o.maxY!=null)o.maxMouseY=o.minMouseY+o.maxY-o.minY;}else{if(o.minY!=null)o.maxMouseY=-o.minY+e.clientY+y;if(o.maxY!=null)o.minMouseY=-o.maxY+e.clientY+y;}document.onmousemove=Drag.drag;document.onmouseup=Drag.end;return false;},drag:function(e){e=Drag.fixE(e);var o=Drag.obj;var ey=e.clientY;var ex=e.clientX;var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);var nx,ny;if(o.minX!=null)ex=o.hmode?Math.max(ex,o.minMouseX):Math.min(ex,o.maxMouseX);if(o.maxX!=null)ex=o.hmode?Math.min(ex,o.maxMouseX):Math.max(ex,o.minMouseX);if(o.minY!=null)ey=o.vmode?Math.max(ey,o.minMouseY):Math.min(ey,o.maxMouseY);if(o.maxY!=null)ey=o.vmode?Math.min(ey,o.maxMouseY):Math.max(ey,o.minMouseY);nx=x+((ex-o.lastMouseX)*(o.hmode?1:-1));ny=y+((ey-o.lastMouseY)*(o.vmode?1:-1));if(o.xMapper)nx=o.xMapper(y);else if(o.yMapper)ny=o.yMapper(x);if(Drag.keeponscreen){ny=ny<0?0:ny;nx=nx<0?0:nx;if(Drag.my_width){nx=nx>Drag.my_width-parseInt(o.root.style.width)?Drag.my_width-parseInt(o.root.style.width):nx;}}Drag.obj.root.style[o.hmode?"left":"right"]=nx+"px";Drag.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";Drag.obj.lastMouseX=ex;Drag.obj.lastMouseY=ey;Drag.obj.root.onDrag(nx,ny);return false;},end:function(){document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]));var o=Drag.obj;fy=parseInt(o.root.style.top);fx=parseInt(o.root.style.left);if(Drag.cookiename){try{ipsclass.my_setcookie(Drag.cookiename,fx+','+fy,1);}catch(e){}}Drag.obj=null;},addEvent:function(elm,evType,fn,useCapture){if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);return true;}else if(elm.attachEvent){var r=elm.attachEvent('on'+evType,fn);return r;}else{elm['on'+evType]=fn;}},fixE:function(e){if(typeof e=='undefined')e=window.event;if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;return e;}};var mystored_selection='';var post_cache=new Array();var ajax_loaded=1;var ignore_cache=new Array();var rate_value=0;add_onload_event(fix_linked_image_sizes);function fix_linked_image_sizes_attach_thumb(attach_id,width,height,file_size){var _img='<img src="'+ipb_var_image_url+'/img-resized.png" style="vertical-align:middle" border="0" alt="" />';var img_obj=document.getElementById('ipb-attach-img-'+attach_id);var div_obj=document.getElementById('ipb-attach-div-'+attach_id);var ct_obj=document.getElementById('ipb-attach-ct-'+attach_id);var cb_obj=document.getElementById('ipb-attach-cb-'+attach_id);var url_obj=document.getElementById('ipb-attach-url-'+attach_id);var tbl_obj=document.getElementById('ipb-attach-table-'+attach_id);var _width=parseInt(img_obj.width)?parseInt(img_obj.width):parseInt(img_obj.style.width);var _height=parseInt(img_obj.height)?parseInt(img_obj.height):parseInt(img_obj.style.height);var _padding=5;var _percent=0;if(is_ie){_width=parseInt(img_obj.currentStyle['width']);_height=parseInt(img_obj.currentStyle['height']);}if(is_safari){tbl_obj.style.display='inline-block';}if(width&&height){_percent=Math.ceil(100-parseInt(_width/width*100));}img_obj.className='ipb';img_obj.title=ipb_global_lang['click_to_view'];img_obj.onmouseover=fix_attach_images_mouseover;img_obj.onclick=function(event){ipsclass.pop_up_window(url_obj.href,width+20,height+20);ipsclass.cancel_bubble(event);};div_obj.style.width=(_width>140?_width:140)+'px';div_obj.style.height=_height+(_padding*2)+28+'px';div_obj.className='resized-linked-image';div_obj.style.paddingTop=_padding+"px";div_obj.style.paddingBottom=_padding+"px";div_obj.style.paddingLeft=_padding+3+"px";div_obj.style.paddingRight=_padding+3+"px";div_obj.style.textAlign='center';div_obj.title=ipb_global_lang['click_to_view'];ct_obj.style.fontSize='9px';cb_obj.style.fontSize='9px';cb_obj.style.textAlign='center';if(_percent>0){ct_obj.innerHTML=_img+'&nbsp;'+ipsclass.lang_build_string(ipb_global_lang['image_attach_percent'],_percent);}else{ct_obj.innerHTML=_img+'&nbsp;'+ipb_global_lang['image_attach_no_percent'];}cb_obj.innerHTML="";if(width&&height){cb_obj.innerHTML=ipsclass.lang_build_string(ipb_global_lang['image_attach_dims'],width,height);}cb_obj.innerHTML+=ipsclass.lang_build_string(ipb_global_lang['image_attach_size'],file_size);}function fix_linked_image_sizes(){if(ipsclass.settings['do_linked_resize']!=1){return true;}var images=document.getElementsByTagName('IMG');var _padding=2;var _count=0;var _img='<img src="'+ipb_var_image_url+'/img-resized.png" style="vertical-align:middle" border="0" alt="" />';var _img2='<img src="'+ipb_var_image_url+'/folder_attach_images/attach_zoom_in.png" style="vertical-align:middle" border="0" alt="" />';var _sw=screen.width*(parseInt(ipsclass.settings['resize_percent'])/100);for(var i=0;i<images.length;i++){if(images[i].className=='linked-image'){_count++;if(images[i].width>_sw){var _width=images[i].width;var _height=images[i].height;var _percent=0;images[i].width=_sw;if(images[i].width<_width&&_width>0&&images[i].width>0){_percent=Math.ceil(parseInt(images[i].width/_width*100));}images[i].id='--ipb-img-resizer-'+_count;images[i]._resized=1;images[i]._width=_width;var div=document.createElement('div');div.innerHTML=_img+'&nbsp;'+ipsclass.lang_build_string(ipb_global_lang['image_resized'],_percent,_width,_height);div.style.width=images[i].width-(_padding*2)+'px';div.className='resized-linked-image';div.style.paddingTop=_padding+"px";div.style.paddingBottom=_padding+"px";div.style.paddingLeft=_padding+"px";div.style.paddingRight=_padding+"px";div._is_div=1;div._resize_id=_count;div.onclick=fix_linked_images_onclick;div.onmouseover=fix_linked_images_mouseover;div.title=ipb_global_lang['click_to_view'];div._src=images[i].src;images[i].parentNode.insertBefore(div,images[i]);}}}}function fix_linked_images_onclick(e){PopUp(this._src,'popup',screen.width,screen.height,1,1,1);e=ipsclass.cancel_bubble_all(e);return false;};function fix_attach_images_mouseover(e){try{this.style.cursor='pointer';}catch(acold){}}function fix_linked_images_mouseover(e){try{this.style.cursor='pointer';}catch(acold){}}function emoticon(ecode,eobj,eurl){ecode=' '+ecode+' ';var obj_ta=document.getElementById('fastreplyarea');if((ua_vers>=4)&&is_ie&&is_win){if(obj_ta.isTextEdit){obj_ta.focus();var sel=document.selection;var rng=sel.createRange();rng.colapse;if((sel.type=="Text"||sel.type=="None")&&rng!=null){if(ecode!=""&&rng.text.length>0)ecode=rng.text+ecode;rng.text=ecode;}}else{obj_ta.value+=ecode;}}else if(obj_ta.selectionEnd){var ss=obj_ta.selectionStart;var st=obj_ta.scrollTop;var es=obj_ta.selectionEnd;if(es<=2){es=obj_ta.textLength;}var start=(obj_ta.value).substring(0,ss);var middle=(obj_ta.value).substring(ss,es);var end=(obj_ta.value).substring(es,obj_ta.textLength);if(obj_ta.selectionEnd-obj_ta.selectionStart>0){middle=ecode+middle;}else{middle=ecode+middle;}obj_ta.value=start+middle+end;var cpos=ss+(middle.length);obj_ta.selectionStart=cpos;obj_ta.selectionEnd=cpos;obj_ta.scrollTop=st;}else{obj_ta.value+=ecode;}obj_ta.focus();if((ua_vers>=4)&&is_ie&&is_win&&emowindow!='undefined'){emowindow.focus();}}function topic_scroll_to_post(post_id){if(!post_id){return false;}try{var post_main_obj=document.getElementById('post-main-'+post_id);}catch(error){var post_main_obj;}if(post_main_obj){var post_box_top=_get_obj_toppos(post_main_obj);if(post_box_top){scroll(0,post_box_top-30);}}}function topic_show_ignored_post(pid){try{var post_main=document.getElementById('post-main-'+pid);var post_ignore=document.getElementById('post-ignore-'+pid);post_main.innerHTML=ignore_cache[pid];}catch(e){}return false;}function topic_init_ignored_post(pid){try{var post_main=document.getElementById('post-main-'+pid);var post_ignore=document.getElementById('post-ignore-'+pid);ignore_cache[pid]=post_main.innerHTML;post_main.innerHTML=post_ignore.innerHTML;}catch(e){}}function ajax_fulleditor_for_edit(post_id){if(post_id&&ipb_input_t&&ipb_input_f){var _form=document.getElementById('quick-edit-form-'+post_id);var _url=ipb_var_base_url+'act=post&do=edit_post&f='+ipb_input_f+'&t='+ipb_input_t+'&p='+post_id+'&st='+ipb_var_st+'&_from=quickedit';_form.action=_url;_form.method='POST';_form.submit();xmlobj.show_loading();return false;}else{return false;}}function ajax_cancel_for_edit(post_id){if(post_cache[post_id]!=""){document.getElementById('post-'+post_id).innerHTML=post_cache[post_id];}return false;}function ajax_save_for_edit(post_id){var url=ipb_var_base_url+'act=xmlout&do=post-edit-save&p='+post_id+'&t='+ipb_input_t+'&f='+ipb_input_f;var fields=new Array();fields['md5check']=ipb_md5_check;fields['t']=ipb_input_t;fields['f']=ipb_input_f;fields['p']=post_id;fields['act']='xmlout';fields['do']='post-edit-save';fields['Post']=document.getElementById(post_id+'_textarea').value;fields['std_used']=1;try{fields['post_edit_reason']=document.getElementById('post_edit_reason').value;}catch(err){}var post_check=fields['Post'];if(post_check.replace(/^\s*|\s*$/g,"")==""){alert(js_no_empty_post);return false;}do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading();return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;if(html=='nopermission'){alert(js_error_no_permission);document.getElementById('post-'+post_id).innerHTML=post_cache[post_id];}else if(html!='error'){document.getElementById('post-'+post_id).innerHTML=html;xmlobj.execute_javascript(html);fix_linked_image_sizes();}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);var xmlreturn=xmlobj.process(url,'POST',xmlobj.format_for_post(fields));return false;}function ajax_prep_for_edit(post_id,event){global_cancel_bubble(event,true);var post_main_obj=document.getElementById('post-main-'+post_id);var post_box_top=_get_obj_toppos(post_main_obj);var url=ipb_var_base_url+'act=xmlout&do=post-edit-show&p='+post_id+'&t='+ipb_input_t+'&f='+ipb_input_f;post_cache[post_id]=document.getElementById('post-'+post_id).innerHTML;try{menu_action_close();}catch(e){}do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading();return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;if(html=='nopermission'){alert(js_error_no_permission);}else if(html!='error'){if(post_box_top){scroll(0,post_box_top-30);}document.getElementById('post-'+post_id).innerHTML=html;IPS_Lite_Editor[post_id]=new ips_text_editor_lite(post_id);IPS_Lite_Editor[post_id].init();}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);return false;}function checkselection(){var myselection='';if(window.getSelection){myselection=window.getSelection();}else if(document.selection){myselection=document.selection.createRange().text;}else if(document.getSelection){myselection=document.getSelection();}if(myselection!=''&&myselection!=null){if(myselection!=mystored_selection){document.getElementById('fastreply-pastesel').style.display='';mystored_selection=(myselection.toString()!='')?myselection.toString():null;}}else{mystored_selection=null;}}function pasteselection(){if(mystored_selection!=''&&mystored_selection!=null){var fr=document.getElementById('fastreplyarea');if(fr){fr.value+='[quote]'+mystored_selection+'[/quote]\n';fr.focus();}}return false;}function link_to_post(pid){temp=prompt(ipb_lang_tt_prompt,ipb_var_base_url+"showtopic="+ipb_input_t+"&view=findpost&p="+pid);return false;}function delete_post(theURL){if(confirm(ipb_lang_js_del_1)){window.location.href=theURL;}else{alert(ipb_lang_js_del_2);}}function multiquote_add(id){saved=new Array();clean=new Array();add=1;if(tmp=my_getcookie('mqtids')){saved=tmp.split(",");}for(i=0;i<saved.length;i++){if(saved[i]!=""){if(saved[i]==id){add=0;}else{clean[clean.length]=saved[i];}}}if(add){clean[clean.length]=id;eval("document.mad_"+id+".src=removequotebutton");eval("document.mad_"+id+".title='-'");}else{eval(" document.mad_"+id+".src=addquotebutton");eval("document.mad_"+id+".title='+'");}my_setcookie('mqtids',clean.join(','),0);return false;}function checkdelete(){if(!document.modform.selectedpids.value){return false;}isDelete=document.modform.tact.options[document.modform.tact.selectedIndex].value;if(isDelete=='delete'){formCheck=confirm(lang_suredelete);if(formCheck==true){return true;}else{return false;}}}function topic_toggle_pid(pid){if(isNaN(pid)){return false;}saved=new Array();clean=new Array();add=1;tmp=document.modform.selectedpids.value;saved=tmp.split(",");for(i=0;i<saved.length;i++){if(saved[i]!=""){if(saved[i]==pid){add=0;}else{clean[clean.length]=saved[i];}}}if(add){clean[clean.length]=pid;eval("document.img"+pid+".src=selectedbutton");}else{eval(" document.img"+pid+".src=unselectedbutton");}newvalue=clean.join(',');my_setcookie('modpids',newvalue,0);document.modform.selectedpids.value=newvalue;newcount=stacksize(clean);document.modform.gobutton.value=lang_gobutton+' ('+newcount+')';return false;};function topic_rate(){this.settings={'allow_rating':0,'default_rating':3,'img_star_on':'star_filled.gif','img_star_selected':'star_selected.gif','img_star_off':'star_empty.gif','img_main_star_0':'rating_0.gif','img_main_star_1':'rating_1.gif','img_main_star_2':'rating_2.gif','img_main_star_3':'rating_3.gif','img_main_star_4':'rating_4.gif','img_main_star_5':'rating_5.gif','img_base_url':'','div_rating_wrapper':'topic-rating-wrapper','text_rating_image':'topic-rating-img-','topic-rating-img-main':'topic-rating-img-main','topic-rating-my-rating':'topic-rating-my-rating','topic-rating-hits':'topic-rating-hits'};this.languages={'img_alt_rate':'','rate_me':''};this.init_rating_images=function(){var html='';if(!this.settings['allow_rating']){return false;}for(var i=1;i<=5;i++){var _onmouseover='';var _onmouseout='';var _onclick='';var _title='';_onmouseover=' onmouseover="this.style.cursor=\'pointer\'; topic_rate.show_rating_images('+i+', 0)"';_onmouseout=' onmouseout="topic_rate.show_rating_images(-1, 1)"';_onclick=' onclick="topic_rate.send_rating('+i+')"';_title=this.languages['img_alt_rate'];html+="<img style='vertical-align:top' src='"+this.settings['img_base_url']+'/'+this.settings['img_star_off']+"' "+_onmouseover+_onmouseout+_onclick+"id='"+this.settings['text_rating_image']+i+"' alt='-' title='"+_title+"' />";}document.getElementById(this.settings['div_rating_wrapper']).innerHTML=this.languages['rate_me']+' '+html;this.show_rating_images(this.settings['default_rating'],1);};this.send_rating=function(rating){rating=rating?rating:0;if(rating){var url=ipb_var_base_url+'act=xmlout&do=topic_rate&t='+ipb_input_t+'&rating='+rating;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading('');return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;if(html=='no_permission'){alert(js_error_no_permission);}else if(html!='error'){var _result=html.split(',');var _new_value=_result[0];var _new_hits=_result[1];var _new_stars=_result[2];var _type=_result[3];topic_rate.settings['default_rating']=parseInt(_new_stars);topic_rate.show_rating_images(topic_rate.settings['default_rating'],1);menu_action_close();document.getElementById('topic-rating-hits').innerHTML=_new_hits;document.getElementById('topic-rating-my-rating').innerHTML=rating;show_inline_messages_instant('rating_updated');}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);return false;}};this.show_rating_images=function(rating,restore_default){rating=restore_default?this.settings['default_rating']:parseInt(rating);var star=restore_default?this.settings['img_star_on']:this.settings['img_star_selected'];for(var i=1;i<=5;i++){var _img=document.getElementById(this.settings['text_rating_image']+i);_img.src=this.settings['img_base_url']+'/'+this.settings['img_star_off'];}for(var i=1;i<=rating;i++){var _img=document.getElementById(this.settings['text_rating_image']+i);_img.src=this.settings['img_base_url']+'/'+star;}document.getElementById(this.settings['topic-rating-img-main']).src=this.settings['img_base_url']+'/'+this.settings['img_main_star_'+rating];};};var IPS_Lite_Editor=new Array();function ips_text_editor_lite(editor_id){this.editor_id=editor_id;this.control_obj=document.getElementById(editor_id+'-controls');this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+'_textarea');this.open_brace='[';this.close_brace=']';this.editor_document=this.text_obj;this.editor_window=this.editor_document;this._ie_cache=null;this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.has_focus=false;this.emoticon_window_id=null;this.init=function(){var controls=new Array();if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName("DIV");for(var i=0;i<items.length;i++){if((items[i].className=='rte-normal'||items[i].className=='rte-menu-button'||items[i].className=='rte-normal-menubutton')&&items[i].id){controls[controls.length]=items[i].id;}}for(var i=0;i<controls.length;i++){var control=document.getElementById(controls[i]);if(control.className=='rte-normal'){this.init_editor_button(control);}else if(control.className=='rte-menu-button'||control.className=='rte-normal-menubutton'){this.init_editor_popup_button(control);}}this.text_obj.onfocus=ips_editor_events.prototype.editor_window_onfocus;this.text_obj.onblur=ips_editor_events.prototype.editor_window_onblur;if(this.editor_document.addEventListener){this.editor_document.addEventListener('keypress',ips_editor_events.prototype.editor_document_onkeypress,false);}};this.editor_check_focus=function(){if(!this.text_obj.has_focus){if(this.is_opera){this.text_obj.focus();}try{this.text_obj.focus();}catch(err){return false;}}return true;};this.init_editor_button=function(obj){obj.cmd=obj.id.replace(new RegExp('^'+this.editor_id+'_cmd_(.+?)$'),'$1');obj.editor_id=this.editor_id;this.buttons[obj.cmd]=obj;obj.state=false;obj.mode='normal';obj.real_type='button';obj.onclick=ips_editor_events.prototype.button_onmouse_event;obj.onmousedown=ips_editor_events.prototype.button_onmouse_event;obj.onmouseover=ips_editor_events.prototype.button_onmouse_event;obj.onmouseout=ips_editor_events.prototype.button_onmouse_event;};this.set_button_context=function(obj,state,type){if(typeof type=='undefined'){type='button';}switch(obj.state){case true:{switch(state){case'mouseout':{this.editor_set_ctl_style(obj,'button','selected');break;}case'mouseover':case'mousedown':case'mouseup':{this.editor_set_ctl_style(obj,type,'down');break;}}break;}default:{switch(state){case'mouseout':{this.editor_set_ctl_style(obj,type,'normal');break;}case'mousedown':{this.editor_set_ctl_style(obj,type,'down');break;}case'mouseover':case'mouseup':{this.editor_set_ctl_style(obj,type,'hover');break;}}break;}}};this.editor_set_ctl_style=function(obj,type,mode){if(obj.mode!=mode){var extra='';if(type=='menu'){extra='-menu';}else if(type=='menubutton'){extra='-menubutton';}extra+=obj.colorname?'-color':'';extra+=obj.emo_id?'-emo':'';obj.mode=mode;try{switch(mode){case"normal":{obj.className='rte-normal'+extra;}break;case"hover":{obj.className='rte-hover'+extra;}break;case"selected":case"down":{obj.className='rte-selected'+extra;}break;}}catch(e){}}};this.format_text=function(e,command,arg){e=ipsclass.cancel_bubble(e,true);if(command.match(/resize_/)){this.resize_editorbox(command.replace(/.+?resize_(up|down)/,"$1"));}if(command.match(/emoticon/)){this.show_all_emoticons();}this.editor_check_focus();if(this[command]){var return_val=this[command](e);}else{try{var return_val=this.apply_formatting(command,false,(typeof arg=='undefined'?true:arg));}catch(e){var return_val=false;}}this.editor_check_focus();return return_val;};this.createlink=function(){var _url=prompt(ipb_global_lang['editor_enter_url'],'http://');if(!_url||_url==null||_url=='http://'){return false;}var _text=this.get_selection();_text=_text?_text:prompt(ipb_global_lang['editor_enter_title']);if(!_text||_text==null){return false;}this.wrap_tags('url',_url,_text);};this.insertimage=function(){var _text=this.get_selection();var _url=prompt(ipb_global_lang['editor_enter_image'],_text?_text:"http://");if(!_url||_url==null||_url=='http://'){return false;}this.wrap_tags('img',false,_url);};this.ipb_quote=function(){var _text=this.get_selection();this.wrap_tags('quote',false,_text);};this.ipb_code=function(){var _text=this.get_selection();this.wrap_tags('code',false,_text);};this.apply_formatting=function(cmd,dialog,argument){switch(cmd){case'bold':case'italic':case'underline':{this.wrap_tags(cmd.substr(0,1),false);return;}case'justifyleft':case'justifycenter':case'justifyright':{this.wrap_tags(cmd.substr(7),false);return;}case'indent':{this.wrap_tags(cmd,false);return;}case'createlink':{var sel=this.get_selection();if(sel){this.wrap_tags('url',argument);}else{this.wrap_tags('url',argument,argument);}return;}case'fontname':{this.wrap_tags('font',argument);return;}case'fontsize':{this.wrap_tags('size',argument);return;}case'forecolor':{this.wrap_tags('color',argument);return;}case'backcolor':{this.wrap_tags('background',argument);return;}case'insertimage':{this.wrap_tags('img',false,argument);return;}case'strikethrough':{this.wrap_tags('strike',false);return;}case'superscript':{this.wrap_tags('sup',false);return;}case'subscript':{this.wrap_tags('sub',false);return;}case'removeformat':return;}};this.wrap_tags=function(tag_name,has_option,selected_text){var tag_close=tag_name;if(typeof selected_text=='undefined'){selected_text=this.get_selection();selected_text=(selected_text===false)?'':new String(selected_text);}if(has_option===true){var option=prompt(ips_language_array['js_rte_optionals']?ips_language_array['js_rte_optionals']:"Enter the optional arguments for this tag",'');if(option){var opentag=this.open_brace+tag_name+'="'+option+'"'+this.close_brace;}else{return false;}}else if(has_option!==false){var opentag=this.open_brace+tag_name+'="'+has_option+'"'+this.close_brace;}else{var opentag=this.open_brace+tag_name+this.close_brace;}var closetag=this.open_brace+'/'+tag_close+this.close_brace;var text=opentag+selected_text+closetag;this.insert_text(text);return false;};this.wrap_tags_lite=function(start_text,close_text){selected_text=this.get_selection();selected_text=(selected_text===false)?'':new String(selected_text);this.insert_text(start_text+selected_text+close_text);return false;};this.editor_get_contents=function(){return this.editor_document.value;};this.get_selection=function(){if(typeof(this.editor_document.selectionStart)!='undefined'){return this.editor_document.value.substr(this.editor_document.selectionStart,this.editor_document.selectionEnd-this.editor_document.selectionStart);}else if((document.selection&&document.selection.createRange)||this._ie_cache){return this._ie_cache?this._ie_cache.text:document.selection.createRange().text;}else if(window.getSelection){return window.getSelection()+'';}else{return false;}};this.insert_text=function(text){if(this.editor_check_focus()==false){return false;}if(typeof(this.editor_document.selectionStart)!='undefined'){var open=this.editor_document.selectionStart+0;var st=this.editor_document.scrollTop;this.editor_document.value=this.editor_document.value.substr(0,this.editor_document.selectionStart)+text+this.editor_document.value.substr(this.editor_document.selectionEnd);if(!text.match(new RegExp("\\"+this.open_brace+"(\\S+?)"+"\\"+this.close_brace+"\\"+this.open_brace+"/(\\S+?)"+"\\"+this.close_brace)))
{this.editor_document.selectionStart=open;this.editor_document.selectionEnd=open+text.length;this.editor_document.scrollTop=st;}}
else if((document.selection&&document.selection.createRange)||this._ie_cache)
{var sel=this._ie_cache?this._ie_cache:document.selection.createRange();sel.text=text.replace(/\r?\n/g,'\r\n');sel.select();}
else
{this.editor_document.value+=text;}
this._ie_cache=null;};this.show_all_emoticons=function()
{if(typeof(this.emoticon_window_id)!=null)
{this.emoticon_window_id=window.open(ipb_var_base_url+"act=legends&CODE=emoticons&_lite=1&editor_id="+editor_id,"Legends","width=250,height=500,resizable=yes,scrollbars=yes");}
else
{this.emoticon_window_id.focus();}
return false;};this.insert_emoticon=function(emo_id,emo_image,emo_code,event)
{emo_code=ipsclass.un_htmlspecialchars(emo_code);this.wrap_tags_lite(" "+emo_code," ");if(this.is_ie)
{if(IPS_Lite_Editor[this.editor_id].emoticon_window_id!=''&&typeof(IPS_Lite_Editor[this.editor_id].emoticon_window_id)!='undefined')
{IPS_Lite_Editor[this.editor_id].emoticon_window_id.focus();}}};this.resize_editorbox=function(direction)
{var inc_value=100;var current_height=parseInt(this.text_obj.style.height);var new_height=0;current_height=current_height?current_height:200;if(current_height>=50)
{if(direction=='up')
{new_height=current_height-inc_value;}
else
{new_height=current_height+inc_value;}
if(new_height>149)
{this.text_obj.style.height=new_height+'px';}}};};function ips_editor_events()
{}
ips_editor_events.prototype.button_onmouse_event=function(e)
{if(is_ie)
{e=ipsclass.cancel_bubble(e,true);}
if(e.type=='click')
{IPS_Lite_Editor[this.editor_id].format_text(e,this.cmd,false,true);}
IPS_Lite_Editor[this.editor_id].set_button_context(this,e.type);};ips_editor_events.prototype.editor_window_onfocus=function(e)
{this.has_focus=true;};ips_editor_events.prototype.editor_window_onblur=function(e)
{this.has_focus=false;};ips_editor_events.prototype.editor_document_onkeypress=function(e)
{if(e.ctrlKey)
{switch(String.fromCharCode(e.charCode).toLowerCase())
{case'b':cmd='bold';break;case'i':cmd='italic';break;case'u':cmd='underline';break;default:return;}
e.preventDefault();IPS_Lite_Editor[this.editor_id].apply_formatting(cmd,false,null);return false;}};var topic_dates={};var topic_flags={};var topic_state={};var forum_mark_time;var newer_topics=new Array;var newer_count=0;var flags_count=0;var forum_id;var url_extra='';var start_int=0;var forum_mark_sent=0;var span_html=new Array;var desc_html=new Array;var text_html=new Array;var folders=new Array;var _desc_clicked=0;var topic_links_init=0;var _this_select_all=0;var tid_date=new Array();var click_delay=1200;function forum_mod_pop(fid){try{menu_action_close();}catch(e){}PopUp(ipb_var_base_url+'act=mod&CODE=prune_start&f='+fid+'&auth_key='+ipb_md5_check,'PRUNE',600,500);}function forum_init_topic_links(){var pagelinks=document.getElementsByTagName('a');for(var i=0;i<=pagelinks.length;i++){try{if(!pagelinks[i].id){continue;}}catch(e){continue;}var linkid=pagelinks[i].id;var linkname=linkid.replace(/^(.*)-(\d+)$/,"$1");if(linkname=='tid-link'){pagelinks[i].onmousedown=topic_link_event_mousedown;pagelinks[i].onmouseup=topic_link_event_mouseup;if(!topic_links_init){pagelinks[i].title=pagelinks[i].title+'. '+lang_clickhold;}}}topic_links_init=1;}function topic_link_event_mousedown(event){event=global_cancel_bubble(event,true);var tid=_get_tid_from_id(this.id);tid_date[tid]=_get_time_now();setTimeout("topic_link_event_timer("+tid+")",5);}function topic_link_event_timer(tid){var timenow=_get_time_now();if(timenow>0&&tid_date[tid]>0&&((timenow-tid_date[tid])>click_delay)){tid_date[tid]=0;span_to_input(tid);return false;}if(tid_date[tid]>0){setTimeout("topic_link_event_timer("+tid+")",5);}else{return false;}}function topic_link_event_mouseup(event){event=global_cancel_bubble(event,true);var tid=_get_tid_from_id(this.id);tid_date[tid]=0;}function _get_time_now(){var mydate=new Date();return mydate.getTime();}function _get_tid_from_id(id){return id.replace(/.*\-(\d+)/,"$1");}function topic_toggle_folder(tid,state){if(!use_enhanced_js){return false;}if(!perm_can_open&&!perm_can_close){return false;}var td_content=document.getElementById('tid-folder-'+tid).innerHTML;if(topic_state[tid]){state=topic_state[tid];}if(state=='closed'){if(!perm_can_open){return false;}if(folders[tid]){td_content=folders[tid];}state='open';}else{if(!perm_can_close){return false;}folders[tid]=td_content;state='closed';}topic_state[tid]=state;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var returned=xmlobj.xmlhandler.responseText;td_content=returned;document.getElementById('tid-folder-'+tid).innerHTML=td_content;};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(ipb_var_base_url+'act=xmlout&do=save-topic&type=openclose&name='+state+'&md5check='+ipb_md5_check+'&tid='+tid);return false;}function span_to_input(tid){if(!use_enhanced_js){return false;}if(!perm_can_edit){return false;}if(_desc_clicked){return false;}span_html[tid]=document.getElementById('tid-span-'+tid).innerHTML;text_html[tid]=document.getElementById('tid-link-'+tid).innerHTML;perm_max_length=perm_max_length?perm_max_length:50;document.getElementById('tid-span-'+tid).innerHTML='<input id="edit-'+tid+'" class="dny-edit-title" maxlength="'+perm_max_length+'" type="text" size="40" value="'+text_html[tid].replace(/"/g,'&quot;')+'" />';document.getElementById('edit-'+tid).onkeyup=function(event){tid_keypress(event,tid)}
document.getElementById('edit-'+tid).onblur=function(event){tid_blur(tid)}
document.getElementById('edit-'+tid).focus();return false;}
function span_desc_to_input(tid)
{if(!use_enhanced_js)
{return false;}
if(!perm_can_edit)
{return false;}
if(_desc_clicked)
{return false;}
_desc_clicked=1;desc_html[tid]=document.getElementById('tid-desc-'+tid).innerHTML;document.getElementById('tid-desc-'+tid).innerHTML='<input id="edit-'+tid+'" maxlength="70" class="dny-edit-title" type="text" size="40" onblur="tid_blur(\''+tid+'\', \'desc\')" onkeypress="tid_keypress(event, \''+tid+'\',\'desc\')" value="'+desc_html[tid].replace(/"/g,'&quot;')+'" />';document.getElementById('edit-'+tid).focus();return false;}
tid_blur=function(tid,type)
{new_text=document.getElementById('edit-'+tid).value;if(type=='desc')
{tid_save(tid,new_text,type);}
else
{if(new_text!="")
{tid_save(tid,new_text,type);}}}
tid_keypress=function(evt,tid,type)
{if(is_safari)
{return false;}
evt=evt?evt:window.event;new_text=document.getElementById('edit-'+tid).value;if((evt.keyCode==13||evt.keyCode==3)&&new_text!="")
{tid_save(tid,new_text,type);}
else if(evt.keyCode==27)
{if(type=='desc')
{document.getElementById('tid-desc-'+tid).innerHTML=desc_html[tid];}
else
{document.getElementById('tid-span-'+tid).innerHTML=span_html[tid];document.getElementById('tid-link-'+tid).innerHTML=text_html[tid];}
return false;}}
tid_save=function(tid,new_text,type)
{var donotedit=0;if(type=='desc')
{if(new_text==desc_html[tid])
{donotedit=1;}
_desc_clicked=0;document.getElementById('tid-desc-'+tid).innerHTML=new_text;}
else
{if(new_text==text_html[tid])
{donotedit=1;}
type='title';document.getElementById('tid-span-'+tid).innerHTML=span_html[tid];document.getElementById('tid-link-'+tid).innerHTML=new_text;forum_init_topic_links();}
if(donotedit)
{return false;}
var url=ipb_var_base_url+'act=xmlout&do=save-topic&type='+type+'&md5check='+ipb_md5_check+'&tid='+tid;var fields=new Array();fields['md5check']=ipb_md5_check;fields['tid']=tid;fields['act']='xmlout';fields['do']='save-topic';fields['type']=type;fields['name']=new_text;do_request_function=function()
{if(!xmlobj.readystate_ready_and_ok())
{return;}
var returned=xmlobj.xmlhandler.responseText;if(type!='desc'&&!returned.match(/<null>s<\/null>/))
{document.getElementById('tid-link-'+tid).innerHTML=returned;}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url,'POST',xmlobj.format_for_post(fields));return false;}
function who_posted(tid)
{window.open(ipb_var_base_url+"act=Stats&CODE=who&t="+tid,"WhoPosted","toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300");}
function checkdelete()
{if(!document.modform.selectedtids.value)
{return false;}
isDelete=document.modform.tact.options[document.modform.tact.selectedIndex].value;if(isDelete=='delete')
{formCheck=confirm(lang_suredelete);if(formCheck==true)
{return true;}
else
{return false;}}}
function forum_select_all()
{clean=new Array();saved=new Array();var topics_this_page=new Array();tmp=document.modform.selectedtids.value;if(tmp!="")
{saved=tmp.split(",");}
if(_this_select_all==0)
{var the_topics=document.getElementsByTagName('input');for(var i=0;i<=the_topics.length;i++)
{var e=the_topics[i];if(e&&(e.type=='hidden')&&(!e.disabled))
{var s=e.id;var a=s.replace(/^tid_(.+?)$/,"$1");if(a)
{try
{document.getElementById('ipb-topic-'+a).src=selectedbutton;clean[clean.length]=a;topics_this_page[a]=1;}
catch(err)
{}}}}
document.getElementById('ipb-topics-all').src=selectedbutton;_this_select_all=1;}
else
{var the_topics=document.getElementsByTagName('input');for(var i=0;i<=the_topics.length;i++)
{var e=the_topics[i];if(e&&(e.type=='hidden')&&(!e.disabled))
{var s=e.id;var a=s.replace(/^tid_(.+?)$/,"$1");if(a)
{try
{document.getElementById('ipb-topic-'+a).src=unselectedbutton;topics_this_page[a]=1;}
catch(err)
{}}}}
document.getElementById('ipb-topics-all').src=unselectedbutton;_this_select_all=0;}
for(i=0;i<saved.length;i++)
{if(saved[i]!=""&&topics_this_page[saved[i]]!=1)
{clean[clean.length]=saved[i];}}
newvalue=clean.join(',');var oldvalue=0;for(var k=0;k<clean.length;k++)
{if(topics_this_page[clean[k]]!=1)
{oldvalue++;}}
my_setcookie('modtids',newvalue,0);document.modform.selectedtids.value=newvalue;newcount=stacksize(clean);if(oldvalue>0)
{document.modform.gobutton.value=ipsclass.html_entity_decode(lang_gobutton)+' ('+newcount+') ('+oldvalue+' '+ipsclass.html_entity_decode(lang_otherpage)+' )';}
else
{document.modform.gobutton.value=ipsclass.html_entity_decode(lang_gobutton)+' ('+newcount+')';}
return false;}
function forum_toggle_tid(tid)
{var saved=new Array();var clean=new Array();var add=1;var _img=document.getElementById('ipb-topic-'+tid);tmp=document.modform.selectedtids.value;if(tmp!="")
{saved=tmp.split(",");}
for(i=0;i<saved.length;i++)
{if(saved[i]!="")
{if(saved[i]==tid)
{add=0;}
else
{clean[clean.length]=saved[i];}}}
if(add)
{clean[clean.length]=tid;_img.src=selectedbutton;}
else
{_img.src=unselectedbutton;}
newvalue=clean.join(',');var topics_this_page=new Array();var oldvalue=0;var the_topics=document.getElementsByTagName('input');for(var i=0;i<=the_topics.length;i++)
{var e=the_topics[i];if(e&&(e.type=='hidden')&&(!e.disabled))
{var s=e.id;var a=s.replace(/^tid_(.+?)$/,"$1");if(a)
{topics_this_page[a]=1;}}}
for(var k=0;k<clean.length;k++)
{if(topics_this_page[clean[k]]!=1)
{oldvalue++;}}
my_setcookie('modtids',newvalue,0);document.modform.selectedtids.value=newvalue;newcount=stacksize(clean);if(oldvalue>0)
{document.modform.gobutton.value=ipsclass.html_entity_decode(lang_gobutton)+' ('+newcount+') ('+oldvalue+' '+ipsclass.html_entity_decode(lang_otherpage)+' )';}
else
{document.modform.gobutton.value=ipsclass.html_entity_decode(lang_gobutton)+' ('+newcount+')';}
return false;}
function multi_page_jump(url_bit,total_posts,per_page)
{pages=1;cur_st=ipb_var_st;cur_page=1;if(total_posts%per_page==0)
{pages=total_posts/per_page;}
else
{pages=Math.ceil(total_posts/per_page);}
msg=ipb_lang_tpl_q1+" "+pages;if(cur_st>0)
{cur_page=cur_st/per_page;cur_page=cur_page-1;}
show_page=1;if(cur_page<pages)
{show_page=cur_page+1;}
if(cur_page>=pages)
{show_page=cur_page-1;}
else
{show_page=cur_page+1;}
userPage=prompt(msg,show_page);if(userPage>0)
{if(userPage<1){userPage=1;}
if(userPage>pages){userPage=pages;}
if(userPage==1){start=0;}
else{start=(userPage-1)*per_page;}
window.location=url_bit+"&st="+start+"&start="+start;}}
function boards_send_marker_update(fid,is_subforum)
{try
{var imgsrc=document.getElementById('f-'+fid).innerHTML;if(imgsrc)
{var regex=new RegExp("src=['\"](.*/)("+regex_markers+")['\"]");var results=imgsrc.match(regex);if(img_markers[results[2]]){imgsrc=imgsrc.replace(regex,"src='$1"+img_markers[results[2]]+"'");document.getElementById('f-'+fid).innerHTML=imgsrc;}}}catch(e){}var text_return=0;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;};text_return=xmlobj.xmlhandler.responseText;};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(ipb_var_base_url+'act=xmlout&do=mark-forum&fid='+fid+'&sf='+is_subforum);if(text_return==1){return false;}}
function CheckAll(fmobj){for(var i=0;i<fmobj.elements.length;i++){var e=fmobj.elements[i];if((e.name!='allbox')&&(e.type=='checkbox')&&(!e.disabled)){e.checked=fmobj.allbox.checked;}}}function CheckCheckAll(fmobj){var TotalBoxes=0;var TotalOn=0;for(var i=0;i<fmobj.elements.length;i++){var e=fmobj.elements[i];if((e.name!='allbox')&&(e.type=='checkbox')){TotalBoxes++;if(e.checked){TotalOn++;}}}if(TotalBoxes==TotalOn){fmobj.allbox.checked=true;}else{fmobj.allbox.checked=false;}}var ie=document.all?1:0;function hl(cb){if(ie){while(cb.tagName!="TR"){cb=cb.parentElement;}}else{while(cb.tagName!="TD"){cb=cb.parentNode;}}cb.className='row1';}function dl(cb){if(ie){while(cb.tagName!="TR"){cb=cb.parentElement;}}else{while(cb.tagName!="TD"){cb=cb.parentNode;}}cb.className='row2';}function cca(cb){if(cb.checked){hl(cb);}else{dl(cb);}}function InboxCheckAll(cb){var fmobj=document.mutliact;for(var i=0;i<fmobj.elements.length;i++){var e=fmobj.elements[i];if((e.name!='allbox')&&(e.type=='checkbox')&&(!e.disabled)){e.checked=fmobj.allbox.checked;if(fmobj.allbox.checked){hl(e);}else{dl(e);}}}}function select_read(){var fmobj=document.mutliact;for(var i=0;i<fmobj.elements.length;i++){var e=fmobj.elements[i];if((e.type=='hidden')&&(e.value==1)&&(!isNaN(e.name))){eval("fmobj.msgid_"+e.name+".checked=true;");hl(e);}}}function unselect_all(){var fmobj=document.mutliact;for(var i=0;i<fmobj.elements.length;i++){var e=fmobj.elements[i];if((e.name!='allbox')&&(e.type=='checkbox')&&(!e.disabled)){e.checked=false;dl(e);}}}
function profile_dname_history(mid){try{menu_action_close();}catch(e){}PopUp(ipb_var_base_url+'act=profile&CODE=show-display-names&id='+mid,'DNAMETITLE',400,300);return false;}
var ips_personal_portal=new ips_personal_portal();function ips_personal_portal(){this.div_rating_wrapper='pp-rating-wrapper';this.text_rating_image='pp-rating-img-';this.css_classes={'pp-tabon':'pp-tabon','pp-taboff':'pp-taboff','pp-tabshaded':'pp-tabshaded','pp-contentbox-back':'pp-contentbox-back','pp-contentbox-entry-noheight':'pp-contentbox-entry-noheight','pp-contentbox-entry-noheight-mod':'pp-contentbox-entry-noheight-mod','pp-contentbox-entry-noheight-sel':'pp-contentbox-entry-noheight-sel'};this.contact_types={'aim':'aim','msn':'msn','icq':'icq','yahoo':'yahoo'};this.content_tabs={};this.stored_tabs={};this.stored_div_classes={};this.iframe_tabs={'comments':ipb_var_base_url+'act=profile&CODE=personal_iframe_comments','settings':ipb_var_base_url+'act=profile&CODE=personal_iframe_settings','friends':ipb_var_base_url+'act=profile&CODE=personal_iframe_friends'};this.stored_tabs_css={};this.div_names={'pp-entry-gender-wrap':'pp-entry-gender-wrap','pp-entry-gender-text':'pp-entry-gender-text','pp-entry-gender-img':'pp-entry-gender-img','pp-entry-gender-imgwrap':'pp-entry-gender-imgwrap','pp-entry-location-wrap':'pp-entry-location-wrap','pp-entry-location-text':'pp-entry-location-text','pp-entry-born-wrap':'pp-entry-born-wrap','pp-entry-born-text':'pp-entry-born-text','pp-entry-age-wrap':'pp-entry-age-wrap','pp-entry-age-text':'pp-entry-age-text','pp-entry-age-yearsold':'pp-entry-age-yearsold','pp-main-tab-content':'pp-main-tab-content','pp-content-tab':'pp-content-tab','pp-comment-textarea':'pp-comment-textarea','pp-comments-wrap':'pp-comments-wrap','pp-comment-entry':'pp-comment-entry','pp-comment-entry-main':'pp-comment-entry-main','pp-iframe-wrap':'pp-iframe-wrap','pp-entry-contact-wrap':'pp-entry-contact-wrap','pp-entry-contact-entry':'pp-entry-contact-entry','pp-main-photo':'pp-main-photo','pp-personal_statement':'pp-personal_statement','pp-checked':'pp-checked','pp-friend-img':'pp-friend-img','pp-friend-text':'pp-friend-text','pp-friend-wrap':'pp-friend-wrap'};this.settings={'allow_rating':0,'default_rating':3,'edit_allowed':0,'member_id':0,'viewer_id':0,'img_star_on':'star_filled.gif','img_star_selected':'star_selected.gif','img_star_off':'star_empty.gif','img_gender_male':'gender_male.png','img_gender_female':'gender_female.png','img_gender_mystery':'gender_mystery.png','img_base_url':'','img_menu_icon':'','default_tab':'','photo_def_width':'150','photo_def_height':'150','photo_def_src':ipb_var_image_url+'/folder_profile_portal/pp-blank-large.png','img_friend_remove':ipb_var_image_url+'/folder_profile_portal/friend_remove_small.png','img_friend_add':ipb_var_image_url+'/folder_profile_portal/friend_add_small.png'};this.languages={'rate_me':'Rate Me','img_alt_rate':'Rate this member, click on desired star to send rating','gender_male':'Male','gender_female':'Female','gender_mystery':'Gender Not Set','saving_comment':'Saving Comment...','loading_tab':ajax_load_msg,'deleting_comment':'Deleting Comment...','friend_add':'Add as Friend','friend_remove':'Remove Friend'};var loaded_tab=null;this.init=function(){var divs=document.getElementsByTagName('DIV');var divcount=0;for(var i=0;i<=divs.length;i++){try{if(!divs[i].id){continue;}}catch(error){continue;}var divid=divs[i].id;var divname=ipsclass.get_name_from_text(divs[i].id);var divnum=ipsclass.get_id_from_text(divs[i].id);if(divname==this.div_names['pp-content-tab']){var _highlight=0;this.stored_tabs[divnum]=divs[i];this.stored_tabs_css[divnum]=divs[i].className;divs[i].style.cursor='pointer';divs[i].onclick=this.tab_onclick;if(this.settings['default_tab']!=""){if(this.settings['default_tab']==divnum){_highlight=1;}}else if(divcount==0){_highlight=1;}if(_highlight==1){divs[i].className=this.css_classes['pp-tabon'];divs[i].style.display='block';}else{if(divs[i].className!=this.css_classes['pp-tabshaded']){divs[i].className=this.css_classes['pp-taboff'];}divs[i].style.display='block';}divcount++;}}this.init_rating_images();this.show_dropdown_boxes();};this.show_friend_add_or_remove=function(add_friend){try{var _div=document.getElementById(this.div_names['pp-friend-wrap']);var _html='';if(_div.id){if(add_friend){_html="<img src='"+this.settings['img_friend_add']+"' id='"+this.div_names['pp-friend-img']+"' alt='' border='0' /> ";_html+="<a href='#' onclick='friends_pop(\"&amp;do=add&amp;member_id="+this.settings['member_id']+"&amp;md5check="+ipb_md5_check+"\"); ips_personal_portal.show_friend_add_or_remove(0); return false;' id='"+this.div_names['pp-friend-text']+"'>"+this.languages['friend_add']+"</a>";}else{_html="<img src='"+this.settings['img_friend_remove']+"' id='"+this.div_names['pp-friend-img']+"' alt='' border='0' /> ";_html+="<a href='#' onclick='friends_pop(\"&amp;do=remove&amp;member_id="+this.settings['member_id']+"&amp;md5check="+ipb_md5_check+"\"); ips_personal_portal.show_friend_add_or_remove(1); return false;' id='"+this.div_names['pp-friend-text']+"'>"+this.languages['friend_remove']+"</a>";}_div.innerHTML=_html;}}catch(error){}};this.toggle_comment_box=function(comment_id,from_iframe){comment_id=parseInt(comment_id);from_iframe=parseInt(from_iframe);var _document=document;if(from_iframe){var iframe=document.getElementById('pp-main-tab-content-iframe');if(iframe.contentDocument){_document=iframe.contentDocument;}else if(iframe.contentWindow){_document=iframe.contentWindow.document;}else if(iframe.document){_document=iframe.document;}}if(comment_id){var _div=_document.getElementById(this.div_names['pp-comment-entry-main']+'-'+comment_id);var _box=_document.getElementById(this.div_names['pp-checked']+'-'+comment_id);var _class=_div.className;if(_class==this.css_classes['pp-contentbox-entry-noheight']||_class==this.css_classes['pp-contentbox-entry-noheight-mod']){this.stored_div_classes[this.div_names['pp-comment-entry']+'-'+comment_id]=_class;_div.className=this.css_classes['pp-contentbox-entry-noheight-sel'];}else if(this.stored_div_classes[this.div_names['pp-comment-entry']+'-'+comment_id]){_div.className=this.stored_div_classes[this.div_names['pp-comment-entry']+'-'+comment_id];}else{_div.className=this.css_classes['pp-contentbox-entry-noheight'];}}return true;};this.show_dropdown_boxes=function(){var html='';if((this.settings['member_id']==this.settings['viewer_id'])&&(this.settings['viewer_id'])&&(this.settings['edit_allowed']==1)){try{var _wrap=document.getElementById(this.div_names['pp-entry-gender-wrap']);_wrap.className='popmenubutton-new';ipsmenu.register("pp-entry-gender-wrap");var _wrap=document.getElementById(this.div_names['pp-entry-location-wrap']);_wrap.className='popmenubutton-new';ipsmenu.register("pp-entry-location-wrap");var _wrap=document.getElementById(this.div_names['pp-entry-born-wrap']);_wrap.className='popmenubutton-new';ipsmenu.register("pp-entry-born-wrap");}catch(error){}for(var i in this.contact_types){try{var _wrap=document.getElementById(this.div_names['pp-entry-contact-wrap']+'-'+this.contact_types[i]);_wrap.className='popmenubutton-new';ipsmenu.register("pp-entry-contact-wrap"+'-'+this.contact_types[i]);}catch(error){}}}};this.init_rating_images=function(){var html='';if(!this.settings['allow_rating']){return false;}for(var i=1;i<=5;i++){var _onmouseover='';var _onmouseout='';var _onclick='';var _title='';if((this.settings['member_id']!=this.settings['viewer_id'])&&(this.settings['viewer_id'])){_onmouseover=' onmouseover="this.style.cursor=\'pointer\'; ips_personal_portal.show_rating_images('+i+', 0)"';_onmouseout=' onmouseout="ips_personal_portal.show_rating_images(-1, 1)"';_onclick=' onclick="ips_personal_portal.send_rating('+i+')"';_title=this.languages['img_alt_rate'];}html+="<img src='"+this.settings['img_base_url']+'/'+this.settings['img_star_off']+"' "+_onmouseover+_onmouseout+_onclick+"id='"+this.text_rating_image+i+"' alt='-' title='"+_title+"' />";}try{if((this.settings['member_id']!=this.settings['viewer_id'])&&(this.settings['viewer_id'])){document.getElementById(this.div_rating_wrapper).innerHTML=this.languages['rate_me']+' '+html;}else{document.getElementById(this.div_rating_wrapper).innerHTML=html;}this.show_rating_images(this.settings['default_rating'],1);}catch(e){}};this.load_content_tab=function(tab){var html='';if(is_ie&&!is_ie7){var _div=document.getElementById(ips_personal_portal.div_names['pp-main-tab-content']);var _width=parseInt(_div.offsetWidth-12);}if(tab){hide_inline_messages_instant();this.loaded_tab=tab;if(this.iframe_tabs[tab]){var url=this.iframe_tabs[tab]+'&member_id='+this.settings['member_id']+'&md5check='+ipb_md5_check;document.getElementById(this.div_names['pp-main-tab-content']).innerHTML='';var iframeinclude=new iframe_include();iframeinclude.iframe_id='pp-main-tab-content-iframe';iframeinclude.iframe_add_to_div='pp-main-tab-content';iframeinclude.iframe_main_wrapper='pp-iframe-wrap';iframeinclude.init();iframeinclude.include(url);}else{var url=ipb_var_base_url+'act=profile&CODE=personal_ajax_load_tab&member_id='+this.settings['member_id']+'&tab='+tab+'&md5check='+ipb_md5_check;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading(ips_personal_portal.languages['loading_tab']);return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;if(html!='error'){document.getElementById(ips_personal_portal.div_names['pp-main-tab-content']).innerHTML=html;try{fix_linked_image_sizes();xmlobj.execute_javascript(html);document.getElementById(ips_personal_portal.div_names['pp-main-tab-content']).style.height='auto';document.getElementById(ips_personal_portal.div_names['pp-main-tab-content']).style.padding='6px';document.getElementById(ips_personal_portal.div_names['pp-main-tab-content']).className=ips_personal_portal.css_classes['pp-contentbox-back'];if(is_ie){_div.style.width=(_width)?_width+"px":'auto';_div.style.overflowX='auto';}}catch(error){}}else{alert(js_error_no_permission);}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);return false;}}};this.send_rating=function(rating){rating=rating?rating:0;if(rating){var url=ipb_var_base_url+'act=xmlout&do=member-rate&member_id='+this.settings['member_id']+'&rating='+rating+'&md5check='+ipb_md5_check;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading('');return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;if(html=='no_permission'){alert(js_error_no_permission);}else if(html!='error'){var _result=html.split(',');var _new_value=_result[0];var _new_hits=_result[1];var _new_stars=_result[2];var _type=_result[3];ips_personal_portal.settings['default_rating']=parseInt(_new_stars);ips_personal_portal.show_rating_images(ips_personal_portal.settings['default_rating'],1);ipsclass.fade_in_element(ips_personal_portal.div_rating_wrapper);show_inline_messages_instant('rating_updated');}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);return false;}};this.show_rating_images=function(rating,restore_default){rating=restore_default?this.settings['default_rating']:parseInt(rating);var star=restore_default?this.settings['img_star_on']:this.settings['img_star_selected'];for(var i=1;i<=5;i++){var _img=document.getElementById(this.text_rating_image+i);_img.src=this.settings['img_base_url']+'/'+this.settings['img_star_off'];}for(var i=1;i<=rating;i++){var _img=document.getElementById(this.text_rating_image+i);_img.src=this.settings['img_base_url']+'/'+star;}};this.delete_comment=function(comment_id){var url=ipb_var_base_url+'act=profile&CODE=personal_ajax_delete_comment&member_id='+this.settings['member_id'];var final_fields=new Array();final_fields['md5check']=ipb_md5_check;final_fields['comment_id']=comment_id;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading(ips_personal_portal.languages['deleting_comment']);return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;if(html=='nopermission'){alert(message_pop_up_lang['no_permission']);}else if(html!='error'){document.getElementById(ips_personal_portal.div_names['pp-comments-wrap']).innerHTML=html;if(ips_personal_portal.loaded_tab=='comments'){ips_personal_portal.load_content_tab('comments');}}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);var xmlreturn=xmlobj.process(url,'POST',xmlobj.format_for_post(final_fields));return false;};this.reload_comments=function(){var url=ipb_var_base_url+'act=profile&CODE=personal_ajax_reload_comments&member_id='+this.settings['member_id'];var final_fields=new Array();final_fields['md5check']=ipb_md5_check;do_request_function=function(){if(!xmlobj_gender.readystate_ready_and_ok()){return;}var html=xmlobj_gender.xmlhandler.responseText;if(html!='error'&&html!='no_permission'){document.getElementById(ips_personal_portal.div_names['pp-comments-wrap']).innerHTML=html;}};xmlobj_gender=new ajax_request();xmlobj_gender.onreadystatechange(do_request_function);var xmlreturn=xmlobj_gender.process(url,'POST',xmlobj_gender.format_for_post(final_fields));return false;};this.save_comment=function(){var url=ipb_var_base_url+'act=profile&CODE=personal_ajax_add_comment&member_id='+this.settings['member_id'];var final_fields=new Array();menu_action_close();final_fields['md5check']=ipb_md5_check;final_fields['comment']=document.getElementById(this.div_names['pp-comment-textarea']).value;do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading(ips_personal_portal.languages['saving_comment']);return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;if(html=='nopermission'){alert(message_pop_up_lang['no_permission']);return;}else if(html=='error-no-comment'){show_inline_messages_instant('pp_comment_error');return;}else if(html!='error'){document.getElementById(ips_personal_portal.div_names['pp-comments-wrap']).innerHTML=html;xmlobj.execute_javascript(html);if(ips_personal_portal.loaded_tab=='comments'){ips_personal_portal.load_content_tab('comments');}document.getElementById(ips_personal_portal.div_names['pp-comment-textarea']).value='';}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);var xmlreturn=xmlobj.process(url,'POST',xmlobj.format_for_post(final_fields));return false;};this.update_personal_photo=function(img_url,width,height){if(!img_url||!img_url.match("/photo-")){img_url=this.settings['photo_def_src'];width=this.settings['photo_def_width'];height=this.settings['photo_def_height'];}var _img=document.getElementById(this.div_names['pp-main-photo']);var mydate=new Date();_img.src=img_url+'?__time='+mydate.getTime();_img.width=width;_img.height=height;};this.update_personal_statement=function(content,website){var _statement=document.getElementById(this.div_names['pp-personal_statement']);content=content.replace(/\[b\](.+?)\[\/b\]/gi,"<b>$1</b>");content=content.replace(/\[i\](.+?)\[\/i\]/gi,"<i>$1</i>");content=content.replace(/\[u\](.+?)\[\/u\]/gi,"<u>$1</u>");content=content.replace(/(\S{19})(\S+?)/g,"$1 $2");_statement.innerHTML=content;if(website){if(website.length>30){_statement.innerHTML+="<br /><br /><a href='"+website+"' target='_blank'>"+ipb_global_lang['visit_my_website']+"</a>";}else{_statement.innerHTML+="<br /><br /><a href='"+website+"' target='_blank'>"+website+"</a>";}}};this.save_settings=function(func_name,field_data,get_data_from_this_id){var url=ipb_var_base_url+'act=xmlout&do=profile-save-settings&member_id='+this.settings['member_id'];var final_fields=new Array();menu_action_close();final_fields['md5check']=ipb_md5_check;final_fields['cmd']=func_name;try{for(var i in field_data){final_fields[i]=field_data[i];}}catch(error){}if(func_name=='birthdate'){final_fields['pp_b_day']=document.getElementById('pp_b_day').options[document.getElementById('pp_b_day').selectedIndex].value;final_fields['pp_b_month']=document.getElementById('pp_b_month').options[document.getElementById('pp_b_month').selectedIndex].value;final_fields['pp_b_year']=document.getElementById('pp_b_year').options[document.getElementById('pp_b_year').selectedIndex].value;}if(get_data_from_this_id!=''){final_fields['value']=document.getElementById(get_data_from_this_id).value;}do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading();return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;if(html=='nopermission'){alert(message_pop_up_lang['no_permission']);}else if(html!='error'){switch(final_fields['cmd']){case'gender':var _txt=document.getElementById(ips_personal_portal.div_names['pp-entry-gender-text']);var _imgwrap=document.getElementById(ips_personal_portal.div_names['pp-entry-gender-imgwrap']);var _date=new Date();var _src='';if(html=='male'){_src=ips_personal_portal.settings['img_base_url']+'/'+ips_personal_portal.settings['img_gender_male']+"?__="+_date.getTime();_txt.innerHTML=ips_personal_portal.languages['gender_male'];}else if(html=='female'){_src=ips_personal_portal.settings['img_base_url']+'/'+ips_personal_portal.settings['img_gender_female']+"?__="+_date.getTime();_txt.innerHTML=ips_personal_portal.languages['gender_female'];}else{_src=ips_personal_portal.settings['img_base_url']+'/'+ips_personal_portal.settings['img_gender_mystery']+"?__="+_date.getTime();_txt.innerHTML=ips_personal_portal.languages['gender_mystery'];}_imgwrap.innerHTML="<img src='"+_src+"' alt='' border='0' />";ips_personal_portal.reload_comments();ipsclass.fade_in_element(ips_personal_portal.div_names['pp-entry-gender-wrap']);break;case'contact':if(html=='icqerror'){show_inline_messages_instant('pp_icq_error');}else{document.getElementById(ips_personal_portal.div_names['pp-entry-contact-entry']+'-'+field_data['contacttype']).innerHTML=html;ipsclass.fade_in_element(ips_personal_portal.div_names['pp-entry-contact-wrap']+'-'+field_data['contacttype']);}break;case'location':document.getElementById(ips_personal_portal.div_names['pp-entry-location-text']).innerHTML=html;ipsclass.fade_in_element(ips_personal_portal.div_names['pp-entry-location-wrap']);break;case'birthdate':if(html=='dateerror'){show_inline_messages_instant('pp_date_error');}else{document.getElementById(ips_personal_portal.div_names['pp-entry-born-text']).innerHTML=html;var _dates=html.split('-');if(_dates[2]){var month=new Array(12);month['Jan']="1";month['Feb']="2";month['Mar']="3";month['April']="4";month['May']="5";month['June']="6";month['July']="7";month['Aug']="8";month['Sep']="9";month['Oct']="10";month['Nov']="11";month['Dec']="12";var today=new Date();var _years=today.getFullYear();var _days=today.getDate();var _mos=today.getMonth()+1;var _age=_years-_dates[2];_dates[0]=month[_dates[0]];if(_dates[0]>_mos){_age-=1;}else if(_dates[0]==_mos){if(_dates[1]>_days){_age-=1;}}document.getElementById(ips_personal_portal.div_names['pp-entry-age-text']).innerHTML=_age;document.getElementById(ips_personal_portal.div_names['pp-entry-age-yearsold']).style.display='';ipsclass.fade_in_element(ips_personal_portal.div_names['pp-entry-age-wrap']);}else{document.getElementById(ips_personal_portal.div_names['pp-entry-age-text']).innerHTML=ips_personal_portal.languages['age_unknown'];document.getElementById(ips_personal_portal.div_names['pp-entry-age-yearsold']).style.display='none';ipsclass.fade_in_element(ips_personal_portal.div_names['pp-entry-age-wrap']);document.getElementById(ips_personal_portal.div_names['pp-entry-born-pretext']).style.display='';}ipsclass.fade_in_element(ips_personal_portal.div_names['pp-entry-born-wrap']);}}}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);var xmlreturn=xmlobj.process(url,'POST',xmlobj.format_for_post(final_fields));return false;};this.tab_onclick=function(event){var tabid=ipsclass.get_id_from_text(this.id);ipsclass.cancel_bubble(event);ips_personal_portal.tab_load(tabid);return false;};this.tab_load=function(tabid){for(var i in ips_personal_portal.stored_tabs){if(i==tabid){ips_personal_portal.stored_tabs[i].style.display='block';ips_personal_portal.stored_tabs[i].className=ips_personal_portal.css_classes['pp-tabon'];}else{ips_personal_portal.stored_tabs[i].style.display='block';if(ips_personal_portal.stored_tabs_css[i]==ips_personal_portal.css_classes['pp-tabshaded']){ips_personal_portal.stored_tabs[i].className=ips_personal_portal.css_classes['pp-tabshaded'];}else{ips_personal_portal.stored_tabs[i].className=ips_personal_portal.css_classes['pp-taboff'];}}}ips_personal_portal.load_content_tab(tabid);return false;};}
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return!YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType"in A&&"tagName"in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){YAHOO.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});(function(){var B=YAHOO.util,L,J,H=0,K={},F={},N=window.document;var C=YAHOO.env.ua.opera,M=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var O=function(Q){if(!E.HYPHEN.test(Q)){return Q;}if(K[Q]){return K[Q];}var R=Q;while(E.HYPHEN.exec(R)){R=R.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}K[Q]=R;return R;};var P=function(R){var Q=F[R];if(!Q){Q=new RegExp("(?:^|\\s+)"+R+"(?:\\s+|$)");F[R]=Q;}return Q;};if(N.defaultView&&N.defaultView.getComputedStyle){L=function(Q,T){var S=null;if(T=="float"){T="cssFloat";}var R=N.defaultView.getComputedStyle(Q,"");if(R){S=R[O(T)];}return Q.style[T]||S;};}else{if(N.documentElement.currentStyle&&G){L=function(Q,S){switch(O(S)){case"opacity":var U=100;try{U=Q.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{U=Q.filters("alpha").opacity;}catch(T){}}return U/100;case"float":S="styleFloat";default:var R=Q.currentStyle?Q.currentStyle[S]:null;return(Q.style[S]||R);}};}else{L=function(Q,R){return Q.style[R];};}}if(G){J=function(Q,R,S){switch(R){case"opacity":if(YAHOO.lang.isString(Q.style.filter)){Q.style.filter="alpha(opacity="+S*100+")";if(!Q.currentStyle||!Q.currentStyle.hasLayout){Q.style.zoom=1;}}break;case"float":R="styleFloat";default:Q.style[R]=S;}};}else{J=function(Q,R,S){if(R=="float"){R="cssFloat";}Q.style[R]=S;};}var D=function(Q,R){return Q&&Q.nodeType==1&&(!R||R(Q));};YAHOO.util.Dom={get:function(S){if(S&&(S.tagName||S.item)){return S;}if(YAHOO.lang.isString(S)||!S){return N.getElementById(S);}if(S.length!==undefined){var T=[];for(var R=0,Q=S.length;R<Q;++R){T[T.length]=B.Dom.get(S[R]);}return T;}return S;},getStyle:function(Q,S){S=O(S);var R=function(T){return L(T,S);};return B.Dom.batch(Q,R,B.Dom,true);},setStyle:function(Q,S,T){S=O(S);var R=function(U){J(U,S,T);};B.Dom.batch(Q,R,B.Dom,true);},getXY:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}return I(S);};return B.Dom.batch(Q,R,B.Dom,true);},getX:function(Q){var R=function(S){return B.Dom.getXY(S)[0];};return B.Dom.batch(Q,R,B.Dom,true);},getY:function(Q){var R=function(S){return B.Dom.getXY(S)[1];};return B.Dom.batch(Q,R,B.Dom,true);},setXY:function(Q,T,S){var R=function(W){var V=this.getStyle(W,"position");if(V=="static"){this.setStyle(W,"position","relative");V="relative";}var Y=this.getXY(W);if(Y===false){return false;}var X=[parseInt(this.getStyle(W,"left"),10),parseInt(this.getStyle(W,"top"),10)];if(isNaN(X[0])){X[0]=(V=="relative")?0:W.offsetLeft;}if(isNaN(X[1])){X[1]=(V=="relative")?0:W.offsetTop;}if(T[0]!==null){W.style.left=T[0]-Y[0]+X[0]+"px";}if(T[1]!==null){W.style.top=T[1]-Y[1]+X[1]+"px";}if(!S){var U=this.getXY(W);if((T[0]!==null&&U[0]!=T[0])||(T[1]!==null&&U[1]!=T[1])){this.setXY(W,T,true);}}};B.Dom.batch(Q,R,B.Dom,true);},setX:function(R,Q){B.Dom.setXY(R,[Q,null]);},setY:function(Q,R){B.Dom.setXY(Q,[null,R]);},getRegion:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=N.body){return false;}var T=B.Region.getRegion(S);return T;};return B.Dom.batch(Q,R,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(U,Y,V,W){Y=Y||"*";V=(V)?B.Dom.get(V):null||N;if(!V){return[];}var R=[],Q=V.getElementsByTagName(Y),X=P(U);for(var S=0,T=Q.length;S<T;++S){if(X.test(Q[S].className)){R[R.length]=Q[S];if(W){W.call(Q[S],Q[S]);}}}return R;},hasClass:function(S,R){var Q=P(R);var T=function(U){return Q.test(U.className);};return B.Dom.batch(S,T,B.Dom,true);},addClass:function(R,Q){var S=function(T){if(this.hasClass(T,Q)){return false;}T.className=YAHOO.lang.trim([T.className,Q].join(" "));return true;};return B.Dom.batch(R,S,B.Dom,true);},removeClass:function(S,R){var Q=P(R);var T=function(U){if(!this.hasClass(U,R)){return false;}var V=U.className;U.className=V.replace(Q," ");if(this.hasClass(U,R)){this.removeClass(U,R);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},replaceClass:function(T,R,Q){if(!Q||R===Q){return false;}var S=P(R);var U=function(V){if(!this.hasClass(V,R)){this.addClass(V,Q);return true;}V.className=V.className.replace(S," "+Q+" ");if(this.hasClass(V,R)){this.replaceClass(V,R,Q);}V.className=YAHOO.lang.trim(V.className);return true;};return B.Dom.batch(T,U,B.Dom,true);},generateId:function(Q,S){S=S||"yui-gen";var R=function(T){if(T&&T.id){return T.id;}var U=S+H++;if(T){T.id=U;}return U;};return B.Dom.batch(Q,R,B.Dom,true)||R.apply(B.Dom,arguments);},isAncestor:function(Q,R){Q=B.Dom.get(Q);R=B.Dom.get(R);if(!Q||!R){return false;}if(Q.contains&&R.nodeType&&!M){return Q.contains(R);}else{if(Q.compareDocumentPosition&&R.nodeType){return!!(Q.compareDocumentPosition(R)&16);}else{if(R.nodeType){return!!this.getAncestorBy(R,function(S){return S==Q;});}}}return false;},inDocument:function(Q){return this.isAncestor(N.documentElement,Q);},getElementsBy:function(X,R,S,U){R=R||"*";S=(S)?B.Dom.get(S):null||N;if(!S){return[];}var T=[],W=S.getElementsByTagName(R);for(var V=0,Q=W.length;V<Q;++V){if(X(W[V])){T[T.length]=W[V];if(U){U(W[V]);}}}return T;},batch:function(U,X,W,S){U=(U&&(U.tagName||U.item))?U:B.Dom.get(U);if(!U||!X){return false;}var T=(S)?W:window;if(U.tagName||U.length===undefined){return X.call(T,U,W);}var V=[];for(var R=0,Q=U.length;R<Q;++R){V[V.length]=X.call(T,U[R],W);}return V;},getDocumentHeight:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollHeight:N.documentElement.scrollHeight;var Q=Math.max(R,B.Dom.getViewportHeight());return Q;},getDocumentWidth:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollWidth:N.documentElement.scrollWidth;var Q=Math.max(R,B.Dom.getViewportWidth());return Q;},getViewportHeight:function(){var Q=self.innerHeight;var R=N.compatMode;if((R||G)&&!C){Q=(R=="CSS1Compat")?N.documentElement.clientHeight:N.body.clientHeight;}return Q;},getViewportWidth:function(){var Q=self.innerWidth;var R=N.compatMode;if(R||G){Q=(R=="CSS1Compat")?N.documentElement.clientWidth:N.body.clientWidth;}return Q;},getAncestorBy:function(Q,R){while(Q=Q.parentNode){if(D(Q,R)){return Q;}}return null;},getAncestorByClassName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return B.Dom.hasClass(T,Q);};return B.Dom.getAncestorBy(R,S);},getAncestorByTagName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return T.tagName&&T.tagName.toUpperCase()==Q.toUpperCase();};return B.Dom.getAncestorBy(R,S);},getPreviousSiblingBy:function(Q,R){while(Q){Q=Q.previousSibling;if(D(Q,R)){return Q;}}return null;},getPreviousSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getPreviousSiblingBy(Q);},getNextSiblingBy:function(Q,R){while(Q){Q=Q.nextSibling;if(D(Q,R)){return Q;}}return null;},getNextSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getNextSiblingBy(Q);},getFirstChildBy:function(Q,S){var R=(D(Q.firstChild,S))?Q.firstChild:null;return R||B.Dom.getNextSiblingBy(Q.firstChild,S);},getFirstChild:function(Q,R){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getFirstChildBy(Q);},getLastChildBy:function(Q,S){if(!Q){return null;}var R=(D(Q.lastChild,S))?Q.lastChild:null;return R||B.Dom.getPreviousSiblingBy(Q.lastChild,S);},getLastChild:function(Q){Q=B.Dom.get(Q);return B.Dom.getLastChildBy(Q);},getChildrenBy:function(R,T){var S=B.Dom.getFirstChildBy(R,T);var Q=S?[S]:[];B.Dom.getNextSiblingBy(S,function(U){if(!T||T(U)){Q[Q.length]=U;}return false;});return Q;},getChildren:function(Q){Q=B.Dom.get(Q);if(!Q){}return B.Dom.getChildrenBy(Q);},getDocumentScrollLeft:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);},getDocumentScrollTop:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollTop,Q.body.scrollTop);},insertBefore:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}return Q.parentNode.insertBefore(R,Q);},insertAfter:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}if(Q.nextSibling){return Q.parentNode.insertBefore(R,Q.nextSibling);}else{return Q.parentNode.appendChild(R);}},getClientRegion:function(){var S=B.Dom.getDocumentScrollTop(),R=B.Dom.getDocumentScrollLeft(),T=B.Dom.getViewportWidth()+R,Q=B.Dom.getViewportHeight()+S;return new B.Region(S,T,Q,R);}};var I=function(){if(N.documentElement.getBoundingClientRect){return function(R){var S=R.getBoundingClientRect();var Q=R.ownerDocument;return[S.left+B.Dom.getDocumentScrollLeft(Q),S.top+B.Dom.getDocumentScrollTop(Q)];};}else{return function(S){var T=[S.offsetLeft,S.offsetTop];var R=S.offsetParent;var Q=(M&&B.Dom.getStyle(S,"position")=="absolute"&&S.offsetParent==S.ownerDocument.body);if(R!=S){while(R){T[0]+=R.offsetLeft;T[1]+=R.offsetTop;if(!Q&&M&&B.Dom.getStyle(R,"position")=="absolute"){Q=true;}R=R.offsetParent;}}if(Q){T[0]-=S.ownerDocument.body.offsetLeft;T[1]-=S.ownerDocument.body.offsetTop;}R=S.parentNode;while(R.tagName&&!E.ROOT_TAG.test(R.tagName)){if(B.Dom.getStyle(R,"display").search(/^inline|table-row.*$/i)){T[0]-=R.scrollLeft;T[1]-=R.scrollTop;}R=R.parentNode;}return T;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.4.1",build:"742"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var D=this.subscribers.length;if(!D&&this.silent){return true;}var H=[],F=true,C,I=false;for(C=0;C<arguments.length;++C){H.push(arguments[C]);}if(!this.silent){}for(C=0;C<D;++C){var L=this.subscribers[C];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var A=null;if(H.length>0){A=H[0];}try{F=L.fn.call(K,A,L.obj);}catch(E){this.lastError=E;}}else{try{F=L.fn.call(K,this.type,H,L.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}if(I){var J=[],B=this.subscribers;for(C=0,D=B.length;C<D;C=C+1){J.push(B[C]);}this.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M];for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return-1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=0,R=L.length;O<R;++O){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=0,R=J.length;O<R;O++){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J[O]=null;return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M[O]=null;break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I[Q]=null;return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(K){if(K&&3==K.nodeType){return K.parentNode;}else{return K;}},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;++M){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return-1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!this.DOMReady){this.startInterval();return false;}}this.locked=true;var P=!H;if(!P){P=(C>0);}var O=[];var Q=function(S,T){var R=S;if(T.override){if(T.override===true){R=T.obj;}else{R=T.override;}}T.fn.call(R,T.obj);};var L,K,N,M;for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&!N.checkReady){M=this.getEl(N.id);if(M){Q(M,N);F[L]=null;}else{O.push(N);}}}for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&N.checkReady){M=this.getEl(N.id);if(M){if(H||M.nextSibling){Q(M,N);F[L]=null;}}else{O.push(N);}}}C=(O.length===0)?0:C-1;if(P){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=0,K=Q.length;N<K;++N){var L=Q[N];this.removeListener(M,L.type,L.fn,L.index);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T&&T.length>0){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(R){var Q=YAHOO.util.Event,O,N,L,K,M;for(O=0,K=J.length;O<K;++O){L=J[O];if(L){var P=window;if(L[Q.ADJ_SCOPE]){if(L[Q.ADJ_SCOPE]===true){P=L[Q.UNLOAD_OBJ];}else{P=L[Q.ADJ_SCOPE];}}L[Q.FN].call(P,Q.getEvent(R,L[Q.EL]),L[Q.UNLOAD_OBJ]);J[O]=null;L=null;P=null;}}J=null;if(YAHOO.env.ua.ie&&I&&I.length>0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M);}N--;}L=null;}G=null;Q._simpleRemove(window,"unload",Q._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);A._dri=setInterval(function(){var C=document.createElement("p");try{C.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();C=null;}catch(B){C=null;}},A.POLL_INTERVAL);}else{if(A.webkit){A._dri=setInterval(function(){var B=document.readyState;if("loaded"==B||"complete"==B){clearInterval(A._dri);A._dri=null;A._ready();}},A.POLL_INTERVAL);}else{A._simpleAdd(document,"DOMContentLoaded",A._ready);}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.4.1",build:"742"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.4.1",build:"742"});(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=("<div class=\""+G.CSS_HEADER+"\"></div><div class=\""+G.CSS_BODY+"\"></div><div class=\""+G.CSS_FOOTER+"\"></div>");O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_BODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:function(U,T){var R,V;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof U=="string"){R=U;U=document.getElementById(U);if(!U){U=(K()).cloneNode(false);U.id=R;}}this.element=U;if(U.id){this.id=U.id;}V=this.element.firstChild;if(V){var Q=false,P=false,S=false;do{if(1==V.nodeType){if(!Q&&F.hasClass(V,G.CSS_HEADER)){this.header=V;Q=true;}else{if(!P&&F.hasClass(V,G.CSS_BODY)){this.body=V;P=true;}else{if(!S&&F.hasClass(V,G.CSS_FOOTER)){this.footer=V;S=true;}}}}}while((V=V.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(T){this.cfg.applyConfig(T,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var P,Q,S;function T(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){Q=F.get("_yuiResizeMonitor");if(!Q){Q=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){Q.src=G.RESIZE_MONITOR_SECURE_URL;}if(YAHOO.env.ua.gecko){S=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();}","</script></head>","<body></body></html>"].join("");Q.src="data:text/html;charset=utf-8,"+encodeURIComponent(S);}Q.id="_yuiResizeMonitor";Q.style.position="absolute";Q.style.visibility="hidden";var R=document.body.firstChild;if(R){document.body.insertBefore(Q,R);}else{document.body.appendChild(Q);}Q.style.width="10em";Q.style.height="10em";Q.style.top=(-1*Q.offsetHeight)+"px";Q.style.left=(-1*Q.offsetWidth)+"px";Q.style.borderWidth="0";Q.style.visibility="visible";if(YAHOO.env.ua.webkit){P=Q.contentWindow.document;P.open();P.close();}}if(Q&&Q.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(!YAHOO.env.ua.gecko){if(!M.on(Q.contentWindow,"resize",T)){M.on(Q,"resize",T);}}G.textResizeInitialized=true;}this.resizeMonitor=Q;}}},onDomResize:function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px";},setHeader:function(Q){var P=this.header||(this.header=J());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},setBody:function(Q){var P=this.body||(this.body=B());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},setFooter:function(Q){var P=this.footer||(this.footer=C());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U);}if(U){S._addToParent(U,S.element);S.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!P){P=this.element;}if(R){Q(R);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T);}else{P.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer);}else{P.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);P=this.element.parentNode;}if(P){P.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll();}}},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild);}else{P.appendChild(Q);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K);};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},H={"X":{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:F.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window,"resize",B.windowResizeHandler);B._initialized=true;}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true);}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes:H.X.supercedes});this.cfg.addProperty(H.Y.key,{handler:this.configY,validator:H.Y.validator,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONSTRAIN_TO_VIEWPORT.validator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes});},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L]);},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars");},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P;if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break;}a=a.parentNode;}if(O=="inherit"){O="visible";}}if(U){if(U instanceof Array){V=U.length;for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration);}}else{R[R.length]=U.effect(this,U.duration);}}if(M){if(Q){this.showMacGeckoScrollbars();}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}L.animateIn();}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(Q){this.hideMacGeckoScrollbars();}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}Z.animateOut();}}else{if(O===""){D.setStyle(this.element,"visibility","hidden");}}}else{if(O=="visible"||O===""){this.beforeHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true);}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe");},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe");},configzIndex:function(M,K,N){var O=K[0],L=this.element;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0;}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(O<=0){O=1;}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe();}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(this.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L);}L.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy");}D.setXY(K,[(N[0]-O),(N[1]-O)]);}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1));}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.IFRAME_SRC;}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=0)";G.frameBorder=0;}else{G.style.opacity="0";}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none";}R=G.cloneNode(false);T=S.parentNode;var Q=T||document.body;this._addToParent(Q,R);this.iframe=R;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false;}if(K){if(this.cfg.getProperty("visible")){P.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},configConstrainToViewport:function(M,K,N){function L(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();}var P=this.cfg.getProperty("x");var R=this.cfg.getProperty("y");var Q=this.getConstrainedXY(P,R);if(Q[0]!==P||Q[1]!==R){this.moveTo(Q[0],Q[1]);}}var O=K[0];if(O){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!C.alreadySubscribed(this.beforeShowEvent,L)){this.beforeShowEvent.subscribe(L);}}else{this.beforeShowEvent.unsubscribe(L);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true);}if(P&&K){this.align(P,K);}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break;}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1];}if(!K){K=Q[2];}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break;}}}},enforceConstraints:function(L,K,M){var O=K[0];var N=this.getConstrainedXY(O[0],O[1]);this.cfg.setProperty("x",N[0],true);this.cfg.setProperty("y",N[1],true);this.cfg.setProperty("xy",N,true);},getConstrainedXY:function(V,T){var N=B.VIEWPORT_OFFSET,U=D.getViewportWidth(),Q=D.getViewportHeight(),M=this.element.offsetHeight,S=this.element.offsetWidth,Y=D.getDocumentScrollLeft(),W=D.getDocumentScrollTop();var P=V;var L=T;if(S+N<U){var R=Y+N;var X=Y+U-S-N;if(V<R){P=R;}else{if(V>X){P=X;}}}else{P=N+Y;}if(M+N<Q){var O=W+N;var K=W+Q-M-N;if(T<O){L=O;}else{if(T>K){L=K;}}}else{L=N+W;}return[P,L];},center:function(){var N=B.VIEWPORT_OFFSET,O=this.element.offsetWidth,M=this.element.offsetHeight,L=D.getViewportWidth(),P=D.getViewportHeight(),K,Q;if(O<L){K=(L/2)-(O/2)+D.getDocumentScrollLeft();}else{K=N+D.getDocumentScrollLeft();}if(M<P){Q=(P/2)-(M/2)+D.getDocumentScrollTop();}else{Q=N+D.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(K,10),parseInt(Q,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);this.cfg.setProperty("xy",K,true);},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context");},0);},bringToTop:function(){var O=[],N=this.element;function R(V,U){var X=D.getStyle(V,"zIndex"),W=D.getStyle(U,"zIndex"),T=(!X||isNaN(X))?0:parseInt(X,10),S=(!W||isNaN(W))?0:parseInt(W,10);if(T>S){return-1;}else{if(T<S){return 1;}else{return 0;}}}function M(U){var S=D.hasClass(U,B.CSS_OVERLAY),T=YAHOO.widget.Panel;if(S&&!D.isAncestor(N,S)){if(T&&D.hasClass(U,T.CSS_PANEL)){O[O.length]=U.parentNode;}else{O[O.length]=U;}}}D.getElementsBy(M,"DIV",document.body);O.sort(R);var K=O[0],Q;if(K){Q=D.getStyle(K,"zIndex");if(!isNaN(Q)){var P=false;if(K!=N){P=true;}else{if(O.length>1){var L=D.getStyle(O[1],"zIndex");if(!isNaN(L)&&(Q==L)){P=true;}}}if(P){this.cfg.setProperty("zindex",(parseInt(Q,10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.call(this);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur();}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire();}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null);}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null;}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._onOverlayBlur=function(K,J){H=null;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},register:function(G){var K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",{value:this});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this);};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire();}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10));}else{G.cfg.setProperty("zIndex",0);}this.overlays.push(G);this.bringToTop(G);return true;}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++;}}if(I>0){return true;}}else{return false;}}},bringToTop:function(M){var I=this.find(M),L,G,J;if(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){var K=false;if(G!==I){K=true;}else{if(J.length>1){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true;}}}if(K){I.cfg.setProperty("zindex",(parseInt(L,10)+2));}}J.sort(this.compareZIndexDesc);}}},find:function(G){var I=this.overlays,J=I.length,H;if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H];}}while(H--);}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H];}}while(H--);}}return null;}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return-1;}else{if(H>G){return-1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show();}while(G--);}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide();}while(G--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim;}this.overlay=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.element;this.animClass=G;};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,G){var I={attributes:{opacity:{from:0,to:1}},duration:G,method:C.easeIn};var F={attributes:{opacity:{to:0}},duration:G,method:C.easeOut};var H=new A(E,I,F,E.element);H.handleUnderlayStart=function(){var K=this.overlay.underlay;if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.filters.length>0);if(J){B.addClass(E.element,"yui-effect-fade");}}};H.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.removeClass(E.element,"yui-effect-fade");}};H.handleStartAnimateIn=function(K,J,L){B.addClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.refireEvent("underlay");}L.handleUnderlayStart();B.setStyle(L.overlay.element,"visibility","visible");B.setStyle(L.overlay.element,"opacity",0);};H.handleCompleteAnimateIn=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire();};H.handleStartAnimateOut=function(K,J,L){B.addClass(L.overlay.element,"hide-select");L.handleUnderlayStart();};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}B.setStyle(L.overlay.element,"visibility","hidden");B.setStyle(L.overlay.element,"opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateOutCompleteEvent.fire();};H.init();return H;};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px";};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible");}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire();};E.handleStartAnimateOut=function(M,L,P){var N=B.getViewportWidth(),Q=B.getXY(P.overlay.element),O=Q[1];P.animOut.attributes.points.to=[(N+25),O];};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire();};E.init();return E;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]";}return E;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.4.1",build:"742"});(function(){var B=YAHOO.util.Dom,A=YAHOO.util.Event;YAHOO.widget.MenuManager=function(){var N=false,F={},Q={},J={},E={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent"},K=null;function D(S){var R;if(S&&S.tagName){switch(S.tagName.toUpperCase()){case"DIV":R=S.parentNode;if((B.hasClass(S,"hd")||B.hasClass(S,"bd")||B.hasClass(S,"ft"))&&R&&R.tagName&&R.tagName.toUpperCase()=="DIV"){return R;}else{return S;}break;case"LI":return S;default:R=S.parentNode;if(R){return D(R);}break;}}}function G(V){var R=A.getTarget(V),S=D(R),X,T,U,Z,Y;if(S){T=S.tagName.toUpperCase();if(T=="LI"){U=S.id;if(U&&J[U]){Z=J[U];Y=Z.parent;}}else{if(T=="DIV"){if(S.id){Y=F[S.id];}}}}if(Y){X=E[V.type];if(Z&&!Z.cfg.getProperty("disabled")){Z[X].fire(V);if(V.type=="keyup"||V.type=="mousedown"){if(K!=Z){if(K){K.blurEvent.fire();}Z.focusEvent.fire();}}}Y[X].fire(V,Z);}else{if(V.type=="mousedown"){if(K){K.blurEvent.fire();K=null;}for(var W in Q){if(YAHOO.lang.hasOwnProperty(Q,W)){Y=Q[W];if(Y.cfg.getProperty("clicktohide")&&!(Y instanceof YAHOO.widget.MenuBar)&&Y.cfg.getProperty("position")=="dynamic"){Y.hide();}else{Y.clearActiveItem(true);}}}}else{if(V.type=="keyup"){if(K){K.blurEvent.fire();K=null;}}}}}function P(S,R,T){if(F[T.id]){this.removeMenu(T);}}function M(S,R){var T=R[0];if(T){K=T;}}function H(S,R){K=null;}function C(T,S){var R=S[0],U=this.id;if(R){Q[U]=this;}else{if(Q[U]){delete Q[U];}}}function L(S,R){O(this);}function O(S){var R=S.id;if(R&&J[R]){if(K==S){K=null;}delete J[R];S.destroyEvent.unsubscribe(L);}}function I(S,R){var U=R[0],T;if(U instanceof YAHOO.widget.MenuItem){T=U.id;if(!J[T]){J[T]=U;U.destroyEvent.subscribe(L);}}}return{addMenu:function(S){var R;if(S instanceof YAHOO.widget.Menu&&S.id&&!F[S.id]){F[S.id]=S;if(!N){R=document;A.on(R,"mouseover",G,this,true);A.on(R,"mouseout",G,this,true);A.on(R,"mousedown",G,this,true);A.on(R,"mouseup",G,this,true);A.on(R,"click",G,this,true);A.on(R,"keydown",G,this,true);A.on(R,"keyup",G,this,true);A.on(R,"keypress",G,this,true);N=true;}S.cfg.subscribeToConfigEvent("visible",C);S.destroyEvent.subscribe(P,S,this);S.itemAddedEvent.subscribe(I);S.focusEvent.subscribe(M);S.blurEvent.subscribe(H);}},removeMenu:function(U){var S,R,T;if(U){S=U.id;if(F[S]==U){R=U.getItems();if(R&&R.length>0){T=R.length-1;do{O(R[T]);}while(T--);}delete F[S];if(Q[S]==U){delete Q[S];}if(U.cfg){U.cfg.unsubscribeFromConfigEvent("visible",C);}U.destroyEvent.unsubscribe(P,U);U.itemAddedEvent.unsubscribe(I);U.focusEvent.unsubscribe(M);U.blurEvent.unsubscribe(H);}}},hideVisible:function(){var R;for(var S in Q){if(YAHOO.lang.hasOwnProperty(Q,S)){R=Q[S];if(!(R instanceof YAHOO.widget.MenuBar)&&R.cfg.getProperty("position")=="dynamic"){R.hide();}}}},getVisible:function(){return Q;},getMenus:function(){return F;},getMenu:function(S){var R=F[S];if(R){return R;}},getMenuItem:function(R){var S=J[R];if(S){return S;}},getMenuItemGroup:function(U){var S=B.get(U),R,W,V,T;if(S&&S.tagName&&S.tagName.toUpperCase()=="UL"){W=S.firstChild;if(W){R=[];do{T=W.id;if(T){V=this.getMenuItem(T);if(V){R[R.length]=V;}}}while((W=W.nextSibling));if(R.length>0){return R;}}}},getFocusedMenuItem:function(){return K;},getFocusedMenu:function(){if(K){return(K.parent.getRoot());}},toString:function(){return"MenuManager";}};}();})();(function(){YAHOO.widget.Menu=function(O,N){if(N){this.parent=N.parent;this.lazyLoad=N.lazyLoad||N.lazyload;this.itemData=N.itemData||N.itemdata;}YAHOO.widget.Menu.superclass.constructor.call(this,O,N);};function I(N){if(typeof N=="string"){return("dynamic,static".indexOf((N.toLowerCase()))!=-1);}}var C=YAHOO.util.Dom,M=YAHOO.util.Event,D=YAHOO.widget.Module,B=YAHOO.widget.Overlay,F=YAHOO.widget.Menu,K=YAHOO.widget.MenuManager,L=YAHOO.util.CustomEvent,E=YAHOO.lang,H=YAHOO.env.ua,G,A={"MOUSE_OVER":"mouseover","MOUSE_OUT":"mouseout","MOUSE_DOWN":"mousedown","MOUSE_UP":"mouseup","CLICK":"click","KEY_PRESS":"keypress","KEY_DOWN":"keydown","KEY_UP":"keyup","FOCUS":"focus","BLUR":"blur","ITEM_ADDED":"itemAdded","ITEM_REMOVED":"itemRemoved"},J={"VISIBLE":{key:"visible",value:false,validator:E.isBoolean},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:true,validator:E.isBoolean,supercedes:["iframe","x","y","xy"]},"POSITION":{key:"position",value:"dynamic",validator:I,supercedes:["visible","iframe"]},"SUBMENU_ALIGNMENT":{key:"submenualignment",value:["tl","tr"],suppressEvent:true},"AUTO_SUBMENU_DISPLAY":{key:"autosubmenudisplay",value:true,validator:E.isBoolean,suppressEvent:true},"SHOW_DELAY":{key:"showdelay",value:250,validator:E.isNumber,suppressEvent:true},"HIDE_DELAY":{key:"hidedelay",value:0,validator:E.isNumber,suppressEvent:true},"SUBMENU_HIDE_DELAY":{key:"submenuhidedelay",value:250,validator:E.isNumber,suppressEvent:true},"CLICK_TO_HIDE":{key:"clicktohide",value:true,validator:E.isBoolean,suppressEvent:true},"CONTAINER":{key:"container",suppressEvent:true},"SCROLL_INCREMENT":{key:"scrollincrement",value:1,validator:E.isNumber,supercedes:["maxheight"],suppressEvent:true},"MIN_SCROLL_HEIGHT":{key:"minscrollheight",value:90,validator:E.isNumber,supercedes:["maxheight"],suppressEvent:true},"MAX_HEIGHT":{key:"maxheight",value:0,validator:E.isNumber,supercedes:["iframe"],suppressEvent:true},"CLASS_NAME":{key:"classname",value:null,validator:E.isString,suppressEvent:true},"DISABLED":{key:"disabled",value:false,validator:E.isBoolean,suppressEvent:true}};YAHOO.lang.extend(F,B,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:[-10000,-10000],_nHideDelayId:null,_nShowDelayId:null,_nSubmenuHideDelayId:null,_nBodyScrollId:null,_bHideDelayEventHandlersAssigned:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,itemAddedEvent:null,itemRemovedEvent:null,init:function(P,O){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}var N;if(typeof P=="string"){N=document.getElementById(P);}else{if(P.tagName){N=P;}}if(N&&N.tagName){switch(N.tagName.toUpperCase()){case"DIV":this.srcElement=N;if(!N.id){N.setAttribute("id",C.generateId());}F.superclass.init.call(this,N);this.beforeInitEvent.fire(F);break;case"SELECT":this.srcElement=N;F.superclass.init.call(this,C.generateId());this.beforeInitEvent.fire(F);break;}}else{F.superclass.init.call(this,P);this.beforeInitEvent.fire(F);}if(this.element){C.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.renderEvent.subscribe(this.onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this.positionOffScreen);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);if(H.gecko||H.webkit){this.cfg.subscribeToConfigEvent("y",this._onYChange);}if(O){this.cfg.applyConfig(O,true);}K.addMenu(this);this.initEvent.fire(F);}},_initSubTree:function(){var O=this.srcElement,N,Q,T,U,S,R,P;if(O){N=(O.tagName&&O.tagName.toUpperCase());if(N=="DIV"){U=this.body.firstChild;if(U){Q=0;T=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(U&&U.tagName){switch(U.tagName.toUpperCase()){case T:this._aGroupTitleElements[Q]=U;break;case"UL":this._aListElements[Q]=U;this._aItemGroups[Q]=[];Q++;break;}}}while((U=U.nextSibling));if(this._aListElements[0]){C.addClass(this._aListElements[0],"first-of-type");}}}U=null;if(N){switch(N){case"DIV":S=this._aListElements;R=S.length;if(R>0){P=R-1;do{U=S[P].firstChild;if(U){do{if(U&&U.tagName&&U.tagName.toUpperCase()=="LI"){this.addItem(new this.ITEM_TYPE(U,{parent:this}),P);}}while((U=U.nextSibling));}}while(P--);}break;case"SELECT":U=O.firstChild;do{if(U&&U.tagName){switch(U.tagName.toUpperCase()){case"OPTGROUP":case"OPTION":this.addItem(new this.ITEM_TYPE(U,{parent:this}));break;}}}while((U=U.nextSibling));break;}}}},_getFirstEnabledItem:function(){var N=this.getItems(),Q=N.length,P;for(var O=0;O<Q;O++){P=N[O];if(P&&!P.cfg.getProperty("disabled")&&P.element.style.display!="none"){return P;}}},_addItemToGroup:function(S,T,W){var U,X,Q,V,R,O,P;function N(Y,Z){return(Y[Z]||N(Y,(Z+1)));}if(T instanceof this.ITEM_TYPE){U=T;U.parent=this;}else{if(typeof T=="string"){U=new this.ITEM_TYPE(T,{parent:this});}else{if(typeof T=="object"){T.parent=this;U=new this.ITEM_TYPE(T.text,T);}}}if(U){if(U.cfg.getProperty("selected")){this.activeItem=U;}X=typeof S=="number"?S:0;Q=this._getItemGroup(X);if(!Q){Q=this._createItemGroup(X);}if(typeof W=="number"){R=(W>=Q.length);if(Q[W]){Q.splice(W,0,U);}else{Q[W]=U;}V=Q[W];if(V){if(R&&(!V.element.parentNode||V.element.parentNode.nodeType==11)){this._aListElements[X].appendChild(V.element);}else{O=N(Q,(W+1));if(O&&(!V.element.parentNode||V.element.parentNode.nodeType==11)){this._aListElements[X].insertBefore(V.element,O.element);}}V.parent=this;this._subscribeToItemEvents(V);this._configureSubmenu(V);this._updateItemProperties(X);this.itemAddedEvent.fire(V);this.changeContentEvent.fire();return V;}}else{P=Q.length;Q[P]=U;V=Q[P];if(V){if(!C.isAncestor(this._aListElements[X],V.element)){this._aListElements[X].appendChild(V.element);}V.element.setAttribute("groupindex",X);V.element.setAttribute("index",P);V.parent=this;V.index=P;V.groupIndex=X;this._subscribeToItemEvents(V);this._configureSubmenu(V);if(P===0){C.addClass(V.element,"first-of-type");}this.itemAddedEvent.fire(V);this.changeContentEvent.fire();return V;}}}},_removeItemFromGroupByIndex:function(Q,O){var P=typeof Q=="number"?Q:0,R=this._getItemGroup(P),T,S,N;if(R){T=R.splice(O,1);S=T[0];if(S){this._updateItemProperties(P);if(R.length===0){N=this._aListElements[P];if(this.body&&N){this.body.removeChild(N);}this._aItemGroups.splice(P,1);this._aListElements.splice(P,1);N=this._aListElements[0];if(N){C.addClass(N,"first-of-type");}}this.itemRemovedEvent.fire(S);this.changeContentEvent.fire();return S;}}},_removeItemFromGroupByValue:function(P,N){var R=this._getItemGroup(P),S,Q,O;if(R){S=R.length;Q=-1;if(S>0){O=S-1;do{if(R[O]==N){Q=O;break;}}while(O--);if(Q>-1){return(this._removeItemFromGroupByIndex(P,Q));}}}},_updateItemProperties:function(O){var P=this._getItemGroup(O),S=P.length,R,Q,N;if(S>0){N=S-1;do{R=P[N];if(R){Q=R.element;R.index=N;R.groupIndex=O;Q.setAttribute("groupindex",O);Q.setAttribute("index",N);C.removeClass(Q,"first-of-type");}}while(N--);if(Q){C.addClass(Q,"first-of-type");}}},_createItemGroup:function(O){var N;if(!this._aItemGroups[O]){this._aItemGroups[O]=[];N=document.createElement("ul");this._aListElements[O]=N;return this._aItemGroups[O];}},_getItemGroup:function(O){var N=((typeof O=="number")?O:0);return this._aItemGroups[N];},_configureSubmenu:function(N){var O=N.cfg.getProperty("submenu");if(O){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,O,true);this.renderEvent.subscribe(this._onParentMenuRender,O,true);O.beforeShowEvent.subscribe(this._onSubmenuBeforeShow);}},_subscribeToItemEvents:function(N){N.focusEvent.subscribe(this._onMenuItemFocus);N.blurEvent.subscribe(this._onMenuItemBlur);N.destroyEvent.subscribe(this._onMenuItemDestroy,N,this);N.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,N,this);},_onVisibleChange:function(P,O){var N=O[0];if(N){C.addClass(this.element,"visible");}else{C.removeClass(this.element,"visible");}},_cancelHideDelay:function(){var N=this.getRoot();if(N._nHideDelayId){window.clearTimeout(N._nHideDelayId);}},_execHideDelay:function(){this._cancelHideDelay();var O=this.getRoot(),P=this;function N(){if(O.activeItem){O.clearActiveItem();}if(O==P&&!(P instanceof YAHOO.widget.MenuBar)&&P.cfg.getProperty("position")=="dynamic"){P.hide();}}O._nHideDelayId=window.setTimeout(N,O.cfg.getProperty("hidedelay"));},_cancelShowDelay:function(){var N=this.getRoot();if(N._nShowDelayId){window.clearTimeout(N._nShowDelayId);}},_execShowDelay:function(P){var O=this.getRoot();function N(){if(P.parent.cfg.getProperty("selected")){P.show();}}O._nShowDelayId=window.setTimeout(N,O.cfg.getProperty("showdelay"));},_execSubmenuHideDelay:function(Q,O,N){var P=this;Q._nSubmenuHideDelayId=window.setTimeout(function(){if(P._nCurrentMouseX>(O+10)){Q._nSubmenuHideDelayId=window.setTimeout(function(){Q.hide();},N);}else{Q.hide();}},50);},_disableScrollHeader:function(){if(!this._bHeaderDisabled){C.addClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){C.addClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){C.removeClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){C.removeClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=false;}},_onMouseOver:function(W,R){if(this._bStopMouseEventHandlers){return false;}var X=R[0],V=R[1],N=M.getTarget(X),O,Q,U,P,T,S;if(!this._bHandledMouseOverEvent&&(N==this.element||C.isAncestor(this.element,N))){this._nCurrentMouseX=0;M.on(this.element,"mousemove",this._onMouseMove,this,true);this.clearActiveItem();if(this.parent&&this._nSubmenuHideDelayId){window.clearTimeout(this._nSubmenuHideDelayId);this.parent.cfg.setProperty("selected",true);O=this.parent.parent;O._bHandledMouseOutEvent=true;O._bHandledMouseOverEvent=false;}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}if(V&&!V.handledMouseOverEvent&&!V.cfg.getProperty("disabled")&&(N==V.element||C.isAncestor(V.element,N))){Q=this.cfg.getProperty("showdelay");U=(Q>0);if(U){this._cancelShowDelay();}P=this.activeItem;if(P){P.cfg.setProperty("selected",false);}T=V.cfg;T.setProperty("selected",true);if(this.hasFocus()){V.focus();}if(this.cfg.getProperty("autosubmenudisplay")){S=T.getProperty("submenu");if(S){if(U){this._execShowDelay(S);}else{S.show();}}}V.handledMouseOverEvent=true;V.handledMouseOutEvent=false;}},_onMouseOut:function(V,P){if(this._bStopMouseEventHandlers){return false;}var W=P[0],T=P[1],Q=M.getRelatedTarget(W),U=false,S,R,N,O;if(T&&!T.cfg.getProperty("disabled")){S=T.cfg;R=S.getProperty("submenu");if(R&&(Q==R.element||C.isAncestor(R.element,Q))){U=true;}if(!T.handledMouseOutEvent&&((Q!=T.element&&!C.isAncestor(T.element,Q))||U)){if(!U){T.cfg.setProperty("selected",false);if(R){N=this.cfg.getProperty("submenuhidedelay");O=this.cfg.getProperty("showdelay");if(!(this instanceof YAHOO.widget.MenuBar)&&N>0&&O>=N){this._execSubmenuHideDelay(R,M.getPageX(W),N);}else{R.hide();}}}T.handledMouseOutEvent=true;T.handledMouseOverEvent=false;}}if(!this._bHandledMouseOutEvent&&((Q!=this.element&&!C.isAncestor(this.element,Q))||U)){M.removeListener(this.element,"mousemove",this._onMouseMove);this._nCurrentMouseX=M.getPageX(W);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}},_onMouseMove:function(O,N){if(this._bStopMouseEventHandlers){return false;}this._nCurrentMouseX=M.getPageX(O);},_onClick:function(W,P){var X=P[0],S=P[1],Q,U=false,O,N,R,T,V;if(S&&!S.cfg.getProperty("disabled")){Q=S.cfg.getProperty("submenu");R=S.cfg.getProperty("url");if(R){T=R.indexOf("#");V=R.length;if(T!=-1){R=R.substr(T,V);V=R.length;if(V>1){N=R.substr(1,V);U=C.isAncestor(this.element,N);}else{if(V===1){U=true;}}}}if(U&&!S.cfg.getProperty("target")){M.preventDefault(X);S.focus();}if(!Q){O=this.getRoot();if(O instanceof YAHOO.widget.MenuBar||O.cfg.getProperty("position")=="static"){O.clearActiveItem();}else{O.hide();}}}},_onKeyDown:function(b,V){var Y=V[0],X=V[1],f=this,U,Z,O,S,c,N,e,R,a,Q,W,d,T;function P(){f._bStopMouseEventHandlers=true;window.setTimeout(function(){f._bStopMouseEventHandlers=false;},10);}if(X&&!X.cfg.getProperty("disabled")){Z=X.cfg;O=this.parent;switch(Y.keyCode){case 38:case 40:c=(Y.keyCode==38)?X.getPreviousEnabledSibling():X.getNextEnabledSibling();if(c){this.clearActiveItem();c.cfg.setProperty("selected",true);c.focus();if(this.cfg.getProperty("maxheight")>0){N=this.body;e=N.scrollTop;R=N.offsetHeight;a=this.getItems();Q=a.length-1;W=c.element.offsetTop;if(Y.keyCode==40){if(W>=(R+e)){N.scrollTop=W-R;}else{if(W<=e){N.scrollTop=0;}}if(c==a[Q]){N.scrollTop=c.element.offsetTop;}}else{if(W<=e){N.scrollTop=W-c.element.offsetHeight;}else{if(W>=(e+R)){N.scrollTop=W;}}if(c==a[0]){N.scrollTop=0;}}e=N.scrollTop;d=N.scrollHeight-N.offsetHeight;if(e===0){this._disableScrollHeader();this._enableScrollFooter();}else{if(e==d){this._enableScrollHeader();this._disableScrollFooter();}else{this._enableScrollHeader();this._enableScrollFooter();}}}}M.preventDefault(Y);P();break;case 39:U=Z.getProperty("submenu");if(U){if(!Z.getProperty("selected")){Z.setProperty("selected",true);}U.show();U.setInitialFocus();U.setInitialSelection();}else{S=this.getRoot();if(S instanceof YAHOO.widget.MenuBar){c=S.activeItem.getNextEnabledSibling();if(c){S.clearActiveItem();c.cfg.setProperty("selected",true);U=c.cfg.getProperty("submenu");if(U){U.show();}c.focus();}}}M.preventDefault(Y);P();break;case 37:if(O){T=O.parent;if(T instanceof YAHOO.widget.MenuBar){c=T.activeItem.getPreviousEnabledSibling();if(c){T.clearActiveItem();c.cfg.setProperty("selected",true);U=c.cfg.getProperty("submenu");if(U){U.show();}c.focus();}}else{this.hide();O.focus();}}M.preventDefault(Y);P();break;}}if(Y.keyCode==27){if(this.cfg.getProperty("position")=="dynamic"){this.hide();if(this.parent){this.parent.focus();}}else{if(this.activeItem){U=this.activeItem.cfg.getProperty("submenu");if(U&&U.cfg.getProperty("visible")){U.hide();this.activeItem.focus();}else{this.activeItem.blur();this.activeItem.cfg.setProperty("selected",false);}}}M.preventDefault(Y);}},_onKeyPress:function(P,O){var N=O[0];if(N.keyCode==40||N.keyCode==38){M.preventDefault(N);}},_onYChange:function(O,N){var Q=this.parent,S,P,R;if(Q){S=Q.parent.body.scrollTop;if(S>0){R=(this.cfg.getProperty("y")-S);C.setY(this.element,R);P=this.iframe;if(P){C.setY(P,R);}this.cfg.setProperty("y",R,true);}}},_onScrollTargetMouseOver:function(T,W){this._cancelHideDelay();var P=M.getTarget(T),R=this.body,V=this,Q=this.cfg.getProperty("scrollincrement"),N,O;function U(){var X=R.scrollTop;if(X<N){R.scrollTop=(X+Q);V._enableScrollHeader();}else{R.scrollTop=N;window.clearInterval(V._nBodyScrollId);V._disableScrollFooter();}}function S(){var X=R.scrollTop;if(X>0){R.scrollTop=(X-Q);V._enableScrollFooter();}else{R.scrollTop=0;window.clearInterval(V._nBodyScrollId);V._disableScrollHeader();}}if(C.hasClass(P,"hd")){O=S;}else{N=R.scrollHeight-R.offsetHeight;O=U;}this._nBodyScrollId=window.setInterval(O,10);},_onScrollTargetMouseOut:function(O,N){window.clearInterval(this._nBodyScrollId);this._cancelHideDelay();},_onInit:function(O,N){this.cfg.subscribeToConfigEvent("visible",this._onVisibleChange);var P=!this.parent,Q=this.lazyLoad;if(((P&&!Q)||(P&&(this.cfg.getProperty("visible")||this.cfg.getProperty("position")=="static"))||(!P&&!Q))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){this.addItems(this.itemData);}}else{if(Q){this.cfg.fireQueue();}}},_onBeforeRender:function(Q,P){var R=this.element,U=this._aListElements.length,O=true,T=0,N,S;if(U>0){do{N=this._aListElements[T];if(N){if(O){C.addClass(N,"first-of-type");O=false;}if(!C.isAncestor(R,N)){this.appendToBody(N);}S=this._aGroupTitleElements[T];if(S){if(!C.isAncestor(R,S)){N.parentNode.insertBefore(S,N);}C.addClass(N,"hastitle");}}T++;}while(T<U);}},_onRender:function(O,N){if(this.cfg.getProperty("position")=="dynamic"){if(!this.cfg.getProperty("visible")){this.positionOffScreen();}}},_onBeforeShow:function(W,R){var V,O,S,Q,T;if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()=="SELECT"){V=this.itemData.length;for(O=0;O<V;O++){if(this.itemData[O].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[O])));}}}else{this.addItems(this.itemData);}}T=this.srcElement;if(T){if(T.tagName.toUpperCase()=="SELECT"){if(C.inDocument(T)){this.render(T.parentNode);}else{this.render(this.cfg.getProperty("container"));}}else{this.render();}}else{if(this.parent){this.render(this.parent.element);}else{this.render(this.cfg.getProperty("container"));}}}var P=this.cfg.getProperty("maxheight"),N=this.cfg.getProperty("minscrollheight"),U=this.cfg.getProperty("position")=="dynamic";if(!this.parent&&U){this.cfg.refireEvent("xy");}function X(){this.cfg.setProperty("maxheight",0);this.hideEvent.unsubscribe(X);}if(!(this instanceof YAHOO.widget.MenuBar)&&U){if(P===0){S=C.getViewportHeight();if(this.parent&&this.parent.parent instanceof YAHOO.widget.MenuBar){Q=YAHOO.util.Region.getRegion(this.parent.element);S=(S-Q.bottom);}if(this.element.offsetHeight>=S){P=(S-(B.VIEWPORT_OFFSET*2));if(P<N){P=N;}this.cfg.setProperty("maxheight",P);this.hideEvent.subscribe(X);}}}},_onShow:function(Q,P){var T=this.parent,S,N,O;function R(V){var U;if(V.type=="mousedown"||(V.type=="keydown"&&V.keyCode==27)){U=M.getTarget(V);if(U!=S.element||!C.isAncestor(S.element,U)){S.cfg.setProperty("autosubmenudisplay",false);M.removeListener(document,"mousedown",R);M.removeListener(document,"keydown",R);}}}if(T){S=T.parent;N=S.cfg.getProperty("submenualignment");O=this.cfg.getProperty("submenualignment");if((N[0]!=O[0])&&(N[1]!=O[1])){this.cfg.setProperty("submenualignment",[N[0],N[1]]);}if(!S.cfg.getProperty("autosubmenudisplay")&&(S instanceof YAHOO.widget.MenuBar||S.cfg.getProperty("position")=="static")){S.cfg.setProperty("autosubmenudisplay",true);M.on(document,"mousedown",R);M.on(document,"keydown",R);}}},_onBeforeHide:function(P,O){var N=this.activeItem,R,Q;if(N){R=N.cfg;R.setProperty("selected",false);Q=R.getProperty("submenu");if(Q){Q.hide();}}if(this.getRoot()==this){this.blur();}},_onParentMenuConfigChange:function(O,N,R){var P=N[0][0],Q=N[0][1];switch(P){case"iframe":case"constraintoviewport":case"hidedelay":case"showdelay":case"submenuhidedelay":case"clicktohide":case"effect":case"classname":case"scrollincrement":case"minscrollheight":R.cfg.setProperty(P,Q);break;}},_onParentMenuRender:function(O,N,S){var P=S.parent.parent.cfg,Q={constraintoviewport:P.getProperty("constraintoviewport"),xy:[0,0],clicktohide:P.getProperty("clicktohide"),effect:P.getProperty("effect"),showdelay:P.getProperty("showdelay"),hidedelay:P.getProperty("hidedelay"),submenuhidedelay:P.getProperty("submenuhidedelay"),classname:P.getProperty("classname"),scrollincrement:P.getProperty("scrollincrement"),minscrollheight:P.getProperty("minscrollheight"),iframe:P.getProperty("iframe")},R;S.cfg.applyConfig(Q);if(!this.lazyLoad){R=this.parent.element;if(this.element.parentNode==R){this.render();}else{this.render(R);}}},_onSubmenuBeforeShow:function(P,O){var Q=this.parent,N=Q.parent.cfg.getProperty("submenualignment");if(!this.cfg.getProperty("context")){this.cfg.setProperty("context",[Q.element,N[0],N[1]]);}else{this.align();}},_onMenuItemFocus:function(O,N){this.parent.focusEvent.fire(this);},_onMenuItemBlur:function(O,N){this.parent.blurEvent.fire(this);},_onMenuItemDestroy:function(P,O,N){this._removeItemFromGroupByValue(N.groupIndex,N);},_onMenuItemConfigChange:function(P,O,N){var R=O[0][0],S=O[0][1],Q;switch(R){case"selected":if(S===true){this.activeItem=N;}break;case"submenu":Q=O[0][1];if(Q){this._configureSubmenu(N);}break;}},enforceConstraints:function(Q,P,W){var j=this.parent,f=B.VIEWPORT_OFFSET,b=this.element,S=this.cfg,T=P[0],R=b.offsetHeight,c=b.offsetWidth,i=C.getViewportWidth(),a=C.getViewportHeight(),Z=(j&&j.parent instanceof YAHOO.widget.MenuBar)?0:f,d=S.getProperty("context"),X=d?d[0]:null,Y,h,O,N,g,e,V,U;if(c<i){V=T[0];g=C.getDocumentScrollLeft();h=g+Z;N=g+i-c-Z;if(V<f){V=h;}else{if((V+c)>i){if(X&&((V-X.offsetWidth)>c)){if(j&&j.parent instanceof YAHOO.widget.MenuBar){V=(V-(c-X.offsetWidth));}else{V=(V-(X.offsetWidth+c));}}else{V=N;}}}}if(R<a){U=T[1];e=C.getDocumentScrollTop();Y=e+Z;O=e+a-R-Z;if(U<f){U=Y;}else{if(U>O){if(X&&(U>R)){U=((U+X.offsetHeight)-R);}else{U=O;}}}}S.setProperty("x",V,true);S.setProperty("y",U,true);S.setProperty("xy",[V,U],true);},configVisible:function(P,O,Q){var N,R;if(this.cfg.getProperty("position")=="dynamic"){F.superclass.configVisible.call(this,P,O,Q);}else{N=O[0];R=C.getStyle(this.element,"display");C.setStyle(this.element,"visibility","visible");if(N){if(R!="block"){this.beforeShowEvent.fire();C.setStyle(this.element,"display","block");this.showEvent.fire();}}else{if(R=="block"){this.beforeHideEvent.fire();C.setStyle(this.element,"display","none");this.hideEvent.fire();}}}},configPosition:function(P,O,S){var R=this.element,Q=O[0]=="static"?"static":"absolute",T=this.cfg,N;C.setStyle(R,"position",Q);if(Q=="static"){C.setStyle(R,"display","block");T.setProperty("visible",true);}else{C.setStyle(R,"visibility","hidden");}if(Q=="absolute"){N=T.getProperty("zindex");if(!N||N===0){N=this.parent?(this.parent.parent.cfg.getProperty("zindex")+1):1;T.setProperty("zindex",N);}}},configIframe:function(O,N,P){if(this.cfg.getProperty("position")=="dynamic"){F.superclass.configIframe.call(this,O,N,P);}},configHideDelay:function(O,N,R){var T=N[0],S=this.mouseOutEvent,P=this.mouseOverEvent,Q=this.keyDownEvent;if(T>0){if(!this._bHideDelayEventHandlersAssigned){S.subscribe(this._execHideDelay);P.subscribe(this._cancelHideDelay);Q.subscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=true;}}else{S.unsubscribe(this._execHideDelay);P.unsubscribe(this._cancelHideDelay);Q.unsubscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=false;}},configContainer:function(O,N,Q){var P=N[0];if(typeof P=="string"){this.cfg.setProperty("container",document.getElementById(P),true);}},_setMaxHeight:function(O,N,P){this.cfg.setProperty("maxheight",P);this.renderEvent.unsubscribe(this._setMaxHeight);},configMaxHeight:function(Y,T,W){var S=T[0],P=this.element,Q=this.body,X=this.header,O=this.footer,V=this._onScrollTargetMouseOver,Z=this._onScrollTargetMouseOut,N=this.cfg.getProperty("minscrollheight"),U,R;if(S!==0&&S<N){S=N;}if(this.lazyLoad&&!Q){this.renderEvent.unsubscribe(this._setMaxHeight);if(S>0){this.renderEvent.subscribe(this._setMaxHeight,S,this);}return;}C.setStyle(Q,"height","");C.removeClass(Q,"yui-menu-body-scrolled");if(H.gecko&&this.parent&&this.parent.parent&&this.parent.parent.cfg.getProperty("position")=="dynamic"&&!this.cfg.getProperty("width")){R=P.offsetWidth;P.style.width=R+"px";P.style.width=(R-(P.offsetWidth-R))+"px";}if(!X&&!O){this.setHeader("&#32;");this.setFooter("&#32;");X=this.header;O=this.footer;C.addClass(X,"topscrollbar");C.addClass(O,"bottomscrollbar");P.insertBefore(X,Q);P.appendChild(O);}U=(S-(X.offsetHeight+X.offsetHeight));if(U>0&&(Q.offsetHeight>S)){C.addClass(Q,"yui-menu-body-scrolled");C.setStyle(Q,"height",(U+"px"));M.on(X,"mouseover",V,this,true);M.on(X,"mouseout",Z,this,true);M.on(O,"mouseover",V,this,true);M.on(O,"mouseout",Z,this,true);this._disableScrollHeader();this._enableScrollFooter();}else{if(X&&O){this._enableScrollHeader();this._enableScrollFooter();M.removeListener(X,"mouseover",V);M.removeListener(X,"mouseout",Z);M.removeListener(O,"mouseover",V);M.removeListener(O,"mouseout",Z);P.removeChild(X);P.removeChild(O);this.header=null;this.footer=null;}}this.cfg.refireEvent("iframe");},configClassName:function(P,O,Q){var N=O[0];if(this._sClassName){C.removeClass(this.element,this._sClassName);}C.addClass(this.element,N);this._sClassName=N;},_onItemAdded:function(O,N){var P=N[0];if(P){P.cfg.setProperty("disabled",true);}},configDisabled:function(P,O,S){var R=O[0],N=this.getItems(),T,Q;if(E.isArray(N)){T=N.length;if(T>0){Q=T-1;do{N[Q].cfg.setProperty("disabled",R);}while(Q--);}if(R){this.clearActiveItem(true);C.addClass(this.element,"disabled");this.itemAddedEvent.subscribe(this._onItemAdded);}else{C.removeClass(this.element,"disabled");this.itemAddedEvent.unsubscribe(this._onItemAdded);}}},onRender:function(R,Q){function S(){var W=this.element,V=this._shadow;if(V&&W){V.style.width=(W.offsetWidth+6)+"px";V.style.height=(W.offsetHeight+1)+"px";}}function U(){this.element.appendChild(this._shadow);}function O(){C.addClass(this._shadow,"yui-menu-shadow-visible");}function N(){C.removeClass(this._shadow,"yui-menu-shadow-visible");}function T(){var W=this._shadow,V,X;if(!W){V=this.element;X=this;if(!G){G=document.createElement("div");G.className="yui-menu-shadow yui-menu-shadow-visible";}W=G.cloneNode(false);V.appendChild(W);this._shadow=W;this.beforeShowEvent.subscribe(O);this.beforeHideEvent.subscribe(N);if(H.ie){window.setTimeout(function(){S.call(X);X.syncIframe();},0);this.cfg.subscribeToConfigEvent("width",S);this.cfg.subscribeToConfigEvent("height",S);this.cfg.subscribeToConfigEvent("maxheight",S);this.changeContentEvent.subscribe(S);D.textResizeEvent.subscribe(S,X,true);this.destroyEvent.subscribe(function(){D.textResizeEvent.unsubscribe(S,X);});}this.cfg.subscribeToConfigEvent("maxheight",U);}}function P(){T.call(this);this.beforeShowEvent.unsubscribe(P);}if(this.cfg.getProperty("position")=="dynamic"){if(this.cfg.getProperty("visible")){T.call(this);}else{this.beforeShowEvent.subscribe(P);}}},initEvents:function(){F.superclass.initEvents.call(this);var N=L.LIST;this.mouseOverEvent=this.createEvent(A.MOUSE_OVER);this.mouseOverEvent.signature=N;this.mouseOutEvent=this.createEvent(A.MOUSE_OUT);this.mouseOutEvent.signature=N;this.mouseDownEvent=this.createEvent(A.MOUSE_DOWN);this.mouseDownEvent.signature=N;this.mouseUpEvent=this.createEvent(A.MOUSE_UP);this.mouseUpEvent.signature=N;this.clickEvent=this.createEvent(A.CLICK);this.clickEvent.signature=N;this.keyPressEvent=this.createEvent(A.KEY_PRESS);this.keyPressEvent.signature=N;this.keyDownEvent=this.createEvent(A.KEY_DOWN);this.keyDownEvent.signature=N;this.keyUpEvent=this.createEvent(A.KEY_UP);this.keyUpEvent.signature=N;this.focusEvent=this.createEvent(A.FOCUS);this.focusEvent.signature=N;this.blurEvent=this.createEvent(A.BLUR);this.blurEvent.signature=N;this.itemAddedEvent=this.createEvent(A.ITEM_ADDED);this.itemAddedEvent.signature=N;this.itemRemovedEvent=this.createEvent(A.ITEM_REMOVED);this.itemRemovedEvent.signature=N;},positionOffScreen:function(){var O=this.iframe,N=this.OFF_SCREEN_POSITION;C.setXY(this.element,N);if(O){C.setXY(O,N);}},getRoot:function(){var O=this.parent,N;if(O){N=O.parent;return N?N.getRoot():this;}else{return this;}},toString:function(){var O="Menu",N=this.id;if(N){O+=(" "+N);}return O;},setItemGroupTitle:function(S,R){var Q,P,O,N;if(typeof S=="string"&&S.length>0){Q=typeof R=="number"?R:0;P=this._aGroupTitleElements[Q];if(P){P.innerHTML=S;}else{P=document.createElement(this.GROUP_TITLE_TAG_NAME);P.innerHTML=S;this._aGroupTitleElements[Q]=P;}O=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[O]){C.removeClass(this._aGroupTitleElements[O],"first-of-type");N=O;}}while(O--);if(N!==null){C.addClass(this._aGroupTitleElements[N],"first-of-type");}this.changeContentEvent.fire();}},addItem:function(N,O){if(N){return this._addItemToGroup(O,N);}},addItems:function(Q,P){var S,N,R,O;if(E.isArray(Q)){S=Q.length;N=[];for(O=0;O<S;O++){R=Q[O];if(R){if(E.isArray(R)){N[N.length]=this.addItems(R,O);}else{N[N.length]=this._addItemToGroup(P,R);}}}if(N.length){return N;}}},insertItem:function(N,O,P){if(N){return this._addItemToGroup(P,N,O);}},removeItem:function(N,O){var P;if(typeof N!="undefined"){if(N instanceof YAHOO.widget.MenuItem){P=this._removeItemFromGroupByValue(O,N);}else{if(typeof N=="number"){P=this._removeItemFromGroupByIndex(O,N);}}if(P){P.destroy();return P;}}},getItems:function(){var P=this._aItemGroups,O,N=[];if(E.isArray(P)){O=P.length;return((O==1)?P[0]:(Array.prototype.concat.apply(N,P)));}},getItemGroups:function(){return this._aItemGroups;},getItem:function(N,O){var P;if(typeof N=="number"){P=this._getItemGroup(O);if(P){return P[N];}}},getSubmenus:function(){var O=this.getItems(),S=O.length,N,P,R,Q;if(S>0){N=[];for(Q=0;Q<S;Q++){R=O[Q];if(R){P=R.cfg.getProperty("submenu");if(P){N[N.length]=P;}}}}return N;},clearContent:function(){var R=this.getItems(),O=R.length,P=this.element,Q=this.body,V=this.header,N=this.footer,U,T,S;if(O>0){S=O-1;do{U=R[S];if(U){T=U.cfg.getProperty("submenu");if(T){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,T);this.renderEvent.unsubscribe(this._onParentMenuRender,T);}this.removeItem(U);}}while(S--);}if(V){M.purgeElement(V);P.removeChild(V);}if(N){M.purgeElement(N);P.removeChild(N);}if(Q){M.purgeElement(Q);Q.innerHTML="";}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty("width",null);},destroy:function(){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;F.superclass.destroy.call(this);},setInitialFocus:function(){var N=this._getFirstEnabledItem();if(N){N.focus();}},setInitialSelection:function(){var N=this._getFirstEnabledItem();if(N){N.cfg.setProperty("selected",true);}},clearActiveItem:function(P){if(this.cfg.getProperty("showdelay")>0){this._cancelShowDelay();}var N=this.activeItem,Q,O;if(N){Q=N.cfg;if(P){N.blur();}Q.setProperty("selected",false);O=Q.getProperty("submenu");if(O){O.hide();}this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var N;if(this.hasFocus()){N=K.getFocusedMenuItem();if(N){N.blur();}}},hasFocus:function(){return(K.getFocusedMenu()==this.getRoot());},subscribe:function(){function Q(V,U,X){var Y=U[0],W=Y.cfg.getProperty("submenu");if(W){W.subscribe.apply(W,X);}}function T(V,U,X){var W=this.cfg.getProperty("submenu");if(W){W.subscribe.apply(W,X);}}F.superclass.subscribe.apply(this,arguments);F.superclass.subscribe.call(this,"itemAdded",Q,arguments);var N=this.getItems(),S,R,O,P;if(N){S=N.length;if(S>0){P=S-1;do{R=N[P];O=R.cfg.getProperty("submenu");if(O){O.subscribe.apply(O,arguments);}else{R.cfg.subscribeToConfigEvent("submenu",T,arguments);}}while(P--);}}},initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);var N=this.cfg;N.addProperty(J.VISIBLE.key,{handler:this.configVisible,value:J.VISIBLE.value,validator:J.VISIBLE.validator});N.addProperty(J.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:J.CONSTRAIN_TO_VIEWPORT.value,validator:J.CONSTRAIN_TO_VIEWPORT.validator,supercedes:J.CONSTRAIN_TO_VIEWPORT.supercedes});N.addProperty(J.POSITION.key,{handler:this.configPosition,value:J.POSITION.value,validator:J.POSITION.validator,supercedes:J.POSITION.supercedes});N.addProperty(J.SUBMENU_ALIGNMENT.key,{value:J.SUBMENU_ALIGNMENT.value,suppressEvent:J.SUBMENU_ALIGNMENT.suppressEvent});N.addProperty(J.AUTO_SUBMENU_DISPLAY.key,{value:J.AUTO_SUBMENU_DISPLAY.value,validator:J.AUTO_SUBMENU_DISPLAY.validator,suppressEvent:J.AUTO_SUBMENU_DISPLAY.suppressEvent});N.addProperty(J.SHOW_DELAY.key,{value:J.SHOW_DELAY.value,validator:J.SHOW_DELAY.validator,suppressEvent:J.SHOW_DELAY.suppressEvent});N.addProperty(J.HIDE_DELAY.key,{handler:this.configHideDelay,value:J.HIDE_DELAY.value,validator:J.HIDE_DELAY.validator,suppressEvent:J.HIDE_DELAY.suppressEvent});N.addProperty(J.SUBMENU_HIDE_DELAY.key,{value:J.SUBMENU_HIDE_DELAY.value,validator:J.SUBMENU_HIDE_DELAY.validator,suppressEvent:J.SUBMENU_HIDE_DELAY.suppressEvent});N.addProperty(J.CLICK_TO_HIDE.key,{value:J.CLICK_TO_HIDE.value,validator:J.CLICK_TO_HIDE.validator,suppressEvent:J.CLICK_TO_HIDE.suppressEvent});N.addProperty(J.CONTAINER.key,{handler:this.configContainer,value:document.body,suppressEvent:J.CONTAINER.suppressEvent});N.addProperty(J.SCROLL_INCREMENT.key,{value:J.SCROLL_INCREMENT.value,validator:J.SCROLL_INCREMENT.validator,supercedes:J.SCROLL_INCREMENT.supercedes,suppressEvent:J.SCROLL_INCREMENT.suppressEvent});N.addProperty(J.MIN_SCROLL_HEIGHT.key,{value:J.MIN_SCROLL_HEIGHT.value,validator:J.MIN_SCROLL_HEIGHT.validator,supercedes:J.MIN_SCROLL_HEIGHT.supercedes,suppressEvent:J.MIN_SCROLL_HEIGHT.suppressEvent});N.addProperty(J.MAX_HEIGHT.key,{handler:this.configMaxHeight,value:J.MAX_HEIGHT.value,validator:J.MAX_HEIGHT.validator,suppressEvent:J.MAX_HEIGHT.suppressEvent,supercedes:J.MAX_HEIGHT.supercedes});N.addProperty(J.CLASS_NAME.key,{handler:this.configClassName,value:J.CLASS_NAME.value,validator:J.CLASS_NAME.validator,supercedes:J.CLASS_NAME.supercedes});N.addProperty(J.DISABLED.key,{handler:this.configDisabled,value:J.DISABLED.value,validator:J.DISABLED.validator,suppressEvent:J.DISABLED.suppressEvent});}});})();(function(){YAHOO.widget.MenuItem=function(K,J){if(K){if(J){this.parent=J.parent;this.value=J.value;this.id=J.id;}this.init(K,J);}};var B=YAHOO.util.Dom,C=YAHOO.widget.Module,E=YAHOO.widget.Menu,H=YAHOO.widget.MenuItem,I=YAHOO.util.CustomEvent,F=YAHOO.lang,D,A={"MOUSE_OVER":"mouseover","MOUSE_OUT":"mouseout","MOUSE_DOWN":"mousedown","MOUSE_UP":"mouseup","CLICK":"click","KEY_PRESS":"keypress","KEY_DOWN":"keydown","KEY_UP":"keyup","ITEM_ADDED":"itemAdded","ITEM_REMOVED":"itemRemoved","FOCUS":"focus","BLUR":"blur","DESTROY":"destroy"},G={"TEXT":{key:"text",value:"",validator:F.isString,suppressEvent:true},"HELP_TEXT":{key:"helptext",supercedes:["text"],suppressEvent:true},"URL":{key:"url",value:"#",suppressEvent:true},"TARGET":{key:"target",suppressEvent:true},"EMPHASIS":{key:"emphasis",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text"]},"STRONG_EMPHASIS":{key:"strongemphasis",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text"]},"CHECKED":{key:"checked",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["disabled","selected"]},"SUBMENU":{key:"submenu",suppressEvent:true,supercedes:["disabled","selected"]},"DISABLED":{key:"disabled",value:false,validator:F.isBoolean,suppressEvent:true,supercedes:["text","selected"]},"SELECTED":{key:"selected",value:false,validator:F.isBoolean,suppressEvent:true},"ONCLICK":{key:"onclick",suppressEvent:true},"CLASS_NAME":{key:"classname",value:null,validator:F.isString,suppressEvent:true}};H.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:H,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:C.prototype.browser,id:null,destroyEvent:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,focusEvent:null,blurEvent:null,init:function(J,R){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=E;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var O=I.LIST,N=this.cfg,P="#",Q,K,M,L;if(F.isString(J)){this._createRootNodeStructure();N.queueProperty("text",J);}else{if(J&&J.tagName){switch(J.tagName.toUpperCase()){case"OPTION":this._createRootNodeStructure();N.queueProperty("text",J.text);N.queueProperty("disabled",J.disabled);this.value=J.value;this.srcElement=J;break;case"OPTGROUP":this._createRootNodeStructure();N.queueProperty("text",J.label);N.queueProperty("disabled",J.disabled);this.srcElement=J;this._initSubTree();break;case"LI":Q=B.getFirstChild(J);if(Q){P=Q.getAttribute("href");K=Q.getAttribute("target");M=Q.innerHTML;}this.srcElement=J;this.element=J;this._oAnchor=Q;N.setProperty("text",M,true);N.setProperty("url",P,true);N.setProperty("target",K,true);this._initSubTree();break;}}}if(this.element){L=(this.srcElement||this.element).id;if(!L){L=this.id||B.generateId();this.element.id=L;}this.id=L;B.addClass(this.element,this.CSS_CLASS_NAME);B.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);this.mouseOverEvent=this.createEvent(A.MOUSE_OVER);this.mouseOverEvent.signature=O;this.mouseOutEvent=this.createEvent(A.MOUSE_OUT);this.mouseOutEvent.signature=O;this.mouseDownEvent=this.createEvent(A.MOUSE_DOWN);this.mouseDownEvent.signature=O;this.mouseUpEvent=this.createEvent(A.MOUSE_UP);this.mouseUpEvent.signature=O;this.clickEvent=this.createEvent(A.CLICK);this.clickEvent.signature=O;this.keyPressEvent=this.createEvent(A.KEY_PRESS);this.keyPressEvent.signature=O;this.keyDownEvent=this.createEvent(A.KEY_DOWN);this.keyDownEvent.signature=O;this.keyUpEvent=this.createEvent(A.KEY_UP);this.keyUpEvent.signature=O;this.focusEvent=this.createEvent(A.FOCUS);this.focusEvent.signature=O;this.blurEvent=this.createEvent(A.BLUR);this.blurEvent.signature=O;this.destroyEvent=this.createEvent(A.DESTROY);this.destroyEvent.signature=O;if(R){N.applyConfig(R);}N.fireQueue();}},_createRootNodeStructure:function(){var J,K;if(!D){D=document.createElement("li");D.innerHTML="<a href=\"#\"></a>";}J=D.cloneNode(true);J.className=this.CSS_CLASS_NAME;K=J.firstChild;K.className=this.CSS_LABEL_CLASS_NAME;this.element=J;this._oAnchor=K;},_initSubTree:function(){var P=this.srcElement,L=this.cfg,N,M,K,J,O;if(P.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()=="SELECT"){L.setProperty("submenu",{id:B.generateId(),itemdata:P.childNodes});}else{N=P.firstChild;M=[];do{if(N&&N.tagName){switch(N.tagName.toUpperCase()){case"DIV":L.setProperty("submenu",N);break;case"OPTION":M[M.length]=N;break;}}}while((N=N.nextSibling));K=M.length;if(K>0){J=new this.SUBMENU_TYPE(B.generateId());L.setProperty("submenu",J);for(O=0;O<K;O++){J.addItem((new J.ITEM_TYPE(M[O])));}}}}},configText:function(S,L,N){var K=L[0],M=this.cfg,Q=this._oAnchor,J=M.getProperty("helptext"),R="",O="",P="";if(K){if(J){R="<em class=\"helptext\">"+J+"</em>";}if(M.getProperty("emphasis")){O="<em>";P="</em>";}if(M.getProperty("strongemphasis")){O="<strong>";P="</strong>";}Q.innerHTML=(O+K+P+R);}},configHelpText:function(L,K,J){this.cfg.refireEvent("text");},configURL:function(L,K,J){var N=K[0];if(!N){N="#";}var M=this._oAnchor;if(YAHOO.env.ua.opera){M.removeAttribute("href");}M.setAttribute("href",N);},configTarget:function(M,L,K){var J=L[0],N=this._oAnchor;if(J&&J.length>0){N.setAttribute("target",J);}else{N.removeAttribute("target");}},configEmphasis:function(L,K,J){var N=K[0],M=this.cfg;if(N&&M.getProperty("strongemphasis")){M.setProperty("strongemphasis",false);}M.refireEvent("text");},configStrongEmphasis:function(M,L,K){var J=L[0],N=this.cfg;if(J&&N.getProperty("emphasis")){N.setProperty("emphasis",false);}N.refireEvent("text");},configChecked:function(S,M,O){var R=M[0],K=this.element,Q=this._oAnchor,N=this.cfg,J="-checked",L=this.CSS_CLASS_NAME+J,P=this.CSS_LABEL_CLASS_NAME+J;if(R){B.addClass(K,L);B.addClass(Q,P);}else{B.removeClass(K,L);B.removeClass(Q,P);}N.refireEvent("text");if(N.getProperty("disabled")){N.refireEvent("disabled");}if(N.getProperty("selected")){N.refireEvent("selected");}},configDisabled:function(X,R,a){var Z=R[0],L=this.cfg,P=L.getProperty("submenu"),O=L.getProperty("checked"),S=this.element,V=this._oAnchor,U="-disabled",W="-checked"+U,Y="-hassubmenu"+U,M=this.CSS_CLASS_NAME+U,N=this.CSS_LABEL_CLASS_NAME+U,T=this.CSS_CLASS_NAME+W,Q=this.CSS_LABEL_CLASS_NAME+W,K=this.CSS_CLASS_NAME+Y,J=this.CSS_LABEL_CLASS_NAME+Y;if(Z){if(L.getProperty("selected")){L.setProperty("selected",false);}B.addClass(S,M);B.addClass(V,N);if(P){B.addClass(S,K);B.addClass(V,J);}if(O){B.addClass(S,T);B.addClass(V,Q);}}else{B.removeClass(S,M);B.removeClass(V,N);if(P){B.removeClass(S,K);B.removeClass(V,J);}if(O){B.removeClass(S,T);B.removeClass(V,Q);}}},configSelected:function(X,R,a){var L=this.cfg,Y=R[0],S=this.element,V=this._oAnchor,O=L.getProperty("checked"),P=L.getProperty("submenu"),U="-selected",W="-checked"+U,Z="-hassubmenu"+U,M=this.CSS_CLASS_NAME+U,N=this.CSS_LABEL_CLASS_NAME+U,T=this.CSS_CLASS_NAME+W,Q=this.CSS_LABEL_CLASS_NAME+W,K=this.CSS_CLASS_NAME+Z,J=this.CSS_LABEL_CLASS_NAME+Z;if(YAHOO.env.ua.opera){V.blur();}if(Y&&!L.getProperty("disabled")){B.addClass(S,M);B.addClass(V,N);if(P){B.addClass(S,K);B.addClass(V,J);}if(O){B.addClass(S,T);B.addClass(V,Q);}}else{B.removeClass(S,M);B.removeClass(V,N);if(P){B.removeClass(S,K);B.removeClass(V,J);}if(O){B.removeClass(S,T);B.removeClass(V,Q);}}if(this.hasFocus()&&YAHOO.env.ua.opera){V.focus();}},_onSubmenuBeforeHide:function(M,L){var N=this.parent,J;function K(){N._oAnchor.blur();J.beforeHideEvent.unsubscribe(K);}if(N.hasFocus()){J=N.parent;J.beforeHideEvent.subscribe(K);}},configSubmenu:function(V,O,R){var Q=O[0],P=this.cfg,K=this.element,T=this._oAnchor,N=this.parent&&this.parent.lazyLoad,J="-hassubmenu",L=this.CSS_CLASS_NAME+J,S=this.CSS_LABEL_CLASS_NAME+J,U,W,M;if(Q){if(Q instanceof E){U=Q;U.parent=this;U.lazyLoad=N;}else{if(typeof Q=="object"&&Q.id&&!Q.nodeType){W=Q.id;M=Q;M.lazyload=N;M.parent=this;U=new this.SUBMENU_TYPE(W,M);P.setProperty("submenu",U,true);}else{U=new this.SUBMENU_TYPE(Q,{lazyload:N,parent:this});P.setProperty("submenu",U,true);}}if(U){B.addClass(K,L);B.addClass(T,S);this._oSubmenu=U;if(YAHOO.env.ua.opera){U.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{B.removeClass(K,L);B.removeClass(T,S);if(this._oSubmenu){this._oSubmenu.destroy();}}if(P.getProperty("disabled")){P.refireEvent("disabled");}if(P.getProperty("selected")){P.refireEvent("selected");}},configOnClick:function(L,K,J){var M=K[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=M)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&typeof M=="object"&&typeof M.fn=="function"){this.clickEvent.subscribe(M.fn,((!YAHOO.lang.isUndefined(M.obj))?M.obj:this),M.scope);this._oOnclickAttributeValue=M;}},configClassName:function(M,L,K){var J=L[0];if(this._sClassName){B.removeClass(this.element,this._sClassName);}B.addClass(this.element,J);this._sClassName=J;},initDefaultConfig:function(){var J=this.cfg;J.addProperty(G.TEXT.key,{handler:this.configText,value:G.TEXT.value,validator:G.TEXT.validator,suppressEvent:G.TEXT.suppressEvent});J.addProperty(G.HELP_TEXT.key,{handler:this.configHelpText,supercedes:G.HELP_TEXT.supercedes,suppressEvent:G.HELP_TEXT.suppressEvent});J.addProperty(G.URL.key,{handler:this.configURL,value:G.URL.value,suppressEvent:G.URL.suppressEvent});J.addProperty(G.TARGET.key,{handler:this.configTarget,suppressEvent:G.TARGET.suppressEvent});J.addProperty(G.EMPHASIS.key,{handler:this.configEmphasis,value:G.EMPHASIS.value,validator:G.EMPHASIS.validator,suppressEvent:G.EMPHASIS.suppressEvent,supercedes:G.EMPHASIS.supercedes});J.addProperty(G.STRONG_EMPHASIS.key,{handler:this.configStrongEmphasis,value:G.STRONG_EMPHASIS.value,validator:G.STRONG_EMPHASIS.validator,suppressEvent:G.STRONG_EMPHASIS.suppressEvent,supercedes:G.STRONG_EMPHASIS.supercedes});J.addProperty(G.CHECKED.key,{handler:this.configChecked,value:G.CHECKED.value,validator:G.CHECKED.validator,suppressEvent:G.CHECKED.suppressEvent,supercedes:G.CHECKED.supercedes});J.addProperty(G.DISABLED.key,{handler:this.configDisabled,value:G.DISABLED.value,validator:G.DISABLED.validator,suppressEvent:G.DISABLED.suppressEvent});J.addProperty(G.SELECTED.key,{handler:this.configSelected,value:G.SELECTED.value,validator:G.SELECTED.validator,suppressEvent:G.SELECTED.suppressEvent});J.addProperty(G.SUBMENU.key,{handler:this.configSubmenu,supercedes:G.SUBMENU.supercedes,suppressEvent:G.SUBMENU.suppressEvent});J.addProperty(G.ONCLICK.key,{handler:this.configOnClick,suppressEvent:G.ONCLICK.suppressEvent});J.addProperty(G.CLASS_NAME.key,{handler:this.configClassName,value:G.CLASS_NAME.value,validator:G.CLASS_NAME.validator,suppressEvent:G.CLASS_NAME.suppressEvent});},getNextEnabledSibling:function(){var L,O,J,N,M;function K(P,Q){return P[Q]||K(P,(Q+1));}if(this.parent instanceof E){L=this.groupIndex;O=this.parent.getItemGroups();if(this.index<(O[L].length-1)){J=K(O[L],(this.index+1));}else{if(L<(O.length-1)){N=L+1;}else{N=0;}M=K(O,N);J=K(M,0);}return(J.cfg.getProperty("disabled")||J.element.style.display=="none")?J.getNextEnabledSibling():J;}},getPreviousEnabledSibling:function(){var N,P,K,J,M;function O(Q,R){return Q[R]||O(Q,(R-1));}function L(Q,R){return Q[R]?R:L(Q,(R+1));}if(this.parent instanceof E){N=this.groupIndex;P=this.parent.getItemGroups();if(this.index>L(P[N],0)){K=O(P[N],(this.index-1));}else{if(N>L(P,0)){J=N-1;}else{J=P.length-1;}M=O(P,J);K=O(M,(M.length-1));}return(K.cfg.getProperty("disabled")||K.element.style.display=="none")?K.getPreviousEnabledSibling():K;}},focus:function(){var N=this.parent,M=this._oAnchor,J=N.activeItem,L=this;function K(){try{if(YAHOO.env.ua.ie&&!document.hasFocus()){return;}if(J){J.blurEvent.fire();}M.focus();L.focusEvent.fire();}catch(O){}}if(!this.cfg.getProperty("disabled")&&N&&N.cfg.getProperty("visible")&&this.element.style.display!="none"){window.setTimeout(K,0);}},blur:function(){var K=this.parent;if(!this.cfg.getProperty("disabled")&&K&&K.cfg.getProperty("visible")){var J=this;window.setTimeout(function(){try{J._oAnchor.blur();J.blurEvent.fire();}catch(L){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var L=this.element,K,J;if(L){K=this.cfg.getProperty("submenu");if(K){K.destroy();}this.mouseOverEvent.unsubscribeAll();this.mouseOutEvent.unsubscribeAll();this.mouseDownEvent.unsubscribeAll();this.mouseUpEvent.unsubscribeAll();this.clickEvent.unsubscribeAll();this.keyPressEvent.unsubscribeAll();this.keyDownEvent.unsubscribeAll();this.keyUpEvent.unsubscribeAll();this.focusEvent.unsubscribeAll();this.blurEvent.unsubscribeAll();this.cfg.configChangedEvent.unsubscribeAll();J=L.parentNode;if(J){J.removeChild(L);this.destroyEvent.fire();}this.destroyEvent.unsubscribeAll();}},toString:function(){var K="MenuItem",J=this.id;if(J){K+=(" "+J);}return K;}};F.augmentProto(H,YAHOO.util.EventProvider);})();(function(){YAHOO.widget.ContextMenu=function(G,F){YAHOO.widget.ContextMenu.superclass.constructor.call(this,G,F);};var B=YAHOO.util.Event,E=YAHOO.widget.ContextMenu,D={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(YAHOO.env.ua.opera?"mousedown":"contextmenu"),"CLICK":"click"},C={"TRIGGER":{key:"trigger",suppressEvent:true}};function A(G,F,H){this.cfg.setProperty("xy",H);this.beforeShowEvent.unsubscribe(A,H);}YAHOO.lang.extend(E,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(G,F){E.superclass.init.call(this,G);this.beforeInitEvent.fire(E);if(F){this.cfg.applyConfig(F,true);}this.initEvent.fire(E);},initEvents:function(){E.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(D.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var F=this._oTrigger;if(F){B.removeListener(F,D.CONTEXT_MENU,this._onTriggerContextMenu);if(YAHOO.env.ua.opera){B.removeListener(F,D.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(G,F){if(G.ctrlKey){B.stopEvent(G);}},_onTriggerContextMenu:function(H,F){if(H.type=="mousedown"&&!H.ctrlKey){return;}var G;B.stopEvent(H);this.contextEventTarget=B.getTarget(H);this.triggerContextMenuEvent.fire(H);YAHOO.widget.MenuManager.hideVisible();if(!this._bCancelled){G=B.getXY(H);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(A,G);}else{this.cfg.setProperty("xy",G);}this.show();}this._bCancelled=false;},toString:function(){var G="ContextMenu",F=this.id;if(F){G+=(" "+F);}return G;},initDefaultConfig:function(){E.superclass.initDefaultConfig.call(this);this.cfg.addProperty(C.TRIGGER.key,{handler:this.configTrigger,suppressEvent:C.TRIGGER.suppressEvent});},destroy:function(){this._removeEventHandlers();E.superclass.destroy.call(this);},configTrigger:function(G,F,I){var H=F[0];if(H){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=H;B.on(H,D.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(YAHOO.env.ua.opera){B.on(H,D.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){YAHOO.widget.MenuBar=function(F,E){YAHOO.widget.MenuBar.superclass.constructor.call(this,F,E);};function D(E){if(typeof E=="string"){return("dynamic,static".indexOf((E.toLowerCase()))!=-1);}}var B=YAHOO.util.Event,A=YAHOO.widget.MenuBar,C={"POSITION":{key:"position",value:"static",validator:D,supercedes:["visible"]},"SUBMENU_ALIGNMENT":{key:"submenualignment",value:["tl","bl"],suppressEvent:true},"AUTO_SUBMENU_DISPLAY":{key:"autosubmenudisplay",value:false,validator:YAHOO.lang.isBoolean,suppressEvent:true}};YAHOO.lang.extend(A,YAHOO.widget.Menu,{init:function(F,E){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}A.superclass.init.call(this,F);this.beforeInitEvent.fire(A);if(E){this.cfg.applyConfig(E,true);}this.initEvent.fire(A);},CSS_CLASS_NAME:"yuimenubar",_onKeyDown:function(G,F,K){var E=F[0],L=F[1],I,J,H;if(L&&!L.cfg.getProperty("disabled")){J=L.cfg;switch(E.keyCode){case 37:case 39:if(L==this.activeItem&&!J.getProperty("selected")){J.setProperty("selected",true);}else{H=(E.keyCode==37)?L.getPreviousEnabledSibling():L.getNextEnabledSibling();if(H){this.clearActiveItem();H.cfg.setProperty("selected",true);if(this.cfg.getProperty("autosubmenudisplay")){I=H.cfg.getProperty("submenu");if(I){I.show();}}H.focus();}}B.preventDefault(E);break;case 40:if(this.activeItem!=L){this.clearActiveItem();J.setProperty("selected",true);L.focus();}I=J.getProperty("submenu");if(I){if(I.cfg.getProperty("visible")){I.setInitialSelection();I.setInitialFocus();}else{I.show();}}B.preventDefault(E);break;}}if(E.keyCode==27&&this.activeItem){I=this.activeItem.cfg.getProperty("submenu");if(I&&I.cfg.getProperty("visible")){I.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty("selected",false);this.activeItem.blur();}B.preventDefault(E);}},_onClick:function(L,G,J){A.superclass._onClick.call(this,L,G,J);var K=G[1],M,E,F,H,I;if(K&&!K.cfg.getProperty("disabled")){M=G[0];E=B.getTarget(M);F=this.activeItem;H=this.cfg;if(F&&F!=K){this.clearActiveItem();}K.cfg.setProperty("selected",true);I=K.cfg.getProperty("submenu");if(I){if(I.cfg.getProperty("visible")){I.hide();}else{I.show();}}}},toString:function(){var F="MenuBar",E=this.id;if(E){F+=(" "+E);}return F;},initDefaultConfig:function(){A.superclass.initDefaultConfig.call(this);var E=this.cfg;E.addProperty(C.POSITION.key,{handler:this.configPosition,value:C.POSITION.value,validator:C.POSITION.validator,supercedes:C.POSITION.supercedes});E.addProperty(C.SUBMENU_ALIGNMENT.key,{value:C.SUBMENU_ALIGNMENT.value,suppressEvent:C.SUBMENU_ALIGNMENT.suppressEvent});E.addProperty(C.AUTO_SUBMENU_DISPLAY.key,{value:C.AUTO_SUBMENU_DISPLAY.value,validator:C.AUTO_SUBMENU_DISPLAY.validator,suppressEvent:C.AUTO_SUBMENU_DISPLAY.suppressEvent});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.4.1",build:"742"});