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."));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_moz=((navigator.product=='Gecko')&&(!is_opera)&&(!is_webtv)&&(!is_safari));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_kon=(uagent.indexOf('konqueror')!=-1);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();function global_dst_check(tzo,dst)
{var thisoffset=tzo+dst;var dstoffset=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)==1)
{try
{xml_dst_set(url+'&xml=1');dstset=1;}
catch(e)
{dstset=0;}
if(dstset==0)
{window.location=url;}}}
function my_getcookie(name)
{cname=ipb_var_cookieid+name+'=';cpos=document.cookie.indexOf(cname);if(cpos!=-1)
{cstart=cpos+cname.length;cend=document.cookie.indexOf(";",cstart);if(cend==-1)
{cend=document.cookie.length;}
return unescape(document.cookie.substring(cstart,cend));}
return null;}
function my_setcookie(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+';';}
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 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 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);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;}
window.location=url_bit+"&st="+start;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=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));}
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(/&{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='';}
center_div.prototype.move_div=function()
{try
{this.divobj=document.getElementById(this.divname);}
catch(e)
{return;}
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;}
this.divobj.style.position='absolute';this.divobj.style.display='block';this.divobj.style.zIndex=99;var divheight=parseInt(this.divobj.style.Height);var divwidth=parseInt(this.divobj.style.Width);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";}
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(document.documentElement&&document.documentElement.scrollTop)
{scrollY=document.documentElement.scrollTop;}
else if(document.body&&document.body.scrollTop)
{scrollY=document.body.scrollTop;}
else if(window.pageYOffset)
{scrollY=window.pageYOffset;}
else if(window.scrollY)
{scrollY=window.scrollY;}
return scrollY;}
function Browser(){var ua,s,i;this.isIE=false;this.isOP=false;this.isNS=false;this.version=null;ua=navigator.userAgent;s="Opera";if((i=ua.indexOf(s))>=0){this.isOP=true;this.version=parseFloat(ua.substr(i+s.length));return;}
s="Netscape6/";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=parseFloat(ua.substr(i+s.length));return;}
s="Gecko";if((i=ua.indexOf(s))>=0){this.isNS=true;this.version=6.1;return;}
s="MSIE";if((i=ua.indexOf(s))){this.isIE=true;this.version=parseFloat(ua.substr(i+s.length));return;}}
var browser=new Browser();var activeButton=null;function buttonClick(event,menuId){var button;if(browser.isIE)
button=window.event.srcElement;else
button=event.currentTarget;button.blur();if(button.menu==null){button.menu=document.getElementById(menuId);if(button.menu.isInitialized==null)
menuInit(button.menu);}
if(button.onmouseout==null)
button.onmouseout=buttonOrMenuMouseout;if(button==activeButton)
return false;if(activeButton!=null)
resetButton(activeButton);if(button!=activeButton){depressButton(button);activeButton=button;}
else
activeButton=null;return false;}
function buttonMouseover(event,menuId){var button;if(activeButton==null){buttonClick(event,menuId);return;}
if(browser.isIE)
button=window.event.srcElement;else
button=event.currentTarget;if(activeButton!=null&&activeButton!=button)
buttonClick(event,menuId);}
function depressButton(button){var x,y;button.className+=" menuButtonActive";if(button.onmouseout==null)
button.onmouseout=buttonOrMenuMouseout;if(button.menu.onmouseout==null)
button.menu.onmouseout=buttonOrMenuMouseout;x=getPageOffsetLeft(button);y=getPageOffsetTop(button)+button.offsetHeight;if(browser.isIE){x+=button.offsetParent.clientLeft;y+=button.offsetParent.clientTop;}
button.menu.style.left=x+"px";button.menu.style.top=y+"px";button.menu.style.visibility="visible";if(button.menu.iframeEl!=null)
{button.menu.iframeEl.style.left=button.menu.style.left;button.menu.iframeEl.style.top=button.menu.style.top;button.menu.iframeEl.style.width=button.menu.offsetWidth+"px";button.menu.iframeEl.style.height=button.menu.offsetHeight+"px";button.menu.iframeEl.style.display="";}}
function delayhidemenu(){buttonOrMenuMouseout}
function resetButton(button){removeClassName(button,"menuButtonActive");if(button.menu!=null){closeSubMenu(button.menu);button.menu.style.visibility="hidden";if(button.menu.iframeEl!=null)
button.menu.iframeEl.style.display="none";}}
function menuMouseover(event){var menu;if(browser.isIE){menu=getContainerWith(window.event.srcElement,"DIV","menu");if(menu==null){menu=getContainerWith(window.event.srcElement,"DIV","menu_main");}}else{menu=event.currentTarget;}
if(menu.activeItem!=null)
closeSubMenu(menu);}
function menuItemMouseover(event,menuId){var item,menu,x,y;if(browser.isIE){item=getContainerWith(window.event.srcElement,"A","menuItem");if(item==null){item=getContainerWith(window.event.srcElement,"A","menuItem_expand");}}else{item=event.currentTarget;}
menu=getContainerWith(item,"DIV","menu");if(menu==null){menu=getContainerWith(item,"DIV","menu_main");}
if(menu.activeItem!=null)
closeSubMenu(menu);menu.activeItem=item;item.className+=" menuItemHighlight";if(item.subMenu==null){item.subMenu=document.getElementById(menuId);if(item.subMenu.isInitialized==null)
menuInit(item.subMenu);}
x=getPageOffsetLeft(item)+item.offsetWidth;y=getPageOffsetTop(item);var maxX,maxY;if(browser.isIE){maxX=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)+
(document.documentElement.clientWidth!=0?document.documentElement.clientWidth:document.body.clientWidth);maxY=Math.max(document.documentElement.scrollTop,document.body.scrollTop)+
(document.documentElement.clientHeight!=0?document.documentElement.clientHeight:document.body.clientHeight);}
if(browser.isOP){maxX=document.documentElement.scrollLeft+window.innerWidth;maxY=document.documentElement.scrollTop+window.innerHeight;}
if(browser.isNS){maxX=window.scrollX+window.innerWidth;maxY=window.scrollY+window.innerHeight;}
maxX-=item.subMenu.offsetWidth;maxY-=item.subMenu.offsetHeight;if(x>maxX)
x=Math.max(0,x-item.offsetWidth-item.subMenu.offsetWidth
+(menu.offsetWidth-item.offsetWidth));y=Math.max(0,Math.min(y,maxY));item.subMenu.style.left=x+"px";item.subMenu.style.top=y+"px";item.subMenu.style.visibility="visible";if(item.subMenu.iframeEl!=null)
{item.subMenu.iframeEl.style.left=item.subMenu.style.left;item.subMenu.iframeEl.style.top=item.subMenu.style.top;item.subMenu.iframeEl.style.width=item.subMenu.offsetWidth+"px";item.subMenu.iframeEl.style.height=item.subMenu.offsetHeight+"px";item.subMenu.iframeEl.style.display="";}
if(browser.isIE)
window.event.cancelBubble=true;else
event.stopPropagation();}
function closeSubMenu(menu){if(menu==null||menu.activeItem==null)
return;if(menu.activeItem.subMenu!=null){closeSubMenu(menu.activeItem.subMenu);menu.activeItem.subMenu.style.visibility="hidden";if(menu.activeItem.subMenu.iframeEl!=null)
menu.activeItem.subMenu.iframeEl.style.display="none";menu.activeItem.subMenu=null;}
removeClassName(menu.activeItem,"menuItemHighlight");menu.activeItem=null;}
function buttonOrMenuMouseout(event){var el;if(activeButton==null)
return;if(browser.isIE)
el=window.event.toElement;else if(event.relatedTarget!=null)
el=(event.relatedTarget.tagName?event.relatedTarget:event.relatedTarget.parentNode);if(getContainerWith(el,"DIV","menu_main")==null&&getContainerWith(el,"DIV","menu")==null){resetButton(activeButton);activeButton=null;}}
function menuInit(menu){var itemList,spanList;var textEl,arrowEl;var itemWidth;var w,dw;var i,j;if(browser.isIE){menu.style.lineHeight="2.5ex";spanList=menu.getElementsByTagName("SPAN");for(i=0;i<spanList.length;i++)
if(hasClassName(spanList[i],"menuItemArrow")){spanList[i].style.fontFamily="Webdings";spanList[i].firstChild.nodeValue="4";}}
itemList=menu.getElementsByTagName("A");if(itemList.length>0)
itemWidth=itemList[0].offsetWidth;else
return;for(i=0;i<itemList.length;i++){spanList=itemList[i].getElementsByTagName("SPAN");textEl=null;arrowEl=null;for(j=0;j<spanList.length;j++){if(hasClassName(spanList[j],"menuItemText"))
textEl=spanList[j];if(hasClassName(spanList[j],"menuItemArrow"))
arrowEl=spanList[j];}
if(textEl!=null&&arrowEl!=null){textEl.style.paddingRight=(itemWidth
-(textEl.offsetWidth+arrowEl.offsetWidth))+"px";if(browser.isOP)
arrowEl.style.marginRight="0px";}}
if(browser.isIE){w=itemList[0].offsetWidth;itemList[0].style.width=w+"px";dw=itemList[0].offsetWidth-w;w-=dw;itemList[0].style.width=w+"px";}
if(browser.isIE){menu.iframeEl=menu.parentNode.insertBefore(document.createElement("IFRAME"),menu);menu.iframeEl.style.display="none";menu.iframeEl.style.position="absolute";}
menu.isInitialized=true;}
function getContainerWith(node,tagName,className){while(node!=null){if(node.tagName!=null&&node.tagName==tagName&&hasClassName(node,className))
return node;node=node.parentNode;}
return node;}
function hasClassName(el,name){var i,list;list=el.className.split(" ");for(i=0;i<list.length;i++)
if(list[i]==name)
return true;return false;}
function removeClassName(el,name){var i,curList,newList;if(el.className==null)
return;newList=new Array();curList=el.className.split(" ");for(i=0;i<curList.length;i++)
if(curList[i]!=name)
newList.push(curList[i]);el.className=newList.join(" ");}
function getPageOffsetLeft(el){var x;x=el.offsetLeft;if(el.offsetParent!=null)
x+=getPageOffsetLeft(el.offsetParent);return x;}
function getPageOffsetTop(el){var y;y=el.offsetTop;if(el.offsetParent!=null)
y+=getPageOffsetTop(el.offsetParent);return y;};var menu_registered=new Array();var menu_openfuncs=new Array();var menu_built=new Array();var menu_open_menus=new Array();var menu_cur_open=false;function menu_do_global_init()
{if(menu_registered.length>0)
{for(var i in menu_registered)
{menu_init(menu_registered[i]);}
document.onclick=menu_action_close;}}
function menu_init(cid)
{var mid=_menu_get_base_name(cid)+"_menu";var mobj=my_getbyid(mid);if(document.getElementsByTagName&&mobj)
{var cobj=my_getbyid(cid);try
{cobj.style.cursor="pointer";}
catch(e)
{cobj.style.cursor="hand";}
cobj.unselectable=true;cobj.onclick=_event_menu_click;cobj.onmouseover=_event_menu_mouseover;if(typeof(menu_built[mid])!="undefined")
{return;}
var pobj=my_getbyid(mid);pobj.style.display="none";pobj.style.position="absolute";pobj.style.left="0px";pobj.style.top="0px";pobj.onclick=_cancel_bubble;pobj.zIndex=1000;menu_built[mid]=true;}}
function menu_register(cid,callback)
{if(document.getElementsByTagName)
{var cobj=my_getbyid(cid);if(cobj)
{menu_registered[menu_registered.length]=cid;if(callback)
{menu_openfuncs[cobj]=callback;}
return true;}}
return false;}
function menu_action_open(e)
{var openmenu=menu_cur_open;var negpad=true;menu_action_close();if(openmenu==e.id)
{return false;}
var mid=_menu_get_base_name(e.id)+"_menu";var mobj=my_getbyid(mid);var left_px=_get_obj_leftpos(e);var top_px=_get_obj_toppos(e)+e.offsetHeight;var callbackobj=my_getbyid(e.id);var ifid=e.id;menu_open_menus[e.id]=true;menu_cur_open=e.id;mobj.style.display="";var width=parseInt(mobj.style.width)?parseInt(mobj.style.width):mobj.offsetWidth;if((left_px+width)>=document.body.clientWidth)
{left_px=left_px+e.offsetWidth-width;negpad=false;}
if(is_ie)
{left_px+=(negpad)?-2:2;}
mobj.style.left=left_px+"px";mobj.style.top=top_px+"px";mobj.style.zIndex=100;if(menu_openfuncs[callbackobj])
{eval(menu_openfuncs[callbackobj]);}
if(is_ie)
{try
{if(!document.getElementById('if_'+e.id))
{var iframeobj=document.createElement('iframe');iframeobj.src='javascript;';iframeobj.id='if_'+e.id;document.getElementsByTagName('body').appendChild(iframeobj);}
else
{var iframeobj=document.getElementById('if_'+e.id);}
iframeobj.scrolling='no';iframeobj.frameborder='no';iframeobj.className='iframeshim';iframeobj.style.position='absolute';iframeobj.style.width=parseInt(mobj.offsetWidth)+'px';iframeobj.style.height=parseInt(mobj.offsetHeight)+'px';iframeobj.style.top=mobj.style.top;iframeobj.style.left=mobj.style.left;iframeobj.style.zIndex=99;iframeobj.style.display="block";}
catch(e)
{}}
if(is_safari)
{try
{mlinks=mobj.getElementsByTagName('a');for(var i=0;i<=mlinks.length;i++)
{if(mlinks[i].href&&(mlinks[i].href.indexOf('#',0)!=(mlinks[i].href.length-1)))
{mlinks[i].onmousedown=_safari_onclick_handler;mlinks[i].id='saf-link-'+mid+i;}}}
catch(e)
{}}
return false;}
function _safari_onclick_handler()
{if(this.id)
{window.location=document.getElementById(this.id).href;}}
function menu_action_close()
{if(menu_cur_open)
{for(i in menu_open_menus)
{my_getbyid(_menu_get_base_name(i)+"_menu").style.display="none";if(is_ie)
{try
{document.getElementById('if_'+i).style.display="none";}
catch(e)
{}}
menu_open_menus[i]=false;}}
menu_cur_open=false;}
function menu_action_hover(e)
{for(i in menu_open_menus)
{if(menu_open_menus[i]==true&&i!=e.id)
{menu_action_open(e);return;}}}
function _cancel_bubble(obj,extra)
{if(!obj||is_ie)
{if(extra)
{window.event.returnValue=false;}
window.event.cancelBubble=true;return window.event;}
else
{if(obj.target.type=='submit')
{obj.target.form.submit();}
obj.stopPropagation();if(extra)
{obj.preventDefault();}
return obj;}}
function _event_menu_mouseover(e)
{e=_cancel_bubble(e,true);menu_action_hover(this);}
function _event_menu_click(e)
{e=_cancel_bubble(e,true);menu_action_open(this);}
function _menu_get_base_name(cid)
{var endpos=cid.indexOf(".");if(endpos!=-1)
{return cid.substr(0,endpos);}
else
{return cid;}}
function _get_obj_leftpos(obj)
{var left=obj.offsetLeft;if(typeof no_menu_pos=='undefined'){while((obj=obj.offsetParent)!=null){left+=obj.offsetLeft;}}
return left;}
function _get_obj_toppos(obj)
{var top=obj.offsetTop;if(typeof no_menu_pos=='undefined'){while((obj=obj.offsetParent)!=null){top+=obj.offsetTop;}}
return top;};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="" scrolling="no" frameborder="1" style="position:absolute;top:0px;left:0px;display:none;"></iframe>'+"\n";}
if(html!='')
{document.open();document.writeln(html);document.close();}
menu_register(cid);};try
{if(!use_charset)
{var use_charset='';}}
catch(e){}
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; charset='+use_charset);}
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();}
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;}
if(use_enhanced_js)
{use_enhanced_js=ajax_request.prototype.xml_init()?1: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 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.readystate_ready_and_ok())
{return;}
var html=xmlobj.xmlhandler.responseText;if(is_ie)
{html="<iframe id='myass-shim' src='javascript;' 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)
{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";}}
xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);if(!tab)
{xmlobj.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.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&limit='+limit_a);myass_content.style.width='399px';myass_content.style.overflow='auto';}
else if(tab=='posts')
{xmlobj.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&st='+posts_st);}
else
{xmlobj.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);};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
{my_setcookie(Drag.cookiename,fx+','+fy,1);}
catch(e)
{}}
Drag.obj=null;},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 B_open=0;var I_open=0;var U_open=0;var QUOTE_open=0;var CODE_open=0;var SQL_open=0;var HTML_open=0;var bbtags=new Array();var fombj=document.REPLIER;prep_mode();function prep_mode()
{cvalue=my_getcookie("bbmode");if(cvalue=='ezmode')
{fombj.bbmode[0].checked=true;}
else
{fombj.bbmode[1].checked=true;}}
function setmode(mVal)
{my_setcookie('bbmode',mVal,1);}
function get_easy_mode_state()
{if(fombj.bbmode[0].checked)
{return true;}
else
{return false;}}
function hstat(msg)
{fombj.helpbox.value=eval("help_"+msg);}
function cstat()
{var c=stacksize(bbtags);if((c<1)||(c==null)){c=0;}
if(!bbtags[0]){c=0;}
fombj.tagcount.value=c;}
function closeall()
{if(bbtags[0])
{while(bbtags[0])
{tagRemove=popstack(bbtags)
fombj.Post.value+="[/"+tagRemove+"]";if((tagRemove!='FONT')&&(tagRemove!='SIZE')&&(tagRemove!='COLOR'))
{eval("fombj."+tagRemove+".value = ' "+tagRemove+" '");eval(tagRemove+"_open = 0");}}}
fombj.tagcount.value=0;bbtags=new Array();fombj.Post.focus();}
function emoticon(theSmilie)
{doInsert(" "+theSmilie+" ","",false);}
function add_code(NewCode)
{fombj.Post.value+=NewCode;fombj.Post.focus();}
function alterfont(theval,thetag)
{if(theval==0)
return;if(doInsert("["+thetag+"="+theval+"]","[/"+thetag+"]",true))
pushstack(bbtags,thetag);fombj.ffont.selectedIndex=0;fombj.fsize.selectedIndex=0;fombj.fcolor.selectedIndex=0;cstat();}
function simpletag(thetag)
{var tagOpen=eval(thetag+"_open");if(get_easy_mode_state())
{inserttext=prompt(prompt_start+"\n["+thetag+"]xxx[/"+thetag+"]");if((inserttext!=null)&&(inserttext!=""))
{doInsert("["+thetag+"]"+inserttext+"[/"+thetag+"] ","",false);}}
else
{if(tagOpen==0)
{if(doInsert("["+thetag+"]","[/"+thetag+"]",true))
{eval(thetag+"_open = 1");eval("fombj."+thetag+".value += '*'");pushstack(bbtags,thetag);cstat();hstat('click_close');}}
else
{lastindex=0;for(i=0;i<bbtags.length;i++)
{if(bbtags[i]==thetag)
{lastindex=i;}}
while(bbtags[lastindex])
{tagRemove=popstack(bbtags);doInsert("[/"+tagRemove+"]","",false)
if((tagRemove!='FONT')&&(tagRemove!='SIZE')&&(tagRemove!='COLOR'))
{eval("fombj."+tagRemove+".value = ' "+tagRemove+" '");eval(tagRemove+"_open = 0");}}
cstat();}}}
function tag_list()
{var listvalue="init";var thelist="";while((listvalue!="")&&(listvalue!=null))
{listvalue=prompt(list_prompt,"");if((listvalue!="")&&(listvalue!=null))
{thelist=thelist+"[*]"+listvalue+"\n";}}
if(thelist!="")
{doInsert("[LIST]\n"+thelist+"[/LIST]\n","",false);}}
function tag_url()
{var FoundErrors='';var enterURL=prompt(text_enter_url,"http://");var enterTITLE=prompt(text_enter_url_name,jsfile_myweb_lang);if(!enterURL){FoundErrors+=" "+error_no_url;}
if(!enterTITLE){FoundErrors+=" "+error_no_title;}
if(FoundErrors){alert(jsfile_error_lang+FoundErrors);return;}
doInsert("[URL="+enterURL+"]"+enterTITLE+"[/URL]","",false);}
function insert_attach_to_textarea(aid)
{doInsert("[attachmentid="+aid+"]");}
function tag_image()
{var FoundErrors='';var enterURL=prompt(text_enter_image,"http://");if(!enterURL){FoundErrors+=" "+error_no_url;}
if(FoundErrors){alert(jsfile_error_lang+FoundErrors);return;}
doInsert("[IMG]"+enterURL+"[/IMG]","",false);}
function tag_email()
{var emailAddress=prompt(text_enter_email,"");if(!emailAddress){alert(error_no_email);return;}
doInsert("[EMAIL]"+emailAddress+"[/EMAIL]","",false);}
function doInsert(ibTag,ibClsTag,isSingle)
{var isClose=false;var obj_ta=fombj.Post;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(ibClsTag!=""&&rng.text.length>0)
ibTag+=rng.text+ibClsTag;else if(isSingle)
isClose=true;rng.text=ibTag;}}
else
{if(isSingle)
{isClose=true;}
obj_ta.value+=ibTag;}}
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=ibTag+middle+ibClsTag;}
else
{middle=ibTag+middle;if(isSingle)
{isClose=true;}}
obj_ta.value=start+middle+end;var cpos=ss+(middle.length);obj_ta.selectionStart=cpos;obj_ta.selectionEnd=cpos;obj_ta.scrollTop=st;}
else
{if(isSingle)
{isClose=true;}
obj_ta.value+=ibTag;}
obj_ta.focus();return isClose;}