/* 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://www.simuscape.com".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.name='_site_opener';var preloader=new Image();var images=[];images[0]="http://www.simuscape.com/themes/SimuScape/images/menus/menu_bullet_hover.png";images[1]="http://www.simuscape.com/themes/default/images/menus/menu_bullet_expand_hover.png";images[2]="http://www.simuscape.com/themes/SimuScape/images/expand.png";images[3]="http://www.simuscape.com/themes/SimuScape/images/contract.png";images[4]="http://www.simuscape.com/themes/SimuScape/images/exp_con.png";images[5]="http://www.simuscape.com/themes/default/images/bottom/loading.gif";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('forms');if(!document.links)document.links=document.getElementsByTagName('a');if(typeof window.expandImages!='undefined')expandImages();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.12);fixImages();handleTextareaScrolling();SetCookie('js_on',1,120);if((!window.parent)||(window.parent==window))
{SetCookie('screen_width',getWindowWidth(),120);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(typeof window.scriptLoadStuffStaff!='undefined')scriptLoadStuffStaff();window.mouseX=0;window.mouseY=0;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);}}}
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((msg.indexOf('to call method UnnamedClass.toString')!=-1)||(msg.indexOf('ASSERT: node must have _DOMElement set')!=-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.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);}
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"><h4>Loading&hellip;</h4><img alt="" src="http://www.simuscape.com/themes/default/images/bottom/loading.gif" /></span>');document.body.appendChild(div);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.nereidFadeTimers!='undefined')&&(nereidFadeTimers[bi.faderKey]))
{window.clearTimeout(nereidFadeTimers[bi.faderKey]);nereidFadeTimers[bi.faderKey]=null;}
setOpacity(bi,1.0);}}
function checkFieldForBlankness(field,event)
{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=='')||(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.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;}
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 generate_question_ui(message,button_set,window_title,fallback_message)
{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')&&(!browser_matches('chrome')))
{var height=200;if(button_set.length>4)height+=5*(button_set.length-4);var timer=new Date().getTime();var url='http://www.simuscape.com/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();var result=window.showModalDialog(url,null,'dialogWidth=430;dialogHeight='+height+';status=no;unadorned=yes');var timer_now=new Date().getTime();if(timer_now-100>timer)
{if((typeof result=="undefined")||(result===null))return button_set[0];return result;}}
if(button_set.length==1)
{window.alert(fallback_message?fallback_message:message);return button_set[0];}else
if(button_set.length==2)
{var result=window.confirm(fallback_message?fallback_message:message);return result?button_set[1]:button_set[0];}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;var result=window.prompt(message,'');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];}
return null;}
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=='global_helper_panel'))
{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='360px';}
panel_right.className+=' horiz_help_panel';panel_right.parentNode.removeChild(panel_right);middle.parentNode.appendChild(panel_right);}}}}}
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='425px';if(global_message)global_message.style.marginRight='425px';for(i=0;i<middles.length;i++)
{middles[i].style.marginRight='425px';}
helper_panel_contents.style.display='block';if(typeof window.nereidFade!='undefined')
{setOpacity(helper_panel_contents,0.0);nereidFade(helper_panel_contents,100,30,4);}
SetCookie('hide_help_panel','0',100);helper_panel_toggle.onclick=function(){return help_panel(false);};helper_panel_toggle.childNodes[0].setAttribute('src','http://www.simuscape.com/themes/SimuScape/images/help_panel_hide.png');}else
{if(ReadCookie('hide_help_panel')=='')
{if(!window.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.'))return false;}
panel_right.style.width='26px';if(global_message)global_message.style.marginRight='16px';for(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://www.simuscape.com/themes/default/images/help_panel_show.png');}
return false;}
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(".simuscape.com"!="")extra=extra+";domain=.simuscape.com";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'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(_is_ie||is_gecko);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'ie_old':return is_ie_old;case'ie_new':return is_ie_new;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 confirm_session(jump_initial_test)
{if(typeof window.load_XML_doc=='undefined')return false;var url='/data/confirm_session.php';var ret=null;if(!jump_initial_test)
{require_javascript("javascript_ajax");if(typeof window.load_XML_doc!='undefined')ret=load_XML_doc(url+keep_stub(true),false);if(!ret)return false;}
var promptt="!";while(((!ret)||((ret.responseText!='')&&(ret.responseText)))&&(promptt!='')&&(promptt))
{promptt=window.prompt('Enter your password (please make sure nobody is watching first)','');if((window.load_XML_doc)&&(promptt)&&(promptt!=''))
ret=load_XML_doc(url,false,'login_username='+ret.responseText+'&password='+promptt+keep_stub());}
return ret.responseText==''||(!ret.responseText);}
function load_snippet(code,post)
{var title=getInnerHTML(document.getElementsByTagName('title')[0]);var metas=document.getElementsByTagName('link');var i;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(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',"http://www.simuscape.com".replace(/^http:/,window.location.protocol)+"/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="http://www.simuscape.com".replace(/^http:/,window.location.protocol)+"/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';}}}
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://www.simuscape.com/themes/SimuScape/images/exp_con.png"))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://www.simuscape.com/themes/SimuScape/images/exp_con.png";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://www.simuscape.com/themes/SimuScape/images/contract.png";refixImage(pic);}}}else
{if((type=='block')&&(itm.nodeName.toLowerCase()=='div')&&(!noAnimate)&&((!pic)||(pic.src.indexOf("themewizard.php")==-1)))
{if(pic)
{pic.src="http://www.simuscape.com/themes/SimuScape/images/exp_con.png";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://www.simuscape.com/themes/SimuScape/images/expand.png";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';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;itm.style.outline='0';if(pic)
{pic.src=(animateDif<0)?"http://www.simuscape.com/themes/SimuScape/images/expand.png":"http://www.simuscape.com/themes/SimuScape/images/contract.png";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';var head='<style type="text/css">',cssText='';for(var i=0;i<document.styleSheets.length;i++)
{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";}}}}
head+=cssText+'<\/style>';var de=window.frames[frame].document.documentElement;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 class="inline_image_2" src="http://www.simuscape.com/themes/default/images/bottom/loading.gif" 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 class="inline_image_2" src="http://www.simuscape.com/themes/default/images/bottom/loading.gif" alt="Loading&hellip;" /> Loading&hellip;<\/div><\/div>');}
var style=de.getElementsByTagName('style')[0];if((style)&&(style.styleSheet))style.styleSheet.cssText=cssText;var ifuob=window.top.document.getElementById('iframe_under');var extra=ifuob?((window!=window.top)?findPosY(ifuob):0):0;window.top.smoothScroll(findPosY(pf)+extra-leave_gap_top);}
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))
{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);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)||(best==150))best=win.document.body.offsetHeight;if((best>win.document.body.scrollHeight)||(win.document.body.scrollHeight==150))return best;return win.document.body.scrollHeight;}
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)window.alert(findPosX.caller);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)window.alert(findPosY.caller);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)
{if(targ.style.background!='#FF8888')
window.setTimeout(function(){targ.style.background=abstractGetComputedStyle(targ,'background');},400);targ.style.background='#FF8888';}
return;}
if((key=='-')&&(event.keyCode==189))key=189;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)
{if(!pageLoaded)return;if((typeof tooltip!='function')&&(tooltip==''))return;if(ac.getAttribute('title'))ac.setAttribute('title','');ac.is_over=true;ac.tooltip_on=false;ac.initial_width=width;if((ac.parentNode.nodeName.toLowerCase()=='a')&&(ac.parentNode.getAttribute('title')=='(this link will open in a new window)'))
ac.parentNode.setAttribute('title','');var children=document.getElementsByTagName('img');for(var i=0;i<children.length;i++)children[i].setAttribute('title','');var tooltipElement;if(typeof ac.tooltipId!='undefined')
{tooltipElement=document.getElementById(ac.tooltipId);setInnerHTML(tooltipElement,'');repositionTooltip(ac,myevent,bottom,true,tooltipElement);}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);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={'pageX':myevent.pageX,'pageY':myevent.pageY,'clientX':myevent.clientX,'clientY':myevent.clientY,'type':myevent.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);},no_delay?10:666);}
function repositionTooltip(ac,event,bottom,starting,tooltipElement)
{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'))
{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(top.frames[name])frame_window=top.frames[name];else if(typeof window.frames[name]!='undefined')frame_window=window.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(h+'px'!=frame_element.style.height)
{frame_element.style.height=((h>=minHeight)?h:minHeight)+'px';frame_window.onscroll=function(event){if(!event)event=window.event;if(event==null)return false;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');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);window.setTimeout(function(frame_name){return function(){window.parent.resizeFrame(frame_name);};}(frames[i].name),500);}}
if(and_subframes)
{frames=document.getElementsByTagName('iframe');for(var i=0;i<frames.length;i++)
if(frames[i].name!='')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)
{element.style.opacity=fraction;if((typeof element.filters!='undefined')&&(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]);var inputs=document.getElementsByTagName('input');for(var i=0;i<inputs.length;i++)fixImage(inputs[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;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://www.simuscape.com".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,command,capture)
{if(element)
{if(typeof element.simulated_events=='undefined')element.simulated_events=[];if(typeof element.simulated_events[the_event]=='undefined')element.simulated_events[the_event]=[];element.simulated_events[the_event].push(command);if(typeof element.addEventListener!='undefined')
{return element.addEventListener(the_event,command,capture);}
else if(typeof element.attachEvent!='undefined')
{return element.attachEvent("on"+the_event,command);}
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.nodeName.toLowerCase()==for_element)||(for_element==''))
{if(typeof event.stopPropagation!='undefined')event.stopPropagation();event.cancelBubble=true;return true;}
return false;}
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.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++)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++)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.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);if(xmlDoc.nodeName.toUpperCase()=='SCRIPT')
{var text=(xmlDoc.nodeValue?xmlDoc.nodeValue:(xmlDoc.textContent?xmlDoc.textContent:(xmlDoc.text?xmlDoc.text:"")));try
{eval(text);}
catch(ignore){};}}
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++)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
{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:"")));eval(text);}}
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;var imgs=element.getElementsByTagName('img');for(var i=0;i<imgs.length;i++)fixImage(imgs[i]);if(element.nodeName.toLowerCase()=='img')fixImage(element);}