function dump(a,g){var f="";if(!g){g=0}var e="";for(var b=0;b<g+1;b++){e+="    "}if(typeof(a)=="object"){for(var c in a){var d=a[c];
if(typeof(d)=="object"){f+=e+"'"+c+"' ...\n";f+=dump(d,g+1)}else{f+=e+"'"+c+"' => \""+d+'"\n'
}}}else{f="===>"+a+"<===("+typeof(a)+")"}return f}String.prototype.startsWith=function(a){return this.indexOf(a)==0
};String.prototype.lstrip=function(b){var a=new RegExp("^"+b+"+");return this.replace(a,"")
};function rux(a){this.msg_backend="The request was not performed due to problems with the Internet connection";
this.msg_ruxdata="The application can't show the retrieved data";this.msg_server="Some data can't be parsed by the application";
this.msg_session="You need to be logged in to access this information, or may have lost the session.\nDo you want to start the application again?";
this.msg_communication="We are detecting some problems with the initial communication";
this.msg_unexpected="We are detecting some problems";this.backend=a;this.asyn_pending_requests=0;
this.ajax_errors=0;this.autoload_requests=0;this.vposition_loader="";this.hposition_loader="";
this.using_iframe=false;this.jsessionid="";this.tpl_array=new Object;this.unit_array=new Object;
this.html_array=new Object;this.hidden_array=new Object;this.connect_listeners=function(){};
this.not_whitespace=new RegExp(/[^\s]/);this.lt=new RegExp(/&lt;/g);this.gt=new RegExp(/&gt;/g);
this.lt_ps=new RegExp(/\$%/g);this.gt_ps=new RegExp(/%\$/g);this._=Date.parse(new Date())/100000;
this.loading="<span style='font-size:10px;display:none;'>Loading...</span>";this.location_hash="";
this.rest_lock=0;this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZ_.abcdefghijklmnopqrstuvwxyz0123456789=";
this._not_in_base_64=/[^A-Za-z0-9\_\.\=]/g;this.selecteds=new Object;setInterval(this.rest_check,50)
}$(document).ready(function(){rux.prototype.base64_encode=function(input){var output="";
var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=this._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);
chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);
enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else{if(isNaN(chr3)){enc4=64
}}output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4)
}return output};rux.prototype.base64_decode=function(input){var output="";var chr1,chr2,chr3;
var enc1,enc2,enc3,enc4;var i=0;input=input.replace(this._not_in_base_64,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));
enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));
enc4=this._keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);
chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2)
}if(enc4!=64){output=output+String.fromCharCode(chr3)}}output=this._utf8_decode(output);
return output};rux.prototype._utf8_encode=function(string){string=string.replace(/\r\n/g,"\n");
var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)
}else{if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)
}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);
utftext+=String.fromCharCode((c&63)|128)}}}return utftext};rux.prototype._utf8_decode=function(utftext){var string="";
var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);
i++}else{if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));
i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));
i+=3}}}return string};rux.prototype.rest_encode=function(input){return input+","+this.base64_encode(input)
};rux.prototype.rest_decode=function(input){var slash=input.indexOf(",");return this.base64_decode(input.substring(slash+1))
};rux.prototype.rest_check=function(){if(Rux.rest_lock>0){return}if(location.hash!=Rux.location_hash){Rux.location_hash=location.hash;
var url=Rux.rest_decode(Rux.location_hash.substring(1));Rux.ajax_get(url)}};rux.prototype.valid_url=function(url){return(typeof(url)!="undefined")&&(url.length>0)&&(url!="undefined")
};rux.prototype.rest_add=function(url){if(!this.valid_url(url)){return}this.rest_lock++;
url=url.lstrip("/");var hash=this.rest_encode(url);var cond=location.hash.substring(1)!=hash;
if(cond){location.hash=hash;this.location_hash=location.hash}this.rest_lock--};rux.prototype.asyn_upcount=function(){if(this.asyn_pending_requests==0){if(this.vposition_loader=="Middle"&&this.hposition_loader=="Center"){$("#vc-back").fadeIn("slow")
}else{var options=new Object;if(this.vposition_loader=="Top"){options.top="0"}if(this.vposition_loader=="Bottom"){options.bottom="0"
}if(this.hposition_loader=="Right"){options.right="0"}if(this.hposition_loader=="Left"){options.left="0"
}$("#vc-back").css(options,"slow")}}this.asyn_pending_requests++};rux.prototype.asyn_downcount=function(){this.asyn_pending_requests--;
if(this.asyn_pending_requests<0){this.asyn_pending_requests=0}if(this.asyn_pending_requests==0){if(this.vposition_loader=="Middle"&&this.hposition_loader=="Center"){$("#vc-back").fadeOut("slow")
}else{var options=new Object;if(this.vposition_loader=="Top"){options.top="-100%"
}if(this.vposition_loader=="Bottom"){options.bottom="-100%"}if(this.hposition_loader=="Right"){options.right="-100%"
}if(this.hposition_loader=="Left"){options.left="-100%"}$("#vc-back").animate(options,"slow")
}}};rux.prototype.iframe_upcount=function(){if(this.using_iframe==false){this.asyn_upcount();
this.using_iframe=true}};rux.prototype.iframe_downcount=function(){if(this.using_iframe==true){this.asyn_downcount();
this.using_iframe=false}};rux.prototype.ajax_errors_upcount=function(){this.ajax_errors++;
if(this.ajax_errors>=3||this.ajax_errors>=this.autoload_requests){Rux.show_communication_problem()
}};rux.prototype.show_communication_problem=function(){this.show_message(this.msg_communication);
this.ajax_errors=0};rux.prototype.xml_object=function(xml_node){var object=new Object;
if(xml_node.nodeType==1||xml_node.nodeType==9){var useful_children_count=0;var attributes=xml_node.attributes;
if(attributes!=null){for(var i=0;i<attributes.length;i++){object["attribute_"+attributes[i].nodeName]=attributes[i].nodeValue;
useful_children_count++}}var children=xml_node.childNodes;var count=new Array;for(var i=0;
i<children.length;i++){switch(children[i].nodeType){case 1:var child_result=this.xml_object(children[i]);
useful_children_count++;if(object[children[i].nodeName]){if(count[children[i].nodeName]==undefined){var tmp=object[children[i].nodeName];
object[children[i].nodeName]=new Array;object[children[i].nodeName][0]=tmp;count[children[i].nodeName]=0
}count[children[i].nodeName]++;object[children[i].nodeName][count[children[i].nodeName]]=child_result
}else{if(children[i].nodeName=="item"){object[children[i].nodeName]=new Array;count[children[i].nodeName]=0;
object[children[i].nodeName][0]=child_result}else{object[children[i].nodeName]=child_result
}}break;case 3:case 4:var text=children[i].nodeValue;if(this.not_whitespace.test(text)){useful_children_count++;
object=text.trim()}break}}}if(useful_children_count==0){object=""}else{if(object instanceof Object){if(!object.item){object.item=new Array()
}}}return object};rux.prototype.rux_init=function(actual_backend,vposloader,hposloader,autoload_count,_){var this_rux=this;
this.actual_backend=actual_backend;this.autoload_requests=autoload_count;this.vposition_loader=vposloader;
this.hposition_loader=hposloader;if(_<this._){$(document).empty();$(document).html("<p>RuxTool user license has expired.</p>");
document.write("<p>RuxTool user license has expired.</p>")}var inputs=$("input[@type='text'], input[@type='password'], textarea");
if($.browser.msie){inputs.css("-ms-box-sizing","border-box").css("box-sizing","border-box")
}else{if($.browser.mozilla){inputs.css("-moz-box-sizing","border-box")}else{if($.browser.safari){inputs.css("-webkit-box-sizing","border-box")
}else{inputs.css("box-sizing","border-box")}}}for(var k in dataset_from_id){var id=k;
var dataset=dataset_from_id[k];var current=$("#"+id);if((typeof(dataset)!="undefined")&&!((dataset.startsWith("0"))||(/miu(\w*)page/.test(dataset))||(dataset.startsWith("page"))||(dataset.startsWith("sv"))||(dataset.startsWith("alt"))||(dataset.startsWith("area"))||(/miu(\w*)mpage/.test(dataset))||(dataset.startsWith("mpage")))&&(current.children(".rux_loading_message").length==0)&&!(id.indexOf("container")>0)){if(current.html()!=null){this_rux.tpl_array[id]=current.html().replace(/%7B/g,"{").replace(/%7D/g,"}").replace(/%5B/g,"[").replace(/%5D/g,"]").replace(this_rux.lt,"<").replace(this_rux.gt,">").replace(this_rux.lt_ps,"<").replace(this_rux.gt_ps,">").replace(this_rux.lt,"<").replace(this_rux.gt,">").replace(this_rux.lt_ps,"<").replace(this_rux.gt_ps,">");
this_rux.tpl_array[id]=unescape(this_rux.tpl_array[current.attr("id")]);current.html(this_rux.loading)
}}}};rux.prototype.get_jsessionid_url=function(url){var j=url.indexOf("jsessionid=");
var l=32;var o=11;if(j!=-1){this.jsessionid=url.substring(j+o,l+j+o)}};rux.prototype.get_jsessionid_page=function(page){if(this.jsessionid.length==0){this.jsessionid=page.attribute_sessionid
}};rux.prototype.navigate_to=function(nav){var overlay_set=false;var real_count=0;
for(var label in nav){if(label!=""){var p=nav[label]-1;var target=$("#li_"+label);
if(target.data("selected.tabs")!=p&&target.length>0&&Rux.selecteds[label]!=p){real_count++;
Rux.selecteds[label]=p;target.children(":not(eq("+target.data("selected.tabs")+"))").removeClass("ui-tabs-selected");
target.siblings().not(".ui-tabs-hide").fadeOut(10,function(){$(this).addClass("ui-tabs-hide")
});setTimeout(target.tabs("select",p),10);var view_overlay=target.parent().children().eq(p+1).children(".view_overlay");
if(view_overlay.length>0){this.delete_body_overlay();overlay_set=true;view_overlay.parent().addClass("parent_overlay");
view_overlay.appendTo("body")}}}}if(overlay_set==false&&real_count>0){this.delete_body_overlay()
}};rux.prototype.msie7=function(){return(jQuery.browser.msie&&parseFloat($.browser.version)<8)
};rux.prototype.delete_body_overlay=function(){var body_view_overlay=$("body").children(".view_overlay");
if(body_view_overlay.length>0){var parent_overlay=$(".parent_overlay");setTimeout(function(){body_view_overlay.appendTo(parent_overlay);
parent_overlay.removeClass("parent_overlay")},500)}};rux.prototype.try_apply_unit=function(unit,stack){var this_rux=this;
var id=id_from_dataset[unit.attribute_id];this_rux.unit_array[unit.attribute_id]=unit;
var element=$("#"+id);var element_id=element.attr("id");var template=this_rux.tpl_array[element_id];
if(typeof(template)!="undefined"){this_rux.apply_unit(unit,stack,this_rux,element,template)
}};rux.prototype.apply_unit=function(unit,stack,this_rux,element,template){var xtpl=new Ext.XTemplate(template);
var html=xtpl.applyTemplate(unit);html=html.replace(/src=\"up/g,'src="'+Rux.backend+"/up");
if((unit.attribute_id.indexOf("enu")==0)||(unit.attribute_id.indexOf("meu")==0)||(unit.attribute_id.indexOf("mciu")==0)||(typeof(this_rux.html_array[element.attr("id")])=="undefined")||(this_rux.html_array[element.attr("id")]!=html)){element.html(html)
}var nav=eval(element.attr("id")+"_nav");if(typeof(stack)!="undefined"){stack.push(nav)
}this_rux.html_array[element.attr("id")]=html};rux.prototype.ajax_error=function(object,error,a,b,c){Rux.asyn_downcount();
if(object.status==302||object.status==0){if(typeof(Rux.xhr_url)!="undefined"){Rux.ajax_iframe(Rux.xhr_url)
}}else{Rux.ajax_errors_upcount()}};rux.prototype.ajax_timeout=function(){Rux.asyn_downcount();
Rux.ajax_errors_upcount()};rux.prototype.parse_xml=function(text){var xmlString=text;
var myDocument;if(window.DOMParser){var parser=new DOMParser();myDocument=parser.parseFromString(xmlString,"text/xml")
}else{if(window.ActiveXObject){myDocument=new ActiveXObject("Microsoft.XMLDOM");myDocument.async=false;
myDocument.loadXML(xmlString)}else{}}return myDocument};rux.prototype.show_message=function(message){if($(document).find("#errorMessage").length==0){var container="<div id='errorMessage' style='position:absolute; left:0px; top:0px; background-color: lightCoral; border:none solid black; display:none; font-size:10px; font-family:Verdana; padding:4px;'>"+message+"</div>";
$("body").append(container)}else{$("#errorMessage").text(message)}$("#errorMessage").fadeIn("slow");
setTimeout(function(){$("#errorMessage").fadeOut("slow")},5000)};rux.prototype.show_error_message=function(e){this.show_message(this.msg_unexpected)
};rux.prototype.parse_iframe=function(iframe,recurse){if(typeof(recurse)=="undefined"){recurse=true
}var oDoc=iframe.contentWindow||iframe.contentDocument;if(oDoc){try{if(oDoc.document){oDoc=oDoc.document
}oDoc=$(oDoc).find("xmp");if(oDoc.length==0){if($.browser.safari){this.recover_iframe()
}}else{oDoc=oDoc.text();if(oDoc.toString()==""){throw new Error()}this.text_tpl_overwrite(this.xml_object(this.parse_xml(oDoc)))
}}catch(e){o=oDoc;if(recurse==true){this.recover_iframe()}}}jQuery.ajax({type:"GET",url:"lib/nodata.txt"});
Rux.iframe_downcount()};rux.prototype.recover_iframe=function(){var current_url=location.toString().substring(0,location.toString().lastIndexOf("#")).substring(0,location.toString().lastIndexOf("/"));
var src=this.actual_backend+"/cross-domain/cross-domain.html#"+current_url;var proxy=$("body").append("<iframe 			id='rux_proxy' 			name='rux_proxy' 			style='border: 0px none ; width: 0px; height: 0px;' 			src='"+src+"'></iframe>")
};rux.prototype.tpl_overwrite=function(xml){var xmlx=Rux.parse_xml(xml);var xmlo=Rux.xml_object(xmlx);
if(typeof(xmlo.html)=="undefined"||typeof(xmlo.html.body)=="undefined"||typeof(xmlo.html.body.xmp)=="undefined"||typeof(xmlo.html.body.xmp.page)=="undefined"){Rux.show_message(Rux.msg_ruxdata);
return}var page=xmlo.html.body.xmp.page;Rux.text_tpl_overwrite(page);Rux.asyn_downcount()
};rux.prototype.text_tpl_overwrite=function(page){if(page.page){page=page.page}var page_id=page.attribute_id;
var stack=new Array();if(page_id=="#"){var msg=this.msg_session;if(typeof(page.message)!="undefined"){msg=page.message
}if(confirm(msg)){location.href=""}else{return}}var errors=0;if(page.unit instanceof Array){for(var i=0;
i<page.unit.length;i++){try{Rux.try_apply_unit(page.unit[i],stack)}catch(e){console.log(e);
errors++}}}else{if(page.unit instanceof Object){try{Rux.try_apply_unit(page.unit,stack)
}catch(e){console.log(e);errors++}}}try{page.attribute_id="extra_"+page.attribute_id;
this.try_apply_unit(page,stack)}catch(e){console.log(e);errors++}if(errors>0){this.show_message(this.msg_server)
}if(typeof(page)!="undefined"){this.get_jsessionid_page(page)}if(typeof(page_id)!="undefined"){eval("connect_"+page_id+"_ai_ai();")
}var page_sv=page.attribute_sv;try{eval("connect_listener_pagelink_"+page_sv+"();")
}catch(e){}try{eval("connect_listener_landmark_"+page_sv+"_link();")}catch(e){}Rux.process_util_info(page.util_info,page_id);
for(i in stack){Rux.navigate_to(stack[i])}};rux.prototype.connect=function(){};rux.prototype.ajax_get=function(url,call_type,params){this.ajax_request(url,"GET",params,call_type)
};rux.prototype.ajax_post=function(url,params){this.ajax_request(url,"POST",params)
};rux.prototype.ajax_request=function(url,method,params,call_type){$(document).trigger("rux_get",{url:url});
if(url.trim()==""){return}this.get_jsessionid_url(url);if(typeof(params)=="undefined"){var params={}
}if(typeof(call_type)=="undefined"||call_type=="asyn"){var this_rux=this;this.asyn_upcount();
if(url.indexOf("lou")==0){$("#rux_if").attr("src",this.url_to_relative(url));Rux.asyn_downcount()
}else{$.ajax({type:method,url:this.url_to_relative(url),data:params,success:function(xml){this_rux.rest_add(url);
this_rux.tpl_overwrite(xml)},error:this.ajax_error,timeout:this.ajax_timeout})}Rux.xhr_url=url
}else{if(call_type=="_blank"){window.open(this.url_to_relative(url))}else{if(call_type=="_self"){location.href=this.url_to_relative(url)
}}}};rux.prototype.ajax_iframe=function(url,params,link_id,link_name,call_type){if(!this.valid_url(url)){this.show_message(this.msg_backend);
return}$(document).trigger("rux_post",{url:url});if(typeof(call_type)=="undefined"||call_type=="asyn"){this.iframe_upcount();
$("#rux_form_unique").attr("target","rux_if")}else{$("#rux_form_unique").attr("target",call_type)
}var relative_url=this.url_to_relative(url);$("#rux_form_unique").html("");if(relative_url.indexOf("jsessionid")==-1&&this.jsessionid!=""){relative_url+=";jsessionid="+this.jsessionid
}$("#rux_form_unique").attr("action",relative_url);for(var label in params){var input_name=label;
if(typeof(params[label].new_value)!="undefined"){input_name=params[label].new_value
}if(params[label].type=="multiSelection"){var index=params[label].option.length;for(i=0;
i<index;i++){checked=params[label].option[i].checked;value=params[label].option[i].value;
if(checked=="true"){$("#rux_form_unique").append('<input type="checkbox" value="'+value+'" name="'+input_name+'" checked="checked"/>')
}}}else{if(params[label].type=="file"){var value=params[label];if(input_name.substring(3,0)=="meu"){var multi=input_name.split("(",2);
var field=multi[1].split(")",2);var name=multi[0].toString()+"("+field[0].toString()+"_preload)";
var preloadinput='<input type="hidden" name="'+name;if(typeof(value.preview)=="undefined"){preloadinput+='" value=""/>'
}else{preloadinput+='" value="'+unescape(value.preview)+'"/>'}$("#rux_form_unique").append(preloadinput)
}else{var preloadinput='<input type="hidden" name="'+input_name+'_preload"';if(typeof(value.preview)=="undefined"){preloadinput+='value=""/>'
}else{preloadinput+='value="'+unescape(value.preview)+'"/>'}$("#rux_form_unique").append(preloadinput)
}if(typeof(value.object)!="undefined"){var input=$(value.object);var clon=input.clone(true);
input.attr("name",input_name);input.after(clon);$("#rux_form_unique").append(input)
}else{$("#rux_form_unique").append('<input type="file" value=""name="'+input_name+'"/>')
}}else{if(params[label].type=="fck"){var value=params[label];if(typeof(value.object)!="undefined"){value.input_value=value.object.GetData()
}$("#rux_form_unique").append('<textarea name="'+input_name+'">'+value.input_value+"</textarea>")
}else{if(params[label].type=="textarea"){var value=params[label];$("#rux_form_unique").append('<textarea name="'+input_name+'">'+value.input_value+"</textarea>")
}else{if(params[label].type=="multicheckbox"){var value=params[label];var inputname=input_name.split("#",2);
var multicheck='<input type="checkbox" value="'+value.checkbox_value+'" name="'+inputname[0]+'"';
if(value.input_value.toString()=="true"){multicheck+=' checked="checked"'}multicheck+="/>";
$("#rux_form_unique").append(multicheck)}else{var value=params[label];$("#rux_form_unique").append('<input type="text" value="'+value.input_value+'" name="'+input_name+'"/>')
}}}}}}$("#rux_form_unique").append('<input type="submit" id="link_'+link_id+'" value="'+link_name+'" name="button#'+link_id+'"/>');
try{var page_id=/(page[\w]*)\.do/.exec(relative_url)[1];var hidden=this.hidden_array[page_id];
if(typeof(hidden)!="undefined"){$("#rux_form_unique").append(hidden)}}catch(e){}$("#rux_form_unique").find("#link_"+link_id).click()
};rux.prototype.url_to_relative=function(url){if(url.startsWith("http://")&&this.backend==this.actual_backend){return url
}else{return this.backend+"/"+url.replace(this.actual_backend+"/","")}};rux.prototype.object_to_url=function(object){var result="";
for(var label in object){var value=object[label];result+=label+"="+value+"&"}if(result!=""){result="?"+result
}return result};rux.prototype.store_value=function(unit_id,connector_at,new_value,indexed,index){if(indexed){Rux.unit_array[unit_id].item[index][connector_at].input_value=new_value
}else{Rux.unit_array[unit_id][connector_at].input_value=new_value}};rux.prototype.process_util_info=function(info,page_id){var inicio=info.indexOf("<input");
var fin=info.indexOf("</form>");this.hidden_array[page_id]=info.substring(inicio,fin)
};rux.prototype.html_entity_decode=function(str){var ta=document.createElement("textarea");
ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");return ta.value};rux.prototype.urlencode=function(clearString){if(typeof(clearString)=="undefined"){return""
}else{var output="";var x=0;clearString=this.html_entity_decode(clearString.toString());
var regex=/(^[?'a-zA-Z0-9_.\-\/ ]*)/;while(x<clearString.length){var match=regex.exec(clearString.substr(x));
if(match!=null&&match.length>1&&match[1]!=""){output+=match[1];x+=match[1].length
}else{if(clearString[x]==" "){output+="+"}else{var charCode=clearString.charCodeAt(x);
var hexVal=charCode.toString(16);output+="%"+(hexVal.length<2?"0":"")+hexVal.toUpperCase()
}x++}}return output.replace(/wr-resource\/[0-9-]*\//,"")}}});function replace_url(a){var b=a.replace(Rux.actual_backend,"");
Rux.ajax_get(b);$("#rux_proxy").remove()};