/* 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 AJAX_REQUESTS=[];var AJAX_METHODS=[];var AJAX_TIMEOUTS=[];function do_ajax_field_test(url,post)
{if(!ajax_supported())return true;if(typeof window.keep_stub!='undefined')url=url+keep_stub();var xmlhttp=load_XML_doc(url,null,post);if((xmlhttp.responseText!='')&&(xmlhttp.responseText.replace(/[ \t\n\r]/g,'')!='0'))
{if(xmlhttp.responseText!='false')
{if(xmlhttp.responseText.length>1000)
{var error_window=window.open();if(error_window)
{error_window.document.write(xmlhttp.responseText);error_window.document.close();}}else
{window.alert(xmlhttp.responseText);}}
return false;}
return true;}
function ajax_form_submit(event,form,block_name,map)
{if(typeof window.cleverFindValue=='undefined')return true;cancelBubbling(event);var comcode='[block'+map+']'+block_name+'[/block]';var post='data='+window.encodeURIComponent(comcode);for(var i=0;i<form.elements.length;i++)
{post+='&'+form.elements[i].name+'='+window.encodeURIComponent(cleverFindValue(form,form.elements[i]));}
var request=load_XML_doc(maintain_theme_in_link('/data/comcode_convert.php'+keep_stub(true)),false,post);if((request.responseText!='')&&(request.responseText!=''))
{if(request.responseText!='false')
{var result_tags=request.responseXML.documentElement.getElementsByTagName("result");if((result_tags)&&(result_tags.length!=0))
{var result=result_tags[0];var xhtml=merge_text_nodes(result.childNodes);var element_replace=form;while(element_replace.className!='form_ajax_target')
{element_replace=element_replace.parentNode;if(!element_replace)return true;}
setInnerHTML(element_replace,xhtml);window.alert('Your action was successful.');return false;}}}
return true;}
function ajax_supported()
{if((typeof window.XMLHttpRequest!='undefined')||(typeof window.ActiveXObject!='undefined'))return true;return false;}
function load_XML_doc(url,callback__method,post)
{var synchronous=!callback__method;if((url.indexOf('://')==-1)&&(url.substr(0,1)=='/'))
{url=window.location.protocol+'//'+window.location.host+url;}
if((typeof window.AJAX_REQUESTS=="undefined")||(!window.AJAX_REQUESTS))return null;var index=AJAX_REQUESTS.length;AJAX_METHODS[index]=callback__method;if(typeof window.XMLHttpRequest!='undefined')
{AJAX_REQUESTS[index]=new XMLHttpRequest();if(!synchronous)AJAX_REQUESTS[index].onreadystatechange=process_request_changes;if(post)
{AJAX_REQUESTS[index].open('POST',url,!synchronous);AJAX_REQUESTS[index].setRequestHeader('Content-Type','application/x-www-form-urlencoded');AJAX_REQUESTS[index].send(post);}else
{AJAX_REQUESTS[index].open("GET",url,!synchronous);AJAX_REQUESTS[index].send(null);}}
else if(typeof window.ActiveXObject!='undefined')
{AJAX_REQUESTS[index]=new ActiveXObject("Microsoft.XMLHTTP");if(AJAX_REQUESTS[index])
{if(!synchronous)AJAX_REQUESTS[index].onreadystatechange=process_request_changes;if(post)
{AJAX_REQUESTS[index].open('POST',url,!synchronous);AJAX_REQUESTS[index].setRequestHeader('Content-Type','application/x-www-form-urlencoded');try{AJAX_REQUESTS[index].send(post);}catch(e){};}else
{AJAX_REQUESTS[index].open("GET",url,!synchronous);try{AJAX_REQUESTS[index].send();}catch(e){};}}}
if((typeof window.AJAX_REQUESTS=="undefined")||(!window.AJAX_REQUESTS))return null;var result=AJAX_REQUESTS[index];if(synchronous)
{AJAX_REQUESTS[index]=null;}
return result;}
function process_request_changes()
{if((typeof window.AJAX_REQUESTS=="undefined")||(!window.AJAX_REQUESTS))return;var i,result;for(i=0;i<AJAX_REQUESTS.length;i++)
{result=AJAX_REQUESTS[i];if((result!=null)&&(result.readyState)&&(result.readyState==4))
{AJAX_REQUESTS[i]=null;if((result.status)&&(result.status==200)||(result.status==500)||(result.status==400)||(result.status==401))
{var xml=handle_errors_in_result(result);if(xml)
{xml.validateOnParse=false;var ajax_result_frame=xml.documentElement;if(!ajax_result_frame)ajax_result_frame=xml;process_request_change(ajax_result_frame,i);}}
else
{try
{if((result.status==0)||(resul
