/* DO NOT EDIT. THIS IS A CACHE FILE AND WILL GET OVERWRITTEN RANDOMLY.
INSTEAD EDIT THE TEMPLATE FROM WITHIN THE ADMIN ZONE, OR BY MANUALLY EDITING A TEMPLATES_CUSTOM OVERRIDE. */


var _editor_url="http://deanager.co.uk".replace(/^http:/,window.location.protocol)+"/data/areaedit/";var _editor_backend=null;var _editor_lang=(window.ocp_lang)?ocp_lang.toLowerCase():'en';var pageLoaded=false;function scriptLoadStuff()
{if(pageLoaded)return;var i;if(window==window.top&&!window.opener||window.name=='')window.name='_site_opener';var preloader=new Image();var images=[];images[0]="http://deanager.co.uk/themes/ffcc66/images/menus/menu_bullet_hover.png".replace(/^http:/,window.location.protocol);images[1]="http://deanager.co.uk/themes/default/images/menus/menu_bullet_expand_hover.png".replace(/^http:/,window.location.protocol);images[2]="http://deanager.co.uk/themes/ffcc66/images/expand.png".replace(/^http:/,window.location.protocol);images[3]="http://deanager.co.uk/themes/ffcc66/images/contract.png".replace(/^http:/,window.location.protocol);images[4]="http://deanager.co.uk/themes/ffcc66/images/exp_con.png".replace(/^http:/,window.location.protocol);images[5]="http://deanager.co.uk/themes/default/images/bottom/loading.gif".replace(/^http:/,window.location.protocol);for(i=0;i<images.length;i++)preloader.src=images[i];if(!document.images)document.images=document.getElementsByTagName('img');if(!document.forms)document.forms=document.getElementsByTagName('form');if(!document.links)document.links=document.getElementsByTagName('a');for(i=0;i<document.images.length;i++)
{var j=document.images[i];if((firstClassName(j.className)=='img_thumb')||(j.className.indexOf(' img_thumb')!=-1))
{setOpacity(j,0.7);}
if((firstClassName(j.className)=='scale_down')||(j.className.indexOf(' scale_down')!=-1))
{j.onclick=function(j){return function(){if(j.className=='scale_down'){j.className='dont_scale_down';j.setAttribute('title','');}else{j.className='scale_down';j.setAttribute('title','Click the image to see it full-size (if it\'s not already).');}}}(j);}}
var helper_pic=document.getElementById('global_helper_panel_pic');if(helper_pic)setOpacity(helper_pic,0.08);fixImages();handleTextareaScrolling();if((!window.parent)||(window.parent==window))
{if(typeof window.server_timestamp!='undefined')
{SetCookie('client_time',new Date().toString(),120);SetCookie('client_time_ref',window.server_timestamp,120);}}
for(i=0;i<document.forms.length;i++)
{if(document.forms[i].className.indexOf('autocomplete')!=-1)
{document.forms[i].setAttribute('autocomplete','on');}else
{var dont_autocomplete=['edit_username','edit_password'];for(var j=0;j<dont_autocomplete.length;j++)
if(document.forms[i].elements[dont_autocomplete[j]])document.forms[i].elements[dont_autocomplete[j]].setAttribute('autocomplete','off');}
if(typeof window.load_html_edit!='undefined')
{load_html_edit(document.forms[i]);}
if(document.forms[i].getAttribute('target')!='_blank')
addEventListenerAbstract(document.forms[i],'mouseover',function(form){return function(){try{form.setAttribute('title','');form.title='';}catch(e){};}}(document.forms[i]));}
if(typeof window.scriptLoadStuffStaff!='undefined')scriptLoadStuffStaff();window.mouseX=0;window.mouseY=0;window.ctrlPressed=false;window.altPressed=false;window.metaPressed=false;window.shiftPressed=false;addEventListenerAbstract(document.body,'mousemove',getMouseXY);if(typeof window.addEventListener!='undefined')
window.addEventListener('click',captureClickKeyStates,true);if(document.getElementsByTagName('base')[0])
{for(i=0;i<document.links.length;i++)
{var href=document.links[i].getAttribute('href');if((href)&&(href.substr(0,1)=='#'))
{document.links[i].setAttribute('href',window.location.href.replace(/#.*$/,'')+href);}}}
for(i=0;i<document.links.length;i++)
{var j=document.links[i];var rel=j.getAttribute('rel');if(rel&&rel.match(/(^|\s)lightbox($|\s)/))
{j.onclick=function(j){return function(){open_image_into_lightbox(j);return false;}}(j);}}
if((typeof window.want_form_saving!='undefined')&&(window.want_form_saving))
{window.setTimeout(init_form_saving,4000);}
if(typeof window.scriptLoadStuffB!='undefined')window.scriptLoadStuffB();pageLoaded=true;}
function initialise_error_mechanism()
{window.onerror=function(msg,file,code)
{if(typeof msg.indexOf=='undefined')return null;if(((msg.indexOf("'undefined' is not a function")!=-1)&&(typeof file=='undefined'))||(msg.indexOf("attempt to run compile-and-go script on a cleared scope")!=-1)||(msg.indexOf('UnnamedClass.toString')!=-1)||(msg.indexOf('chrome.tabs is not supported in content script')!=-1)||(msg.indexOf('convert to string')!=-1)||(msg.indexOf('ASSERT: ')!=-1)||((file)&&(file.indexOf('TODO: FIXME')!=-1))||(msg.indexOf('TODO: FIXME')!=-1)||(msg.indexOf('Location.toString')!=-1)||(msg.indexOf('Array.constructor')!=-1)||(msg.indexOf('Error loading script')!=-1)||((code=='0')&&(msg.indexOf('Script error.')!=-1))||(msg.indexOf('NS_ERROR_FAILURE')!=-1)||(msg.indexOf('AJAX_REQUESTS is not defined')!=-1))return null;if((typeof window.done_one_error=='undefined')||(!window.done_one_error))
{window.done_one_error=true;window.fauxmodal_alert('An error occurred when loading this screen onto the web browser. You are being notified of this as you are staff. If you believe this is a bug in the website software, please contact ocProducts with full details. More details are available in your browser\'s error console. The error was:\n\n'+code+': '+msg+'\n'+file,null,'An error has occurred');}
return false;};addEventListenerAbstract(window,'unload',function(){window.onerror=null;});}
if((typeof window.take_errors!='undefined')&&(window.take_errors))initialise_error_mechanism();window.unloaded=false;addEventListenerAbstract(window,'unload',function(){window.unloaded=true;});function staff_unload_action()
{undo_staff_unload_action();var bi=document.getElementById('body_inner');if(bi)
{if(typeof window.nereidFade!='undefined')
{nereidFade(bi,20,30,-4);}else
{setOpacity(bi,0.2);}}
var div=document.createElement('div');div.className='unload_action';div.style.width='100%';div.style.top=(getWindowHeight()/2-160)+'px';div.style.position='absolute';div.style.zIndex=10000;div.style.textAlign='center';setInnerHTML(div,'<span style="width: 10em; display: inline-block" class="lightborder"><h2>Loading&hellip;</h2><img id="loading_image" alt="" src="'+'http://deanager.co.uk/themes/default/images/bottom/loading.gif'.replace(/^http:/,window.location.protocol)+'" /></span>');window.setTimeout(function(){if(document.getElementById('loading_image'))document.getElementById('loading_image').src+='';},100);document.body.appendChild(div);if(typeof window.scrollTo!='undefined')window.scrollTo(0,0);addEventListenerAbstract(window,'pageshow',undo_staff_unload_action);addEventListenerAbstract(window,'keydown',undo_staff_unload_action);addEventListenerAbstract(document.body,'keydown',undo_staff_unload_action);addEventListenerAbstract(window,'click',undo_staff_unload_action);}
function undo_staff_unload_action()
{var pre=get_elements_by_class_name(document.body,'unload_action');for(var i=0;i<pre.length;i++)
{pre[i].parentNode.removeChild(pre[i]);}
var bi=document.getElementById('body_inner');if(bi)
{if((typeof window.thumbFadeTimers!='undefined')&&(typeof window.thumbFadeTimers!='undefined')&&(thumbFadeTimers[bi.faderKey]))
{window.clearTimeout(thumbFadeTimers[bi.faderKey]);thumbFadeTimers[bi.faderKey]=null;}
setOpacity(bi,1.0);}}
function checkFieldForBlankness(field,event)
{if(!field)return true;if(typeof field.nodeName=='undefined')return true;var value;if(field.nodeName.toLowerCase()=='select')
{value=field.options[field.selectedIndex].value;}else
{value=field.value;}
var ee=document.getElementById('error_'+field.id);if((value.replace(/\s/g,'')=='')||(value=='****')||(value=="Make your post civil and relevant."))
{if(event)
{cancelBubbling(event);}
if(ee!==null)
{ee.style.display='block';setInnerHTML(ee,"This is a required field so needs filling in");}
window.fauxmodal_alert("Please check back over the form - you did not fill in all fields on the form correctly");return false;}
if(ee!==null)
{ee.style.display='none';}
return true;}
function disable_button_just_clicked(input)
{if(input.nodeName.toLowerCase()=='form')
{for(var i=0;i<input.elements.length;i++)
if((input.elements[i].type=='submit')||(input.elements[i].type=='button')||(input.elements[i].type=='image')||(input.elements[i].nodeName.toLowerCase()=='button'))
disable_button_just_clicked(input.elements[i]);return;}
if(input.form.target=='_blank')return;window.setTimeout(function(){input.disabled=true;input.under_timer=true;},20);input.style.cursor='wait';var goback=function(){input.disabled=false;input.under_timer=false;input.style.cursor='default';};window.setTimeout(goback,5000);addEventListenerAbstract(window,"pagehide",goback);}
function manageScrollHeight(ob)
{var dif=0;if((browser_matches('chrome')))dif=-4;var height=(ob.scrollHeight-sts(ob.style.paddingTop)-sts(ob.style.paddingBottom)-sts(ob.style.marginTop)-sts(ob.style.marginBottom)+dif)
if((height>5)&&(sts(ob.style.height)<height)&&(findHeight(ob)<height))ob.style.height=height+'px';}
function generate_question_ui(message,button_set,window_title,fallback_message,callback)
{var image_set=[];if(typeof button_set.length=='undefined')
{var new_button_set=[];for(var s in button_set)
{new_button_set.push(button_set[s]);image_set.push(s);}
button_set=new_button_set;}
if((typeof window.showModalDialog!='undefined'))
{var height=160;if(button_set.length>4)height+=5*(button_set.length-4);var url=maintain_theme_in_link('http://deanager.co.uk/data/question_ui.php?message='+window.encodeURIComponent(message)+'&image_set='+window.encodeURIComponent(image_set.join(','))+'&button_set='+window.encodeURIComponent(button_set.join(','))+'&window_title='+window.encodeURIComponent(window_title)+keep_stub());window.faux_showModalDialog(url,null,'dialogWidth=440;dialogHeight='+height+';status=no;unadorned=yes',function(result)
{if((typeof result=="undefined")||(result===null))
{callback(button_set[0]);}else
{callback(result);}});return;}
if(button_set.length==1)
{window.fauxmodal_alert(fallback_message?fallback_message:message,function()
{callback(button_set[0]);},window_title);return;}else
if(button_set.length==2)
{window.fauxmodal_confirm(fallback_message?fallback_message:message,function(result)
{callback(result?button_set[1]:button_set[0]);},window_title);return;}else
{if(!fallback_message)
{message+="\n\nType either: ";for(var i=0;i<button_set.length;i++)
{message+=button_set[i]+',';}
message=message.substr(0,message.length-1);}else message=fallback_message;window.fauxmodal_prompt(message,'',function(result)
{if((typeof result=="undefined")||(result===null))return button_set[0];if(result=='')return button_set[1];for(var i=0;i<button_set.length;i++)
{if(result.toLowerCase()==button_set[i].toLowerCase())return result;}
return button_set[0];},window_title);return;}
return;}
function doc_onmouseout()
{if(typeof window.orig_helper_text!='undefined')
{var help=document.getElementById('help');if(!help)return;setInnerHTML(help,window.orig_helper_text);if(typeof window.nereidFade!='undefined')
{setOpacity(help,0.0);nereidFade(help,100,30,4);}
help.className='global_helper_panel_text';}}
function doc_onmouseover(i)
{var doc=document.getElementById('doc_'+i);if((doc)&&(getInnerHTML(doc)!=''))
{var help=document.getElementById('help');if(!help)return;window.orig_helper_text=getInnerHTML(help);setInnerHTML(help,getInnerHTML(doc));if(typeof window.nereidFade!='undefined')
{setOpacity(help,0.0);nereidFade(help,100,30,4);}
help.className='global_helper_panel_text_over';}}
function handleTextareaScrolling()
{var i;var elements=document.getElementsByTagName('textarea');for(i=0;i<elements.length;i++)
{if(elements[i].className.indexOf('textarea_scroll')!=-1)
{elements[i].setAttribute('wrap','off');elements[i].style.overflow='auto';}}}
function scriptPageRendered()
{if(getWindowWidth()<990)
{var panel_right=document.getElementById('panel_right');var global_div=document.getElementById('global_div');if(panel_right)
{var divs=panel_right.getElementsByTagName('div');if((divs[0])&&(divs[0].className.indexOf('global_helper_panel')!=-1))
{var middle=get_elements_by_class_name(panel_right.parentNode,'global_middle')[0];if(middle)
{middle.style.marginRight='0';var boxes=get_elements_by_class_name(panel_right,'standardbox_curved'),i;for(i=0;i<boxes.length;i++)
{boxes[i].style.width='auto';}
panel_right.className+=' horiz_help_panel';panel_right.parentNode.removeChild(panel_right);middle.parentNode.appendChild(panel_right);document.getElementById('helper_panel_toggle').style.display='none';get_elements_by_class_name(panel_right,'global_helper_panel')[0].style.minHeight='0';}}}}}
function help_panel(show)
{var panel_right=document.getElementById('panel_right');var middles=get_elements_by_class_name(document,'global_middle');var global_message=document.getElementById('global_message');var helper_panel_contents=document.getElementById('helper_panel_contents');var helper_panel_toggle=document.getElementById('helper_panel_toggle');var i;if(show)
{panel_right.style.width='275px';if(global_message)global_message.style.marginRight='275px';for(i=0;i<middles.length;i++)
{middles[i].style.marginRight='275px';}
helper_panel_contents.style.display='block';if(typeof window.nereidFade!='undefined')
{setOpacity(helper_panel_contents,0.0);nereidFade(helper_panel_contents,100,30,4);}
if(ReadCookie('hide_help_panel')=='1')SetCookie('hide_help_panel','0',100);helper_panel_toggle.onclick=function(){return help_panel(false);};helper_panel_toggle.childNodes[0].setAttribute('src','http://deanager.co.uk/themes/ffcc66/images/help_panel_hide.png'.replace(/^http:/,window.location.protocol));}else
{if(ReadCookie('hide_help_panel')=='')
{window.fauxmodal_confirm('You have chosen to contract the help panel, and it will remain so until you expand it again. It is not advised that you leave the panel contracted, as you may miss program help. Confirm if you sure you wish to contract the help panel (and save a cookie on your computer).',function(answer)
{if(answer)
_hide_help_panel(middles,panel_right,global_message,helper_panel_contents,helper_panel_toggle);});return false;}
_hide_help_panel(middles,panel_right,global_message,helper_panel_contents,helper_panel_toggle);}
return false;}
function _hide_help_panel(middles,panel_right,global_message,helper_panel_contents,helper_panel_toggle)
{panel_right.style.width='26px';if(global_message)global_message.style.marginRight='16px';for(var i=0;i<middles.length;i++)
{middles[i].style.marginRight='16px';}
helper_panel_contents.style.display='none';SetCookie('hide_help_panel','1',100);helper_panel_toggle.onclick=function(){return help_panel(true);};helper_panel_toggle.childNodes[0].setAttribute('src','http://deanager.co.uk/themes/default/images/help_panel_show.png'.replace(/^http:/,window.location.protocol));}
function sts(src)
{if(!src)return 0;if(src.indexOf('px')==-1)return 0;return window.parseInt(src.replace('px',''));}
function captureClickKeyStates(event)
{window.capture_event=event;}
function magicKeypress(event)
{if(typeof window.capture_event!='undefined')event=window.capture_event;var count=0;if(event.shiftKey)count++;if(event.ctrlKey)count++;if(event.metaKey)count++;if(event.altKey)count++;return(count>=2);}
function window_r(expr)
{var win=window.open('','format','width=400,height=300,left=50,top=50,status,menubar,scrollbars,resizable');win.document.open();win.document.write('<pre>'+((window.format_r)?format_r(expr):expr)+'</pre>');win.document.close()
win.focus();}
function escape_html(value)
{if(!value)return'';return value.replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(new RegExp('<','g'),'&lt;').replace(/>/g,'&gt;');}
function escape_comcode(value)
{return value.replace(/\\/g,'\\\\').replace(/"/g,'\\"');}
function create_rollover(rand,rollover)
{var img=document.getElementById(rand);if(!img)return;new Image().src=rollover;var activate=function()
{img.old_src=img.getAttribute('src');if(typeof img.origsrc!='undefined')img.old_src=img.origsrc;img.setAttribute('src',rollover);refixImage(img);};var deactivate=function()
{img.setAttribute('src',img.old_src);refixImage(img);};addEventListenerAbstract(img,"mouseover",activate);addEventListenerAbstract(img,"click",deactivate);addEventListenerAbstract(img,"mouseout",deactivate);}
function SetCookie(cookieName,cookieValue,nDays)
{var today=new Date();var expire=new Date();if(nDays==null||nDays==0)nDays=1;expire.setTime(today.getTime()+3600000*24*nDays);var extra="";if("/"!="")extra=extra+";path=/";if(".deanager.co.uk"!="")extra=extra+";domain=.deanager.co.uk";var to_set=cookieName+"="+encodeURIComponent(cookieValue)+";expires="+expire.toUTCString()+extra;document.cookie=to_set;var read=ReadCookie(cookieName);if((read!=cookieValue)&&(read))
{window.done_cookie_alert=true;}}
function ReadCookie(cookieName)
{var theCookie=""+document.cookie;var ind=theCookie.indexOf(' '+cookieName+'=');if((ind==-1)&&(theCookie.substr(0,cookieName.length+1)==cookieName+'='))ind=0;else if(ind!=-1)ind++;if(ind==-1||cookieName=="")return"";var ind1=theCookie.indexOf(';',ind);if(ind1==-1)ind1=theCookie.length;return window.decodeURIComponent(theCookie.substring(ind+cookieName.length+1,ind1));}
function firstClassName(className)
{var p=className.indexOf(' ');if(p!=-1)
{return className.substr(0,p);}
return className;}
function get_elements_by_class_name(node,classname)
{if(node)
{var a=[];var re=new RegExp('(^| )'+classname+'( |$)');var els=node.getElementsByTagName("*");for(var i=0,j=els.length;i<j;i++)
{if(re.test(els[i].className))a.push(els[i]);}
return a;}
else return[];}
function isInteger(val)
{if(val=="")return false;var c;for(var i=0;i<val.length;i++)
{c=val.charAt(i);if((c!="0")&&(c!="1")&&(c!="2")&&(c!="3")&&(c!="4")&&(c!="5")&&(c!="6")&&(c!="7")&&(c!="8")&&(c!="9"))
return false;}
return true;}
function is_opera()
{return browser_matches('opera');}
function is_ie()
{return browser_matches('ie');}
function browser_matches(code)
{var browser=navigator.userAgent.toLowerCase();var os=navigator.platform.toLowerCase()+' '+browser;var _is_opera=browser.indexOf('opera')!=-1;var is_konqueror=browser.indexOf('konqueror')!=-1;var is_safari=browser.indexOf('applewebkit')!=-1;var is_chrome=browser.indexOf('chrome/')!=-1;var is_gecko=(browser.indexOf('gecko')!=-1)&&!_is_opera&&!is_konqueror&&!is_safari;var _is_ie=(browser.indexOf('msie')!=-1)&&!_is_opera;var is_ie_old=((browser.indexOf('msie 6')!=-1)||(browser.indexOf('msie 5')!=-1))&&_is_ie;var is_ie_decent=(!is_ie_old)&&(browser.indexOf('msie 7')==-1)&&_is_ie;var is_ie5=(browser.indexOf('msie 5')!=-1)&&_is_ie;var is_ie_new=(!is_ie_old)&&_is_ie;var is_iceweasel=browser.indexOf('iceweasel')!=-1;switch(code)
{case'ios':return browser.indexOf('iphone')!=-1;case'android':return browser.indexOf('android')!=-1;case'no_alpha_ie':return((/MSIE ((5\.5)|[6])/.test(navigator.userAgent))&&(navigator.platform=="Win32")&&(!_is_opera));case'no_alpha_ie_with_opacity':return((/MSIE ((5\.5)|[678])/.test(navigator.userAgent))&&(navigator.platform=="Win32")&&(!_is_opera));case'wysiwyg':if(''=='1')return false;return true;case'windows':return os.indexOf('windows')!=-1||os.indexOf('win32')!=-1;case'mac':return os.indexOf('mac')!=-1;case'linux':return os.indexOf('linux')!=-1;case'opera':return _is_opera;case'ie':return _is_ie;case'ie5':return is_ie5;case'ie6':case'ie_old':return is_ie_old;case'ie7+':case'ie_new':return is_ie_new;case'ie8+':case'ie_decent':return is_ie_decent;case'chrome':return is_chrome;case'gecko':return is_gecko;case'konqueror':return is_konqueror;case'safari':return is_safari;}
return false;}
function get_base_url()
{return(window.location+'').replace(/(^.*:\/\/[^\/]*)\/.*/,'$1')+''.replace(/^.*:\/\/[^\/]*/,'');}
function confirm_session(callback)
{if(typeof window.load_XML_doc=='undefined')return;var url='/data/confirm_session.php'+keep_stub(true);var ret=null;require_javascript("javascript_ajax");if(typeof window.load_XML_doc!='undefined')ret=load_XML_doc(url+keep_stub(true),false);if(!ret)return;if(ret&&ret.responseText==='')
{callback(true);return;}
_confirm_session(callback,ret.responseText,url);}
function _confirm_session(callback,username,url)
{window.fauxmodal_prompt('Enter your password','',function(promptt)
{if(promptt!==null)
{var ret=load_XML_doc(url,false,'login_username='+window.encodeURIComponent(username)+'&password='+window.encodeURIComponent(promptt));if(ret&&ret.responseText==='')
callback(true);else
_confirm_session(callback,username,url);}else callback(false);},'Login','password');}
function load_snippet(code,post)
{var title=getInnerHTML(document.getElementsByTagName('title')[0]);var metas=document.getElementsByTagName('link');var i;if(!window.location)return;var url=window.location.href;for(i=0;i<metas.length;i++)
{if(metas[i].getAttribute('rel')=='canonical')url=metas[i].getAttribute('href');}
if(!url)url=window.location.href;var html;if(typeof window.load_XML_doc!='undefined')
{var url2="/data/snippet.php?snippet="+code+"&url="+window.encodeURIComponent(url)+'&title='+window.encodeURIComponent(title)+keep_stub();html=load_XML_doc(maintain_theme_in_link(url2),null,post);}
return html.responseText;}
function require_css(sheet)
{if(document.getElementById('loading_css_'+sheet))return;var link=document.createElement('link');link.setAttribute('id','loading_css_'+sheet);link.setAttribute('type',"text/css");link.setAttribute('rel',"stylesheet");link.setAttribute('href',"/data/sheet.php?sheet="+sheet+keep_stub());document.getElementsByTagName('head')[0].appendChild(link);}
function require_javascript(script,lang)
{if(document.getElementById('loading_js_'+script))return;var link=document.createElement('script');link.setAttribute('id','loading_js_'+script);link.setAttribute('type',"text/javascript");var url="/data/javascript.php?script="+script+keep_stub();if(lang)url=url+"&lang="+lang;link.setAttribute('src',url);document.getElementsByTagName('head')[0].appendChild(link);}
function select_tab(id,tab)
{var tabs=[];var i,element;element=document.getElementById('t_'+tab);for(i=0;i<element.parentNode.childNodes.length;i++)
{if((element.parentNode.childNodes[i].id)&&(element.parentNode.childNodes[i].id.substr(0,2)=='t_'))
tabs.push(element.parentNode.childNodes[i].id.substr(2));}
for(i=0;i<tabs.length;i++)
{element=document.getElementById(id+'_'+tabs[i]);if(element)
{element.style.display=(tabs[i]==tab)?'block':'none';if((typeof window.nereidFade!='undefined')&&(tabs[i]==tab))
{setOpacity(element,0.0);nereidFade(element,100,30,4);}}
element=document.getElementById('t_'+tabs[i]);if(element)
{element.className=element.className.replace(' tab_active','');if(tabs[i]==tab)element.className+=' tab_active';}}
return false;}
function hideTag(element,noAnimate)
{var pics=element.getElementsByTagName('img');var pic=pics[0];toggleSectionInline('','block',pic,get_elements_by_class_name(element,'hide_tag')[0],noAnimate);}
function toggleSectionTable(id,noAnimate)
{toggleSectionInline(id,browser_matches('ie')?'block':'table',false,noAnimate);}
function toggleSectionInline(id,type,pic,itm,noAnimate)
{if(!itm)itm=document.getElementById(id);if(!pic)pic=document.getElementById('e_'+id);if((pic)&&(pic.src=="http://deanager.co.uk/themes/ffcc66/images/exp_con.png".replace(/^http:/,window.location.protocol)))return;if(itm.style.display=='none')
{itm.style.display=type;if((type=='block')&&(itm.nodeName.toLowerCase()=='div')&&(!noAnimate)&&((!pic)||(pic.src.indexOf("themewizard.php")==-1)))
{itm.style.visibility='hidden';itm.style.width=findWidth(itm,true,true,true)+'px';itm.style.position='absolute';if(pic)
{pic.src="http://deanager.co.uk/themes/ffcc66/images/exp_con.png".replace(/^http:/,window.location.protocol);refixImage(pic);}
window.setTimeout(function(){beginAnimation(itm,20,70,-1,pic);},20);}else
{if(typeof window.nereidFade!='undefined')
{setOpacity(itm,0.0);nereidFade(itm,100,30,4);}
if(pic)
{pic.src=((pic.src.indexOf("themewizard.php")!=-1)?pic.src.replace("expand","contract"):"http://deanager.co.uk/themes/ffcc66/images/contract.png").replace(/^http:/,window.location.protocol);refixImage(pic);}}}else
{if((type=='block')&&(itm.nodeName.toLowerCase()=='div')&&(!noAnimate)&&((!pic)||(pic.src.indexOf("themewizard.php")==-1)))
{if(pic)
{pic.src="http://deanager.co.uk/themes/ffcc66/images/exp_con.png".replace(/^http:/,window.location.protocol);refixImage(pic);}
window.setTimeout(function(){beginAnimation(itm,-20,70,0,pic);},20);}else
{if(pic)
{pic.src=((pic.src.indexOf("themewizard.php")!=-1)?pic.src.replace("contract","expand"):"http://deanager.co.uk/themes/ffcc66/images/expand.png").replace(/^http:/,window.location.protocol);pic.setAttribute('alt',pic.getAttribute('alt').replace('Contract','Expand'));pic.setAttribute('title','Expand');refixImage(pic);}
itm.style.display='none';}}
trigger_resize(true);}
function beginAnimation(itm,animateDif,animateTicks,finalHeight,pic)
{var fullHeight=findHeight(itm,true);if(finalHeight==-1)
{finalHeight=fullHeight;itm.style.height='0px';itm.style.visibility='visible';itm.style.position='static';}
if(fullHeight>300)
{animateDif*=6;}
if(itm.parentNode.parentNode.className!='standardbox_wrap_classic')itm.style.outline='1px dashed gray';if(typeof window.nereidFade!='undefined')
{if(finalHeight==0)
{setOpacity(itm,1.0);nereidFade(itm,0,30,4);}else
{setOpacity(itm,0.0);nereidFade(itm,100,30,4);}}
var origOverflow=itm.style.overflow;itm.style.overflow='hidden';if(browser_matches('firefox'))itm.parentNode.style.overflow='hidden';window.setTimeout(function(){animate(itm,finalHeight,animateDif,origOverflow,animateTicks,pic);},animateTicks);}
function animate(itm,finalHeight,animateDif,origOverflow,animateTicks,pic)
{var currentHeight=((itm.style.height=='auto')||(itm.style.height==''))?(findHeight(itm)):sts(itm.style.height);if(((currentHeight>finalHeight)&&(animateDif<0))||((currentHeight<finalHeight)&&(animateDif>0)))
{var num=Math.max(currentHeight+animateDif,0);if(animateDif>0)num=Math.min(num,finalHeight);itm.style.height=num+'px';window.setTimeout(function(){animate(itm,finalHeight,animateDif,origOverflow,animateTicks,pic);},animateTicks);}else
{itm.style.height='auto';if(animateDif<0)
{itm.style.display='none';}
itm.style.overflow=origOverflow;if(browser_matches('firefox'))itm.parentNode.style.overflow='';itm.style.outline='0';if(pic)
{pic.src=((animateDif<0)?"http://deanager.co.uk/themes/ffcc66/images/expand.png":"http://deanager.co.uk/themes/ffcc66/images/contract.png").replace(/^http:/,window.location.protocol);pic.setAttribute('alt',pic.getAttribute('alt').replace((animateDif<0)?'Contract':'Expand',(animateDif<0)?'Expand':'Contract'));pic.setAttribute('title',(animateDif<0)?'Expand':'Contract');refixImage(pic);}
trigger_resize(true);}}
function animateFrameLoad(pf,frame,leave_gap_top)
{if(!leave_gap_top)leave_gap_top=0;pf.style.height=window.top.getWindowHeight()+'px';illustrateFrameLoad(pf,frame);var ifuob=window.top.document.getElementById('iframe_under');var extra=ifuob?((window!=window.top)?findPosY(ifuob):0):0;if(ifuob)ifuob.scrolling='no';if(window==window.top)
window.top.smoothScroll(findPosY(pf)+extra-leave_gap_top);}
function illustrateFrameLoad(pf,frame)
{var head='<style type="text/css">',cssText='';for(var i=0;i<document.styleSheets.length;i++)
{try
{if((typeof document.styleSheets[i].href!='undefined')&&(document.styleSheets[i].href)&&(document.styleSheets[i].href.indexOf('/global')==-1))continue;if(typeof document.styleSheets[i].cssText!='undefined')
{cssText+=document.styleSheets[i].cssText;}else
{var rules=[];try{rules=document.styleSheets[i].cssRules?document.styleSheets[i].cssRules:document.styleSheets[i].rules;}
catch(e){};if(rules)
{for(var j=0;j<rules.length;j++)
{if(rules[j].cssText)
cssText+=rules[j].cssText+"\n\n";else
cssText+=rules[j].selectorText+'{ '+rules[j].style.cssText+"}\n\n";}}}}
catch(e){};}
head+=cssText+'<\/style>';if(!window.frames[frame])return;if(!window.frames[frame].document)return;var de=window.frames[frame].document.documentElement;if(!de)return;var body=de.getElementsByTagName('body');if(body.length==0)
{setInnerHTML(de,'<head>'+head+'<\/head><body class="re_body"><div class="spaced"><div class="ajax_tree_list_loading"><img id="loading_image" class="inline_image_2" src="'+'http://deanager.co.uk/themes/default/images/bottom/loading.gif'.replace(/^http:/,window.location.protocol)+'" alt="Loading&hellip;" /> Loading&hellip;<\/div><\/div><\/body>');}else
{body[0].className='re_body';var head_element=de.getElementsByTagName('head')[0];if(!head_element)
{head_element=document.createElement('head');de.appendChild(head_element);}
if(de.getElementsByTagName('style').length==0)
setInnerHTML(head_element,head);setInnerHTML(body[0],'<div class="spaced"><div class="ajax_tree_list_loading"><img id="loading_image" class="inline_image_2" src="'+'http://deanager.co.uk/themes/default/images/bottom/loading.gif'.replace(/^http:/,window.location.protocol)+'" alt="Loading&hellip;" /> Loading&hellip;<\/div><\/div>');}
var the_frame=window.frames[frame];window.setTimeout(function(){if(the_frame.document&&the_frame.document.getElementById('loading_image'))
{var i_new=document.createElement('img');i_new.src=the_frame.document.getElementById('loading_image').src;var i_default=the_frame.document.getElementById('loading_image');i_new.className=i_default.className;i_new.alt=i_default.alt;i_new.id=i_default.id;i_default.parentNode.replaceChild(i_new,i_default);}},0);var style=de.getElementsByTagName('style')[0];if((style)&&(style.styleSheet))style.styleSheet.cssText=cssText;}
function smoothScroll(destY,expectedScrollY,dir,eventAfter)
{var scrollY;if(typeof window.scrollY=='undefined')scrollY=document.documentElement.scrollTop;else scrollY=window.scrollY;if(typeof destY=='string')destY=findPosY(document.getElementById(destY));if(destY<0)destY=0;if((typeof expectedScrollY!="undefined")&&(expectedScrollY!=null)&&(expectedScrollY!=scrollY))return;if(!dir)dir=((destY-scrollY)>0)?1:-1;var dist=dir*17;if(((dir==1)&&(scrollY+dist>=destY))||((dir==-1)&&(scrollY+dist<=destY))||((destY-scrollY)*dir>2000))
{if(typeof window.scrollTo!='undefined')window.scrollTo(0,destY);if(eventAfter)eventAfter();return;}
window.scrollBy(0,dist);if(typeof window.scrollY=='undefined')scrollY=document.documentElement.scrollTop;else scrollY=window.scrollY;window.setTimeout(function(){smoothScroll(destY,scrollY,dir,eventAfter);},30);}
function abstractGetComputedStyle(obj,property)
{if(obj.currentStyle)
{var index=property.indexOf('-');if(index!=-1)
{property=property.substring(0,index)+property.substring(index+1,index+2).toUpperCase()+property.substring(index+2,property.length);}
return obj.currentStyle[property];}
var ret=null;try{ret=document.defaultView.getComputedStyle(obj,null).getPropertyValue(property);}
catch(e){}
return ret;}
function changeClass(box,theId,to,from)
{var cell=document.getElementById(theId);if(!cell)cell=theId;cell.className=(box.checked)?to:from;}
function getMouseXY(e)
{window.mouseX=getMouseX(e);window.mouseY=getMouseY(e);window.ctrlPressed=e.ctrlKey;window.altPressed=e.altKey;window.metaPressed=e.metaKey;window.shiftPressed=e.shiftKey;return true}
function getMouseX(event)
{try
{if((typeof event.pageX!='undefined')&&(event.pageX))
{return event.pageX;}else if((typeof event.clientX!='undefined')&&(event.clientX))
{return event.clientX+getWindowScrollX()}}
catch(err){}
return 0;}
function getMouseY(event)
{try
{if((typeof event.pageY!='undefined')&&(event.pageY))
{return event.pageY;}else if((typeof event.clientY!='undefined')&&(event.clientY))
{return event.clientY+getWindowScrollY()}}
catch(err){}
return 0;}
function getWindowWidth()
{if(typeof window.innerWidth!='undefined')return window.innerWidth-18;if((document.documentElement)&&(document.documentElement.clientWidth))return document.documentElement.clientWidth;if((document.body)&&(document.body.clientWidth))return document.body.clientWidth;return 0;}
function getWindowHeight()
{if(typeof window.innerHeight!='undefined')return window.innerHeight-18;if((document.documentElement)&&(document.documentElement.clientHeight))return document.documentElement.clientHeight;if((document.body)&&(document.body.clientHeight))return document.body.clientHeight;return 0;}
function getWindowScrollWidth(win)
{if(!win)win=window;return win.document.body.scrollWidth;}
function getWindowScrollHeight(win)
{if(!win)win=window;var best=win.document.body.parentNode.offsetHeight;if(((win.document.body.offsetHeight>best)&&(win.document.body.offsetHeight!=150))||(best==150))best=win.document.body.offsetHeight;if(((win.document.body.parentNode.scrollHeight>best)&&(win.document.body.parentNode.scrollHeight!=150))||(best==150))best=win.document.body.parentNode.scrollHeight;if(((win.document.body.scrollHeight>best)&&(best<150)&&(win.document.body.scrollHeight!=150))||(best==150))best=win.document.body.scrollHeight;return best;}
function getWindowScrollX()
{if(typeof window.pageXOffset!='undefined')return window.pageXOffset;if((document.documentElement)&&(document.documentElement.scrollLeft))return document.documentElement.scrollLeft;if((document.body)&&(document.body.scrollLeft))return document.body.scrollLeft;if(typeof window.scrollX!='undefined')return window.scrollX;return 0;}
function getWindowScrollY()
{if(typeof window.pageYOffset!='undefined')return window.pageYOffset;if((document.documentElement)&&(document.documentElement.scrollTop))return document.documentElement.scrollTop;if((document.body)&&(document.body.scrollTop))return document.body.scrollTop;if(typeof window.scrollTop!='undefined')return window.scrollTop;return 0;}
function findPosX(obj,notRelative)
{if(!obj&&typeof window.console!='undefined'){console.log(findPosX.caller);return 0;}
var call_obj=obj;var curleft=0;if(obj.offsetParent)
{while(obj.offsetParent)
{if(((abstractGetComputedStyle(obj,'position')=='absolute')||(abstractGetComputedStyle(obj,'position')=='relative'))&&(!notRelative))
{if(obj==call_obj)curleft+=obj.offsetLeft;break;}
curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(typeof obj.x!='undefined')curleft+=obj.x;return curleft;}
function findPosY(obj,notRelative)
{if(!obj&&typeof window.console!='undefined'){console.log(findPosY.caller);return 0;}
var call_obj=obj;var curtop=0;if(obj.offsetParent)
{while(obj.offsetParent)
{if(((abstractGetComputedStyle(obj,'position')=='absolute')||(abstractGetComputedStyle(obj,'position')=='relative'))&&(!notRelative))
{if(obj==call_obj)curtop+=obj.offsetTop;break;}
curtop+=obj.offsetTop;obj=obj.offsetParent;}}
else if(typeof obj.y!='undefined')curtop+=obj.y;return curtop;}
function findWidth(obj,takePadding,takeMargin,takeBorder)
{if(!obj)return 0;var ret=obj.offsetWidth;if(takePadding)
{ret-=sts(abstractGetComputedStyle(obj,'padding-left'));ret-=sts(abstractGetComputedStyle(obj,'padding-right'));}
if(takeMargin)
{ret-=sts(abstractGetComputedStyle(obj,'margin-left'));ret-=sts(abstractGetComputedStyle(obj,'margin-right'));}
if(takeBorder)
{ret-=sts(abstractGetComputedStyle(obj,'border-left-width'));ret-=sts(abstractGetComputedStyle(obj,'border-right-width'));}
return ret;}
function findHeight(obj,takePadding,takeMargin,takeBorder)
{if(!obj)return 0;var ret=obj.offsetHeight;if(takePadding)
{ret-=sts(abstractGetComputedStyle(obj,'padding-top'));ret-=sts(abstractGetComputedStyle(obj,'padding-bottom'));}
if(takeMargin)
{ret-=sts(abstractGetComputedStyle(obj,'margin-top'));ret-=sts(abstractGetComputedStyle(obj,'margin-bottom'));}
if(takeBorder)
{ret-=sts(abstractGetComputedStyle(obj,'border-top-width'));ret-=sts(abstractGetComputedStyle(obj,'border-bottom-width'));}
return ret;}
function enter_pressed(event,altChar)
{if(!event)event=window.event;if((altChar)&&(((event.which)&&(event.which==altChar.charCodeAt(0)))||((event.keyCode)&&(event.keyCode==altChar.charCodeAt(0)))))return true;return(((event.which)&&(event.which==13))||((event.keyCode)&&(event.keyCode==13)));}
function key_pressed(event,key,no_error_if_bad)
{if(!event)event=window.event;if(typeof window.anykeyokay=='undefined')window.anykeyokay=false;if(key.constructor==Array)
{for(var i=0;i<key.length;i++)
{if(key[i]==null)
{if((event.keyCode)&&((window.anykeyokay)||(event.keyCode<48)||(event.keyCode==86)||(event.keyCode==91)||(event.keyCode==224))&&(event.keyCode!=32))
{window.anykeyokay=true;window.setTimeout(function(){window.anykeyokay=false;},200);return true;}}else
{if(key_pressed(event,key[i]))return true;}}
var targ;if(typeof event.target!='undefined')targ=event.target;else targ=event.srcElement;if(!no_error_if_bad)
{var current_bg=abstractGetComputedStyle(targ,'background');if((typeof current_bg=='undefined')||(current_bg))current_bg='white';if(current_bg!='#FF8888')
window.setTimeout(function(){targ.style.background=current_bg;},400);targ.style.background='#FF8888';}
return false;}
if((key=='-')&&(event.keyCode==189))key=189;if((key==190)&&(event.keyCode==110))key=110;if(key=='-')key=109;if((key=='_')&&(event.keyCode==189))key=189;else if(key=='_')key=0;if(key.constructor==String)
{if((event.shiftKey)&&(key.toUpperCase()==key.toLowerCase()))return false;key=key.toUpperCase().charCodeAt(0);if((event.keyCode)&&(event.keyCode>=96)&&(event.keyCode<106)&&(key>=48)&&(key<58))key+=48;}
return ret=((typeof event.keyCode!="undefined")&&(event.keyCode==key));}
function activateTooltip(ac,myevent,tooltip,width,pic,height,bottom,no_delay,lights_off,force_width)
{if(!pageLoaded)return;if((typeof tooltip!='function')&&(tooltip==''))return;var existing_tooltips=get_elements_by_class_name(document.body,'ocp_tooltip');for(var i=0;i<existing_tooltips.length;i++)
{if(existing_tooltips[i].id!=ac.tooltipId)existing_tooltips[i].parentNode.removeChild(existing_tooltips[i]);}
ac.is_over=true;ac.tooltip_on=false;ac.initial_width=width;var children=document.getElementsByTagName('img');for(var i=0;i<children.length;i++)children[i].setAttribute('title','');var tooltipElement;if((typeof ac.tooltipId!='undefined')&&(document.getElementById(ac.tooltipId)))
{tooltipElement=document.getElementById(ac.tooltipId);setInnerHTML(tooltipElement,'');repositionTooltip(ac,myevent,bottom,true,tooltipElement,force_width);}else
{tooltipElement=document.createElement("div");tooltipElement.style.display='none';tooltipElement.className="ocp_tooltip";if(ac.className.substr(0,3)=='tt_')tooltipElement.className+=' '+ac.className;tooltipElement.style.width=width;if((!browser_matches('ie_old'))&&(height)){if(height!='auto')tooltipElement.style.maxHeight=height;tooltipElement.style.overflow='auto';}
tooltipElement.style.position='absolute';tooltipElement.id=Math.floor(Math.random()*1000);ac.tooltipId=tooltipElement.id;repositionTooltip(ac,myevent,bottom,true,tooltipElement,force_width);document.body.appendChild(tooltipElement);}
if(pic)
{var img=document.createElement('img');img.src=pic;img.className='tooltip_img';if(lights_off)setOpacity(img,0.2);tooltipElement.appendChild(img);tooltipElement.style.paddingRight='30px';}
var myevent_copy;try{myevent_copy={'pageX':myevent.pageX,'pageY':myevent.pageY,'clientX':myevent.clientX,'clientY':myevent.clientY,'type':myevent.type};}
catch(e){myevent_copy={'pageX':0,'pageY':0,'clientX':0,'clientY':0,'type':''};}
window.setTimeout(function(){if(!ac.is_over)return;if(typeof tooltip=='function')tooltip=tooltip();if(tooltip=='')return;if(!ac.tooltip_on)setInnerHTML(tooltipElement,tooltip,true);ac.tooltip_on=true;tooltipElement.style.display='block';repositionTooltip(ac,myevent_copy,bottom,true,tooltipElement,force_width);},no_delay?10:666);}
function repositionTooltip(ac,event,bottom,starting,tooltipElement,force_width)
{if(!starting)
{if(ac.getAttribute('title'))ac.setAttribute('title','');if((ac.parentNode.nodeName.toLowerCase()=='a')&&(ac.parentNode.getAttribute('title'))&&(ac.parentNode.getAttribute('title').indexOf('(this link will open in a new window)')!=-1))
ac.parentNode.setAttribute('title','');}
if(!pageLoaded)return;if(!ac.tooltipId){if((typeof ac.onmouseover!='undefined')&&(ac.onmouseover))ac.onmouseover(event);return;};if(!tooltipElement)tooltipElement=document.getElementById(ac.tooltipId);if(tooltipElement)
{var width=findWidth(tooltipElement);if((tooltipElement.style.maxWidth)&&(tooltipElement.style.maxWidth.indexOf('px')!=-1))width=window.parseInt(tooltipElement.style.maxWidth.replace('px',''));if(tooltipElement.style.width.indexOf('px')!=-1)width=window.parseInt(tooltipElement.style.width.replace('px',''));if((!width)||((tooltipElement.style.width=='auto')&&(width<200)))width=360;var height=findHeight(tooltipElement);var x=(getMouseX(event)+10);var y=(getMouseY(event)+10);try
{if(typeof event.type!='undefined')
{if(event.type!='focus')ac.done_none_focus=true;if((event.type=='focus')&&(ac.done_none_focus))return;x=(event.type=='focus')?(getWindowScrollX()+getWindowWidth()/2):(getMouseX(event)+10);y=(event.type=='focus')?(getWindowScrollY()+getWindowHeight()/2-40):(getMouseY(event)+10);}}
catch(ignore){};if((!browser_matches('ie_old'))&&(!force_width))
{tooltipElement.style.maxWidth=width+'px';tooltipElement.style.width='auto';}else
{tooltipElement.style.width=width+'px';}
var _width=findWidth(tooltipElement);if((_width==0)||(_width>width))_width=width;var x_excess=x-getWindowWidth()-getWindowScrollX()+_width+20;if(x_excess>0)
{x-=x_excess+20;}
if(bottom)
{tooltipElement.style.top=(y-height)+'px';}else
{var y_excess=y-getWindowHeight()-getWindowScrollY()+height+10;if(y_excess>0)y-=y_excess;tooltipElement.style.top=y+'px';}
tooltipElement.style.left=x+'px';}}
function deactivateTooltip(ac,event)
{ac.is_over=false;if((!pageLoaded)||(!ac.tooltipId))return;var tooltipElement=document.getElementById(ac.tooltipId);if(tooltipElement)tooltipElement.style.display='none';}
function resizeFrame(name,minHeight)
{if(!minHeight)minHeight=0;var frame_element=document.getElementById(name);var frame_window;if(typeof window.frames[name]!='undefined')frame_window=window.frames[name];else if(parent&&parent.frames[name])frame_window=parent.frames[name];else return;if((frame_element)&&(frame_window)&&(frame_window.document)&&(frame_window.document.body))
{var h=getWindowScrollHeight(frame_window);if((h==0)&&(frame_element.parentNode.style.display=='none'))
{h=((typeof minHeight=='undefined')||(minHeight==0))?100:minHeight;if(frame_window.parent)window.setTimeout(function(){if(frame_window.parent)frame_window.parent.trigger_resize();},0);}
if(h+'px'!=frame_element.style.height)
{if(frame_element.scrolling!='auto')
{frame_element.style.height=((h>=minHeight)?h:minHeight)+'px';if(frame_window.parent)window.setTimeout(function(){if(frame_window.parent)frame_window.parent.trigger_resize();},0);frame_element.scrolling='no';frame_window.onscroll=function(event){if(!event)event=window.event;if(event==null)return false;if(typeof frame_window.scrollTo!='undefined')frame_window.scrollTo(0,0);return cancelBubbling(event);};}}}}
function trigger_resize(and_subframes)
{if(typeof window.parent=='undefined')return;var frames=window.parent.document.getElementsByTagName('iframe');var done=false;for(var i=0;i<frames.length;i++)
{if((frames[i].src==window.location.href)||(frames[i].contentWindow==window)||((typeof window.parent.frames[frames[i].id]!="undefined")&&(window.parent.frames[frames[i].id]==window)))
{if(frames[i].style.height=='900px')frames[i].style.height='auto';window.parent.resizeFrame(frames[i].name);}}
if(and_subframes)
{frames=document.getElementsByTagName('iframe');for(var i=0;i<frames.length;i++)
if((frames[i].name!='')&&((frames[i].className.indexOf('expandable_iframe')!=-1)||(frames[i].className.indexOf('dynamic_iframe')!=-1)))resizeFrame(frames[i].name);}}
function addFormMarkedPosts(work_on,prefix)
{var get=work_on.getAttribute('method').toLowerCase()=='get';var elements=document.getElementsByTagName('input');var i;var append='';if(get)
{for(i=0;i<work_on.elements.length;i++)
{if(work_on.elements[i].name.match(new RegExp('&'+prefix.replace('_','\_')+'\d+=1$','g')))
{work_on.elements[i].parentNode.removeChild(work_on.elements[i]);}}}else
{work_on.action=work_on.action.replace('?','&');work_on.action=work_on.action.replace(new RegExp('&'+prefix.replace('_','\_')+'\d+=1$','g'),'');work_on.action=work_on.action.replace('&','?');}
for(i=0;i<elements.length;i++)
{if((elements[i].type=='checkbox')&&(elements[i].name.substring(0,prefix.length)==prefix)&&(elements[i].checked))
append+=(((append=='')&&(work_on.action.indexOf('?')==-1)&&(work_on.action.indexOf('/pg/')==-1)&&(!get))?'?':'&')+elements[i].name+'=1';}
if(get)
{var bits=append.split('&');for(i=0;i<bits.length;i++)
{if(bits[i]!='')
{var hidden=document.createElement('input');hidden.name=bits[i].substr(0,bits[i].indexOf('=1'));hidden.value='1';hidden.type='hidden';work_on.appendChild(hidden);}}}else
{work_on.action+=append;}
return append!='';}
function markAllTopics()
{var e=document.getElementsByTagName('input');var i;for(i=0;i<e.length;i++)
{if((e[i].type=='checkbox')&&(e[i].name.substr(0,5)=='mark_'))
{e[i].checked=!e[i].checked;e[i].onclick();}}}
function setOpacity(element,fraction)
{if((typeof element.faderKey!='undefined')&&(element.faderKey)&&(thumbFadeTimers[element.faderKey]))
{try
{window.clearTimeout(thumbFadeTimers[element.faderKey]);}
catch(e){};thumbFadeTimers[element.faderKey]=null;}
if(typeof element.style.opacity!='undefined')
{element.style.opacity=fraction;return;}
if((typeof element.filters!='undefined')&&(typeof element.filters!='unknown')&&(typeof element.filters['DXImageTransform.Microsoft.Alpha']!='undefined'))
{element.filters['DXImageTransform.Microsoft.Alpha'].opacity=fraction*100;element.filters['DXImageTransform.Microsoft.Alpha'].enabled=1;}else
{element.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity='"+parseInt(fraction*100)+"')";}
if(element.src)fixImage(element,true);}
function fixImages()
{for(var i=0;i<document.images.length;i++)fixImage(document.images[i]);addEventListenerAbstract(window,"beforeprint",function(){unfixImages();});addEventListenerAbstract(window,"afterprint",function(){fixImages();});}
function unfixImages()
{for(var i=0;i<document.images.length;i++)unfixImage(document.images[i]);var inputs=document.getElementsByTagName('input');for(var i=0;i<inputs.length;i++)unfixImage(inputs[i]);}
function unfixImage(img,keep_src)
{if(typeof img.origsrc!='undefined')
{if(!keep_src)img.src=img.origsrc;img.filters.filter='';img.style.filter=null;}}
function refixImage(img)
{unfixImage(img,true);fixImage(img);}
function fixImage(img,force_ie8)
{if(force_ie8)
{if(!browser_matches('no_alpha_ie_with_opacity'))return;}else
{if(!browser_matches('no_alpha_ie'))return;}
if(!img.src)return;if(window.location.href.indexOf('keep_noiepng')!=-1)return;if(img.className.indexOf('no_alpha')!=-1)return;var imgName=img.src.toUpperCase();if((imgName.substring(imgName.length-3,imgName.length)=="PNG")||(imgName.indexOf(".PHP")!=-1))
{if((!img.style.filter)||(img.style.filter=='null'))
{img.origsrc=img.src;img.width=img.width;img.height=img.height;if((img.currentStyle)&&((browser_matches('ie5'))||(!img.width)||(!img.height)||(((img.currentStyle['max-width'])||(img.currentStyle['max-height'])))))
{if(!img.style.width)
{var width=findWidth(img);var dif=-sts(abstractGetComputedStyle(img,'padding-left'))-sts(abstractGetComputedStyle(img,'padding-right'));if((img.currentStyle['max-width'])&&((width==0)||(sts(img.currentStyle['max-width'])<width)))width=sts(img.currentStyle['max-width']);if((img.currentStyle['width'])&&((width==0)||((sts(img.currentStyle['width'])!=0)&&(sts(img.currentStyle['width'])<width))))width=sts(img.currentStyle['width']);if(width!=0)img.style.width=(width+dif)+'px';}
if(!img.style.height)
{var height=findHeight(img);var dif=-sts(abstractGetComputedStyle(img,'padding-top'))-sts(abstractGetComputedStyle(img,'padding-bottom'));if((img.currentStyle['max-height'])&&((height==0)||(sts(img.currentStyle['max-height'])<height)))height=sts(img.currentStyle['max-height']);if((img.currentStyle['height'])&&((height==0)||((sts(img.currentStyle['height'])!=0)&&(sts(img.currentStyle['height'])<height))))height=sts(img.currentStyle['height']);if(height!=0)img.style.height=(height+dif)+'px';}}
img.src="http://deanager.co.uk".replace(/^http:/,window.location.protocol)+"/themes/default/images/blank.gif";var new_filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.origsrc+"',sizingMethod='"+(((img.style.width)||(img.style.height))?'scale':'image')+"')";img.style.filter=new_filter;img.style.marginLeft=(sts(abstractGetComputedStyle(img,'padding-left'))+sts(abstractGetComputedStyle(img,'margin-left')))+'px';img.style.marginRight=(sts(abstractGetComputedStyle(img,'padding-right'))+sts(abstractGetComputedStyle(img,'margin-right')))+'px';img.style.marginTop=(sts(abstractGetComputedStyle(img,'padding-top'))+sts(abstractGetComputedStyle(img,'margin-top')))+'px';img.style.marginBottom=(sts(abstractGetComputedStyle(img,'padding-bottom'))+sts(abstractGetComputedStyle(img,'margin-bottom')))+'px';if((img.title)&&(img.title!=''))
{var title=img.title;img.attachEvent("onmousemove",function(){repositionTooltip(img,event);});img.attachEvent("onmouseout",function(){deactivateTooltip(img,event);});img.attachEvent("onmouseover",function(){activateTooltip(img,event,title,'auto');});img.title="";}}}}
function addEventListenerAbstract(element,the_event,func,capture)
{if(element)
{if((element==window)&&(the_event=='load')&&(pageLoaded))
{func();return true;}
if(typeof element.simulated_events=='undefined')element.simulated_events=[];try
{if(typeof element.simulated_events[the_event]=='undefined')element.simulated_events[the_event]=[];element.simulated_events[the_event].push(func);}
catch(e)
{element.simulated_events=[];element.simulated_events[the_event]=[];element.simulated_events[the_event].push(func);}
if(typeof element.addEventListener!='undefined')
{if(the_event=='load')
{element.addEventListener('DOMContentLoaded',function(){window.ranD=true;func();},capture);return element.addEventListener(the_event,function(){if(!window.ranD)func();},capture);}
if(the_event=='real_load')the_event='load';return element.addEventListener(the_event,func,capture);}
else if(typeof element.attachEvent!='undefined')
{if(the_event=='real_load')the_event='load';return element.attachEvent("on"+the_event,func);}
else return false;}
else return false;}
function cancelBubbling(event,for_element)
{if(!for_element)for_element='';if(!event)event=window.event;var src=event.srcElement?event.srcElement:event.target;if(!src)return false;if((src.nodeName)&&(src.nodeName.toLowerCase()==for_element)||(for_element==''))
{if(typeof event.stopPropagation!='undefined')event.stopPropagation();event.cancelBubble=true;return true;}
return false;}
function maintain_theme_in_link(url)
{if(url.indexOf('&utheme=')!=-1)return url;if(url.indexOf('?utheme=')!=-1)return url;if(url.indexOf('&keep_theme=')!=-1)return url;if(url.indexOf('?keep_theme=')!=-1)return url;if(typeof window.ocp_theme=='undefined')window.ocp_theme='ffcc66';if(typeof window.ocp_theme!='undefined')
{if(url.indexOf('?')==-1)url+='?';else url+='&';url+='utheme='+window.encodeURIComponent(window.ocp_theme);}
return url;}
function keep_stub(starting_query_string)
{var to_add='',i;var search=(window.location.search=='')?'?':window.location.search.substr(1);var bits=search.split('&');var done_session=false;var gap_symbol;for(i=0;i<bits.length;i++)
{if(bits[i].substr(0,5)=='keep_')
{gap_symbol=(((to_add=='')&&(starting_query_string))?'?':'&');to_add=to_add+gap_symbol+bits[i];if(bits[i].substr(0,13)=='keep_session=')done_session=true;}}
if(!done_session)
{var session=ReadCookie('ocp_session');gap_symbol=(((to_add=='')&&(starting_query_string))?'?':'&');if(session)to_add=to_add+gap_symbol+'keep_session='+window.encodeURIComponent(session);}
return to_add;}
function getInnerHTML(element,outerToo){function Copy(srcDomNode,level){var out='';if(typeof level=="undefined")level=1;if(level>1){if(srcDomNode.nodeType==1){var thisNode=document.createElement(srcDomNode.nodeName);out+='<'+thisNode.nodeName;var cleaned_attributes=[];for(var a=0,attr=srcDomNode.attributes.length;a<attr;a++){var aName=srcDomNode.attributes[a].name,aValue=srcDomNode.attributes[a].value;cleaned_attributes[aName]=aValue;}
if(browser_matches('no_alpha_ie'))
{if((typeof cleaned_attributes['src']!='undefined')&&(typeof cleaned_attributes['origsrc']!='undefined'))
{cleaned_attributes['src']=cleaned_attributes['origsrc'];cleaned_attributes['width']=null;cleaned_attributes['height']=null;cleaned_attributes['origsrc']=null;}}
for(var a=0,attr=srcDomNode.attributes.length;a<attr;a++){var aName=srcDomNode.attributes[a].name,aValue=cleaned_attributes[aName];if((aValue!==null)&&(aName!='complete')&&(aName!='simulated_events')&&(((aName.substr(0,2)!='on')&&(aName!='cite')&&(aName!='nofocusrect')&&(aName!='width')&&(aName!='height')&&(aName!='cache')&&(aName!='dataFld')&&(aName!='dataFormatAs')&&(aName!='dataSrc')&&(aName!='implementation')&&(aName!='style'))||(aValue!='null'))&&((aName!='start')||(aValue!='fileopen'))&&((aName!='loop')||(aValue!='1'))&&(((aName!='width')&&(aName!='height')&&(aName!='tabIndex')&&(aName!='hspace')&&(aName!='vspace'))||(aValue!='0'))&&(((aName!='noWrap')&&(aName!='readOnly')&&(aName!='indeterminate')&&(aName!='hideFocus')&&(aName!='disabled')&&(aName!='isMap'))||(aValue!='false'))&&((aName!='contentEditable')||(aValue!='inherit'))&&(((aName.substr(0,6)!='border')&&(aName!='dateTime')&&(aName!='scope')&&(aName!='clear')&&(aName!='bgColor')&&(aName!='vAlign')&&(aName!='chOff')&&(aName!='ch')&&(aName!='height')&&(aName!='width')&&(aName!='axis')&&(aName!='headers')&&(aName!='background')&&(aName!='accept')&&(aName!='language')&&(aName!='longDesc')&&(aName!='border')&&(aName!='dataFld')&&(aName!='dataFormatAs')&&(aName!='dataSrc')&&(aName!='lang')&&(aName!='id')&&(aName!='name')&&(aName!='dir')&&(aName!='accessKey')&&(aName!='dynsrc')&&(aName!='vrml')&&(aName!='align')&&(aName!='useMap')&&(aName!='lowsrc'))||(aValue!='')))
out+=' '+aName+'="'+escape_html(aValue)+'"';}
if(srcDomNode.childNodes.length>0)
{out+='>';for(var i=0,j=srcDomNode.childNodes.length;i<j;i++)
{if((srcDomNode.childNodes[i].id!='_firebugConsole')&&(srcDomNode.childNodes[i].type!='application/x-googlegears'))
out+=Copy(srcDomNode.childNodes[i],level+1);}
out+='</'+thisNode.nodeName+'>';}else
{out+=' />';}}
else if(srcDomNode.nodeType==3){out+=(srcDomNode.nodeValue?srcDomNode.nodeValue:"");}
else if(srcDomNode.nodeType==4){out+=(srcDomNode.nodeValue?"<![CDATA["+srcDomNode.nodeValue+"]]":"");}}else
{for(var i=0,j=srcDomNode.childNodes.length;i<j;i++)
{if((srcDomNode.childNodes[i].id!='_firebugConsole')&&(srcDomNode.childNodes[i].type!='application/x-googlegears'))
out+=Copy(srcDomNode.childNodes[i],level+1);}}
return out;}
return Copy(element,outerToo?2:1);}
function EntitiesToUnicode(din)
{if((!din.replace)||(din.indexOf('&')==-1))return din;if(typeof window.entity_rep_reg=='undefined')
{var reps={'amp':38,'gt':62,'lt':60,'quot':34,'hellip':8230,'middot':183,'ldquo':8220,'lsquo':8216,'rdquo':8221,'rsquo':8217,'mdash':8212,'ndash':8211,'nbsp':160,'times':215,'euro':8364,'pound':163,'bull':8226,'copy':169,'trade':8482,'dagger':8224,'yen':165,'laquo':171,'raquo':187,'larr':8592,'rarr':8594,'uarr':8593,'darr':8595};window.entity_rep_reg={};for(var i in reps)
{window.entity_rep_reg['&#'+reps[i]+';']=new RegExp('&'+i+';','g');}}
for(var x in window.entity_rep_reg)
{din=din.replace(window.entity_rep_reg[x],x);}
return din;}
function Load(xmlString){var xml;if(typeof DOMParser!="undefined")xml=(new DOMParser()).parseFromString(xmlString,"application/xml");else{var ieDOM=["MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];for(var i=0;i<ieDOM.length&&!xml;i++){try{xml=new ActiveXObject(ieDOM[i]);xml.loadXML(xmlString);}
catch(e){}}}
return xml;}
function Copy(domNode,xmlDoc,level){if(typeof level=="undefined")level=1;if(level>1){if(xmlDoc.nodeName.toUpperCase()=='SCRIPT')
{var text=(xmlDoc.nodeValue?xmlDoc.nodeValue:(xmlDoc.textContent?xmlDoc.textContent:(xmlDoc.text?xmlDoc.text:"")));try
{eval(text);}
catch(ignore){};return;}
if(xmlDoc.nodeType==1){var thisNode=domNode.ownerDocument.createElement(xmlDoc.nodeName);for(var a=0,attr=xmlDoc.attributes.length;a<attr;a++){var aName=xmlDoc.attributes[a].name,aValue=xmlDoc.attributes[a].value,evt=(aName.substr(0,2)=="on");if(!evt){switch(aName){case"class":thisNode.className=aValue;break;case"for":thisNode.htmlFor=aValue;break;default:thisNode.setAttribute(aName,aValue);}}else thisNode[aName]=eval('var x=function(event) { '+aValue+' }; x;');}
domNode=domNode.appendChild(thisNode);}
else if(xmlDoc.nodeType==3){var text=(xmlDoc.nodeValue?xmlDoc.nodeValue:(xmlDoc.textContent?xmlDoc.textContent:(xmlDoc.text?xmlDoc.text:"")));var test=text.replace(/^\s*|\s*$/g,"");if(test.indexOf("<!--")!=0&&(test.length<=3||test.indexOf("-->")!=(test.length-3)))
{if((domNode.nodeName=='STYLE')&&(!domNode.ownerDocument.createCDATASection))
{domNode.cssText=text;}else
{domNode.appendChild(domNode.ownerDocument.createTextNode(text));}
domNode=null;}}
else if(xmlDoc.nodeType==4){var text=(xmlDoc.nodeValue?xmlDoc.nodeValue:(xmlDoc.textContent?xmlDoc.textContent:(xmlDoc.text?xmlDoc.text:"")));if((domNode.nodeName=='STYLE')&&(!domNode.ownerDocument.createCDATASection))
{domNode.cssText=text;}else
{domNode.appendChild(domNode.ownerDocument.createTextNode(text));}
domNode=null;}}
if(domNode)
{for(var i=0,j=xmlDoc.childNodes.length;i<j;i++)
{if((xmlDoc.childNodes[i].id!='_firebugConsole')&&(xmlDoc.childNodes[i].type!='application/x-googlegears'))
Copy(domNode,xmlDoc.childNodes[i],level+1);}}}
function setInnerHTML(element,tHTML,append){if((document.write)&&(typeof element.innerHTML!="undefined")&&(!document.xmlVersion))
{var clone=element.cloneNode(true);try
{if(append)
{element.innerHTML+=tHTML;}else
{window.js_runs_test=false;tHTML+='<script type="text/javascript">window.js_runs_test=true;</script>';element.innerHTML=tHTML;var scripts=element.getElementsByTagName('script'),text;for(var i=0;i<scripts.length;i++)
{text=(scripts[i].nodeValue?scripts[i].nodeValue:(scripts[i].textContent?scripts[i].textContent:(scripts[i].text?scripts[i].text.replace(/^<script[^>]*>/,''):"")));window.setTimeout(function(text){return function(){if(!window.js_runs_test)
eval(text);}}(text),0);}}
window.setTimeout(function(){fixImagesIn(element);},500);return;}
catch(ignore){};}
tHTML=EntitiesToUnicode(tHTML);tHTML="<root>"+tHTML+"</root>";var xmlDoc=Load(tHTML);if(element&&xmlDoc){if(!append)while(element.lastChild)element.removeChild(element.lastChild);Copy(element,xmlDoc.documentElement);window.setTimeout(function(){fixImagesIn(element);},500);}}
function fixImagesIn(element)
{if(typeof element.getElementsByTagName=='undefined')return;if(typeof element.getElementsByTagName=='unknown')return;var imgs=element.getElementsByTagName('img');for(var i=0;i<imgs.length;i++)fixImage(imgs[i]);if(element.nodeName.toLowerCase()=='img')fixImage(element);}
function carefulImportNode(node)
{var imported;try{imported=(document.importNode)?document.importNode(node,true):null;}catch(e){};if(!imported)imported=node;return imported;}
function click_link(link)
{var cancelled=false;if(typeof document.createEvent!='undefined')
{var event=document.createEvent('MouseEvents');event.initMouseEvent('click',true,true,window,0,0,0,0,0,false,false,false,false,0,null);cancelled=!link.dispatchEvent(event);}
else if(typeof link.fireEvent!='undefined')
{cancelled=!link.fireEvent('onclick');}
if(!cancelled)
{if(link.getAttribute('target'))window.open(link.href,link.getAttribute('target'));window.location=link.href;}}
var overlay_zIndex=1000;function open_link_as_overlay(ob,width,height)
{if(!width)width=900;if(!height)height=700;faux_open(ob.href+((ob.href.indexOf('?')==-1)?'?':'&')+'wide_high=1',null,'width='+width+';height='+height,'_top');return false;return true;}
function open_image_into_lightbox(a)
{var lightbox_code='<p class="ajax_tree_list_loading"><img id="lightbox_image" class="inline_image_2" src="http://deanager.co.uk/themes/default/images/bottom/loading.gif" /></p><p class="community_block_tagline">[ <a href="'+escape_html(a.href)+'" target="_blank" title="See full image (this link will open in a new window)">See full image</a> ]</p>';var myLightbox={type:"lightbox",text:lightbox_code,yes_button:"Close",width:450,height:300};var modal=new ModalWindow();modal.open(myLightbox);window.setTimeout(function(){var img=modal.topWindow.document.createElement('img');img.onload=function()
{var real_width=img.width;var width=real_width;var real_height=img.height;var height=real_height;var max_width=modal.topWindow.getWindowWidth()-20;var max_height=modal.topWindow.getWindowHeight()-180;if(width>max_width)
{width=max_width;height=window.parseInt(max_width*real_height/real_width-1);}
if(height>max_height)
{width=window.parseInt(max_height*real_width/real_height-1);height=max_height;}
modal.resetDimensions(width,height);var sup=modal.topWindow.document.getElementById('lightbox_image').parentNode;img.className='no_alpha';img.width=width;img.height=height;sup.removeChild(sup.childNodes[0]);sup.appendChild(img);sup.className='';sup.style.textAlign='center';sup.style.overflow='hidden';}
img.src=a.href;},0);}
function fauxmodal_confirm(question,callback,title)
{if(!title)title='Are you sure you want to proceed?';var myConfirm={type:"confirm",text:escape_html(question),yes_button:"Yes",no_button:"No",title:title,yes:function(){callback(true);},no:function(){callback(false);},width:450};new ModalWindow().open(myConfirm);}
function fauxmodal_alert(notice,callback,title)
{if(!callback)callback=function(){};if(!title)title='Message';var myAlert={type:"alert",text:escape_html(notice),yes_button:"Okay",width:600,yes:callback,title:title};new ModalWindow().open(myAlert);}
function fauxmodal_prompt(question,defaultValue,callback,title,input_type)
{var myPrompt={type:"prompt",text:escape_html(question),yes_button:"Okay",cancel_button:"Cancel",defaultValue:defaultValue,title:title,yes:function(value){callback(value);},cancel:function(){callback(null);},width:450};if(input_type)myPrompt.input_type=input_type;new ModalWindow().open(myPrompt);}
function faux_showModalDialog(url,name,options,callback,target,cancel_text)
{if(!callback)callback=function(){};var width=null,height=null,scrollbars=null,unadorned=null;if(!cancel_text)cancel_text="Cancel";if(options)
{var parts=options.split(/[;,]/g);for(var i=0;i<parts.length;i++)
{var bits=parts[i].split('=');if(typeof bits[1]!='undefined')
{if((bits[0]=='dialogWidth')||(bits[0]=='width'))
width=window.parseInt(bits[1].replace(/px$/,''));if((bits[0]=='dialogHeight')||(bits[0]=='height'))
height=window.parseInt(bits[1].replace(/px$/,''));if(((bits[0]=='resizable')||(bits[0]=='scrollbars'))&&scrollbars!==true)
scrollbars=((bits[1]=='yes')||(bits[1]=='1'));if(bits[0]=='unadorned')unadorned=((bits[1]=='yes')||(bits[1]=='1'));}}}
var myFrame={type:"iframe",finished:function(value){callback(value);},name:name,width:width,height:height,scrollbars:scrollbars,href:url};myFrame.cancel_button=(unadorned!==true)?cancel_text:null;if(target)myFrame.target=target;new ModalWindow().open(myFrame);}
function faux_open(url,name,options,target,cancel_text)
{if(!cancel_text)cancel_text="Close";faux_showModalDialog(url,name,options,null,target,cancel_text);}
function ModalWindow()
{return{box:null,returnValue:null,topWindow:null,open:function(){var options=arguments[0]||{};var defaults={'type':"alert",'opacity':"0.5",'width':null,'height':'auto','title':"",'text':"",'yes_button':"Yes",'no_button':"No",'cancel_button':"Cancel",'yes':null,'no':null,'finished':null,'cancel':null,'href':null,'scrollbars':null,'defaultValue':null,'target':'_self','input_type':'text'};this.topWindow=window.top;if(this.topWindow.opener)this.topWindow=this.topWindow.opener;this.topWindow=this.topWindow.top;for(var key in defaults){this[key]=(typeof options[key]!="undefined")?options[key]:defaults[key];}
this.close(this.topWindow);this.initOverlay();this.initBox();},close:function(win){var bi=this.topWindow.document.getElementById('body_inner');if(this.box){this.remove(this.box,win);this.box=null;if(bi)
{this.topWindow.setOpacity(bi,1.0);}}
if(this.type=="prompt")this.removeEvent(bi.parentNode,"click",this.clickout_cancel);if(this.type=="iframe")this.removeEvent(bi.parentNode,"click",this.clickout_finished);if(this.type=="alert"||this.type=="lightbox")this.removeEvent(bi.parentNode,"click",this.clickout_yes);this.removeEvent(document,"keyup",this.keyup);this.opened=false;},option:function(method){var win=this.topWindow;if(this[method]){if(this.type=="prompt"){this[method](this.input.value);}
else if(this.type=="iframe"){this[method](this.returnValue);}
else this[method]();}
this.close(win);},resetDimensions:function(width,height){var dim=this.getPageSize();var boxWidth=((width)?(width+8):(dim.pageWidth/4))+"px";var extra_box_height=(this.type=="iframe")?160:120;if(this.cancel_button===null)extra_box_height=0;var boxHeight=(typeof height=="string"||height===null||this.type=="iframe")?"auto":(height+extra_box_height)+"px";var boxPosVCentre=(typeof height=="string"||height===null||this.type=="iframe")?((this.type=="iframe")?20:150):((dim.windowHeight/2.5)-(parseInt(boxHeight)/2));if(boxPosVCentre<20)boxPosVCentre=20;var boxPosHCentre=((dim.pageWidth/2)-(parseInt(boxWidth)/2));var boxPosTop=(boxPosVCentre)+"px";var boxPosLeft=boxPosHCentre+"px";this.width=width;this.height=height;this.box.style.width=boxWidth;this.box.style.height=boxHeight;this.box.style.top=boxPosTop;this.box.style.left=boxPosLeft;},initBox:function(){this.box=this.element("div",{'class':'medborder medborder_box overlay','styles':{'position':browser_matches('ie_old')?"absolute":"fixed",'zIndex':this.topWindow.overlay_zIndex++,'overflow':(this.type=="iframe")?"auto":"hidden",'borderRadius':"15px"}});this.resetDimensions(this.width,this.height);this.inject(this.box);var container=this.element("div",{'class':"standardbox_main_classic",'styles':{'width':"auto",'height':"auto"}});var overlay_header=null;if(this.title!=''||this.type=="iframe"){overlay_header=this.element("h3",{'html':this.title,'styles':{'display':(this.title=="")?"none":"block"}});container.appendChild(overlay_header);}
if(this.text!=''){if(this.type=="prompt")
{var p=this.element("p");p.appendChild(this.element("label",{'for':"overlay_prompt",'html':this.text}));container.appendChild(p);}else
{container.appendChild(this.element("p",{'html':this.text}));}}
var buttonContainer=this.element("div",{'class':"proceed_button"});var _this=this;this.clickout_cancel=function(){_this.option('cancel');};this.clickout_finished=function(){_this.option('finished');};this.clickout_yes=function(){_this.option('yes');};this.keyup=function(e){if(!e)e=window.event;var keyCode=(e)?(e.which||e.keyCode):null;if(keyCode==13){_this.option('yes');}};this.addEvent(this.box,"click",function(e){cancelBubbling(e);});switch(this.type){case"iframe":var iframe=this.element("iframe",{'frameBorder':"0",'scrolling':(this.scrollbars===false)?"no":"auto",'title':"",'name':"overlay_iframe",'id':"overlay_iframe",'src':this.href,'allowtransparency':"true",'styles':{'width':this.width?(this.width+'px'):"100%",'height':this.height?(this.height+'px'):"50%"}});container.appendChild(iframe);if(this.cancel_button)
{var button=this.element("button",{'html':this.cancel_button,'class':"button_pageitem"});this.addEvent(button,"click",function(){_this.option('finished');});buttonContainer.appendChild(button);container.appendChild(this.element("hr",{'class':'spaced_rule'}));container.appendChild(buttonContainer);}
var bi=this.topWindow.document.getElementById('body_inner');if(bi)
window.setTimeout(function(){_this.addEvent(bi.parentNode,"click",_this.clickout_finished);},1000);this.addEvent(iframe,"load",function(){if(typeof iframe.contentWindow.document.getElementsByTagName('h1')[0]=='undefined'&&typeof iframe.contentWindow.document.getElementsByTagName('h2')[0]=='undefined')
{setInnerHTML(overlay_header,escape_html(iframe.contentWindow.document.title));overlay_header.style.display='block';}});var name=this.name;var makeFrameLikePopup=function(){if((iframe)&&(iframe.contentWindow)&&(iframe.contentWindow.document)&&(iframe.contentWindow.document.body))
{iframe.contentWindow.document.body.style.background='none';iframe.contentWindow.document.body.style.backgroundColor='transparent';var body_inner=iframe.contentWindow.document.getElementById('body_inner');if(body_inner)body_inner.id='';var main_website=iframe.contentWindow.document.getElementById('main_website');if(main_website)main_website.id='';var popup_spacer=iframe.contentWindow.document.getElementById('popup_spacer');if(popup_spacer)popup_spacer.id='';iframe.contentWindow.opener=window;var bases=iframe.contentWindow.document.getElementsByTagName('base');var baseElement;if(!bases[0])
{baseElement=iframe.contentWindow.document.createElement('base');if(iframe.contentWindow.document)
{var heads=iframe.contentWindow.document.getElementsByTagName('head');if(heads[0])
{heads[0].appendChild(baseElement);}}}else
{baseElement=bases[0];}
baseElement.target=_this.target;if(name&&iframe.contentWindow.name!=name)iframe.contentWindow.name=name;if(typeof iframe.contentWindow.faux_close=='undefined')
{iframe.contentWindow.faux_close=function(){if(iframe&&iframe.contentWindow&&typeof iframe.contentWindow.returnValue!='undefined')
_this.returnValue=iframe.contentWindow.returnValue;_this.option('finished');};}}};window.setTimeout(function(){illustrateFrameLoad(iframe,'overlay_iframe');makeFrameLikePopup();},0);window.setInterval(makeFrameLikePopup,100);break;case"lightbox":case"alert":if(this.yes!=false){var button=this.element("button",{'html':this.yes_button,'class':"button_pageitem"});this.addEvent(button,"click",function(){_this.option('yes');});var bi=this.topWindow.document.getElementById('body_inner');if(bi)
window.setTimeout(function(){_this.addEvent(bi.parentNode,"click",_this.clickout_yes);},1000);buttonContainer.appendChild(button);container.appendChild(buttonContainer);}
break;case"confirm":var button=this.element("button",{'html':this.yes_button,'class':"button_pageitem",'style':"font-weight: bold;"});this.addEvent(button,"click",function(){_this.option('yes');});buttonContainer.appendChild(button);var button=this.element("button",{'html':this.no_button,'class':"button_pageitem"});this.addEvent(button,"click",function(){_this.option('no');});buttonContainer.appendChild(button);container.appendChild(buttonContainer);break;case"prompt":this.input=this.element("input",{'name':"prompt",'id':"overlay_prompt",'type':this.input_type,'size':"40",'class':"wide_field",'value':this.defaultValue});var input_wrap=this.element("div",{'class':"constrain_field"});input_wrap.appendChild(this.input);container.appendChild(input_wrap);if(this.yes){var button=this.element("button",{'html':this.yes_button,'class':"button_pageitem",'style':"font-weight: bold;"});this.addEvent(button,"click",function(){_this.option('yes');});buttonContainer.appendChild(button);}
var button=this.element("button",{'html':this.cancel_button,'class':"button_pageitem"});this.addEvent(button,"click",function(){_this.option('cancel');});var bi=this.topWindow.document.getElementById('body_inner');if(bi)
window.setTimeout(function(){_this.addEvent(bi.parentNode,"click",_this.clickout_cancel);},1000);buttonContainer.appendChild(button);container.appendChild(buttonContainer);break;}
this.box.appendChild(container);if(this.input)this.input.focus();else if(typeof this.box.getElementsByTagName('button')[0]!='undefined')this.box.getElementsByTagName('button')[0].focus();if(this.yes||this.yes!=false)this.addEvent(document,"keyup",this.keyup);},initOverlay:function(){var bi=this.topWindow.document.getElementById('body_inner');if(bi)
{if(typeof window.nereidFade!='undefined')
{this.topWindow.setOpacity(bi,1.0);nereidFade(bi,30,30,-5);}else
{setOpacity(bi,0.3);}}},inject:function(el){this.topWindow.document.body.appendChild(el);},remove:function(el,win){if(!win)win=this.topWindow;win.document.body.removeChild(el);},element:function(){var tag=arguments[0],options=arguments[1];var el=this.topWindow.document.createElement(tag);var attributes={'html':'innerHTML','class':'className','for':'htmlFor','text':'innerText'};if(options){if(typeof options=="object"){for(var name in options){var value=options[name];if(name=="styles"){this.setStyles(el,value);}else if(name=="html"){setInnerHTML(el,value);}else if(attributes[name]){el[attributes[name]]=value;}else{el.setAttribute(name,value);}}}}
return el;},addEvent:function(o,e,f){if(o){if(o.addEventListener)o.addEventListener(e,f,false);else if(o.attachEvent)o.attachEvent('on'+e,f);}},removeEvent:function(o,e,f){if(o){if(o.removeEventListener)o.removeEventListener(e,f,false);else if(o.detachEvent)o.detachEvent('on'+e,f);}},setStyles:function(e,o){for(var k in o){this.setStyle(e,k,o[k]);}},setStyle:function(e,p,v){if(p=='opacity'){this.topWindow.setOpacity(e,v);}else{e.style[p]=v;}},getPageSize:function(){return{'pageWidth':this.topWindow.getWindowScrollWidth(this.topWindow),'pageHeight':this.topWindow.getWindowScrollHeight(this.topWindow),'windowWidth':this.topWindow.getWindowWidth(),'windowHeight':this.topWindow.getWindowHeight()};}};}
