i3geo_tudo_compacto.js
933 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
$i = function(id){return document.getElementById(id);};
function cpaint(){this.version='2.0.3';var config=new Array();config['debugging']=-1;config['proxy_url']='';config['transfer_mode']='GET';config['async']=true;config['response_type']='OBJECT';config['persistent_connection']=false;config['use_cpaint_api']=true;var stack_count=0;this.capable=test_ajax_capability();this.set_debug=function(){if(typeof arguments[0]=='boolean'){if(arguments[0]===true){config['debugging']=1}else{config['debugging']=0}}else if(typeof arguments[0]=='number'){config['debugging']=Math.round(arguments[0])}};this.set_proxy_url=function(){if(typeof arguments[0]=='string'){config['proxy_url']=arguments[0]}};this.set_transfer_mode=function(){if(arguments[0].toUpperCase()=='GET'||arguments[0].toUpperCase()=='POST'){config['transfer_mode']=arguments[0].toUpperCase()}};this.set_async=function(){if(typeof arguments[0]=='boolean'){config['async']=arguments[0]}};this.set_response_type=function(){if(arguments[0].toUpperCase()=='TEXT'||arguments[0].toUpperCase()=='XML'||arguments[0].toUpperCase()=='OBJECT'||arguments[0].toUpperCase()=='E4X'||arguments[0].toUpperCase()=='JSON'){config['response_type']=arguments[0].toUpperCase()}};this.set_persistent_connection=function(){if(typeof arguments[0]=='boolean'){config['persistent_connection']=arguments[0]}};this.set_use_cpaint_api=function(){if(typeof arguments[0]=='boolean'){config['use_cpaint_api']=arguments[0]}};function test_ajax_capability(){var cpc=new cpaint_call(0,config,this.version);return cpc.test_ajax_capability()}this.call=function(){var sUrl=escape(arguments[0]);var re=new RegExp("%3F","g");var sUrl=sUrl.replace(re,'?');var re=new RegExp("%3D","g");var sUrl=sUrl.replace(re,'=');var re=new RegExp("%26","g");var sUrl=sUrl.replace(re,'&');var re=new RegExp("%3A","g");var sUrl=sUrl.replace(re,':');arguments[0]=sUrl;var use_stack=-1;if(config['persistent_connection']==true&&__cpaint_stack[0]!=null){switch(__cpaint_stack[0].get_http_state()){case-1:use_stack=0;debug('no XMLHttpObject object to re-use for persistence, creating new one later',2);break;case 4:use_stack=0;debug('re-using the persistent connection',2);break;default:debug('the persistent connection is in use - skipping this request',2)}}else if(config['persistent_connection']==true){use_stack=0;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object available for re-use, created new one',2)}else{use_stack=stack_count;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object created new one',2)}if(use_stack!=-1){__cpaint_stack[use_stack].set_client_callback(arguments[2]);if(config['proxy_url']!=''){__cpaint_stack[use_stack].call_proxy(arguments)}else{__cpaint_stack[use_stack].call_direct(arguments)}stack_count++;debug('stack size: '+__cpaint_stack.length,2)}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(debug_level<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}}}var __cpaint_stack=new Array();var __cpaint_transformer=new cpaint_transformer();function cpaint_call(){var version=arguments[2];var config=new Array();config['debugging']=arguments[1]['debugging'];config['proxy_url']=arguments[1]['proxy_url'];config['transfer_mode']=arguments[1]['transfer_mode'];config['async']=arguments[1]['async'];config['response_type']=arguments[1]['response_type'];config['persistent_connection']=arguments[1]['persistent_connection'];config['use_cpaint_api']=arguments[1]['use_cpaint_api'];var httpobj=false;var client_callback;var stack_id=arguments[0];this.set_client_callback=function(){if(typeof arguments[0]=='function'){client_callback=arguments[0]}};this.get_http_state=function(){var return_value=-1;if(typeof httpobj=='object'){return_value=httpobj.readyState}return return_value};this.call_direct=function(call_arguments){var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;if(url=='SELF'){url=document.location.href}if(config['use_cpaint_api']==true){for(i=3;i<call_arguments.length;i++){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(Number(call_arguments[i])))}else{querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(call_arguments[i]))}}querystring+='&cpaint_response_type='+config['response_type'];if(config['transfer_mode']=='GET'){if(url.indexOf('?')!=-1){url=url+'&cpaint_function='+remote_method+querystring}else{url=url+'?cpaint_function='+remote_method+querystring}}else{querystring='cpaint_function='+remote_method+querystring}}else{for(i=3;i<call_arguments.length;i++){if(i==3){querystring+=encodeURIComponent(call_arguments[i])}else{querystring+='&'+encodeURIComponent(call_arguments[i])}}if(config['transfer_mode']=='GET'){url=url+querystring}}get_connection_object();debug('opening connection to "'+url+'"',1);httpobj.open(config['transfer_mode'],url,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version+' :: http://sf.net/projects/cpaint');httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==true){callback()}};this.call_proxy=function(call_arguments){var proxyscript=config['proxy_url'];var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;var querystring_argument_prefix='cpaint_argument[]=';if(config['use_cpaint_api']==false){querystring_argument_prefix=''}for(i=3;i<call_arguments.length;i++){if(config['use_cpaint_api']==true){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(Number(call_arguments[i]))+'&')}else{querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(call_arguments[i])+'&')}}else{querystring+=encodeURIComponent(querystring_argument_prefix+call_arguments[i]+'&')}}if(config['use_cpaint_api']==true){querystring+=encodeURIComponent('&cpaint_function='+remote_method);querystring+=encodeURIComponent('&cpaint_responsetype='+config['response_type'])}if(config['transfer_mode']=='GET'){proxyscript+='?cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}else{querystring='cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}get_connection_object();debug('opening connection to proxy "'+proxyscript+'"',1);httpobj.open(config['transfer_mode'],proxyscript,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version);httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==false){callback()}};this.test_ajax_capability=function(){return get_connection_object()};var get_connection_object=function(){var return_value=false;var new_connection=false;if(config['persistent_connection']==false){debug('Using new connection object',1);new_connection=true}else{debug('Using shared connection object.',1);if(typeof httpobj!='object'){debug('Getting new persistent connection object.',1);new_connection=true}}if(new_connection==true){try{httpobj=new XMLHttpRequest()}catch(e1){try{httpobj=new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{httpobj=new ActiveXObject('Microsoft.XMLHTTP')}catch(oc){httpobj=null}}}if(!httpobj){debug('Could not create connection object',0)}else{return_value=true}}if(httpobj.readyState!=4){httpobj.abort()}return return_value};var callback=function(){var response=null;if(httpobj.readyState==4&&httpobj.status==200){if(httpobj.responseText==""){alert("O servidor demorou muito - timeout");client_callback("","erro");return}debug(httpobj.responseText,1);debug('using response type '+config['response_type'],2);switch(config['response_type']){case'XML':debug(httpobj.responseXML,2);response=__cpaint_transformer.xml_conversion(httpobj.responseXML);break;case'OBJECT':response=__cpaint_transformer.object_conversion(httpobj.responseXML);break;case'TEXT':response=__cpaint_transformer.text_conversion(httpobj.responseText);break;case'E4X':response=__cpaint_transformer.e4x_conversion(httpobj.responseText);break;case'JSON':response=__cpaint_transformer.json_conversion(httpobj.responseText);break;default:debug('invalid response type \''+response_type+'\'',0)}if(response!=null&&typeof client_callback=='function'){try{if(response.data)client_callback(response,httpobj.responseText);else client_callback("","erro")}catch(e){client_callback("","erro")}}remove_from_stack()}else{if(httpobj.readyState==4&&httpobj.status!=200){debug('invalid HTTP response code \''+Number(httpobj.status)+'\'',0);if(httpobj.status==500){alert("O servidor demorou muito - timeout");client_callback("","erro")}else{client_callback("","erro")}}}};var remove_from_stack=function(){if(typeof stack_id=='number'&&__cpaint_stack[stack_id]&&config['persistent_connection']==false){__cpaint_stack[stack_id]=null}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(config['debugging']<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}if(message.search(" error")>1){client_callback("",message)}}}function cpaint_transformer(){this.object_conversion=function(xml_document){var return_value=new cpaint_result_object();var i=0;var firstNodeName='';if(typeof xml_document=='object'&&xml_document!=null){for(i=0;i<xml_document.childNodes.length;i++){if(xml_document.childNodes[i].nodeType==1){firstNodeName=xml_document.childNodes[i].nodeName;break}}var ajax_response=xml_document.getElementsByTagName(firstNodeName);return_value[firstNodeName]=new Array();for(i=0;i<ajax_response.length;i++){var tmp_node=create_object_structure(ajax_response[i]);tmp_node.id=ajax_response[i].getAttribute('id');return_value[firstNodeName].push(tmp_node)}}else{debug('received invalid XML response',0)}return return_value};this.xml_conversion=function(xml_document){return xml_document};this.text_conversion=function(text){return decode(text)};this.e4x_conversion=function(text){text=text.replace(/^\<\?xml[^>]+\>/,'');return new XML(text)};this.json_conversion=function(text){return JSON.parse(text)};var create_object_structure=function(stream){var return_value=new cpaint_result_object();var node_name='';var i=0;var attrib=0;if(stream.hasChildNodes()==true){for(i=0;i<stream.childNodes.length;i++){node_name=stream.childNodes[i].nodeName;node_name=node_name.replace(/[^a-zA-Z0-9_]*/g,'');if(typeof return_value[node_name]!='object'){return_value[node_name]=new Array()}if(stream.childNodes[i].nodeType==1){var tmp_node=create_object_structure(stream.childNodes[i]);for(attrib=0;attrib<stream.childNodes[i].attributes.length;attrib++){tmp_node.set_attribute(stream.childNodes[i].attributes[attrib].nodeName,stream.childNodes[i].attributes[attrib].nodeValue)}return_value[node_name].push(tmp_node)}else if(stream.childNodes[i].nodeType==3){return_value.data=decode(String(stream.firstChild.data))}}}return return_value};var decode=function(rawtext){var plaintext='';var i=0;var c1=0;var c2=0;var c3=0;var u=0;var t=0;while(i<rawtext.length){if(rawtext.charAt(i)=='\\'&&rawtext.charAt(i+1)=='u'){u=0;for(j=2;j<6;j+=1){t=parseInt(rawtext.charAt(i+j),16);if(!isFinite(t)){break}u=u*16+t}plaintext+=String.fromCharCode(u);i+=6}else{plaintext+=rawtext.charAt(i);i++}}if(plaintext!=''&&plaintext.search(/^\s+$/g)==-1&&!isNaN(plaintext)&&isFinite(plaintext)){plaintext=Number(plaintext)}return plaintext}}function cpaint_result_object(){this.id=0;this.data='';var __attributes=new Array();this.find_item_by_id=function(){var return_value=null;var type=arguments[0];var id=arguments[1];var i=0;if(this[type]){for(i=0;i<this[type].length;i++){if(this[type][i].get_attribute('id')==id){return_value=this[type][i];break}}}return return_value};this.get_attribute=function(){var return_value=null;var id=arguments[0];if(typeof __attributes[id]!='undefined'){return_value=__attributes[id]}return return_value};this.set_attribute=function(){__attributes[arguments[0]]=arguments[1]}}Array.prototype.______array='______array';var JSON={org:'http://www.JSON.org',copyright:'(c)2005 JSON.org',license:'http://www.crockford.com/JSON/license.html',stringify:function(arg){var c,i,l,s='',v;var numeric=true;switch(typeof arg){case'object':if(arg){if(arg.______array=='______array'){for(i in arg){if(i!='______array'&&(isNaN(i)||!isFinite(i))){numeric=false;break}}if(numeric==true){for(i=0;i<arg.length;++i){if(typeof arg[i]!='undefined'){v=this.stringify(arg[i]);if(s){s+=','}s+=v}else{s+=',null'}}return'['+s+']'}else{for(i in arg){if(i!='______array'){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}}return'{'+s+'}'}}else if(typeof arg.toString!='undefined'){for(i in arg){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}return'{'+s+'}'}}return'null';case'number':return isFinite(arg)?String(arg):'null';case'string':l=arg.length;s='"';for(i=0;i<l;i+=1){c=arg.charAt(i);if(c>=' '){if(c=='\\'||c=='"'){s+='\\'}s+=c}else{switch(c){case'\b':s+='\\b';break;case'\f':s+='\\f';break;case'\n':s+='\\n';break;case'\r':s+='\\r';break;case'\t':s+='\\t';break;default:c=c.charCodeAt();s+='\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16)}}}return s+'"';case'boolean':return String(arg);default:return'null'}},parse:function(text){var at=0;var ch=' ';function error(m){throw{name:'JSONError',message:m,at:at-1,text:text}};function next(){ch=text.charAt(at);at+=1;return ch};function white(){while(ch!=''&&ch<=' '){next()}};function str(){var i,s='',t,u;if(ch=='"'){outer:while(next()){if(ch=='"'){next();return s}else if(ch=='\\'){switch(next()){case'b':s+='\b';break;case'f':s+='\f';break;case'n':s+='\n';break;case'r':s+='\r';break;case't':s+='\t';break;case'u':u=0;for(i=0;i<4;i+=1){t=parseInt(next(),16);if(!isFinite(t)){break outer}u=u*16+t}s+=String.fromCharCode(u);break;default:s+=ch}}else{s+=ch}}}error("Bad string")};function arr(){var a=[];if(ch=='['){next();white();if(ch==']'){next();return a}while(ch){a.push(val());white();if(ch==']'){next();return a}else if(ch!=','){break}next();white()}}error("Bad array")};function obj(){var k,o={};if(ch=='{'){next();white();if(ch=='}'){next();return o}while(ch){k=str();white();if(ch!=':'){break}next();o[k]=val();white();if(ch=='}'){next();return o}else if(ch!=','){break}next();white()}}error("Bad object")};function assoc(){var k,a=[];if(ch=='<'){next();white();if(ch=='>'){next();return a}while(ch){k=str();white();if(ch!=':'){break}next();a[k]=val();white();if(ch=='>'){next();return a}else if(ch!=','){break}next();white()}}error("Bad associative array")};function num(){var n='',v;if(ch=='-'){n='-';next()}while(ch>='0'&&ch<='9'){n+=ch;next()}if(ch=='.'){n+='.';while(next()&&ch>='0'&&ch<='9'){n+=ch}}if(ch=='e'||ch=='E'){n+='e';next();if(ch=='-'||ch=='+'){n+=ch;next()}while(ch>='0'&&ch<='9'){n+=ch;next()}}v=+n;if(!isFinite(v)){error("Bad number")}else{return v}};function word(){switch(ch){case't':if(next()=='r'&&next()=='u'&&next()=='e'){next();return true}break;case'f':if(next()=='a'&&next()=='l'&&next()=='s'&&next()=='e'){next();return false}break;case'n':if(next()=='u'&&next()=='l'&&next()=='l'){next();return null}break}error("Syntax error")};function val(){white();switch(ch){case'{':return obj();case'[':return arr();case'<':return assoc();case'"':return str();case'-':return num();default:return ch>='0'&&ch<='9'?num():word()}};return val()}};
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y;}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("element");}if("length" in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC==c)){if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});
},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x);},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G);},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);
}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C);}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true);},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N;}else{P=O;}}M.call(P,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(M,N,O);}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false;}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z;}return Z;}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W);});return true;}}}if(!O){return false;}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true;}var N=O;if(W){if(W===true){N=S;}else{N=W;}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S);};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q);};}E[Q].push(a);}else{try{this._simpleAdd(O,M,P,b);}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false;}}return true;},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false);},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true);},removeFocusListener:function(N,M){return this.removeListener(N,K,M);},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true);},removeBlurListener:function(N,M){return this.removeListener(N,L,M);},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S);}}M=G[P];if(M&&M[2]){M[2](R);}return T;},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return -1;}else{return B[M];}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N));},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N);}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break;}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false);}catch(U){this.lastError=U;return false;}}delete I[S][this.WFN];delete I[S][this.FN];
I.splice(S,1);return true;},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M);},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode;}}catch(M){}return N;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft();}}return M;},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop();}}return N;},getXY:function(M){return[this.getPageX(M),this.getPageY(M)];},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement;}else{if(N.type=="mouseover"){M=N.fromElement;}}}return this.resolveTextNode(M);},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N;}catch(M){this.lastError=M;return N;}}return O.time;},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M);},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation();}else{M.cancelBubble=true;}},preventDefault:function(M){if(M.preventDefault){M.preventDefault();}else{M.returnValue=false;}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break;}P=P.caller;}}return N;},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M];}return M;},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O;}}return -1;},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N;}return N;},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined");}catch(M){return false;}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach();}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj;}else{U=W.overrideContext;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null;}}else{T(P,Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{if(this._interval){clearInterval(this._interval);this._interval=null;}}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}else{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S});}}}}return(R.length)?R:null;},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ];}else{M=O[N.ADJ_SCOPE];}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null;}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P);}}O=null;}G=null;N._simpleRemove(window,"unload",N._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);
}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN;}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D);}if(C.isFunction(E)){G.subscribe(E);}else{G.subscribe(E.fn,E.scope,E.correctScope);}function H(O,N){if(!I.shift){I.shift=false;}if(!I.alt){I.alt=false;}if(!I.ctrl){I.ctrl=false;}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break;}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O);}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I);}this.enabled=true;};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I);}this.enabled=false;};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"");};};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.7.0", build: "1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y;}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("element");}if("length" in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC==c)){if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});
},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x);},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G);},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);
}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]]}}return E};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{return false}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]}}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B)}if(E){E.VERSION=H;E.BUILD=G}else{YAHOO.log("mainClass is undefined for module "+A,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple"}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0]}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0]}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0]}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1])}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1])}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1])}return C}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break}}if(D){A.push(B)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F},isBoolean:function(G){return typeof G==="boolean"},isFunction:function(G){return A.toString.apply(G)===C},isNull:function(G){return G===null},isNumber:function(G){return typeof G==="number"&&isFinite(G)},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false},isString:function(G){return typeof G==="string"},isUndefined:function(G){return typeof G==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.")}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G]}}B._IEEnumFix(J.prototype,I)}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.")}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]]}}else{for(L in J){if(H||!(L in K)){K[L]=J[L]}}B._IEEnumFix(K,J)}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.")}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H])}B.augmentObject.apply(this,G)},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+""}else{if(G instanceof Date||("nodeType"in G&&"tagName"in G)){return G}else{if(B.isFunction(G)){return H}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}if(N.length>1){N.pop()}N.push("]")}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}}if(N.length>1){N.pop()}N.push("}")}return N.join("")},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break}K=V.indexOf(T,L);if(L+1>=K){break}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J)}S=H[R];if(O){S=O(R,S,U)}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10))}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4)}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10))}else{S=S.toString()}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I}}V=V.substring(0,L)+S+V.substring(K+1)}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g")}return V},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"")}catch(H){return G}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true)}return J},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O]}if(!I){throw new TypeError("method undefined")}if(!B.isArray(M)){M=[J]}L=function(){I.apply(H,M)};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G)}else{clearTimeout(G)}}}},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G))}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H)}:function(G,H){return!B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H]};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V])}}return Z};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"id":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T},U)};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+(R++),"type":"text/javascript","charset":V,"src":T},U)};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId)}}};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T)}return V};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V))}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T))}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.scope||T;T.onTimeout.call(U,A(T))}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel()}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return}if(Z){U.url.shift();if(U.varName){U.varName.shift()}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y)}else{C(V)}return}var T=U.url[0];if(!T){U.url.shift();return G(V)}if(U.timeout){U.timer=S.later(U.timeout,U,O,V)}if(U.type==="script"){W=P(T,c,U.charset)}else{W=I(T,c,U.charset)}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e)}}else{a.appendChild(W)}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T)}};var K=function(){if(E){return}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T]}}E=false};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V){W=V.parentNode}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U])}X.nodes=[]}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K()}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge"in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,G,X);return{tId:X}};var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=null;a(W,U)}}}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U)})}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if(this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h)}else{}return}}T.timer.cancel();a(W,U)},null,true)}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U])}}}}else{X.onload=function(){a(W,U)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T)},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true}},script:function(T,U){return H("script",T,U)},css:function(T,U){return H("css",T,U)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1799"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.7.0/build/","base":"http://yui.yahooapis.com/2.7.0/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i)}}return a}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2)},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i}}return-1},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true}return o},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a))}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name)}});this.skin=lang.merge(YUI.info.skin);this._config(o)};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i])}else{this[i]=o[i]}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger")}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y}}this.filter=this.FILTERS[f]}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a)},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext})}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext})}}return name},getRequires:function(mod){if(!mod){return[]}if(!this.dirty&&mod.expanded){return mod.expanded}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m))}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]))}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o}if(m[ckey]){return m[ckey]}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm))}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i])}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey]},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name)}}else{smod=this._addSkin(this.skin.defaultSkin,name)}m.requires.push(smod)}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules)}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore)}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]]}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j))}}this.loaded=l},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req)}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod}return s},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]}}return null},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m}}}this.rollups=rollups}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m)}}}if(!rolled){break}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i]}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j]}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]]}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false})}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true}return false};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i)}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break}}if(moved){break}else{p=p+1}}if(!moved){break}}this.sorted=s},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1)},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target}else{css+=target}this._combining.push(s[i])}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true}this.loadNext(o.data)},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self})}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self})}else{loadScript()}return}else{this.loadNext(this._loading)}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine()}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js")};this.insert(null,"css");return}this.loadNext()},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox")}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js")};this.insert(null,"css");return}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js")},scope:this},"js");return}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort()}return}if(m.type!=="js"){this._loadCount++;continue}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data})}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data})}else{this._onFailure.call(this.varName+" reference failure")}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data})},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData))}},loadNext:function(mname){if(!this._loading){return}if(mname){if(mname!==this._loading){return}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data})}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue}if(s[i]===this._loading){return}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data)};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this)}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data})}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load()}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str},_url:function(path){return this._filter((this.base||"")+path)}}})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x]}}}}return y}if(y.DOM_EVENTS){y=y.get("element")}if("length"in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x])}return z}return y}return null},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y]}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y)}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y)},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y]}}return x}}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(z){try{x=G.filters("alpha").opacity}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x)}}}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x})},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1}}break;case"float":x="styleFloat";default:Y.style[x]=y}}else{}}}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat"}Y.style[x]=y}else{}}}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY)},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G))},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0}}if((AC==c)){if(G!==r){AE=parseInt(G,10)}if(x!==r){AD=parseInt(x,10)}}AG[0]-=AE;AG[1]-=AD}if((Y||z)){AG[0]+=z;AG[1]+=Y}AG[0]=AB(AG[0]);AG[1]=AB(AG[1])}else{}return AG}}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z)}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z)}if(AA||AB){z[0]-=AB;z[1]-=AA}}z[0]+=x;z[1]+=Y}else{if(D){z[0]-=x;z[1]-=Y}else{if(I||H){z[0]+=x;z[1]+=Y}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1])}else{}return z}}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0]};return E.Dom.batch(G,Y,E.Dom,true)},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1]};return E.Dom.batch(G,Y,E.Dom,true)},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y})},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA)}AC=E.Dom._getXY(G);if(!AD||AC===false){return false}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b]}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P]}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px")}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px")}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true})}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null])},setY:function(G,Y){E.Dom.setXY(G,[null,Y])},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x)}else{}return y};return E.Dom.batch(G,Y,E.Dom,true)},getClientWidth:function(){return E.Dom.getViewportWidth()},getClientHeight:function(){return E.Dom.getViewportHeight()},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[]}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y]}}if(AE){E.Dom.batch(Y,AE,x,AD)}return Y},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G)},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y)}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1}}else{}return G},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G)},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true}}else{}return G},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G)},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G)}}}else{}return Y},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G})},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false}else{if(!AB){G=E.Dom._addClass(y,x.to)}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true}}}}else{}return G},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x)}y.id=z}return z};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments)},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x)}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16)}}}else{}return G},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y)},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y)}else{}return G},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[]}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break}else{x[x.length]=G[z]}}}if(AD){E.Dom.batch(x,AD,y,AC)}return x},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true)},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA)}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA)}}else{return false}return y},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight}return G},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth}return G},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G}}return null},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return E.Dom.hasClass(y,G)};return E.Dom.getAncestorBy(Y,x)},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase()};return E.Dom.getAncestorBy(Y,x)},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getPreviousSiblingBy(G)},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getNextSiblingBy(G)},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x)},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null}return E.Dom.getFirstChildBy(G)},getLastChildBy:function(G,x){if(!G){return null}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x)},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G)},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z}return false});return G},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G)},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft)},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop)},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}return G[Z].insertBefore(Y,G)},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling)}else{return G[Z].appendChild(Y)}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y)},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x)},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G)},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase()}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G))},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U)}}}return G},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G))},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0}}y[0]+=G;y[1]+=Y;return y}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x)}return x}}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent"}return x}}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B)}else{return null}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B)};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}")};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B)};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0]}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A)};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U)}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z)}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z)}else{Y=a}}}}return Y},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d)}Z[H][e]=L}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b}a=Z[H][Y]}return a+I},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break}return Y+I},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X)}return Z},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J]}return(Z)?Z[X]:S},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a))}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E)}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")"}return E},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("")}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1")}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H}return H.toLowerCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C)}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C))},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll()}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true}}return E},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0]}try{G=M.fn.call(L,B,M.obj)}catch(F){this.lastError=F;if(A){throw F}}}else{try{G=M.fn.call(L,this.type,I,M.obj)}catch(H){this.lastError=H;if(A){throw H}}}if(false===G){if(!this.silent){}break}}}return(G!==false)},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B)}this.subscribers=[];return A},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj}this.subscribers.splice(A,1)},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}return A};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B)}else{return(this.fn==A)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach()};this._interval=setInterval(N,this.POLL_INTERVAL)}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P})}C=this.POLL_RETRYS;this.startInterval()},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true)},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N}else{P=O}}M.call(P,"DOMReady",[],N)},0)}else{this.DOMReadyEvent.subscribe(M,N,O)}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z}return Z}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W)});return true}}}if(!O){return false}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true}var N=O;if(W){if(W===true){N=S}else{N=W}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S)};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q)}}E[Q].push(a)}else{try{this._simpleAdd(O,M,P,b)}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false}}return true},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false)},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true)},removeFocusListener:function(N,M){return this.removeListener(N,K,M)},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true)},removeBlurListener:function(N,M){return this.removeListener(N,L,M)},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S)}}M=G[P];if(M&&M[2]){M[2](R)}return T},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return-1}else{return B[M]}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N))},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N)}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W)}return W}}if(!V||!V.call){return this.purgeElement(N,false,M)}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true}}return false}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V)}if(S>=0){R=I[S]}if(!N||!R){return false}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false)}catch(U){this.lastError=U;return false}}delete I[S][this.WFN];delete I[S][this.FN];I.splice(S,1);return true},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M)},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode}}catch(M){}return N},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft()}}return M},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop()}}return N},getXY:function(M){return[this.getPageX(M),this.getPageY(M)]},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement}else{if(N.type=="mouseover"){M=N.fromElement}}}return this.resolveTextNode(M)},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N}catch(M){this.lastError=M;return N}}return O.time},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M)},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation()}else{M.cancelBubble=true}},preventDefault:function(M){if(M.preventDefault){M.preventDefault()}else{M.returnValue=false}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break}P=P.caller}}return N},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M]}return M},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O}}return-1},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N}return N},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined")}catch(M){return false}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach()}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready)}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0)}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj}else{U=W.overrideContext}}W.fn.call(U,W.obj)};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null}}else{T(P,Q);F[N]=null}}else{R.push(Q)}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q)}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn)}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T)}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J]}else{if(M==="unload"){N=[J]}else{N=[I]}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S})}}}}return(R.length)?R:null},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ]}else{M=O[N.ADJ_SCOPE]}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P)}}O=null}G=null;N._simpleRemove(window,"unload",N._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft]}else{if(N){return[N.scrollTop,N.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M))}}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M))}}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M)}}else{return function(){}}}}()}}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null}catch(ex){}},EU.POLL_INTERVAL)}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready()}},EU.POLL_INTERVAL)}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready)}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E)}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[]}B[A].push({fn:C,obj:F,overrideContext:E})}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G)}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G)}}return B}return false},unsubscribeAll:function(A){return this.unsubscribe(A)},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext)}}}return I[G]},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F])}return G.fire.apply(G,B)},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true}}return false}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D)}if(C.isFunction(E)){G.subscribe(E)}else{G.subscribe(E.fn,E.scope,E.correctScope)}function H(O,N){if(!I.shift){I.shift=false}if(!I.alt){I.alt=false}if(!I.ctrl){I.ctrl=false}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O)}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I)}this.enabled=true};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I)}this.enabled=false};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"")}};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38}})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(C){var B=YAHOO.util.Event.getTarget(C),A=B.nodeName.toLowerCase();if((A==="input"||A==="button")&&(B.type&&B.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(B.name)+"="+encodeURIComponent(B.value)}});return true}return false})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A}else{if(typeof A=="boolean"){this._use_default_post_header=A}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A}else{this._use_default_xhr_header=A}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F}}catch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);E={conn:A,tId:F};break}catch(C){}}}finally{return E}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D)}else{C={};C.tId=D;C.isUpload=true}if(C){this._transaction_id++}}catch(B){}finally{return C}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null}else{if(E&&E.customevents){this.initCustomEvents(D,E)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(this._has_default_headers||this._has_http_headers){this.setHeader(D)}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B)}return D}},initCustomEvents:function(A,C){var B;for(B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B])}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true)},D.timeout)}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId]}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A)}B.handleTransactionResponse(C,D)}},this._polling_interval)},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status}else{D=13030}}catch(E){D=13030}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C)}else{G.success.apply(G.scope,[C])}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C)}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C)}}this.releaseObject(F);C=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2)}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G}return D},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B}else{E.status=F;E.statusText=G}if(D){E.argument=D}return E},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(A){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B])}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B])}}delete this._http_headers;this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false},setForm:function(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){L=(document.getElementById(M)||document.forms[M])}else{if(typeof M=="object"){L=M}else{return}}if(H){this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return}for(E=0,G=L.elements.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if(B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D<N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}}}break;case"radio":case"checkbox":if(B.checked){F[O++]=K+I}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._submitElementValue){F[O++]=this._submitElementValue}J=true}break;default:F[O++]=K+I}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(YAHOO.env.ua.ie){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false"}}else{C=document.createElement("iframe");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decodeURIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E+1));this._formNode.appendChild(D[C])}}return D},uploadFile:function(D,N,E,C){var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this,K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",I);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",J)}else{this._formNode.setAttribute("enctype",J)}if(C){M=this.appendPostData(C)}this._formNode.submit();this.startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K)}if(N&&N.timeout){this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true)},N.timeout)}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H])}}for(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribute(B,A[B])}else{this._formNode.removeAttribute(B)}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._timeOut[D.tId]}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fire(D,K)}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.document.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.documentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.contentWindow.document.XMLDocument:L.contentWindow.document}catch(P){}if(N&&N.upload){if(!N.scope){N.upload(G)}else{N.upload.apply(N.scope,[G])}}O.uploadEvent.fire(G);if(D.uploadEvent){D.uploadEvent.fire(G)}YAHOO.util.Event.removeListener(L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D)},100)};YAHOO.util.Event.addListener(L,"load",F)},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{D=false}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B)}this.handleTransactionResponse(E,G,true)}return D},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false}else{return false}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.7.0",build:"1799"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F)};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames)},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0}if("style"in D){B.Dom.setStyle(D,C,F+E)}else{if(C in D){D[C]=F}}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G)}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style"in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)]}else{G=0}}else{if(C in E){G=E[C]}}return G},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px"}return""},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined")};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"]}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1}}else{E=I+F[D]["by"]*1}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M)};this.getEl=function(){return E};this.isAnimated=function(){return D};this.getStartTime=function(){return F};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}B.AnimMgr.registerElement(this);return true};this.stop=function(M){if(!this.isAnimated()){return false}if(M){this.currentFrame=this.totalFrames;this._onTween.fire()}B.AnimMgr.stop(this)};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M)}D=true;H=0;F=new Date()};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame)};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit)}H+=1};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps)};D=false;H=0;this.onComplete.fire(N)};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G)}};B.Anim=A})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start()};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop()}return true};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0)}B=[];C=null;A=0}else{this.unRegister(H)}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G)}G._onTween.fire()}else{YAHOO.util.AnimMgr.stop(G,H)}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G}}return-1};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame)}else{K=J-(I+1)}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]]}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1]}}return[C[0][0],C[0][1]]}};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H)};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)]}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)]}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)]}return null};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return!H.patterns.transparent.test(I)});if(F){I=C.Dom.getStyle(F,E)}else{I=A.DEFAULT_BGCOLOR}}}else{I=D.getAttribute.call(this,E)}return I};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H])}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")"}else{I=D.doMethod.call(this,F,J,G)}return I};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I]}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G}};C.ColorAnim=A})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A},easeIn:function(B,A,D,C){return D*(B/=C)*B+A},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A}return-D/2*((--B)*(B-2)-1)+A},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A}return-D/2*((B-=2)*B*B*B-2)+A},elasticIn:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A},elasticOut:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F/2)==2){return A+G}if(!E){E=F*(0.3*1.5)}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*(B/=D)*B*((C+1)*B-C)+A},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J)}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H)}else{F.setAttribute.call(this,G,I,H)}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")]}else{H=F.getAttribute.call(this,G)}return H};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I)}else{J=F.doMethod.call(this,G,K,H)}return J};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L]}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M]}L=K}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative")}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"])}else{E.Dom.setXY(H,E.Dom.getXY(H))}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G)}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]]}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L)}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I}else{F.setRuntimeAttribute.call(this,P)}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G};var D=function(G){return(typeof G!=="undefined")};E.Motion=A})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H)}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)]}else{G=C.doMethod.call(this,E,H,F)}return G};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop]}else{G=C.getAttribute.call(this,E)}return G};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1]}else{C.setAttribute.call(this,E,H,G)}};B.Scroll=D})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild)}else{document.body.appendChild(C)}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5"}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue}G[E].apply(G,D)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(C){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init()}if(!this.ids[C]){this.ids[C]={}}this.ids[C][D.id]=D},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={}}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id]}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id]}}}delete this.handleIds[E.id]},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={}}this.handleIds[D][C]=C},isDragDrop:function(C){return(this.getDDById(C))?true:false},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue}if(!D||C.isTarget){G[G.length]=C}}}return G},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true}}return false},isTypeOfDD:function(C){return(C&&C.__ygDragDrop)},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C])},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D]}}return null},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true},this.clickTimeThresh)},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E})}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E})}this.dragThreshMet=true},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C)}this.fromTimeout=false;this.fireEvents(C,true)}else{}this.stopDrag(C);this.stopEvent(C)}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C)}if(this.preventDefault){YAHOO.util.Event.preventDefault(C)}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E})}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E})}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F)}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F})}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F})}if(C){this.fireEvents(F,false)}}this.stopEvent(F)}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d)}I[S]=true;delete this.dragOvers[S]}for(var R in a.groups){if("string"!=typeof R){continue}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G)}else{if(!I[G.id]){c.enterEvts.push(G)}else{c.overEvts.push(G)}this.dragOvers[G.id]=G}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C)}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V})}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"]}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q})}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q})}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]})}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]})}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0]}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C}}}}return G},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H}else{delete this.locationCache[G.id]}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true}}}catch(E){}return false},getLocation:function(H){if(!this.isTypeOfDD(H)){return null}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F)}catch(I){}if(!K){return null}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G)},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G}if(!G){return false}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x)}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver}else{return false}},_onUnload:function(D,C){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D))}return C},getElement:function(C){return YAHOO.util.Dom.get(C)},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style},getPosX:function(C){return YAHOO.util.Dom.getX(C)},getPosY:function(C){return YAHOO.util.Dom.getY(C)},swapNode:function(E,C){if(E.swapNode){E.swapNode(C)}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C)}else{if(C==E.nextSibling){F.insertBefore(C,E)}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D)}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft}else{if(D){E=D.scrollTop;C=D.scrollLeft}else{}}return{top:E,left:C}},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(D,C){return(D-C)},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad()}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true}else{D=D.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id)}return this._domRef},getDragEl:function(){return B.get(this.dragElId)},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event")}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E)}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E]}else{if(!F&&0!==F){this.padding=[E,C,E,C]}else{this.padding=[E,C,F,D]}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H)},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1]},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C)},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C]}this.DDM.removeDDFromGroup(this,C)},setDragElId:function(C){this.dragElId=C},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.handleElId=C;this.DDM.regHandle(this.id,C)},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return}if(this.isLocked()){return}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J)}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J)}if((C===false)||(E===false)||(F===false)||(H===false)){return}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J)}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)))},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX}if(C>this.maxX){C=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F}},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.invalidHandleIds[C]=C},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D]},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}delete this.invalidHandleIds[C]},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E]}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase()}catch(G){H=F.nodeName}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D])}return E},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px")}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth)},0)},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A)}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A)}if(M>B&&F<C){window.scrollTo(D+A,N)}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(I)){I=0}if(isNaN(F)){F=0}if(isNaN(D)){D=0}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px")}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true)}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name)}return A},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false}if(this.validator&&!this.validator.call(A,F)){return false}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name)}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D)}return true},configure:function(B,C){B=B||{};if(C){this._written=false}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A]}}}},resetValue:function(){return this.setValue(this._initialConfig.value)},resetConfig:function(){this.configure(this._initialConfig,true)},refresh:function(A){this.setValue(this.value,A)}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null}return B.getValue()},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false}return C.setValue(E,B)},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B}}return C},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B)}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true}return false},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C)}}},register:function(B,C){this.setAttributeConfig(B,C)},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C]}}return D},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C)}else{this._configs[B].configure(C,D)}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D)},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig()},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.subscribe.apply(this,arguments)},addListener:function(){this.subscribe.apply(this,arguments)},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C)},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B)},createAttribute:function(B){return new YAHOO.util.Attribute(B,this)}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments)};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D]}return F},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D)},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D)},hasChildNodes:function(){return this.get("element").hasChildNodes()},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E)},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D)},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E)},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement}D.fireEvent(H,J)},I,F)}this.createEvent(H,this)}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){return this.addListener.apply(this,arguments)},subscribe:function(){return this.addListener.apply(this,arguments)},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments)},addClass:function(D){B.addClass(this.get("element"),D)},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"))},hasClass:function(D){return B.hasClass(this.get("element"),D)},removeClass:function(D){return B.removeClass(this.get("element"),D)},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D)},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D)},getStyle:function(D){return B.getStyle(this.get("element"),D)},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1])}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false}if(!E){return false}if(D.parent!=E){if(F){E.insertBefore(D,F)}else{E.appendChild(D)}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D)}return C.prototype.get.call(this,D)},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G)}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G)}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G}return}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E)}return C.prototype.set.apply(this,arguments)},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments)},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments)},init:function(E,D){this._initElement(E,D)},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D)}this._queue=[];this._events={};this._configs={};this._configOrder=[]},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G]}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element})}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E)}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E)}this.fireEvent("available",{type:"available",target:B.get(E.element)})},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E)}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)})},this,true)},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true})},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue()},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this)}};YAHOO.augment(A,C);YAHOO.util.Element=A})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});YAHOO.register("utilities",YAHOO,{version:"2.7.0",build:"1799"});
(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&¤tX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function(){var S="DIV",O="hd",K="bd",N="ft",X="LI",A="disabled",D="mouseover",F="mouseout",U="mousedown",G="mouseup",R=YAHOO.env.ua.ie?"focusin":"focus",V="click",B="keydown",M="keyup",I="keypress",L="clicktohide",T="position",P="dynamic",Y="showdelay",J="selected",E="visible",W="UL",Q="MenuManager",C=YAHOO.util.Dom,Z=YAHOO.util.Event,H=YAHOO.lang;YAHOO.widget.MenuManager=function(){var a=false,c={},r={},d={},n={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent","focus":"focusEvent","focusin":"focusEvent","blur":"blurEvent","focusout":"blurEvent"},m=null,k=null;function o(u){var s,t;if(u&&u.tagName){switch(u.tagName.toUpperCase()){case S:s=u.parentNode;if((C.hasClass(u,O)||C.hasClass(u,K)||C.hasClass(u,N))&&s&&s.tagName&&s.tagName.toUpperCase()==S){t=s;}else{t=u;}break;case X:t=u;break;default:s=u.parentNode;if(s){t=o(s);}break;}}return t;}function q(w){var s=Z.getTarget(w),t=o(s),y,u,v,AA,z;if(t){u=t.tagName.toUpperCase();if(u==X){v=t.id;if(v&&d[v]){AA=d[v];z=AA.parent;}}else{if(u==S){if(t.id){z=c[t.id];}}}}if(z){y=n[w.type];if(AA&&!AA.cfg.getProperty(A)){AA[y].fire(w);}z[y].fire(w,AA);}else{if(w.type==U){for(var x in r){if(H.hasOwnProperty(r,x)){z=r[x];if(z.cfg.getProperty(L)&&!(z instanceof YAHOO.widget.MenuBar)&&z.cfg.getProperty(T)==P){z.hide();}else{if(z.cfg.getProperty(Y)>0){z._cancelShowDelay();}if(z.activeItem){z.activeItem.blur();z.activeItem.cfg.setProperty(J,false);z.activeItem=null;}}}}}else{if(w.type==R){m=s;}}}}function f(t,s,u){if(c[u.id]){this.removeMenu(u);}}function j(t,s){var u=s[1];if(u){k=u;}}function i(t,s){k=null;}function b(t,s,v){if(v&&v.focus){try{v.focus();}catch(u){}}this.hideEvent.unsubscribe(b,v);}function l(t,s){if(this===this.getRoot()&&this.cfg.getProperty(T)===P){this.hideEvent.subscribe(b,m);this.focus();}}function g(u,t){var s=t[0],v=this.id;if(s){r[v]=this;}else{if(r[v]){delete r[v];}}}function h(t,s){p(this);}function p(t){var s=t.id;if(s&&d[s]){if(k==t){k=null;}delete d[s];t.destroyEvent.unsubscribe(h);}}function e(t,s){var v=s[0],u;if(v instanceof YAHOO.widget.MenuItem){u=v.id;if(!d[u]){d[u]=v;v.destroyEvent.subscribe(h);}}}return{addMenu:function(t){var s;if(t instanceof YAHOO.widget.Menu&&t.id&&!c[t.id]){c[t.id]=t;if(!a){s=document;Z.on(s,D,q,this,true);Z.on(s,F,q,this,true);Z.on(s,U,q,this,true);Z.on(s,G,q,this,true);Z.on(s,V,q,this,true);Z.on(s,B,q,this,true);Z.on(s,M,q,this,true);Z.on(s,I,q,this,true);Z.onFocus(s,q,this,true);Z.onBlur(s,q,this,true);a=true;}t.cfg.subscribeToConfigEvent(E,g);t.destroyEvent.subscribe(f,t,this);t.itemAddedEvent.subscribe(e);t.focusEvent.subscribe(j);t.blurEvent.subscribe(i);t.showEvent.subscribe(l);}},removeMenu:function(v){var t,s,u;if(v){t=v.id;if((t in c)&&(c[t]==v)){s=v.getItems();if(s&&s.length>0){u=s.length-1;do{p(s[u]);}while(u--);}delete c[t];if((t in r)&&(r[t]==v)){delete r[t];}if(v.cfg){v.cfg.unsubscribeFromConfigEvent(E,g);}v.destroyEvent.unsubscribe(f,v);v.itemAddedEvent.unsubscribe(e);v.focusEvent.unsubscribe(j);v.blurEvent.unsubscribe(i);}}},hideVisible:function(){var s;for(var t in r){if(H.hasOwnProperty(r,t)){s=r[t];if(!(s instanceof YAHOO.widget.MenuBar)&&s.cfg.getProperty(T)==P){s.hide();}}}},getVisible:function(){return r;},getMenus:function(){return c;},getMenu:function(t){var s;if(t in c){s=c[t];}return s;},getMenuItem:function(t){var s;if(t in d){s=d[t];}return s;},getMenuItemGroup:function(w){var t=C.get(w),s,y,x,u,v;if(t&&t.tagName&&t.tagName.toUpperCase()==W){y=t.firstChild;if(y){s=[];do{u=y.id;if(u){x=this.getMenuItem(u);if(x){s[s.length]=x;}}}while((y=y.nextSibling));if(s.length>0){v=s;}}}return v;},getFocusedMenuItem:function(){return k;},getFocusedMenu:function(){var s;if(k){s=k.parent.getRoot();}return s;},toString:function(){return Q;}};}();})();(function(){var AN=YAHOO.lang,Ao="Menu",H="DIV",K="div",Ak="id",AI="SELECT",f="xy",R="y",Av="UL",L="ul",AK="first-of-type",l="LI",i="OPTGROUP",Ax="OPTION",Af="disabled",AY="none",z="selected",Ar="groupindex",j="index",O="submenu",As="visible",AX="hidedelay",Ab="position",AE="dynamic",C="static",Al=AE+","+C,Y="windows",Q="url",M="#",V="target",AU="maxheight",T="topscrollbar",y="bottomscrollbar",e="_",P=T+e+Af,E=y+e+Af,c="mousemove",At="showdelay",d="submenuhidedelay",AG="iframe",x="constraintoviewport",A2="preventcontextoverlap",AP="submenualignment",a="autosubmenudisplay",AD="clicktohide",h="container",k="scrollincrement",Ah="minscrollheight",A0="classname",Ae="shadow",Ap="keepopen",Ay="hd",D="hastitle",q="context",v="",Ai="mousedown",Ac="keydown",Am="height",U="width",AR="px",Aw="effect",AF="monitorresize",AW="display",AV="block",J="visibility",AA="absolute",AT="zindex",m="yui-menu-body-scrolled",AL=" ",Az=" ",Ag="mouseover",G="mouseout",AS="itemAdded",o="itemRemoved",AM="hidden",t="yui-menu-shadow",AH=t+"-visible",n=t+Az+AH;YAHOO.widget.Menu=function(A4,A3){if(A3){this.parent=A3.parent;this.lazyLoad=A3.lazyLoad||A3.lazyload;this.itemData=A3.itemData||A3.itemdata;}YAHOO.widget.Menu.superclass.constructor.call(this,A4,A3);};function B(A4){var A3=false;if(AN.isString(A4)){A3=(Al.indexOf((A4.toLowerCase()))!=-1);}return A3;}var g=YAHOO.util.Dom,AB=YAHOO.util.Event,Au=YAHOO.widget.Module,AC=YAHOO.widget.Overlay,s=YAHOO.widget.Menu,A1=YAHOO.widget.MenuManager,F=YAHOO.util.CustomEvent,Aq=YAHOO.env.ua,An,Aa=[["mouseOverEvent",Ag],["mouseOutEvent",G],["mouseDownEvent",Ai],["mouseUpEvent","mouseup"],["clickEvent","click"],["keyPressEvent","keypress"],["keyDownEvent",Ac],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["itemAddedEvent",AS],["itemRemovedEvent",o]],AZ={key:As,value:false,validator:AN.isBoolean},AQ={key:x,value:true,validator:AN.isBoolean,supercedes:[AG,"x",R,f]},AJ={key:A2,value:true,validator:AN.isBoolean,supercedes:[x]},S={key:Ab,value:AE,validator:B,supercedes:[As,AG]},A={key:AP,value:["tl","tr"]},u={key:a,value:true,validator:AN.isBoolean,suppressEvent:true},Z={key:At,value:250,validator:AN.isNumber,suppressEvent:true},r={key:AX,value:0,validator:AN.isNumber,suppressEvent:true},w={key:d,value:250,validator:AN.isNumber,suppressEvent:true},p={key:AD,value:true,validator:AN.isBoolean,suppressEvent:true},AO={key:h,suppressEvent:true},Ad={key:k,value:1,validator:AN.isNumber,supercedes:[AU],suppressEvent:true},N={key:Ah,value:90,validator:AN.isNumber,supercedes:[AU],suppressEvent:true},X={key:AU,value:0,validator:AN.isNumber,supercedes:[AG],suppressEvent:true},W={key:A0,value:null,validator:AN.isString,suppressEvent:true},b={key:Af,value:false,validator:AN.isBoolean,suppressEvent:true},I={key:Ae,value:true,validator:AN.isBoolean,suppressEvent:true,supercedes:[As]},Aj={key:Ap,value:false,validator:AN.isBoolean};
YAHOO.lang.extend(s,AC,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:"-999em",_useHideDelay:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,init:function(A5,A4){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}var A3;if(AN.isString(A5)){A3=g.get(A5);}else{if(A5.tagName){A3=A5;}}if(A3&&A3.tagName){switch(A3.tagName.toUpperCase()){case H:this.srcElement=A3;if(!A3.id){A3.setAttribute(Ak,g.generateId());}s.superclass.init.call(this,A3);this.beforeInitEvent.fire(s);break;case AI:this.srcElement=A3;s.superclass.init.call(this,g.generateId());this.beforeInitEvent.fire(s);break;}}else{s.superclass.init.call(this,A5);this.beforeInitEvent.fire(s);}if(this.element){g.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this._onHide);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);this.blurEvent.subscribe(this._onBlur);if((Aq.gecko&&Aq.gecko<1.9)||Aq.webkit){this.cfg.subscribeToConfigEvent(R,this._onYChange);}if(A4){this.cfg.applyConfig(A4,true);}A1.addMenu(this);this.initEvent.fire(s);}},_initSubTree:function(){var A4=this.srcElement,A3,A6,A9,BA,A8,A7,A5;if(A4){A3=(A4.tagName&&A4.tagName.toUpperCase());if(A3==H){BA=this.body.firstChild;if(BA){A6=0;A9=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(BA&&BA.tagName){switch(BA.tagName.toUpperCase()){case A9:this._aGroupTitleElements[A6]=BA;break;case Av:this._aListElements[A6]=BA;this._aItemGroups[A6]=[];A6++;break;}}}while((BA=BA.nextSibling));if(this._aListElements[0]){g.addClass(this._aListElements[0],AK);}}}BA=null;if(A3){switch(A3){case H:A8=this._aListElements;A7=A8.length;if(A7>0){A5=A7-1;do{BA=A8[A5].firstChild;if(BA){do{if(BA&&BA.tagName&&BA.tagName.toUpperCase()==l){this.addItem(new this.ITEM_TYPE(BA,{parent:this}),A5);}}while((BA=BA.nextSibling));}}while(A5--);}break;case AI:BA=A4.firstChild;do{if(BA&&BA.tagName){switch(BA.tagName.toUpperCase()){case i:case Ax:this.addItem(new this.ITEM_TYPE(BA,{parent:this}));break;}}}while((BA=BA.nextSibling));break;}}}},_getFirstEnabledItem:function(){var A3=this.getItems(),A7=A3.length,A6,A5;for(var A4=0;A4<A7;A4++){A6=A3[A4];if(A6&&!A6.cfg.getProperty(Af)&&A6.element.style.display!=AY){A5=A6;break;}}return A5;},_addItemToGroup:function(A8,A9,BD){var BB,BE,A6,BC,A7,A4,A5,BA;function A3(BF,BG){return(BF[BG]||A3(BF,(BG+1)));}if(A9 instanceof this.ITEM_TYPE){BB=A9;BB.parent=this;}else{if(AN.isString(A9)){BB=new this.ITEM_TYPE(A9,{parent:this});}else{if(AN.isObject(A9)){A9.parent=this;BB=new this.ITEM_TYPE(A9.text,A9);}}}if(BB){if(BB.cfg.getProperty(z)){this.activeItem=BB;}BE=AN.isNumber(A8)?A8:0;A6=this._getItemGroup(BE);if(!A6){A6=this._createItemGroup(BE);}if(AN.isNumber(BD)){A7=(BD>=A6.length);if(A6[BD]){A6.splice(BD,0,BB);}else{A6[BD]=BB;}BC=A6[BD];if(BC){if(A7&&(!BC.element.parentNode||BC.element.parentNode.nodeType==11)){this._aListElements[BE].appendChild(BC.element);}else{A4=A3(A6,(BD+1));if(A4&&(!BC.element.parentNode||BC.element.parentNode.nodeType==11)){this._aListElements[BE].insertBefore(BC.element,A4.element);}}BC.parent=this;this._subscribeToItemEvents(BC);this._configureSubmenu(BC);this._updateItemProperties(BE);this.itemAddedEvent.fire(BC);this.changeContentEvent.fire();BA=BC;}}else{A5=A6.length;A6[A5]=BB;BC=A6[A5];if(BC){if(!g.isAncestor(this._aListElements[BE],BC.element)){this._aListElements[BE].appendChild(BC.element);}BC.element.setAttribute(Ar,BE);BC.element.setAttribute(j,A5);BC.parent=this;BC.index=A5;BC.groupIndex=BE;this._subscribeToItemEvents(BC);this._configureSubmenu(BC);if(A5===0){g.addClass(BC.element,AK);}this.itemAddedEvent.fire(BC);this.changeContentEvent.fire();BA=BC;}}}return BA;},_removeItemFromGroupByIndex:function(A6,A4){var A5=AN.isNumber(A6)?A6:0,A7=this._getItemGroup(A5),A9,A8,A3;if(A7){A9=A7.splice(A4,1);A8=A9[0];if(A8){this._updateItemProperties(A5);if(A7.length===0){A3=this._aListElements[A5];if(this.body&&A3){this.body.removeChild(A3);}this._aItemGroups.splice(A5,1);this._aListElements.splice(A5,1);A3=this._aListElements[0];if(A3){g.addClass(A3,AK);}}this.itemRemovedEvent.fire(A8);this.changeContentEvent.fire();}}return A8;},_removeItemFromGroupByValue:function(A6,A3){var A8=this._getItemGroup(A6),A9,A7,A5,A4;if(A8){A9=A8.length;A7=-1;if(A9>0){A4=A9-1;do{if(A8[A4]==A3){A7=A4;break;}}while(A4--);if(A7>-1){A5=this._removeItemFromGroupByIndex(A6,A7);}}}return A5;},_updateItemProperties:function(A4){var A5=this._getItemGroup(A4),A8=A5.length,A7,A6,A3;if(A8>0){A3=A8-1;do{A7=A5[A3];if(A7){A6=A7.element;A7.index=A3;A7.groupIndex=A4;A6.setAttribute(Ar,A4);A6.setAttribute(j,A3);g.removeClass(A6,AK);}}while(A3--);if(A6){g.addClass(A6,AK);}}},_createItemGroup:function(A5){var A3,A4;if(!this._aItemGroups[A5]){this._aItemGroups[A5]=[];A3=document.createElement(L);this._aListElements[A5]=A3;A4=this._aItemGroups[A5];}return A4;},_getItemGroup:function(A5){var A3=AN.isNumber(A5)?A5:0,A6=this._aItemGroups,A4;if(A3 in A6){A4=A6[A3];}return A4;},_configureSubmenu:function(A3){var A4=A3.cfg.getProperty(O);if(A4){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,A4,true);this.renderEvent.subscribe(this._onParentMenuRender,A4,true);}},_subscribeToItemEvents:function(A3){A3.destroyEvent.subscribe(this._onMenuItemDestroy,A3,this);A3.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,A3,this);
},_onVisibleChange:function(A5,A4){var A3=A4[0];if(A3){g.addClass(this.element,As);}else{g.removeClass(this.element,As);}},_cancelHideDelay:function(){var A3=this.getRoot()._hideDelayTimer;if(A3){A3.cancel();}},_execHideDelay:function(){this._cancelHideDelay();var A3=this.getRoot();A3._hideDelayTimer=AN.later(A3.cfg.getProperty(AX),this,function(){if(A3.activeItem){if(A3.hasFocus()){A3.activeItem.focus();}A3.clearActiveItem();}if(A3==this&&!(this instanceof YAHOO.widget.MenuBar)&&this.cfg.getProperty(Ab)==AE){this.hide();}});},_cancelShowDelay:function(){var A3=this.getRoot()._showDelayTimer;if(A3){A3.cancel();}},_execSubmenuHideDelay:function(A5,A4,A3){A5._submenuHideDelayTimer=AN.later(50,this,function(){if(this._nCurrentMouseX>(A4+10)){A5._submenuHideDelayTimer=AN.later(A3,A5,function(){this.hide();});}else{A5.hide();}});},_disableScrollHeader:function(){if(!this._bHeaderDisabled){g.addClass(this.header,P);this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){g.addClass(this.footer,E);this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){g.removeClass(this.header,P);this._bHeaderDisabled=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){g.removeClass(this.footer,E);this._bFooterDisabled=false;}},_onMouseOver:function(BF,A8){var BG=A8[0],BC=A8[1],A3=AB.getTarget(BG),A7=this.getRoot(),BE=this._submenuHideDelayTimer,A4,A6,BB,A5,BA,A9;var BD=function(){if(this.parent.cfg.getProperty(z)){this.show();}};if(!this._bStopMouseEventHandlers){if(!this._bHandledMouseOverEvent&&(A3==this.element||g.isAncestor(this.element,A3))){if(this._useHideDelay){this._cancelHideDelay();}this._nCurrentMouseX=0;AB.on(this.element,c,this._onMouseMove,this,true);if(!(BC&&g.isAncestor(BC.element,AB.getRelatedTarget(BG)))){this.clearActiveItem();}if(this.parent&&BE){BE.cancel();this.parent.cfg.setProperty(z,true);A4=this.parent.parent;A4._bHandledMouseOutEvent=true;A4._bHandledMouseOverEvent=false;}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}if(BC&&!BC.handledMouseOverEvent&&!BC.cfg.getProperty(Af)&&(A3==BC.element||g.isAncestor(BC.element,A3))){A6=this.cfg.getProperty(At);BB=(A6>0);if(BB){this._cancelShowDelay();}A5=this.activeItem;if(A5){A5.cfg.setProperty(z,false);}BA=BC.cfg;BA.setProperty(z,true);if(this.hasFocus()||A7._hasFocus){BC.focus();A7._hasFocus=false;}if(this.cfg.getProperty(a)){A9=BA.getProperty(O);if(A9){if(BB){A7._showDelayTimer=AN.later(A7.cfg.getProperty(At),A9,BD);}else{A9.show();}}}BC.handledMouseOverEvent=true;BC.handledMouseOutEvent=false;}}},_onMouseOut:function(BB,A5){var BC=A5[0],A9=A5[1],A6=AB.getRelatedTarget(BC),BA=false,A8,A7,A3,A4;if(!this._bStopMouseEventHandlers){if(A9&&!A9.cfg.getProperty(Af)){A8=A9.cfg;A7=A8.getProperty(O);if(A7&&(A6==A7.element||g.isAncestor(A7.element,A6))){BA=true;}if(!A9.handledMouseOutEvent&&((A6!=A9.element&&!g.isAncestor(A9.element,A6))||BA)){if(!BA){A9.cfg.setProperty(z,false);if(A7){A3=this.cfg.getProperty(d);A4=this.cfg.getProperty(At);if(!(this instanceof YAHOO.widget.MenuBar)&&A3>0&&A4>=A3){this._execSubmenuHideDelay(A7,AB.getPageX(BC),A3);}else{A7.hide();}}}A9.handledMouseOutEvent=true;A9.handledMouseOverEvent=false;}}if(!this._bHandledMouseOutEvent&&((A6!=this.element&&!g.isAncestor(this.element,A6))||BA)){if(this._useHideDelay){this._execHideDelay();}AB.removeListener(this.element,c,this._onMouseMove);this._nCurrentMouseX=AB.getPageX(BC);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}}},_onMouseMove:function(A4,A3){if(!this._bStopMouseEventHandlers){this._nCurrentMouseX=AB.getPageX(A4);}},_onClick:function(BE,A5){var BF=A5[0],A9=A5[1],BB=false,A7,BC,A4,A3,A8,BA,BD;var A6=function(){if(!((Aq.gecko&&this.platform==Y)&&BF.button>0)){A4=this.getRoot();if(A4 instanceof YAHOO.widget.MenuBar||A4.cfg.getProperty(Ab)==C){A4.clearActiveItem();}else{A4.hide();}}};if(A9){if(A9.cfg.getProperty(Af)){AB.preventDefault(BF);A6.call(this);}else{A7=A9.cfg.getProperty(O);A8=A9.cfg.getProperty(Q);if(A8){BA=A8.indexOf(M);BD=A8.length;if(BA!=-1){A8=A8.substr(BA,BD);BD=A8.length;if(BD>1){A3=A8.substr(1,BD);BC=YAHOO.widget.MenuManager.getMenu(A3);if(BC){BB=(this.getRoot()===BC.getRoot());}}else{if(BD===1){BB=true;}}}}if(BB&&!A9.cfg.getProperty(V)){AB.preventDefault(BF);if(Aq.webkit){A9.focus();}else{A9.focusEvent.fire();}}if(!A7&&!this.cfg.getProperty(Ap)){A6.call(this);}}}},_onKeyDown:function(BH,BB){var BE=BB[0],BD=BB[1],BA,BF,A4,A8,BI,A3,BK,A7,BG,A6,BC,BJ,A9;if(this._useHideDelay){this._cancelHideDelay();}function A5(){this._bStopMouseEventHandlers=true;AN.later(10,this,function(){this._bStopMouseEventHandlers=false;});}if(BD&&!BD.cfg.getProperty(Af)){BF=BD.cfg;A4=this.parent;switch(BE.keyCode){case 38:case 40:BI=(BE.keyCode==38)?BD.getPreviousEnabledSibling():BD.getNextEnabledSibling();if(BI){this.clearActiveItem();BI.cfg.setProperty(z,true);BI.focus();if(this.cfg.getProperty(AU)>0){A3=this.body;BK=A3.scrollTop;A7=A3.offsetHeight;BG=this.getItems();A6=BG.length-1;BC=BI.element.offsetTop;if(BE.keyCode==40){if(BC>=(A7+BK)){A3.scrollTop=BC-A7;}else{if(BC<=BK){A3.scrollTop=0;}}if(BI==BG[A6]){A3.scrollTop=BI.element.offsetTop;}}else{if(BC<=BK){A3.scrollTop=BC-BI.element.offsetHeight;}else{if(BC>=(BK+A7)){A3.scrollTop=BC;}}if(BI==BG[0]){A3.scrollTop=0;}}BK=A3.scrollTop;BJ=A3.scrollHeight-A3.offsetHeight;if(BK===0){this._disableScrollHeader();this._enableScrollFooter();}else{if(BK==BJ){this._enableScrollHeader();this._disableScrollFooter();}else{this._enableScrollHeader();this._enableScrollFooter();}}}}AB.preventDefault(BE);A5();break;case 39:BA=BF.getProperty(O);if(BA){if(!BF.getProperty(z)){BF.setProperty(z,true);}BA.show();BA.setInitialFocus();BA.setInitialSelection();}else{A8=this.getRoot();if(A8 instanceof YAHOO.widget.MenuBar){BI=A8.activeItem.getNextEnabledSibling();if(BI){A8.clearActiveItem();BI.cfg.setProperty(z,true);BA=BI.cfg.getProperty(O);if(BA){BA.show();BA.setInitialFocus();}else{BI.focus();}}}}AB.preventDefault(BE);A5();break;case 37:if(A4){A9=A4.parent;
if(A9 instanceof YAHOO.widget.MenuBar){BI=A9.activeItem.getPreviousEnabledSibling();if(BI){A9.clearActiveItem();BI.cfg.setProperty(z,true);BA=BI.cfg.getProperty(O);if(BA){BA.show();BA.setInitialFocus();}else{BI.focus();}}}else{this.hide();A4.focus();}}AB.preventDefault(BE);A5();break;}}if(BE.keyCode==27){if(this.cfg.getProperty(Ab)==AE){this.hide();if(this.parent){this.parent.focus();}}else{if(this.activeItem){BA=this.activeItem.cfg.getProperty(O);if(BA&&BA.cfg.getProperty(As)){BA.hide();this.activeItem.focus();}else{this.activeItem.blur();this.activeItem.cfg.setProperty(z,false);}}}AB.preventDefault(BE);}},_onKeyPress:function(A5,A4){var A3=A4[0];if(A3.keyCode==40||A3.keyCode==38){AB.preventDefault(A3);}},_onBlur:function(A4,A3){if(this._hasFocus){this._hasFocus=false;}},_onYChange:function(A4,A3){var A6=this.parent,A8,A5,A7;if(A6){A8=A6.parent.body.scrollTop;if(A8>0){A7=(this.cfg.getProperty(R)-A8);g.setY(this.element,A7);A5=this.iframe;if(A5){g.setY(A5,A7);}this.cfg.setProperty(R,A7,true);}}},_onScrollTargetMouseOver:function(A9,BC){var BB=this._bodyScrollTimer;if(BB){BB.cancel();}this._cancelHideDelay();var A5=AB.getTarget(A9),A7=this.body,A6=this.cfg.getProperty(k),A3,A4;function BA(){var BD=A7.scrollTop;if(BD<A3){A7.scrollTop=(BD+A6);this._enableScrollHeader();}else{A7.scrollTop=A3;this._bodyScrollTimer.cancel();this._disableScrollFooter();}}function A8(){var BD=A7.scrollTop;if(BD>0){A7.scrollTop=(BD-A6);this._enableScrollFooter();}else{A7.scrollTop=0;this._bodyScrollTimer.cancel();this._disableScrollHeader();}}if(g.hasClass(A5,Ay)){A4=A8;}else{A3=A7.scrollHeight-A7.offsetHeight;A4=BA;}this._bodyScrollTimer=AN.later(10,this,A4,null,true);},_onScrollTargetMouseOut:function(A5,A3){var A4=this._bodyScrollTimer;if(A4){A4.cancel();}this._cancelHideDelay();},_onInit:function(A4,A3){this.cfg.subscribeToConfigEvent(As,this._onVisibleChange);var A5=!this.parent,A6=this.lazyLoad;if(((A5&&!A6)||(A5&&(this.cfg.getProperty(As)||this.cfg.getProperty(Ab)==C))||(!A5&&!A6))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){this.addItems(this.itemData);}}else{if(A6){this.cfg.fireQueue();}}},_onBeforeRender:function(A6,A5){var A7=this.element,BA=this._aListElements.length,A4=true,A9=0,A3,A8;if(BA>0){do{A3=this._aListElements[A9];if(A3){if(A4){g.addClass(A3,AK);A4=false;}if(!g.isAncestor(A7,A3)){this.appendToBody(A3);}A8=this._aGroupTitleElements[A9];if(A8){if(!g.isAncestor(A7,A8)){A3.parentNode.insertBefore(A8,A3);}g.addClass(A3,D);}}A9++;}while(A9<BA);}},_onRender:function(A4,A3){if(this.cfg.getProperty(Ab)==AE){if(!this.cfg.getProperty(As)){this.positionOffScreen();}}},_onBeforeShow:function(A5,A4){var A7,BA,A6,A8=this.cfg.getProperty(h);if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()==AI){A7=this.itemData.length;for(BA=0;BA<A7;BA++){if(this.itemData[BA].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[BA])));}}}else{this.addItems(this.itemData);}}A6=this.srcElement;if(A6){if(A6.tagName.toUpperCase()==AI){if(g.inDocument(A6)){this.render(A6.parentNode);}else{this.render(A8);}}else{this.render();}}else{if(this.parent){this.render(this.parent.element);}else{this.render(A8);}}}var A9=this.parent,A3;if(!A9&&this.cfg.getProperty(Ab)==AE){this.cfg.refireEvent(f);}if(A9){A3=A9.parent.cfg.getProperty(AP);this.cfg.setProperty(q,[A9.element,A3[0],A3[1]]);this.align();}},getConstrainedY:function(BF){var BQ=this,BM=BQ.cfg.getProperty(q),BT=BQ.cfg.getProperty(AU),BP,BE={"trbr":true,"tlbl":true,"bltl":true,"brtr":true},A8=(BM&&BE[BM[1]+BM[2]]),BA=BQ.element,BU=BA.offsetHeight,BO=AC.VIEWPORT_OFFSET,BJ=g.getViewportHeight(),BN=g.getDocumentScrollTop(),BK=(BQ.cfg.getProperty(Ah)+BO<BJ),BS,BB,BH,BI,BD=false,BC,A5,BG=BN+BO,A7=BN+BJ-BU-BO,A3=BF;var A9=function(){var BV;if((BQ.cfg.getProperty(R)-BN)>BH){BV=(BH-BU);}else{BV=(BH+BI);}BQ.cfg.setProperty(R,(BV+BN),true);return BV;};var A6=function(){if((BQ.cfg.getProperty(R)-BN)>BH){return(A5-BO);}else{return(BC-BO);}};var BL=function(){var BV;if((BQ.cfg.getProperty(R)-BN)>BH){BV=(BH+BI);}else{BV=(BH-BA.offsetHeight);}BQ.cfg.setProperty(R,(BV+BN),true);};var A4=function(){BQ._setScrollHeight(this.cfg.getProperty(AU));BQ.hideEvent.unsubscribe(A4);};var BR=function(){var BY=A6(),BV=(BQ.getItems().length>0),BX,BW;if(BU>BY){BX=BV?BQ.cfg.getProperty(Ah):BU;if((BY>BX)&&BV){BP=BY;}else{BP=BT;}BQ._setScrollHeight(BP);BQ.hideEvent.subscribe(A4);BL();if(BY<BX){if(BD){A9();}else{A9();BD=true;BW=BR();}}}else{if(BP&&(BP!==BT)){BQ._setScrollHeight(BT);BQ.hideEvent.subscribe(A4);BL();}}return BW;};if(BF<BG||BF>A7){if(BK){if(BQ.cfg.getProperty(A2)&&A8){BB=BM[0];BI=BB.offsetHeight;BH=(g.getY(BB)-BN);BC=BH;A5=(BJ-(BH+BI));BR();A3=BQ.cfg.getProperty(R);}else{if(!(BQ instanceof YAHOO.widget.MenuBar)&&BU>=BJ){BS=(BJ-(BO*2));if(BS>BQ.cfg.getProperty(Ah)){BQ._setScrollHeight(BS);BQ.hideEvent.subscribe(A4);BL();A3=BQ.cfg.getProperty(R);}}else{if(BF<BG){A3=BG;}else{if(BF>A7){A3=A7;}}}}}else{A3=BO+BN;}}return A3;},_onHide:function(A4,A3){if(this.cfg.getProperty(Ab)===AE){this.positionOffScreen();}},_onShow:function(BB,A9){var A3=this.parent,A5,A6,A8,A4;function A7(BD){var BC;if(BD.type==Ai||(BD.type==Ac&&BD.keyCode==27)){BC=AB.getTarget(BD);if(BC!=A5.element||!g.isAncestor(A5.element,BC)){A5.cfg.setProperty(a,false);AB.removeListener(document,Ai,A7);AB.removeListener(document,Ac,A7);}}}function BA(BD,BC,BE){this.cfg.setProperty(U,v);this.hideEvent.unsubscribe(BA,BE);}if(A3){A5=A3.parent;if(!A5.cfg.getProperty(a)&&(A5 instanceof YAHOO.widget.MenuBar||A5.cfg.getProperty(Ab)==C)){A5.cfg.setProperty(a,true);AB.on(document,Ai,A7);AB.on(document,Ac,A7);}if((this.cfg.getProperty("x")<A5.cfg.getProperty("x"))&&(Aq.gecko&&Aq.gecko<1.9)&&!this.cfg.getProperty(U)){A6=this.element;A8=A6.offsetWidth;A6.style.width=A8+AR;A4=(A8-(A6.offsetWidth-A8))+AR;this.cfg.setProperty(U,A4);this.hideEvent.subscribe(BA,A4);
}}},_onBeforeHide:function(A5,A4){var A3=this.activeItem,A7=this.getRoot(),A8,A6;if(A3){A8=A3.cfg;A8.setProperty(z,false);A6=A8.getProperty(O);if(A6){A6.hide();}}if(Aq.ie&&this.cfg.getProperty(Ab)===AE&&this.parent){A7._hasFocus=this.hasFocus();}if(A7==this){A7.blur();}},_onParentMenuConfigChange:function(A4,A3,A7){var A5=A3[0][0],A6=A3[0][1];switch(A5){case AG:case x:case AX:case At:case d:case AD:case Aw:case A0:case k:case AU:case Ah:case AF:case Ae:case A2:A7.cfg.setProperty(A5,A6);break;case AP:if(!(this.parent.parent instanceof YAHOO.widget.MenuBar)){A7.cfg.setProperty(A5,A6);}break;}},_onParentMenuRender:function(A4,A3,A9){var A6=A9.parent.parent,A5=A6.cfg,A7={constraintoviewport:A5.getProperty(x),xy:[0,0],clicktohide:A5.getProperty(AD),effect:A5.getProperty(Aw),showdelay:A5.getProperty(At),hidedelay:A5.getProperty(AX),submenuhidedelay:A5.getProperty(d),classname:A5.getProperty(A0),scrollincrement:A5.getProperty(k),maxheight:A5.getProperty(AU),minscrollheight:A5.getProperty(Ah),iframe:A5.getProperty(AG),shadow:A5.getProperty(Ae),preventcontextoverlap:A5.getProperty(A2),monitorresize:A5.getProperty(AF)},A8;if(!(A6 instanceof YAHOO.widget.MenuBar)){A7[AP]=A5.getProperty(AP);}A9.cfg.applyConfig(A7);if(!this.lazyLoad){A8=this.parent.element;if(this.element.parentNode==A8){this.render();}else{this.render(A8);}}},_onMenuItemDestroy:function(A5,A4,A3){this._removeItemFromGroupByValue(A3.groupIndex,A3);},_onMenuItemConfigChange:function(A5,A4,A3){var A7=A4[0][0],A8=A4[0][1],A6;switch(A7){case z:if(A8===true){this.activeItem=A3;}break;case O:A6=A4[0][1];if(A6){this._configureSubmenu(A3);}break;}},configVisible:function(A5,A4,A6){var A3,A7;if(this.cfg.getProperty(Ab)==AE){s.superclass.configVisible.call(this,A5,A4,A6);}else{A3=A4[0];A7=g.getStyle(this.element,AW);g.setStyle(this.element,J,As);if(A3){if(A7!=AV){this.beforeShowEvent.fire();g.setStyle(this.element,AW,AV);this.showEvent.fire();}}else{if(A7==AV){this.beforeHideEvent.fire();g.setStyle(this.element,AW,AY);this.hideEvent.fire();}}}},configPosition:function(A5,A4,A8){var A7=this.element,A6=A4[0]==C?C:AA,A9=this.cfg,A3;g.setStyle(A7,Ab,A6);if(A6==C){g.setStyle(A7,AW,AV);A9.setProperty(As,true);}else{g.setStyle(A7,J,AM);}if(A6==AA){A3=A9.getProperty(AT);if(!A3||A3===0){A9.setProperty(AT,1);}}},configIframe:function(A4,A3,A5){if(this.cfg.getProperty(Ab)==AE){s.superclass.configIframe.call(this,A4,A3,A5);}},configHideDelay:function(A4,A3,A5){var A6=A3[0];this._useHideDelay=(A6>0);},configContainer:function(A4,A3,A6){var A5=A3[0];if(AN.isString(A5)){this.cfg.setProperty(h,g.get(A5),true);}},_clearSetWidthFlag:function(){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);},_setScrollHeight:function(BE){var BA=BE,A9=false,BF=false,A6,A7,BD,A4,BC,BG,A3,BB,A8,A5;if(this.getItems().length>0){A6=this.element;A7=this.body;BD=this.header;A4=this.footer;BC=this._onScrollTargetMouseOver;BG=this._onScrollTargetMouseOut;A3=this.cfg.getProperty(Ah);if(BA>0&&BA<A3){BA=A3;}g.setStyle(A7,Am,v);g.removeClass(A7,m);A7.scrollTop=0;BF=((Aq.gecko&&Aq.gecko<1.9)||Aq.ie);if(BA>0&&BF&&!this.cfg.getProperty(U)){A8=A6.offsetWidth;A6.style.width=A8+AR;A5=(A8-(A6.offsetWidth-A8))+AR;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,A5);this._widthSetForScroll=true;this.cfg.subscribeToConfigEvent(U,this._clearSetWidthFlag);}if(BA>0&&(!BD&&!A4)){this.setHeader(AL);this.setFooter(AL);BD=this.header;A4=this.footer;g.addClass(BD,T);g.addClass(A4,y);A6.insertBefore(BD,A7);A6.appendChild(A4);}BB=BA;if(BD&&A4){BB=(BB-(BD.offsetHeight+A4.offsetHeight));}if((BB>0)&&(A7.offsetHeight>BA)){g.addClass(A7,m);g.setStyle(A7,Am,(BB+AR));if(!this._hasScrollEventHandlers){AB.on(BD,Ag,BC,this,true);AB.on(BD,G,BG,this,true);AB.on(A4,Ag,BC,this,true);AB.on(A4,G,BG,this,true);this._hasScrollEventHandlers=true;}this._disableScrollHeader();this._enableScrollFooter();A9=true;}else{if(BD&&A4){if(this._widthSetForScroll){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,v);}this._enableScrollHeader();this._enableScrollFooter();if(this._hasScrollEventHandlers){AB.removeListener(BD,Ag,BC);AB.removeListener(BD,G,BG);AB.removeListener(A4,Ag,BC);AB.removeListener(A4,G,BG);this._hasScrollEventHandlers=false;}A6.removeChild(BD);A6.removeChild(A4);this.header=null;this.footer=null;A9=true;}}if(A9){this.cfg.refireEvent(AG);this.cfg.refireEvent(Ae);}}},_setMaxHeight:function(A4,A3,A5){this._setScrollHeight(A5);this.renderEvent.unsubscribe(this._setMaxHeight);},configMaxHeight:function(A4,A3,A5){var A6=A3[0];if(this.lazyLoad&&!this.body&&A6>0){this.renderEvent.subscribe(this._setMaxHeight,A6,this);}else{this._setScrollHeight(A6);}},configClassName:function(A5,A4,A6){var A3=A4[0];if(this._sClassName){g.removeClass(this.element,this._sClassName);}g.addClass(this.element,A3);this._sClassName=A3;},_onItemAdded:function(A4,A3){var A5=A3[0];if(A5){A5.cfg.setProperty(Af,true);}},configDisabled:function(A5,A4,A8){var A7=A4[0],A3=this.getItems(),A9,A6;if(AN.isArray(A3)){A9=A3.length;if(A9>0){A6=A9-1;do{A3[A6].cfg.setProperty(Af,A7);}while(A6--);}if(A7){this.clearActiveItem(true);g.addClass(this.element,Af);this.itemAddedEvent.subscribe(this._onItemAdded);}else{g.removeClass(this.element,Af);this.itemAddedEvent.unsubscribe(this._onItemAdded);}}},configShadow:function(BB,A5,BA){var A9=function(){var BE=this.element,BD=this._shadow;if(BD&&BE){if(BD.style.width&&BD.style.height){BD.style.width=v;BD.style.height=v;}BD.style.width=(BE.offsetWidth+6)+AR;BD.style.height=(BE.offsetHeight+1)+AR;}};var BC=function(){this.element.appendChild(this._shadow);};var A7=function(){g.addClass(this._shadow,AH);};var A8=function(){g.removeClass(this._shadow,AH);};var A4=function(){var BE=this._shadow,BD;if(!BE){BD=this.element;if(!An){An=document.createElement(K);An.className=n;}BE=An.cloneNode(false);BD.appendChild(BE);this._shadow=BE;this.beforeShowEvent.subscribe(A7);this.beforeHideEvent.subscribe(A8);
if(Aq.ie){AN.later(0,this,function(){A9.call(this);this.syncIframe();});this.cfg.subscribeToConfigEvent(U,A9);this.cfg.subscribeToConfigEvent(Am,A9);this.cfg.subscribeToConfigEvent(AU,A9);this.changeContentEvent.subscribe(A9);Au.textResizeEvent.subscribe(A9,this,true);this.destroyEvent.subscribe(function(){Au.textResizeEvent.unsubscribe(A9,this);});}this.cfg.subscribeToConfigEvent(AU,BC);}};var A6=function(){if(this._shadow){BC.call(this);if(Aq.ie){A9.call(this);}}else{A4.call(this);}this.beforeShowEvent.unsubscribe(A6);};var A3=A5[0];if(A3&&this.cfg.getProperty(Ab)==AE){if(this.cfg.getProperty(As)){if(this._shadow){BC.call(this);if(Aq.ie){A9.call(this);}}else{A4.call(this);}}else{this.beforeShowEvent.subscribe(A6);}}},initEvents:function(){s.superclass.initEvents.call(this);var A4=Aa.length-1,A5,A3;do{A5=Aa[A4];A3=this.createEvent(A5[1]);A3.signature=F.LIST;this[A5[0]]=A3;}while(A4--);},positionOffScreen:function(){var A4=this.iframe,A5=this.element,A3=this.OFF_SCREEN_POSITION;A5.style.top=v;A5.style.left=v;if(A4){A4.style.top=A3;A4.style.left=A3;}},getRoot:function(){var A5=this.parent,A4,A3;if(A5){A4=A5.parent;A3=A4?A4.getRoot():this;}else{A3=this;}return A3;},toString:function(){var A4=Ao,A3=this.id;if(A3){A4+=(Az+A3);}return A4;},setItemGroupTitle:function(A8,A7){var A6,A5,A4,A3;if(AN.isString(A8)&&A8.length>0){A6=AN.isNumber(A7)?A7:0;A5=this._aGroupTitleElements[A6];if(A5){A5.innerHTML=A8;}else{A5=document.createElement(this.GROUP_TITLE_TAG_NAME);A5.innerHTML=A8;this._aGroupTitleElements[A6]=A5;}A4=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[A4]){g.removeClass(this._aGroupTitleElements[A4],AK);A3=A4;}}while(A4--);if(A3!==null){g.addClass(this._aGroupTitleElements[A3],AK);}this.changeContentEvent.fire();}},addItem:function(A3,A4){return this._addItemToGroup(A4,A3);},addItems:function(A7,A6){var A9,A3,A8,A4,A5;if(AN.isArray(A7)){A9=A7.length;A3=[];for(A4=0;A4<A9;A4++){A8=A7[A4];if(A8){if(AN.isArray(A8)){A3[A3.length]=this.addItems(A8,A4);}else{A3[A3.length]=this._addItemToGroup(A6,A8);}}}if(A3.length){A5=A3;}}return A5;},insertItem:function(A3,A4,A5){return this._addItemToGroup(A5,A3,A4);},removeItem:function(A3,A5){var A6,A4;if(!AN.isUndefined(A3)){if(A3 instanceof YAHOO.widget.MenuItem){A6=this._removeItemFromGroupByValue(A5,A3);}else{if(AN.isNumber(A3)){A6=this._removeItemFromGroupByIndex(A5,A3);}}if(A6){A6.destroy();A4=A6;}}return A4;},getItems:function(){var A6=this._aItemGroups,A4,A5,A3=[];if(AN.isArray(A6)){A4=A6.length;A5=((A4==1)?A6[0]:(Array.prototype.concat.apply(A3,A6)));}return A5;},getItemGroups:function(){return this._aItemGroups;},getItem:function(A4,A5){var A6,A3;if(AN.isNumber(A4)){A6=this._getItemGroup(A5);if(A6){A3=A6[A4];}}return A3;},getSubmenus:function(){var A4=this.getItems(),A8=A4.length,A3,A5,A7,A6;if(A8>0){A3=[];for(A6=0;A6<A8;A6++){A7=A4[A6];if(A7){A5=A7.cfg.getProperty(O);if(A5){A3[A3.length]=A5;}}}}return A3;},clearContent:function(){var A7=this.getItems(),A4=A7.length,A5=this.element,A6=this.body,BB=this.header,A3=this.footer,BA,A9,A8;if(A4>0){A8=A4-1;do{BA=A7[A8];if(BA){A9=BA.cfg.getProperty(O);if(A9){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,A9);this.renderEvent.unsubscribe(this._onParentMenuRender,A9);}this.removeItem(BA,BA.groupIndex);}}while(A8--);}if(BB){AB.purgeElement(BB);A5.removeChild(BB);}if(A3){AB.purgeElement(A3);A5.removeChild(A3);}if(A6){AB.purgeElement(A6);A6.innerHTML=v;}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty(U,null);},destroy:function(){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;s.superclass.destroy.call(this);},setInitialFocus:function(){var A3=this._getFirstEnabledItem();if(A3){A3.focus();}},setInitialSelection:function(){var A3=this._getFirstEnabledItem();if(A3){A3.cfg.setProperty(z,true);}},clearActiveItem:function(A5){if(this.cfg.getProperty(At)>0){this._cancelShowDelay();}var A3=this.activeItem,A6,A4;if(A3){A6=A3.cfg;if(A5){A3.blur();this.getRoot()._hasFocus=true;}A6.setProperty(z,false);A4=A6.getProperty(O);if(A4){A4.hide();}this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var A3;if(this.hasFocus()){A3=A1.getFocusedMenuItem();if(A3){A3.blur();}}},hasFocus:function(){return(A1.getFocusedMenu()==this.getRoot());},subscribe:function(){function A6(BB,BA,BD){var BE=BA[0],BC=BE.cfg.getProperty(O);if(BC){BC.subscribe.apply(BC,BD);}}function A9(BB,BA,BD){var BC=this.cfg.getProperty(O);if(BC){BC.subscribe.apply(BC,BD);}}s.superclass.subscribe.apply(this,arguments);s.superclass.subscribe.call(this,AS,A6,arguments);var A3=this.getItems(),A8,A7,A4,A5;if(A3){A8=A3.length;if(A8>0){A5=A8-1;do{A7=A3[A5];A4=A7.cfg.getProperty(O);if(A4){A4.subscribe.apply(A4,arguments);}else{A7.cfg.subscribeToConfigEvent(O,A9,arguments);}}while(A5--);}}},initDefaultConfig:function(){s.superclass.initDefaultConfig.call(this);var A3=this.cfg;A3.addProperty(AZ.key,{handler:this.configVisible,value:AZ.value,validator:AZ.validator});A3.addProperty(AQ.key,{handler:this.configConstrainToViewport,value:AQ.value,validator:AQ.validator,supercedes:AQ.supercedes});A3.addProperty(AJ.key,{value:AJ.value,validator:AJ.validator,supercedes:AJ.supercedes});A3.addProperty(S.key,{handler:this.configPosition,value:S.value,validator:S.validator,supercedes:S.supercedes});A3.addProperty(A.key,{value:A.value,suppressEvent:A.suppressEvent});A3.addProperty(u.key,{value:u.value,validator:u.validator,suppressEvent:u.suppressEvent});A3.addProperty(Z.key,{value:Z.value,validator:Z.validator,suppressEvent:Z.suppressEvent});A3.addProperty(r.key,{handler:this.configHideDelay,value:r.value,validator:r.validator,suppressEvent:r.suppressEvent});A3.addProperty(w.key,{value:w.value,validator:w.validator,suppressEvent:w.suppressEvent});A3.addProperty(p.key,{value:p.value,validator:p.validator,suppressEvent:p.suppressEvent});A3.addProperty(AO.key,{handler:this.configContainer,value:document.body,suppressEvent:AO.suppressEvent});
A3.addProperty(Ad.key,{value:Ad.value,validator:Ad.validator,supercedes:Ad.supercedes,suppressEvent:Ad.suppressEvent});A3.addProperty(N.key,{value:N.value,validator:N.validator,supercedes:N.supercedes,suppressEvent:N.suppressEvent});A3.addProperty(X.key,{handler:this.configMaxHeight,value:X.value,validator:X.validator,suppressEvent:X.suppressEvent,supercedes:X.supercedes});A3.addProperty(W.key,{handler:this.configClassName,value:W.value,validator:W.validator,supercedes:W.supercedes});A3.addProperty(b.key,{handler:this.configDisabled,value:b.value,validator:b.validator,suppressEvent:b.suppressEvent});A3.addProperty(I.key,{handler:this.configShadow,value:I.value,validator:I.validator});A3.addProperty(Aj.key,{value:Aj.value,validator:Aj.validator});}});})();(function(){YAHOO.widget.MenuItem=function(AS,AR){if(AS){if(AR){this.parent=AR.parent;this.value=AR.value;this.id=AR.id;}this.init(AS,AR);}};var x=YAHOO.util.Dom,j=YAHOO.widget.Module,AB=YAHOO.widget.Menu,c=YAHOO.widget.MenuItem,AK=YAHOO.util.CustomEvent,k=YAHOO.env.ua,AQ=YAHOO.lang,AL="text",O="#",Q="-",L="helptext",n="url",AH="target",A="emphasis",N="strongemphasis",b="checked",w="submenu",H="disabled",B="selected",P="hassubmenu",U="checked-disabled",AI="hassubmenu-disabled",AD="hassubmenu-selected",T="checked-selected",q="onclick",J="classname",AJ="",i="OPTION",v="OPTGROUP",K="LI",AE="href",r="SELECT",X="DIV",AN='<em class="helptext">',a="<em>",I="</em>",W="<strong>",y="</strong>",Y="preventcontextoverlap",h="obj",AG="scope",t="none",V="visible",E=" ",m="MenuItem",AA="click",D="show",M="hide",S="li",AF='<a href="#"></a>',p=[["mouseOverEvent","mouseover"],["mouseOutEvent","mouseout"],["mouseDownEvent","mousedown"],["mouseUpEvent","mouseup"],["clickEvent",AA],["keyPressEvent","keypress"],["keyDownEvent","keydown"],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["destroyEvent","destroy"]],o={key:AL,value:AJ,validator:AQ.isString,suppressEvent:true},s={key:L,supercedes:[AL],suppressEvent:true},G={key:n,value:O,suppressEvent:true},AO={key:AH,suppressEvent:true},AP={key:A,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},d={key:N,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},l={key:b,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[H,B]},F={key:w,suppressEvent:true,supercedes:[H,B]},AM={key:H,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL,B]},f={key:B,value:false,validator:AQ.isBoolean,suppressEvent:true},u={key:q,suppressEvent:true},AC={key:J,value:null,validator:AQ.isString,suppressEvent:true},z={key:"keylistener",value:null,suppressEvent:true},C=null,e={};var Z=function(AU,AT){var AR=e[AU];if(!AR){e[AU]={};AR=e[AU];}var AS=AR[AT];if(!AS){AS=AU+Q+AT;AR[AT]=AS;}return AS;};var g=function(AR){x.addClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.addClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};var R=function(AR){x.removeClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.removeClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};c.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:c,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:j.prototype.browser,id:null,init:function(AR,Ab){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=AB;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var AX=this.cfg,AY=O,AT,Aa,AZ,AS,AV,AU,AW;if(AQ.isString(AR)){this._createRootNodeStructure();AX.queueProperty(AL,AR);}else{if(AR&&AR.tagName){switch(AR.tagName.toUpperCase()){case i:this._createRootNodeStructure();AX.queueProperty(AL,AR.text);AX.queueProperty(H,AR.disabled);this.value=AR.value;this.srcElement=AR;break;case v:this._createRootNodeStructure();AX.queueProperty(AL,AR.label);AX.queueProperty(H,AR.disabled);this.srcElement=AR;this._initSubTree();break;case K:AZ=x.getFirstChild(AR);if(AZ){AY=AZ.getAttribute(AE,2);AS=AZ.getAttribute(AH);AV=AZ.innerHTML;}this.srcElement=AR;this.element=AR;this._oAnchor=AZ;AX.setProperty(AL,AV,true);AX.setProperty(n,AY,true);AX.setProperty(AH,AS,true);this._initSubTree();break;}}}if(this.element){AU=(this.srcElement||this.element).id;if(!AU){AU=this.id||x.generateId();this.element.id=AU;}this.id=AU;x.addClass(this.element,this.CSS_CLASS_NAME);x.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);AW=p.length-1;do{Aa=p[AW];AT=this.createEvent(Aa[1]);AT.signature=AK.LIST;this[Aa[0]]=AT;}while(AW--);if(Ab){AX.applyConfig(Ab);}AX.fireQueue();}},_createRootNodeStructure:function(){var AR,AS;if(!C){C=document.createElement(S);C.innerHTML=AF;}AR=C.cloneNode(true);AR.className=this.CSS_CLASS_NAME;AS=AR.firstChild;AS.className=this.CSS_LABEL_CLASS_NAME;this.element=AR;this._oAnchor=AS;},_initSubTree:function(){var AX=this.srcElement,AT=this.cfg,AV,AU,AS,AR,AW;if(AX.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()==r){AT.setProperty(w,{id:x.generateId(),itemdata:AX.childNodes});}else{AV=AX.firstChild;AU=[];do{if(AV&&AV.tagName){switch(AV.tagName.toUpperCase()){case X:AT.setProperty(w,AV);break;case i:AU[AU.length]=AV;break;}}}while((AV=AV.nextSibling));AS=AU.length;if(AS>0){AR=new this.SUBMENU_TYPE(x.generateId());AT.setProperty(w,AR);for(AW=0;AW<AS;AW++){AR.addItem((new AR.ITEM_TYPE(AU[AW])));}}}}},configText:function(Aa,AT,AV){var AS=AT[0],AU=this.cfg,AY=this._oAnchor,AR=AU.getProperty(L),AZ=AJ,AW=AJ,AX=AJ;if(AS){if(AR){AZ=AN+AR+I;}if(AU.getProperty(A)){AW=a;AX=I;}if(AU.getProperty(N)){AW=W;AX=y;}AY.innerHTML=(AW+AS+AX+AZ);}},configHelpText:function(AT,AS,AR){this.cfg.refireEvent(AL);},configURL:function(AT,AS,AR){var AV=AS[0];if(!AV){AV=O;}var AU=this._oAnchor;if(k.opera){AU.removeAttribute(AE);}AU.setAttribute(AE,AV);},configTarget:function(AU,AT,AS){var AR=AT[0],AV=this._oAnchor;if(AR&&AR.length>0){AV.setAttribute(AH,AR);}else{AV.removeAttribute(AH);}},configEmphasis:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;
if(AV&&AU.getProperty(N)){AU.setProperty(N,false);}AU.refireEvent(AL);},configStrongEmphasis:function(AU,AT,AS){var AR=AT[0],AV=this.cfg;if(AR&&AV.getProperty(A)){AV.setProperty(A,false);}AV.refireEvent(AL);},configChecked:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV){g.call(this,b);}else{R.call(this,b);}AU.refireEvent(AL);if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configDisabled:function(AT,AS,AR){var AV=AS[0],AW=this.cfg,AU=AW.getProperty(w),AX=AW.getProperty(b);if(AV){if(AW.getProperty(B)){AW.setProperty(B,false);}g.call(this,H);if(AU){g.call(this,AI);}if(AX){g.call(this,U);}}else{R.call(this,H);if(AU){R.call(this,AI);}if(AX){R.call(this,U);}}},configSelected:function(AT,AS,AR){var AX=this.cfg,AW=this._oAnchor,AV=AS[0],AY=AX.getProperty(b),AU=AX.getProperty(w);if(k.opera){AW.blur();}if(AV&&!AX.getProperty(H)){g.call(this,B);if(AU){g.call(this,AD);}if(AY){g.call(this,T);}}else{R.call(this,B);if(AU){R.call(this,AD);}if(AY){R.call(this,T);}}if(this.hasFocus()&&k.opera){AW.focus();}},_onSubmenuBeforeHide:function(AU,AT){var AV=this.parent,AR;function AS(){AV._oAnchor.blur();AR.beforeHideEvent.unsubscribe(AS);}if(AV.hasFocus()){AR=AV.parent;AR.beforeHideEvent.subscribe(AS);}},configSubmenu:function(AY,AT,AW){var AV=AT[0],AU=this.cfg,AS=this.parent&&this.parent.lazyLoad,AX,AZ,AR;if(AV){if(AV instanceof AB){AX=AV;AX.parent=this;AX.lazyLoad=AS;}else{if(AQ.isObject(AV)&&AV.id&&!AV.nodeType){AZ=AV.id;AR=AV;AR.lazyload=AS;AR.parent=this;AX=new this.SUBMENU_TYPE(AZ,AR);AU.setProperty(w,AX,true);}else{AX=new this.SUBMENU_TYPE(AV,{lazyload:AS,parent:this});AU.setProperty(w,AX,true);}}if(AX){AX.cfg.setProperty(Y,true);g.call(this,P);if(AU.getProperty(n)===O){AU.setProperty(n,(O+AX.id));}this._oSubmenu=AX;if(k.opera){AX.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{R.call(this,P);if(this._oSubmenu){this._oSubmenu.destroy();}}if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configOnClick:function(AT,AS,AR){var AU=AS[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=AU)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&AQ.isObject(AU)&&AQ.isFunction(AU.fn)){this.clickEvent.subscribe(AU.fn,((h in AU)?AU.obj:this),((AG in AU)?AU.scope:null));this._oOnclickAttributeValue=AU;}},configClassName:function(AU,AT,AS){var AR=AT[0];if(this._sClassName){x.removeClass(this.element,this._sClassName);}x.addClass(this.element,AR);this._sClassName=AR;},_dispatchClickEvent:function(){var AT=this,AS,AR;if(!AT.cfg.getProperty(H)){AS=x.getFirstChild(AT.element);if(k.ie){AS.fireEvent(q);}else{if((k.gecko&&k.gecko>=1.9)||k.opera||k.webkit){AR=document.createEvent("HTMLEvents");AR.initEvent(AA,true,true);}else{AR=document.createEvent("MouseEvents");AR.initMouseEvent(AA,true,true,window,0,0,0,0,0,false,false,false,false,0,null);}AS.dispatchEvent(AR);}}},_createKeyListener:function(AU,AT,AW){var AV=this,AS=AV.parent;var AR=new YAHOO.util.KeyListener(AS.element.ownerDocument,AW,{fn:AV._dispatchClickEvent,scope:AV,correctScope:true});if(AS.cfg.getProperty(V)){AR.enable();}AS.subscribe(D,AR.enable,null,AR);AS.subscribe(M,AR.disable,null,AR);AV._keyListener=AR;AS.unsubscribe(D,AV._createKeyListener,AW);},configKeyListener:function(AT,AS){var AV=AS[0],AU=this,AR=AU.parent;if(AU._keyData){AR.unsubscribe(D,AU._createKeyListener,AU._keyData);AU._keyData=null;}if(AU._keyListener){AR.unsubscribe(D,AU._keyListener.enable);AR.unsubscribe(M,AU._keyListener.disable);AU._keyListener.disable();AU._keyListener=null;}if(AV){AU._keyData=AV;AR.subscribe(D,AU._createKeyListener,AV,AU);}},initDefaultConfig:function(){var AR=this.cfg;AR.addProperty(o.key,{handler:this.configText,value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});AR.addProperty(s.key,{handler:this.configHelpText,supercedes:s.supercedes,suppressEvent:s.suppressEvent});AR.addProperty(G.key,{handler:this.configURL,value:G.value,suppressEvent:G.suppressEvent});AR.addProperty(AO.key,{handler:this.configTarget,suppressEvent:AO.suppressEvent});AR.addProperty(AP.key,{handler:this.configEmphasis,value:AP.value,validator:AP.validator,suppressEvent:AP.suppressEvent,supercedes:AP.supercedes});AR.addProperty(d.key,{handler:this.configStrongEmphasis,value:d.value,validator:d.validator,suppressEvent:d.suppressEvent,supercedes:d.supercedes});AR.addProperty(l.key,{handler:this.configChecked,value:l.value,validator:l.validator,suppressEvent:l.suppressEvent,supercedes:l.supercedes});AR.addProperty(AM.key,{handler:this.configDisabled,value:AM.value,validator:AM.validator,suppressEvent:AM.suppressEvent});AR.addProperty(f.key,{handler:this.configSelected,value:f.value,validator:f.validator,suppressEvent:f.suppressEvent});AR.addProperty(F.key,{handler:this.configSubmenu,supercedes:F.supercedes,suppressEvent:F.suppressEvent});AR.addProperty(u.key,{handler:this.configOnClick,suppressEvent:u.suppressEvent});AR.addProperty(AC.key,{handler:this.configClassName,value:AC.value,validator:AC.validator,suppressEvent:AC.suppressEvent});AR.addProperty(z.key,{handler:this.configKeyListener,value:z.value,suppressEvent:z.suppressEvent});},getNextEnabledSibling:function(){var AU,AX,AR,AW,AV,AS;function AT(AY,AZ){return AY[AZ]||AT(AY,(AZ+1));}if(this.parent instanceof AB){AU=this.groupIndex;AX=this.parent.getItemGroups();if(this.index<(AX[AU].length-1)){AR=AT(AX[AU],(this.index+1));}else{if(AU<(AX.length-1)){AW=AU+1;}else{AW=0;}AV=AT(AX,AW);AR=AT(AV,0);}AS=(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getNextEnabledSibling():AR;}return AS;},getPreviousEnabledSibling:function(){var AW,AY,AS,AR,AV,AU;function AX(AZ,Aa){return AZ[Aa]||AX(AZ,(Aa-1));}function AT(AZ,Aa){return AZ[Aa]?Aa:AT(AZ,(Aa+1));}if(this.parent instanceof AB){AW=this.groupIndex;AY=this.parent.getItemGroups();if(this.index>AT(AY[AW],0)){AS=AX(AY[AW],(this.index-1));}else{if(AW>AT(AY,0)){AR=AW-1;}else{AR=AY.length-1;
}AV=AX(AY,AR);AS=AX(AV,(AV.length-1));}AU=(AS.cfg.getProperty(H)||AS.element.style.display==t)?AS.getPreviousEnabledSibling():AS;}return AU;},focus:function(){var AU=this.parent,AT=this._oAnchor,AR=AU.activeItem;function AS(){try{if(!(k.ie&&!document.hasFocus())){if(AR){AR.blurEvent.fire();}AT.focus();this.focusEvent.fire();}}catch(AV){}}if(!this.cfg.getProperty(H)&&AU&&AU.cfg.getProperty(V)&&this.element.style.display!=t){AQ.later(0,this,AS);}},blur:function(){var AR=this.parent;if(!this.cfg.getProperty(H)&&AR&&AR.cfg.getProperty(V)){AQ.later(0,this,function(){try{this._oAnchor.blur();this.blurEvent.fire();}catch(AS){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var AT=this.element,AS,AR,AV,AU;if(AT){AS=this.cfg.getProperty(w);if(AS){AS.destroy();}AR=AT.parentNode;if(AR){AR.removeChild(AT);this.destroyEvent.fire();}AU=p.length-1;do{AV=p[AU];this[AV[0]].unsubscribeAll();}while(AU--);this.cfg.configChangedEvent.unsubscribeAll();}},toString:function(){var AS=m,AR=this.id;if(AR){AS+=(E+AR);}return AS;}};AQ.augmentProto(c,YAHOO.util.EventProvider);})();(function(){var B="xy",C="mousedown",F="ContextMenu",J=" ";YAHOO.widget.ContextMenu=function(L,K){YAHOO.widget.ContextMenu.superclass.constructor.call(this,L,K);};var I=YAHOO.util.Event,E=YAHOO.env.ua,G=YAHOO.widget.ContextMenu,A={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(E.opera?C:"contextmenu"),"CLICK":"click"},H={key:"trigger",suppressEvent:true};function D(L,K,M){this.cfg.setProperty(B,M);this.beforeShowEvent.unsubscribe(D,M);}YAHOO.lang.extend(G,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(L,K){G.superclass.init.call(this,L);this.beforeInitEvent.fire(G);if(K){this.cfg.applyConfig(K,true);}this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(A.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var K=this._oTrigger;if(K){I.removeListener(K,A.CONTEXT_MENU,this._onTriggerContextMenu);if(E.opera){I.removeListener(K,A.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(L,K){if(L.ctrlKey){I.stopEvent(L);}},_onTriggerContextMenu:function(M,K){var L;if(!(M.type==C&&!M.ctrlKey)){this.contextEventTarget=I.getTarget(M);this.triggerContextMenuEvent.fire(M);if(!this._bCancelled){I.stopEvent(M);YAHOO.widget.MenuManager.hideVisible();L=I.getXY(M);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(D,L);}else{this.cfg.setProperty(B,L);}this.show();}this._bCancelled=false;}},toString:function(){var L=F,K=this.id;if(K){L+=(J+K);}return L;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.key,{handler:this.configTrigger,suppressEvent:H.suppressEvent});},destroy:function(){this._removeEventHandlers();G.superclass.destroy.call(this);},configTrigger:function(L,K,N){var M=K[0];if(M){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=M;I.on(M,A.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(E.opera){I.on(M,A.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){var D=YAHOO.lang,N="static",M="dynamic,"+N,A="disabled",F="selected",B="autosubmenudisplay",G="submenu",C="visible",Q=" ",H="submenutoggleregion",P="MenuBar";YAHOO.widget.MenuBar=function(T,S){YAHOO.widget.MenuBar.superclass.constructor.call(this,T,S);};function O(T){var S=false;if(D.isString(T)){S=(M.indexOf((T.toLowerCase()))!=-1);}return S;}var R=YAHOO.util.Event,L=YAHOO.widget.MenuBar,K={key:"position",value:N,validator:O,supercedes:[C]},E={key:"submenualignment",value:["tl","bl"]},J={key:B,value:false,validator:D.isBoolean,suppressEvent:true},I={key:H,value:false,validator:D.isBoolean};D.extend(L,YAHOO.widget.Menu,{init:function(T,S){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}L.superclass.init.call(this,T);this.beforeInitEvent.fire(L);if(S){this.cfg.applyConfig(S,true);}this.initEvent.fire(L);},CSS_CLASS_NAME:"yuimenubar",SUBMENU_TOGGLE_REGION_WIDTH:20,_onKeyDown:function(U,T,Y){var S=T[0],Z=T[1],W,X,V;if(Z&&!Z.cfg.getProperty(A)){X=Z.cfg;switch(S.keyCode){case 37:case 39:if(Z==this.activeItem&&!X.getProperty(F)){X.setProperty(F,true);}else{V=(S.keyCode==37)?Z.getPreviousEnabledSibling():Z.getNextEnabledSibling();if(V){this.clearActiveItem();V.cfg.setProperty(F,true);W=V.cfg.getProperty(G);if(W){W.show();W.setInitialFocus();}else{V.focus();}}}R.preventDefault(S);break;case 40:if(this.activeItem!=Z){this.clearActiveItem();X.setProperty(F,true);Z.focus();}W=X.getProperty(G);if(W){if(W.cfg.getProperty(C)){W.setInitialSelection();W.setInitialFocus();}else{W.show();W.setInitialFocus();}}R.preventDefault(S);break;}}if(S.keyCode==27&&this.activeItem){W=this.activeItem.cfg.getProperty(G);if(W&&W.cfg.getProperty(C)){W.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty(F,false);this.activeItem.blur();}R.preventDefault(S);}},_onClick:function(e,Y,b){L.superclass._onClick.call(this,e,Y,b);var d=Y[1],T=true,S,f,U,W,Z,a,c,V;var X=function(){if(a.cfg.getProperty(C)){a.hide();}else{a.show();}};if(d&&!d.cfg.getProperty(A)){f=Y[0];U=R.getTarget(f);W=this.activeItem;Z=this.cfg;if(W&&W!=d){this.clearActiveItem();}d.cfg.setProperty(F,true);a=d.cfg.getProperty(G);if(a){S=d.element;c=YAHOO.util.Dom.getX(S);V=c+(S.offsetWidth-this.SUBMENU_TOGGLE_REGION_WIDTH);if(Z.getProperty(H)){if(R.getPageX(f)>V){X();R.preventDefault(f);T=false;}}else{X();}}}return T;},configSubmenuToggle:function(U,T){var S=T[0];if(S){this.cfg.setProperty(B,false);}},toString:function(){var T=P,S=this.id;if(S){T+=(Q+S);}return T;},initDefaultConfig:function(){L.superclass.initDefaultConfig.call(this);var S=this.cfg;S.addProperty(K.key,{handler:this.configPosition,value:K.value,validator:K.validator,supercedes:K.supercedes});
S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
YAHOO.widget.LogMsg=function(A){this.msg=this.time=this.category=this.source=this.sourceDetail=null;if(A&&(A.constructor==Object)){for(var B in A){if(A.hasOwnProperty(B)){this[B]=A[B];}}}};YAHOO.widget.LogWriter=function(A){if(!A){YAHOO.log("Could not instantiate LogWriter due to invalid source.","error","LogWriter");return;}this._source=A;};YAHOO.widget.LogWriter.prototype.toString=function(){return"LogWriter "+this._sSource;};YAHOO.widget.LogWriter.prototype.log=function(A,B){YAHOO.widget.Logger.log(A,B,this._source);};YAHOO.widget.LogWriter.prototype.getSource=function(){return this._source;};YAHOO.widget.LogWriter.prototype.setSource=function(A){if(!A){YAHOO.log("Could not set source due to invalid source.","error",this.toString());return;}else{this._source=A;}};YAHOO.widget.LogWriter.prototype._source=null;YAHOO.widget.LogReader=function(B,A){this._sName=YAHOO.widget.LogReader._index;YAHOO.widget.LogReader._index++;this._buffer=[];this._filterCheckboxes={};this._lastTime=YAHOO.widget.Logger.getStartTime();if(A&&(A.constructor==Object)){for(var C in A){if(A.hasOwnProperty(C)){this[C]=A[C];}}}this._initContainerEl(B);if(!this._elContainer){YAHOO.log("Could not instantiate LogReader due to an invalid container element "+B,"error",this.toString());return;}this._initHeaderEl();this._initConsoleEl();this._initFooterEl();this._initDragDrop();this._initCategories();this._initSources();YAHOO.widget.Logger.newLogEvent.subscribe(this._onNewLog,this);YAHOO.widget.Logger.logResetEvent.subscribe(this._onReset,this);YAHOO.widget.Logger.categoryCreateEvent.subscribe(this._onCategoryCreate,this);YAHOO.widget.Logger.sourceCreateEvent.subscribe(this._onSourceCreate,this);this._filterLogs();YAHOO.log("LogReader initialized",null,this.toString());};YAHOO.lang.augmentObject(YAHOO.widget.LogReader,{_index:0,ENTRY_TEMPLATE:(function(){var A=document.createElement("pre");YAHOO.util.Dom.addClass(A,"yui-log-entry");return A;})(),VERBOSE_TEMPLATE:"<p><span class='{category}'>{label}</span> {totalTime}ms (+{elapsedTime}) {localTime}:</p><p>{sourceAndDetail}</p><p>{message}</p>",BASIC_TEMPLATE:"<p><span class='{category}'>{label}</span> {totalTime}ms (+{elapsedTime}) {localTime}: {sourceAndDetail}: {message}</p>"});YAHOO.widget.LogReader.prototype={logReaderEnabled:true,width:null,height:null,top:null,left:null,right:null,bottom:null,fontSize:null,footerEnabled:true,verboseOutput:true,entryFormat:null,newestOnTop:true,outputBuffer:100,thresholdMax:500,thresholdMin:100,isCollapsed:false,isPaused:false,draggable:true,toString:function(){return"LogReader instance"+this._sName;},pause:function(){this.isPaused=true;this._timeout=null;this.logReaderEnabled=false;if(this._btnPause){this._btnPause.value="Resume";}},resume:function(){this.isPaused=false;this.logReaderEnabled=true;this._printBuffer();if(this._btnPause){this._btnPause.value="Pause";}},hide:function(){this._elContainer.style.display="none";},show:function(){this._elContainer.style.display="block";},collapse:function(){this._elConsole.style.display="none";if(this._elFt){this._elFt.style.display="none";}this._btnCollapse.value="Expand";this.isCollapsed=true;},expand:function(){this._elConsole.style.display="block";if(this._elFt){this._elFt.style.display="block";}this._btnCollapse.value="Collapse";this.isCollapsed=false;},getCheckbox:function(A){return this._filterCheckboxes[A];},getCategories:function(){return this._categoryFilters;},showCategory:function(B){var D=this._categoryFilters;if(D.indexOf){if(D.indexOf(B)>-1){return;}}else{for(var A=0;A<D.length;A++){if(D[A]===B){return;}}}this._categoryFilters.push(B);this._filterLogs();var C=this.getCheckbox(B);if(C){C.checked=true;}},hideCategory:function(B){var D=this._categoryFilters;for(var A=0;A<D.length;A++){if(B==D[A]){D.splice(A,1);break;}}this._filterLogs();var C=this.getCheckbox(B);if(C){C.checked=false;}},getSources:function(){return this._sourceFilters;},showSource:function(A){var D=this._sourceFilters;if(D.indexOf){if(D.indexOf(A)>-1){return;}}else{for(var B=0;B<D.length;B++){if(A==D[B]){return;}}}D.push(A);this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=true;}},hideSource:function(A){var D=this._sourceFilters;for(var B=0;B<D.length;B++){if(A==D[B]){D.splice(B,1);break;}}this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=false;}},clearConsole:function(){this._timeout=null;this._buffer=[];this._consoleMsgCount=0;var A=this._elConsole;A.innerHTML="";},setTitle:function(A){this._title.innerHTML=this.html2Text(A);},getLastTime:function(){return this._lastTime;},formatMsg:function(C){var B=YAHOO.widget.LogReader,A=this.entryFormat||(this.verboseOutput?B.VERBOSE_TEMPLATE:B.BASIC_TEMPLATE),D={category:C.category,label:C.category.substring(0,4).toUpperCase(),sourceAndDetail:C.sourceDetail?C.source+" "+C.sourceDetail:C.source,message:this.html2Text(C.msg||C.message||"")};if(C.time&&C.time.getTime){D.localTime=C.time.toLocaleTimeString?C.time.toLocaleTimeString():C.time.toString();D.elapsedTime=C.time.getTime()-this.getLastTime();D.totalTime=C.time.getTime()-YAHOO.widget.Logger.getStartTime();}var E=B.ENTRY_TEMPLATE.cloneNode(true);if(this.verboseOutput){E.className+=" yui-log-verbose";}E.innerHTML=A.replace(/\{(\w+)\}/g,function(F,G){return(G in D)?D[G]:"";});return E;},html2Text:function(A){if(A){A+="";return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");}return"";},_sName:null,_buffer:null,_consoleMsgCount:0,_lastTime:null,_timeout:null,_filterCheckboxes:null,_categoryFilters:null,_sourceFilters:null,_elContainer:null,_elHd:null,_elCollapse:null,_btnCollapse:null,_title:null,_elConsole:null,_elFt:null,_elBtns:null,_elCategoryFilters:null,_elSourceFilters:null,_btnPause:null,_btnClear:null,_initContainerEl:function(B){B=YAHOO.util.Dom.get(B);if(B&&B.tagName&&(B.tagName.toLowerCase()=="div")){this._elContainer=B;YAHOO.util.Dom.addClass(this._elContainer,"yui-log");}else{this._elContainer=document.body.appendChild(document.createElement("div"));YAHOO.util.Dom.addClass(this._elContainer,"yui-log");
YAHOO.util.Dom.addClass(this._elContainer,"yui-log-container");var A=this._elContainer.style;if(this.width){A.width=this.width;}if(this.right){A.right=this.right;}if(this.top){A.top=this.top;}if(this.left){A.left=this.left;A.right="auto";}if(this.bottom){A.bottom=this.bottom;A.top="auto";}if(this.fontSize){A.fontSize=this.fontSize;}if(navigator.userAgent.toLowerCase().indexOf("opera")!=-1){document.body.style+="";}}},_initHeaderEl:function(){var A=this;if(this._elHd){YAHOO.util.Event.purgeElement(this._elHd,true);this._elHd.innerHTML="";}this._elHd=this._elContainer.appendChild(document.createElement("div"));this._elHd.id="yui-log-hd"+this._sName;this._elHd.className="yui-log-hd";this._elCollapse=this._elHd.appendChild(document.createElement("div"));this._elCollapse.className="yui-log-btns";this._btnCollapse=document.createElement("input");this._btnCollapse.type="button";this._btnCollapse.className="yui-log-button";this._btnCollapse.value="Collapse";this._btnCollapse=this._elCollapse.appendChild(this._btnCollapse);YAHOO.util.Event.addListener(A._btnCollapse,"click",A._onClickCollapseBtn,A);this._title=this._elHd.appendChild(document.createElement("h4"));this._title.innerHTML="Logger Console";},_initConsoleEl:function(){if(this._elConsole){YAHOO.util.Event.purgeElement(this._elConsole,true);this._elConsole.innerHTML="";}this._elConsole=this._elContainer.appendChild(document.createElement("div"));this._elConsole.className="yui-log-bd";if(this.height){this._elConsole.style.height=this.height;}},_initFooterEl:function(){var A=this;if(this.footerEnabled){if(this._elFt){YAHOO.util.Event.purgeElement(this._elFt,true);this._elFt.innerHTML="";}this._elFt=this._elContainer.appendChild(document.createElement("div"));this._elFt.className="yui-log-ft";this._elBtns=this._elFt.appendChild(document.createElement("div"));this._elBtns.className="yui-log-btns";this._btnPause=document.createElement("input");this._btnPause.type="button";this._btnPause.className="yui-log-button";this._btnPause.value="Pause";this._btnPause=this._elBtns.appendChild(this._btnPause);YAHOO.util.Event.addListener(A._btnPause,"click",A._onClickPauseBtn,A);this._btnClear=document.createElement("input");this._btnClear.type="button";this._btnClear.className="yui-log-button";this._btnClear.value="Clear";this._btnClear=this._elBtns.appendChild(this._btnClear);YAHOO.util.Event.addListener(A._btnClear,"click",A._onClickClearBtn,A);this._elCategoryFilters=this._elFt.appendChild(document.createElement("div"));this._elCategoryFilters.className="yui-log-categoryfilters";this._elSourceFilters=this._elFt.appendChild(document.createElement("div"));this._elSourceFilters.className="yui-log-sourcefilters";}},_initDragDrop:function(){if(YAHOO.util.DD&&this.draggable&&this._elHd){var A=new YAHOO.util.DD(this._elContainer);A.setHandleElId(this._elHd.id);this._elHd.style.cursor="move";}},_initCategories:function(){this._categoryFilters=[];var C=YAHOO.widget.Logger.categories;for(var A=0;A<C.length;A++){var B=C[A];this._categoryFilters.push(B);if(this._elCategoryFilters){this._createCategoryCheckbox(B);}}},_initSources:function(){this._sourceFilters=[];var C=YAHOO.widget.Logger.sources;for(var B=0;B<C.length;B++){var A=C[B];this._sourceFilters.push(A);if(this._elSourceFilters){this._createSourceCheckbox(A);}}},_createCategoryCheckbox:function(B){var A=this;if(this._elFt){var E=this._elCategoryFilters;var D=E.appendChild(document.createElement("span"));D.className="yui-log-filtergrp";var C=document.createElement("input");C.id="yui-log-filter-"+B+this._sName;C.className="yui-log-filter-"+B;C.type="checkbox";C.category=B;C=D.appendChild(C);C.checked=true;YAHOO.util.Event.addListener(C,"click",A._onCheckCategory,A);var F=D.appendChild(document.createElement("label"));F.htmlFor=C.id;F.className=B;F.innerHTML=B;this._filterCheckboxes[B]=C;}},_createSourceCheckbox:function(A){var D=this;if(this._elFt){var F=this._elSourceFilters;var E=F.appendChild(document.createElement("span"));E.className="yui-log-filtergrp";var C=document.createElement("input");C.id="yui-log-filter"+A+this._sName;C.className="yui-log-filter"+A;C.type="checkbox";C.source=A;C=E.appendChild(C);C.checked=true;YAHOO.util.Event.addListener(C,"click",D._onCheckSource,D);var B=E.appendChild(document.createElement("label"));B.htmlFor=C.id;B.className=A;B.innerHTML=A;this._filterCheckboxes[A]=C;}},_filterLogs:function(){if(this._elConsole!==null){this.clearConsole();this._printToConsole(YAHOO.widget.Logger.getStack());}},_printBuffer:function(){this._timeout=null;if(this._elConsole!==null){var B=this.thresholdMax;B=(B&&!isNaN(B))?B:500;if(this._consoleMsgCount<B){var A=[];for(var C=0;C<this._buffer.length;C++){A[C]=this._buffer[C];}this._buffer=[];this._printToConsole(A);}else{this._filterLogs();}if(!this.newestOnTop){this._elConsole.scrollTop=this._elConsole.scrollHeight;}}},_printToConsole:function(I){var B=I.length,M=document.createDocumentFragment(),P=[],Q=this.thresholdMin,C=this._sourceFilters.length,N=this._categoryFilters.length,K,H,G,F,L;if(isNaN(Q)||(Q>this.thresholdMax)){Q=0;}K=(B>Q)?(B-Q):0;for(H=K;H<B;H++){var E=false;var J=false;var O=I[H];var A=O.source;var D=O.category;for(G=0;G<C;G++){if(A==this._sourceFilters[G]){J=true;break;}}if(J){for(G=0;G<N;G++){if(D==this._categoryFilters[G]){E=true;break;}}}if(E){F=this.formatMsg(O);if(typeof F==="string"){P[P.length]=F;}else{M.insertBefore(F,this.newestOnTop?M.firstChild||null:null);}this._consoleMsgCount++;this._lastTime=O.time.getTime();}}if(P.length){P.splice(0,0,this._elConsole.innerHTML);this._elConsole.innerHTML=this.newestOnTop?P.reverse().join(""):P.join("");}else{if(M.firstChild){this._elConsole.insertBefore(M,this.newestOnTop?this._elConsole.firstChild||null:null);}}},_onCategoryCreate:function(D,C,A){var B=C[0];A._categoryFilters.push(B);if(A._elFt){A._createCategoryCheckbox(B);}},_onSourceCreate:function(D,C,A){var B=C[0];A._sourceFilters.push(B);if(A._elFt){A._createSourceCheckbox(B);}},_onCheckCategory:function(A,B){var C=this.category;
if(!this.checked){B.hideCategory(C);}else{B.showCategory(C);}},_onCheckSource:function(A,B){var C=this.source;if(!this.checked){B.hideSource(C);}else{B.showSource(C);}},_onClickCollapseBtn:function(A,B){if(!B.isCollapsed){B.collapse();}else{B.expand();}},_onClickPauseBtn:function(A,B){if(!B.isPaused){B.pause();}else{B.resume();}},_onClickClearBtn:function(A,B){B.clearConsole();},_onNewLog:function(D,C,A){var B=C[0];A._buffer.push(B);if(A.logReaderEnabled===true&&A._timeout===null){A._timeout=setTimeout(function(){A._printBuffer();},A.outputBuffer);}},_onReset:function(C,B,A){A._filterLogs();}};if(!YAHOO.widget.Logger){YAHOO.widget.Logger={loggerEnabled:true,_browserConsoleEnabled:false,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],maxStackEntries:2500,_startTime:new Date().getTime(),_lastTime:null,_windowErrorsHandled:false,_origOnWindowError:null};YAHOO.widget.Logger.log=function(B,F,G){if(this.loggerEnabled){if(!F){F="info";}else{F=F.toLocaleLowerCase();if(this._isNewCategory(F)){this._createNewCategory(F);}}var C="global";var A=null;if(G){var D=G.indexOf(" ");if(D>0){C=G.substring(0,D);A=G.substring(D,G.length);}else{C=G;}if(this._isNewSource(C)){this._createNewSource(C);}}var H=new Date();var J=new YAHOO.widget.LogMsg({msg:B,time:H,category:F,source:C,sourceDetail:A});var I=this._stack;var E=this.maxStackEntries;if(E&&!isNaN(E)&&(I.length>=E)){I.shift();}I.push(J);this.newLogEvent.fire(J);if(this._browserConsoleEnabled){this._printToBrowserConsole(J);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.handleWindowErrors=function(){if(!YAHOO.widget.Logger._windowErrorsHandled){if(window.error){YAHOO.widget.Logger._origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger._windowErrorsHandled=true;YAHOO.log("Logger handling of window.onerror has been enabled.");}else{YAHOO.log("Logger handling of window.onerror had already been enabled.");}};YAHOO.widget.Logger.unhandleWindowErrors=function(){if(YAHOO.widget.Logger._windowErrorsHandled){if(YAHOO.widget.Logger._origOnWindowError){window.onerror=YAHOO.widget.Logger._origOnWindowError;YAHOO.widget.Logger._origOnWindowError=null;}else{window.onerror=null;}YAHOO.widget.Logger._windowErrorsHandled=false;YAHOO.log("Logger handling of window.onerror has been disabled.");}else{YAHOO.log("Logger handling of window.onerror had already been disabled.");}};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(A){this.categories.push(A);this.categoryCreateEvent.fire(A);};YAHOO.widget.Logger._isNewCategory=function(B){for(var A=0;A<this.categories.length;A++){if(B==this.categories[A]){return false;}}return true;};YAHOO.widget.Logger._createNewSource=function(A){this.sources.push(A);this.sourceCreateEvent.fire(A);};YAHOO.widget.Logger._isNewSource=function(A){if(A){for(var B=0;B<this.sources.length;B++){if(A==this.sources[B]){return false;}}return true;}};YAHOO.widget.Logger._printToBrowserConsole=function(C){if(window.console&&console.log){var E=C.category;var D=C.category.substring(0,4).toUpperCase();var G=C.time;var F;if(G.toLocaleTimeString){F=G.toLocaleTimeString();}else{F=G.toString();}var H=G.getTime();var B=(YAHOO.widget.Logger._lastTime)?(H-YAHOO.widget.Logger._lastTime):0;YAHOO.widget.Logger._lastTime=H;var A=F+" ("+B+"ms): "+C.source+": ";if(YAHOO.env.ua.webkit){A+=C.msg;}console.log(A,C.msg);}};YAHOO.widget.Logger._onWindowError=function(A,C,B){try{YAHOO.widget.Logger.log(A+" ("+C+", line "+B+")","window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}catch(D){return false;}};YAHOO.widget.Logger.log("Logger initialized");}YAHOO.register("logger",YAHOO.widget.Logger,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue;
}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"];}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q});}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q});}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]});}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);
}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);
}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function(){var B=YAHOO.util.Dom.getXY,A=YAHOO.util.Event,D=Array.prototype.slice;function C(G,E,F,H){C.ANIM_AVAIL=(!YAHOO.lang.isUndefined(YAHOO.util.Anim));if(G){this.init(G,E,true);this.initSlider(H);this.initThumb(F);}}YAHOO.lang.augmentObject(C,{getHorizSlider:function(F,G,I,H,E){return new C(F,F,new YAHOO.widget.SliderThumb(G,F,I,H,0,0,E),"horiz");},getVertSlider:function(G,H,E,I,F){return new C(G,G,new YAHOO.widget.SliderThumb(H,G,0,0,E,I,F),"vert");},getSliderRegion:function(G,H,J,I,E,K,F){return new C(G,G,new YAHOO.widget.SliderThumb(H,G,J,I,E,K,F),"region");},SOURCE_UI_EVENT:1,SOURCE_SET_VALUE:2,SOURCE_KEY_EVENT:3,ANIM_AVAIL:false},true);YAHOO.extend(C,YAHOO.util.DragDrop,{_mouseDown:false,dragOnly:true,initSlider:function(E){this.type=E;this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);this.isTarget=false;this.animate=C.ANIM_AVAIL;this.backgroundEnabled=true;this.tickPause=40;this.enableKeys=true;this.keyIncrement=20;this.moveComplete=true;this.animationDuration=0.2;this.SOURCE_UI_EVENT=1;this.SOURCE_SET_VALUE=2;this.valueChangeSource=0;this._silent=false;this.lastOffset=[0,0];},initThumb:function(F){var E=this;this.thumb=F;F.cacheBetweenDrags=true;if(F._isHoriz&&F.xTicks&&F.xTicks.length){this.tickPause=Math.round(360/F.xTicks.length);}else{if(F.yTicks&&F.yTicks.length){this.tickPause=Math.round(360/F.yTicks.length);}}F.onAvailable=function(){return E.setStartSliderState();};F.onMouseDown=function(){E._mouseDown=true;return E.focus();};F.startDrag=function(){E._slideStart();};F.onDrag=function(){E.fireEvents(true);};F.onMouseUp=function(){E.thumbMouseUp();};},onAvailable:function(){this._bindKeyEvents();},_bindKeyEvents:function(){A.on(this.id,"keydown",this.handleKeyDown,this,true);A.on(this.id,"keypress",this.handleKeyPress,this,true);},handleKeyPress:function(F){if(this.enableKeys){var E=A.getCharCode(F);switch(E){case 37:case 38:case 39:case 40:case 36:case 35:A.preventDefault(F);break;default:}}},handleKeyDown:function(J){if(this.enableKeys){var G=A.getCharCode(J),F=this.thumb,H=this.getXValue(),E=this.getYValue(),I=true;switch(G){case 37:H-=this.keyIncrement;break;case 38:E-=this.keyIncrement;break;case 39:H+=this.keyIncrement;break;case 40:E+=this.keyIncrement;break;case 36:H=F.leftConstraint;E=F.topConstraint;break;case 35:H=F.rightConstraint;E=F.bottomConstraint;break;default:I=false;}if(I){if(F._isRegion){this._setRegionValue(C.SOURCE_KEY_EVENT,H,E,true);}else{this._setValue(C.SOURCE_KEY_EVENT,(F._isHoriz?H:E),true);}A.stopEvent(J);}}},setStartSliderState:function(){this.setThumbCenterPoint();this.baselinePos=B(this.getEl());this.thumb.startOffset=this.thumb.getOffsetFromParent(this.baselinePos);if(this.thumb._isRegion){if(this.deferredSetRegionValue){this._setRegionValue.apply(this,this.deferredSetRegionValue);this.deferredSetRegionValue=null;}else{this.setRegionValue(0,0,true,true,true);}}else{if(this.deferredSetValue){this._setValue.apply(this,this.deferredSetValue);this.deferredSetValue=null;}else{this.setValue(0,true,true,true);}}},setThumbCenterPoint:function(){var E=this.thumb.getEl();if(E){this.thumbCenterPoint={x:parseInt(E.offsetWidth/2,10),y:parseInt(E.offsetHeight/2,10)};}},lock:function(){this.thumb.lock();this.locked=true;},unlock:function(){this.thumb.unlock();this.locked=false;},thumbMouseUp:function(){this._mouseDown=false;if(!this.isLocked()&&!this.moveComplete){this.endMove();}},onMouseUp:function(){this._mouseDown=false;if(this.backgroundEnabled&&!this.isLocked()&&!this.moveComplete){this.endMove();}},getThumb:function(){return this.thumb;},focus:function(){this.valueChangeSource=C.SOURCE_UI_EVENT;var E=this.getEl();if(E.focus){try{E.focus();}catch(F){}}this.verifyOffset();return !this.isLocked();},onChange:function(E,F){},onSlideStart:function(){},onSlideEnd:function(){},getValue:function(){return this.thumb.getValue();},getXValue:function(){return this.thumb.getXValue();},getYValue:function(){return this.thumb.getYValue();},setValue:function(){var E=D.call(arguments);E.unshift(C.SOURCE_SET_VALUE);return this._setValue.apply(this,E);},_setValue:function(I,L,G,H,E){var F=this.thumb,K,J;if(!F.available){this.deferredSetValue=arguments;return false;}if(this.isLocked()&&!H){return false;}if(isNaN(L)){return false;}if(F._isRegion){return false;}this._silent=E;this.valueChangeSource=I||C.SOURCE_SET_VALUE;F.lastOffset=[L,L];this.verifyOffset(true);this._slideStart();if(F._isHoriz){K=F.initPageX+L+this.thumbCenterPoint.x;this.moveThumb(K,F.initPageY,G);}else{J=F.initPageY+L+this.thumbCenterPoint.y;this.moveThumb(F.initPageX,J,G);}return true;},setRegionValue:function(){var E=D.call(arguments);E.unshift(C.SOURCE_SET_VALUE);return this._setRegionValue.apply(this,E);},_setRegionValue:function(F,J,H,I,G,K){var L=this.thumb,E,M;if(!L.available){this.deferredSetRegionValue=arguments;return false;}if(this.isLocked()&&!G){return false;}if(isNaN(J)){return false;}if(!L._isRegion){return false;}this._silent=K;this.valueChangeSource=F||C.SOURCE_SET_VALUE;L.lastOffset=[J,H];this.verifyOffset(true);this._slideStart();E=L.initPageX+J+this.thumbCenterPoint.x;M=L.initPageY+H+this.thumbCenterPoint.y;this.moveThumb(E,M,I);return true;},verifyOffset:function(F){var G=B(this.getEl()),E=this.thumb;if(!this.thumbCenterPoint||!this.thumbCenterPoint.x){this.setThumbCenterPoint();}if(G){if(G[0]!=this.baselinePos[0]||G[1]!=this.baselinePos[1]){this.setInitPosition();this.baselinePos=G;E.initPageX=this.initPageX+E.startOffset[0];E.initPageY=this.initPageY+E.startOffset[1];E.deltaSetXY=null;this.resetThumbConstraints();return false;}}return true;},moveThumb:function(K,J,I,G){var L=this.thumb,M=this,F,E,H;if(!L.available){return;}L.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);E=L.getTargetCoord(K,J);F=[Math.round(E.x),Math.round(E.y)];if(this.animate&&L._graduated&&!I){this.lock();this.curCoord=B(this.thumb.getEl());this.curCoord=[Math.round(this.curCoord[0]),Math.round(this.curCoord[1])];setTimeout(function(){M.moveOneTick(F);
},this.tickPause);}else{if(this.animate&&C.ANIM_AVAIL&&!I){this.lock();H=new YAHOO.util.Motion(L.id,{points:{to:F}},this.animationDuration,YAHOO.util.Easing.easeOut);H.onComplete.subscribe(function(){M.unlock();if(!M._mouseDown){M.endMove();}});H.animate();}else{L.setDragElPos(K,J);if(!G&&!this._mouseDown){this.endMove();}}}},_slideStart:function(){if(!this._sliding){if(!this._silent){this.onSlideStart();this.fireEvent("slideStart");}this._sliding=true;}},_slideEnd:function(){if(this._sliding&&this.moveComplete){var E=this._silent;this._sliding=false;this._silent=false;this.moveComplete=false;if(!E){this.onSlideEnd();this.fireEvent("slideEnd");}}},moveOneTick:function(F){var H=this.thumb,G=this,I=null,E,J;if(H._isRegion){I=this._getNextX(this.curCoord,F);E=(I!==null)?I[0]:this.curCoord[0];I=this._getNextY(this.curCoord,F);J=(I!==null)?I[1]:this.curCoord[1];I=E!==this.curCoord[0]||J!==this.curCoord[1]?[E,J]:null;}else{if(H._isHoriz){I=this._getNextX(this.curCoord,F);}else{I=this._getNextY(this.curCoord,F);}}if(I){this.curCoord=I;this.thumb.alignElWithMouse(H.getEl(),I[0]+this.thumbCenterPoint.x,I[1]+this.thumbCenterPoint.y);if(!(I[0]==F[0]&&I[1]==F[1])){setTimeout(function(){G.moveOneTick(F);},this.tickPause);}else{this.unlock();if(!this._mouseDown){this.endMove();}}}else{this.unlock();if(!this._mouseDown){this.endMove();}}},_getNextX:function(E,F){var H=this.thumb,J,G=[],I=null;if(E[0]>F[0]){J=H.tickSize-this.thumbCenterPoint.x;G=H.getTargetCoord(E[0]-J,E[1]);I=[G.x,G.y];}else{if(E[0]<F[0]){J=H.tickSize+this.thumbCenterPoint.x;G=H.getTargetCoord(E[0]+J,E[1]);I=[G.x,G.y];}else{}}return I;},_getNextY:function(E,F){var H=this.thumb,J,G=[],I=null;if(E[1]>F[1]){J=H.tickSize-this.thumbCenterPoint.y;G=H.getTargetCoord(E[0],E[1]-J);I=[G.x,G.y];}else{if(E[1]<F[1]){J=H.tickSize+this.thumbCenterPoint.y;G=H.getTargetCoord(E[0],E[1]+J);I=[G.x,G.y];}else{}}return I;},b4MouseDown:function(E){if(!this.backgroundEnabled){return false;}this.thumb.autoOffset();this.resetThumbConstraints();},onMouseDown:function(F){if(!this.backgroundEnabled||this.isLocked()){return false;}this._mouseDown=true;var E=A.getPageX(F),G=A.getPageY(F);this.focus();this._slideStart();this.moveThumb(E,G);},onDrag:function(F){if(this.backgroundEnabled&&!this.isLocked()){var E=A.getPageX(F),G=A.getPageY(F);this.moveThumb(E,G,true,true);this.fireEvents();}},endMove:function(){this.unlock();this.fireEvents();this.moveComplete=true;this._slideEnd();},resetThumbConstraints:function(){var E=this.thumb;E.setXConstraint(E.leftConstraint,E.rightConstraint,E.xTickSize);E.setYConstraint(E.topConstraint,E.bottomConstraint,E.xTickSize);},fireEvents:function(G){var F=this.thumb,I,H,E;if(!G){F.cachePosition();}if(!this.isLocked()){if(F._isRegion){I=F.getXValue();H=F.getYValue();if(I!=this.previousX||H!=this.previousY){if(!this._silent){this.onChange(I,H);this.fireEvent("change",{x:I,y:H});}}this.previousX=I;this.previousY=H;}else{E=F.getValue();if(E!=this.previousVal){if(!this._silent){this.onChange(E);this.fireEvent("change",E);}}this.previousVal=E;}}},toString:function(){return("Slider ("+this.type+") "+this.id);}});YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);YAHOO.widget.Slider=C;})();YAHOO.widget.SliderThumb=function(G,B,E,D,A,F,C){if(G){YAHOO.widget.SliderThumb.superclass.constructor.call(this,G,B);this.parentElId=B;}this.isTarget=false;this.tickSize=C;this.maintainOffset=true;this.initSlider(E,D,A,F,C);this.scroll=false;};YAHOO.extend(YAHOO.widget.SliderThumb,YAHOO.util.DD,{startOffset:null,dragOnly:true,_isHoriz:false,_prevVal:0,_graduated:false,getOffsetFromParent0:function(C){var A=YAHOO.util.Dom.getXY(this.getEl()),B=C||YAHOO.util.Dom.getXY(this.parentElId);return[(A[0]-B[0]),(A[1]-B[1])];},getOffsetFromParent:function(H){var A=this.getEl(),E,I,F,B,K,D,C,J,G;if(!this.deltaOffset){I=YAHOO.util.Dom.getXY(A);F=H||YAHOO.util.Dom.getXY(this.parentElId);E=[(I[0]-F[0]),(I[1]-F[1])];B=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);K=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);D=B-E[0];C=K-E[1];if(isNaN(D)||isNaN(C)){}else{this.deltaOffset=[D,C];}}else{J=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);G=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);E=[J+this.deltaOffset[0],G+this.deltaOffset[1]];}return E;},initSlider:function(D,C,A,E,B){this.initLeft=D;this.initRight=C;this.initUp=A;this.initDown=E;this.setXConstraint(D,C,B);this.setYConstraint(A,E,B);if(B&&B>1){this._graduated=true;}this._isHoriz=(D||C);this._isVert=(A||E);this._isRegion=(this._isHoriz&&this._isVert);},clearTicks:function(){YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);this.tickSize=0;this._graduated=false;},getValue:function(){return(this._isHoriz)?this.getXValue():this.getYValue();},getXValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[0])){this.lastOffset=A;return(A[0]-this.startOffset[0]);}else{return(this.lastOffset[0]-this.startOffset[0]);}},getYValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[1])){this.lastOffset=A;return(A[1]-this.startOffset[1]);}else{return(this.lastOffset[1]-this.startOffset[1]);}},toString:function(){return"SliderThumb "+this.id;},onChange:function(A,B){}});(function(){var A=YAHOO.util.Event,B=YAHOO.widget;function C(I,F,H,D){var G=this,J={min:false,max:false},E,K;this.minSlider=I;this.maxSlider=F;this.activeSlider=I;this.isHoriz=I.thumb._isHoriz;E=this.minSlider.thumb.onMouseDown;K=this.maxSlider.thumb.onMouseDown;this.minSlider.thumb.onMouseDown=function(){G.activeSlider=G.minSlider;E.apply(this,arguments);};this.maxSlider.thumb.onMouseDown=function(){G.activeSlider=G.maxSlider;K.apply(this,arguments);};this.minSlider.thumb.onAvailable=function(){I.setStartSliderState();J.min=true;if(J.max){G.fireEvent("ready",G);}};this.maxSlider.thumb.onAvailable=function(){F.setStartSliderState();J.max=true;if(J.min){G.fireEvent("ready",G);}};I.onMouseDown=F.onMouseDown=function(L){return this.backgroundEnabled&&G._handleMouseDown(L);
};I.onDrag=F.onDrag=function(L){G._handleDrag(L);};I.onMouseUp=F.onMouseUp=function(L){G._handleMouseUp(L);};I._bindKeyEvents=function(){G._bindKeyEvents(this);};F._bindKeyEvents=function(){};I.subscribe("change",this._handleMinChange,I,this);I.subscribe("slideStart",this._handleSlideStart,I,this);I.subscribe("slideEnd",this._handleSlideEnd,I,this);F.subscribe("change",this._handleMaxChange,F,this);F.subscribe("slideStart",this._handleSlideStart,F,this);F.subscribe("slideEnd",this._handleSlideEnd,F,this);this.createEvent("ready",this);this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);D=YAHOO.lang.isArray(D)?D:[0,H];D[0]=Math.min(Math.max(parseInt(D[0],10)|0,0),H);D[1]=Math.max(Math.min(parseInt(D[1],10)|0,H),0);if(D[0]>D[1]){D.splice(0,2,D[1],D[0]);}this.minVal=D[0];this.maxVal=D[1];this.minSlider.setValue(this.minVal,true,true,true);this.maxSlider.setValue(this.maxVal,true,true,true);}C.prototype={minVal:-1,maxVal:-1,minRange:0,_handleSlideStart:function(E,D){this.fireEvent("slideStart",D);},_handleSlideEnd:function(E,D){this.fireEvent("slideEnd",D);},_handleDrag:function(D){B.Slider.prototype.onDrag.call(this.activeSlider,D);},_handleMinChange:function(){this.activeSlider=this.minSlider;this.updateValue();},_handleMaxChange:function(){this.activeSlider=this.maxSlider;this.updateValue();},_bindKeyEvents:function(D){A.on(D.id,"keydown",this._handleKeyDown,this,true);A.on(D.id,"keypress",this._handleKeyPress,this,true);},_handleKeyDown:function(D){this.activeSlider.handleKeyDown.apply(this.activeSlider,arguments);},_handleKeyPress:function(D){this.activeSlider.handleKeyPress.apply(this.activeSlider,arguments);},setValues:function(H,K,I,E,J){var F=this.minSlider,M=this.maxSlider,D=F.thumb,L=M.thumb,N=this,G={min:false,max:false};if(D._isHoriz){D.setXConstraint(D.leftConstraint,L.rightConstraint,D.tickSize);L.setXConstraint(D.leftConstraint,L.rightConstraint,L.tickSize);}else{D.setYConstraint(D.topConstraint,L.bottomConstraint,D.tickSize);L.setYConstraint(D.topConstraint,L.bottomConstraint,L.tickSize);}this._oneTimeCallback(F,"slideEnd",function(){G.min=true;if(G.max){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});this._oneTimeCallback(M,"slideEnd",function(){G.max=true;if(G.min){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});F.setValue(H,I,E,false);M.setValue(K,I,E,false);},setMinValue:function(F,H,I,E){var G=this.minSlider,D=this;this.activeSlider=G;D=this;this._oneTimeCallback(G,"slideEnd",function(){D.updateValue(E);setTimeout(function(){D._cleanEvent(G,"slideEnd");},0);});G.setValue(F,H,I);},setMaxValue:function(D,H,I,F){var G=this.maxSlider,E=this;this.activeSlider=G;this._oneTimeCallback(G,"slideEnd",function(){E.updateValue(F);setTimeout(function(){E._cleanEvent(G,"slideEnd");},0);});G.setValue(D,H,I);},updateValue:function(J){var E=this.minSlider.getValue(),K=this.maxSlider.getValue(),F=false,D,M,H,I,L,G;if(E!=this.minVal||K!=this.maxVal){F=true;D=this.minSlider.thumb;M=this.maxSlider.thumb;H=this.isHoriz?"x":"y";G=this.minSlider.thumbCenterPoint[H]+this.maxSlider.thumbCenterPoint[H];I=Math.max(K-G-this.minRange,0);L=Math.min(-E-G-this.minRange,0);if(this.isHoriz){I=Math.min(I,M.rightConstraint);D.setXConstraint(D.leftConstraint,I,D.tickSize);M.setXConstraint(L,M.rightConstraint,M.tickSize);}else{I=Math.min(I,M.bottomConstraint);D.setYConstraint(D.leftConstraint,I,D.tickSize);M.setYConstraint(L,M.bottomConstraint,M.tickSize);}}this.minVal=E;this.maxVal=K;if(F&&!J){this.fireEvent("change",this);}},selectActiveSlider:function(H){var E=this.minSlider,D=this.maxSlider,J=E.isLocked()||!E.backgroundEnabled,G=D.isLocked()||!E.backgroundEnabled,F=YAHOO.util.Event,I;if(J||G){this.activeSlider=J?D:E;}else{if(this.isHoriz){I=F.getPageX(H)-E.thumb.initPageX-E.thumbCenterPoint.x;}else{I=F.getPageY(H)-E.thumb.initPageY-E.thumbCenterPoint.y;}this.activeSlider=I*2>D.getValue()+E.getValue()?D:E;}},_handleMouseDown:function(D){if(!D._handled){D._handled=true;this.selectActiveSlider(D);return B.Slider.prototype.onMouseDown.call(this.activeSlider,D);}else{return false;}},_handleMouseUp:function(D){B.Slider.prototype.onMouseUp.apply(this.activeSlider,arguments);},_oneTimeCallback:function(F,D,E){F.subscribe(D,function(){F.unsubscribe(D,arguments.callee);E.apply({},[].slice.apply(arguments));});},_cleanEvent:function(K,E){var J,I,D,G,H,F;if(K.__yui_events&&K.events[E]){for(I=K.__yui_events.length;I>=0;--I){if(K.__yui_events[I].type===E){J=K.__yui_events[I];break;}}if(J){H=J.subscribers;F=[];G=0;for(I=0,D=H.length;I<D;++I){if(H[I]){F[G++]=H[I];}}J.subscribers=F;}}}};YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);B.Slider.getHorizDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,G,0,0,F),E=new B.SliderThumb(K,H,0,G,0,0,F);return new C(new B.Slider(H,H,I,"horiz"),new B.Slider(H,H,E,"horiz"),G,D);};B.Slider.getVertDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,0,0,G,F),E=new B.SliderThumb(K,H,0,0,0,G,F);return new B.DualSlider(new B.Slider(H,H,I,"vert"),new B.Slider(H,H,E,"vert"),G,D);};YAHOO.widget.DualSlider=C;})();YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0;}if("style" in D){B.Dom.setStyle(D,C,F+E);}else{if(C in D){D[C]=F;}}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style" in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];
}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return !H.patterns.transparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}else{I=D.getAttribute.call(this,E);}return I;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})();
/*
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);
}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});
(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);if(this.cfg){this.cfg.destroy();this.cfg=null}this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){if(this.cfg)this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Tooltip=YAHOO.widget.Tooltip,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oShadowTemplate,DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:Lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:Lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:Lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:Lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true}},EVENT_TYPES={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};Tooltip.CSS_TOOLTIP="yui-tt";function restoreOriginalWidth(sOriginalWidth,sForcedWidth){var oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sForcedWidth){oConfig.setProperty("width",sOriginalWidth)}}function setWidthToOffsetWidth(p_sType,p_aArgs){if("_originalWidth"in this){restoreOriginalWidth.call(this,this._originalWidth,this._forcedWidth)}var oBody=document.body,oConfig=this.cfg,sOriginalWidth=oConfig.getProperty("width"),sNewWidth,oClone;if((!sOriginalWidth||sOriginalWidth=="auto")&&(oConfig.getProperty("container")!=oBody||oConfig.getProperty("x")>=Dom.getViewportWidth()||oConfig.getProperty("y")>=Dom.getViewportHeight())){oClone=this.element.cloneNode(true);oClone.style.visibility="hidden";oClone.style.top="0px";oClone.style.left="0px";oBody.appendChild(oClone);sNewWidth=(oClone.offsetWidth+"px");oBody.removeChild(oClone);oClone=null;oConfig.setProperty("width",sNewWidth);oConfig.refireEvent("xy");this._originalWidth=sOriginalWidth||"";this._forcedWidth=sNewWidth}}function onDOMReady(p_sType,p_aArgs,p_oObject){this.render(p_oObject)}function onInit(){Event.onDOMReady(onDOMReady,this.cfg.getProperty("container"),this)}YAHOO.extend(Tooltip,YAHOO.widget.Overlay,{init:function(el,userConfig){Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(Tooltip);Dom.addClass(this.element,Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",setWidthToOffsetWidth);this.subscribe("init",onInit);this.subscribe("render",this.onRender);this.initEvent.fire(Tooltip)},initEvents:function(){Tooltip.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.contextMouseOverEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=SIGNATURE;this.contextMouseOutEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=SIGNATURE;this.contextTriggerEvent=this.createEvent(EVENT_TYPES.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=SIGNATURE},initDefaultConfig:function(){Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configContainer,value:DEFAULT_CONFIG.DISABLED.value,supressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent})},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text)}},configContainer:function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true)}},_removeEventListeners:function(){var aElements=this._context,nElements,oElement,i;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.removeListener(oElement,"mouseover",this.onContextMouseOver);Event.removeListener(oElement,"mousemove",this.onContextMouseMove);Event.removeListener(oElement,"mouseout",this.onContextMouseOut)}while(i--)}}},configContext:function(type,args,obj){var context=args[0],aElements,nElements,oElement,i;if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true)}else{this.cfg.setProperty("context",[context],true)}context=this.cfg.getProperty("context")}this._removeEventListeners();this._context=context;aElements=this._context;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.on(oElement,"mouseover",this.onContextMouseOver,this);Event.on(oElement,"mousemove",this.onContextMouseMove,this);Event.on(oElement,"mouseout",this.onContextMouseOut,this)}while(i--)}}}},onContextMouseMove:function(e,obj){obj.pageX=Event.getPageX(e);obj.pageY=Event.getPageY(e)},onContextMouseOver:function(e,obj){var context=this;if(context.title){obj._tempTitle=context.title;context.title=""}if(obj.fireEvent("contextMouseOver",context,e)!==false&&!obj.cfg.getProperty("disabled")){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}Event.on(context,"mousemove",obj.onContextMouseMove,obj);obj.showProcId=obj.doShow(e,context)}},onContextMouseOut:function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null}if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null}if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}obj.fireEvent("contextMouseOut",el,e);obj.hideProcId=setTimeout(function(){obj.hide()},obj.cfg.getProperty("hidedelay"))},doShow:function(e,context){var yOffset=25,me=this;if(UA.opera&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12}return setTimeout(function(){var txt=me.cfg.getProperty("text");if(me._tempTitle&&(txt===""||YAHOO.lang.isUndefined(txt)||YAHOO.lang.isNull(txt))){me.setBody(me._tempTitle)}else{me.cfg.refireEvent("text")}me.moveTo(me.pageX,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY)}Event.removeListener(context,"mousemove",me.onContextMouseMove);me.contextTriggerEvent.fire(context);me.show();me.hideProcId=me.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var me=this;return setTimeout(function(){me.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(pageX,pageY){var height=this.element.offsetHeight,mousePoint=new YAHOO.util.Point(pageX,pageY),elementRegion=Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5))}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this.underlay;if(oShadow){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px"}}function addShadowVisibleClass(){Dom.addClass(this.underlay,"yui-tt-shadow-visible");if(UA.ie){this.forceUnderlayRedraw()}}function removeShadowVisibleClass(){Dom.removeClass(this.underlay,"yui-tt-shadow-visible")}function createShadow(){var oShadow=this.underlay,oElement,Module,nIE,me;if(!oShadow){oElement=this.element;Module=YAHOO.widget.Module;nIE=UA.ie;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-tt-shadow"}oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this.underlay=oShadow;this._shadow=this.underlay;addShadowVisibleClass.call(this);this.subscribe("beforeShow",addShadowVisibleClass);this.subscribe("hide",removeShadowVisibleClass);if(bIEQuirks){window.setTimeout(function(){sizeShadow.call(me)},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.subscribe("changeContent",sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,this,true);this.subscribe("destroy",function(){Module.textResizeEvent.unsubscribe(sizeShadow,this)})}}}function onBeforeShow(){createShadow.call(this);this.unsubscribe("beforeShow",onBeforeShow)}if(this.cfg.getProperty("visible")){createShadow.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}},forceUnderlayRedraw:function(){var tt=this;Dom.addClass(tt.underlay,"yui-force-redraw");setTimeout(function(){Dom.removeClass(tt.underlay,"yui-force-redraw")},0)},destroy:function(){this._removeEventListeners();Tooltip.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig)};var _currentModal=null;var Lang=YAHOO.lang,Util=YAHOO.util,Dom=Util.Dom,Event=Util.Event,CustomEvent=Util.CustomEvent,KeyListener=YAHOO.util.KeyListener,Config=Util.Config,Overlay=YAHOO.widget.Overlay,Panel=YAHOO.widget.Panel,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oMaskTemplate,m_oUnderlayTemplate,m_oCloseIconTemplate,EVENT_TYPES={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:Lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(Util.DD?true:false),validator:Lang.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:Lang.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:Lang.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:Lang.isObject,value:{close:"Close"}}};Panel.CSS_PANEL="yui-panel";Panel.CSS_PANEL_CONTAINER="yui-panel-container";Panel.FOCUSABLE=["a","button","select","textarea","input","iframe"];function createHeader(p_sType,p_aArgs){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader(" ")}}function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth)}this.unsubscribe("hide",restoreOriginalWidth,p_oObject)}function setWidthToOffsetWidth(p_sType,p_aArgs){var oConfig,sOriginalWidth,sNewWidth;if(bIEQuirks){oConfig=this.cfg;sOriginalWidth=oConfig.getProperty("width");if(!sOriginalWidth||sOriginalWidth=="auto"){sNewWidth=(this.element.offsetWidth+"px");oConfig.setProperty("width",sNewWidth);this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth])}}}YAHOO.extend(Panel,Overlay,{init:function(el,userConfig){Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(Panel);Dom.addClass(this.element,Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",createHeader);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this.focusFirst);this.initEvent.fire(Panel)},_onElementFocus:function(e){if(_currentModal===this){var target=Event.getTarget(e),doc=document.documentElement,insideDoc=(target!==doc&&target!==window);if(insideDoc&&target!==this.element&&target!==this.mask&&!Dom.isAncestor(this.element,target)){try{if(this.firstElement){this.firstElement.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}}catch(err){try{if(insideDoc&&target!==document.body){target.blur()}}catch(err2){}}}}},_addFocusHandlers:function(p_sType,p_aArgs){if(!this.firstElement){if(UA.webkit||UA.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this.setTabLoop(this.firstElement,this.lastElement);Event.onFocus(document.documentElement,this._onElementFocus,this,true);_currentModal=this},_createHiddenFocusElement:function(){var e=document.createElement("button");e.style.height="1px";e.style.width="1px";e.style.position="absolute";e.style.left="-10000em";e.style.opacity=0;e.tabIndex=-1;this.innerElement.appendChild(e);this._modalFocus=e},_removeFocusHandlers:function(p_sType,p_aArgs){Event.removeFocusListener(document.documentElement,this._onElementFocus,this);if(_currentModal==this){_currentModal=null}},focusFirst:function(type,args,obj){var el=this.firstElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},focusLast:function(type,args,obj){var el=this.lastElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},setTabLoop:function(firstElement,lastElement){var backTab=this.preventBackTab,tab=this.preventTabOut,showEvent=this.showEvent,hideEvent=this.hideEvent;if(backTab){backTab.disable();showEvent.unsubscribe(backTab.enable,backTab);hideEvent.unsubscribe(backTab.disable,backTab);backTab=this.preventBackTab=null}if(tab){tab.disable();showEvent.unsubscribe(tab.enable,tab);hideEvent.unsubscribe(tab.disable,tab);tab=this.preventTabOut=null}if(firstElement){this.preventBackTab=new KeyListener(firstElement,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});backTab=this.preventBackTab;showEvent.subscribe(backTab.enable,backTab,true);hideEvent.subscribe(backTab.disable,backTab,true)}if(lastElement){this.preventTabOut=new KeyListener(lastElement,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});tab=this.preventTabOut;showEvent.subscribe(tab.enable,tab,true);hideEvent.subscribe(tab.disable,tab,true)}},getFocusableElements:function(root){root=root||this.innerElement;var focusable={};for(var i=0;i<Panel.FOCUSABLE.length;i++){focusable[Panel.FOCUSABLE[i]]=true}function isFocusable(el){if(el.focus&&el.type!=="hidden"&&!el.disabled&&focusable[el.tagName.toLowerCase()]){return true}return false}return Dom.getElementsBy(isFocusable,null,root)},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var elements=this.getFocusableElements();this.focusableElements=elements;if(elements.length>0){this.firstElement=elements[0];this.lastElement=elements[elements.length-1]}if(this.cfg.getProperty("modal")){this.setTabLoop(this.firstElement,this.lastElement)}},initEvents:function(){Panel.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.showMaskEvent=this.createEvent(EVENT_TYPES.SHOW_MASK);this.showMaskEvent.signature=SIGNATURE;this.hideMaskEvent=this.createEvent(EVENT_TYPES.HIDE_MASK);this.hideMaskEvent.signature=SIGNATURE;this.dragEvent=this.createEvent(EVENT_TYPES.DRAG);this.dragEvent.signature=SIGNATURE},initDefaultConfig:function(){Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:(Util.DD)?true:false,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key,{value:DEFAULT_CONFIG.DRAG_ONLY.value,validator:DEFAULT_CONFIG.DRAG_ONLY.validator,supercedes:DEFAULT_CONFIG.DRAG_ONLY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.STRINGS.key,{value:DEFAULT_CONFIG.STRINGS.value,handler:this.configStrings,validator:DEFAULT_CONFIG.STRINGS.validator,supercedes:DEFAULT_CONFIG.STRINGS.supercedes})},configClose:function(type,args,obj){var val=args[0],oClose=this.close,strings=this.cfg.getProperty("strings");if(val){if(!oClose){if(!m_oCloseIconTemplate){m_oCloseIconTemplate=document.createElement("a");m_oCloseIconTemplate.className="container-close";m_oCloseIconTemplate.href="#"}oClose=m_oCloseIconTemplate.cloneNode(true);this.innerElement.appendChild(oClose);oClose.innerHTML=(strings&&strings.close)?strings.close:" ";Event.on(oClose,"click",this._doClose,this,true);this.close=oClose}else{oClose.style.display="block"}}else{if(oClose){oClose.style.display="none"}}},_doClose:function(e){Event.preventDefault(e);this.hide()},configDraggable:function(type,args,obj){var val=args[0];if(val){if(!Util.DD){this.cfg.setProperty("draggable",false);return}if(this.header){Dom.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",setWidthToOffsetWidth)}else{if(this.dd){this.dd.unreg()}if(this.header){Dom.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",setWidthToOffsetWidth)}},configUnderlay:function(type,args,obj){var bMacGecko=(this.platform=="mac"&&UA.gecko),sUnderlay=args[0].toLowerCase(),oUnderlay=this.underlay,oElement=this.element;function createUnderlay(){var bNew=false;if(!oUnderlay){if(!m_oUnderlayTemplate){m_oUnderlayTemplate=document.createElement("div");m_oUnderlayTemplate.className="underlay"}oUnderlay=m_oUnderlayTemplate.cloneNode(false);this.element.appendChild(oUnderlay);this.underlay=oUnderlay;if(bIEQuirks){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(UA.webkit&&UA.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw)}bNew=true}}function onBeforeShow(){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(onBeforeShow)}function destroyUnderlay(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(onBeforeShow);this._underlayDeferred=false}if(oUnderlay){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(oUnderlay);this.underlay=null}}switch(sUnderlay){case"shadow":Dom.removeClass(oElement,"matte");Dom.addClass(oElement,"shadow");break;case"matte":if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.addClass(oElement,"matte");break;default:if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.removeClass(oElement,"matte");break}if((sUnderlay=="shadow")||(bMacGecko&&!oUnderlay)){if(this.cfg.getProperty("visible")){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._underlayDeferred=true}}}},configModal:function(type,args,obj){var modal=args[0];if(modal){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var oMask=this.mask,oParentNode;if(oMask){this.hideMask();oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask)}this.mask=null}},configKeyListeners:function(type,args,obj){var listeners=args[0],listener,nListeners,i;if(listeners){if(listeners instanceof Array){nListeners=listeners.length;for(i=0;i<nListeners;i++){listener=listeners[i];if(!Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true)}if(!Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true)}}}else{if(!Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true)}if(!Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true)}}}},configStrings:function(type,args,obj){var val=Lang.merge(DEFAULT_CONFIG.STRINGS.value,args[0]);this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key,val,true)},configHeight:function(type,args,obj){var height=args[0],el=this.innerElement;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(type,args,el){Panel.superclass._autoFillOnHeightChange.apply(this,arguments);if(bIEQuirks){var panel=this;setTimeout(function(){panel.sizeUnderlay()},0)}},configWidth:function(type,args,obj){var width=args[0],el=this.innerElement;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){Panel.superclass.configzIndex.call(this,type,args,obj);if(this.mask||this.cfg.getProperty("modal")===true){var panelZ=Dom.getStyle(this.element,"zIndex");if(!panelZ||isNaN(panelZ)){panelZ=0}if(panelZ===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var elementParent=this.element.parentNode,originalElement=this.element,wrapper=document.createElement("div");wrapper.className=Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement)}wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;Dom.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var oUnderlay=this.underlay,oElement;if(oUnderlay){oElement=this.element;oUnderlay.style.width=oElement.offsetWidth+"px";oUnderlay.style.height=oElement.offsetHeight+"px"}},registerDragDrop:function(){var me=this;if(this.header){if(!Util.DD){return}var bDragOnly=(this.cfg.getProperty("dragonly")===true);this.dd=new Util.DD(this.element.id,this.id,{dragOnly:bDragOnly});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var offsetHeight,offsetWidth,viewPortWidth,viewPortHeight,scrollX,scrollY;if(YAHOO.env.ua.ie==6){Dom.addClass(me.element,"drag")}if(me.cfg.getProperty("constraintoviewport")){var nViewportOffset=Overlay.VIEWPORT_OFFSET;offsetHeight=me.element.offsetHeight;offsetWidth=me.element.offsetWidth;viewPortWidth=Dom.getViewportWidth();viewPortHeight=Dom.getViewportHeight();scrollX=Dom.getDocumentScrollLeft();scrollY=Dom.getDocumentScrollTop();if(offsetHeight+nViewportOffset<viewPortHeight){this.minY=scrollY+nViewportOffset;this.maxY=scrollY+viewPortHeight-offsetHeight-nViewportOffset}else{this.minY=scrollY+nViewportOffset;this.maxY=scrollY+nViewportOffset}if(offsetWidth+nViewportOffset<viewPortWidth){this.minX=scrollX+nViewportOffset;this.maxX=scrollX+viewPortWidth-offsetWidth-nViewportOffset}else{this.minX=scrollX+nViewportOffset;this.maxX=scrollX+nViewportOffset}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}me.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}me.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){Dom.removeClass(me.element,"drag")}me.dragEvent.fire("endDrag",arguments);me.moveEvent.fire(me.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var oMask=this.mask;if(!oMask){if(!m_oMaskTemplate){m_oMaskTemplate=document.createElement("div");m_oMaskTemplate.className="mask";m_oMaskTemplate.innerHTML=" "}oMask=m_oMaskTemplate.cloneNode(true);oMask.id=this.id+"_mask";document.body.insertBefore(oMask,document.body.firstChild);this.mask=oMask;if(YAHOO.env.ua.gecko&&this.platform=="mac"){Dom.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";Dom.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var mask=this.mask,viewWidth=Dom.getViewportWidth(),viewHeight=Dom.getViewportHeight();if(mask.offsetHeight>viewHeight){mask.style.height=viewHeight+"px"}if(mask.offsetWidth>viewWidth){mask.style.width=viewWidth+"px"}mask.style.height=Dom.getDocumentHeight()+"px";mask.style.width=Dom.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var panelZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(panelZ)&&!isNaN(panelZ)){Dom.setStyle(this.mask,"zIndex",panelZ-1)}}},render:function(appendToNode){return Panel.superclass.render.call(this,appendToNode,this.innerElement)},destroy:function(){Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){Event.purgeElement(this.close)}Panel.superclass.destroy.call(this)},forceUnderlayRedraw:function(){var u=this.underlay;Dom.addClass(u,"yui-force-redraw");setTimeout(function(){Dom.removeClass(u,"yui-force-redraw")},0)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig)};var Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Dialog=YAHOO.widget.Dialog,Lang=YAHOO.lang,EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};Dialog.CSS_DIALOG="yui-dialog";function removeButtonEventHandlers(){var aButtons=this._aButtons,nButtons,oButton,i;if(Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=nButtons-1;do{oButton=aButtons[i];if(YAHOO.widget.Button&&oButton instanceof YAHOO.widget.Button){oButton.destroy()}else if(oButton.tagName.toUpperCase()=="BUTTON"){Event.purgeElement(oButton);Event.purgeElement(oButton,false)}}while(i--)}}}YAHOO.extend(Dialog,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_METHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false}else{return true}}});this.cfg.addProperty(DEFAULT_CONFIG.POST_DATA.key,{value:DEFAULT_CONFIG.POST_DATA.value});this.cfg.addProperty(DEFAULT_CONFIG.HIDEAFTERSUBMIT.key,{value:DEFAULT_CONFIG.HIDEAFTERSUBMIT.value});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value,supercedes:DEFAULT_CONFIG.BUTTONS.supercedes})},initEvents:function(){Dialog.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeSubmitEvent=this.createEvent(EVENT_TYPES.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=SIGNATURE;this.submitEvent=this.createEvent(EVENT_TYPES.SUBMIT);this.submitEvent.signature=SIGNATURE;this.manualSubmitEvent=this.createEvent(EVENT_TYPES.MANUAL_SUBMIT);this.manualSubmitEvent.signature=SIGNATURE;this.asyncSubmitEvent=this.createEvent(EVENT_TYPES.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=SIGNATURE;this.formSubmitEvent=this.createEvent(EVENT_TYPES.FORM_SUBMIT);this.formSubmitEvent.signature=SIGNATURE;this.cancelEvent=this.createEvent(EVENT_TYPES.CANCEL);this.cancelEvent.signature=SIGNATURE},init:function(el,userConfig){Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(Dialog);Dom.addClass(this.element,Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(Dialog)},doSubmit:function(){var Connect=YAHOO.util.Connect,oForm=this.form,bUseFileUpload=false,bUseSecureFileUpload=false,aElements,nElements,i,formAttrs;switch(this.cfg.getProperty("postmethod")){case"async":aElements=oForm.elements;nElements=aElements.length;if(nElements>0){i=nElements-1;do{if(aElements[i].type=="file"){bUseFileUpload=true;break}}while(i--)}if(bUseFileUpload&&YAHOO.env.ua.ie&&this.isSecure){bUseSecureFileUpload=true}formAttrs=this._getFormAttributes(oForm);Connect.setForm(oForm,bUseFileUpload,bUseSecureFileUpload);var postData=this.cfg.getProperty("postdata");var c=Connect.asyncRequest(formAttrs.method,formAttrs.action,this.callback,postData);this.asyncSubmitEvent.fire(c);break;case"form":oForm.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(oForm){var attrs={method:null,action:null};if(oForm){if(oForm.getAttributeNode){var action=oForm.getAttributeNode("action");var method=oForm.getAttributeNode("method");if(action){attrs.action=action.value}if(method){attrs.method=method.value}}else{attrs.action=oForm.getAttribute("action");attrs.method=oForm.getAttribute("method")}}attrs.method=(Lang.isString(attrs.method)?attrs.method:"POST").toUpperCase();attrs.action=Lang.isString(attrs.action)?attrs.action:"";return attrs},registerForm:function(){var form=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==form&&Dom.isAncestor(this.element,this.form)){return}else{Event.purgeElement(this.form);this.form=null}}if(!form){form=document.createElement("form");form.name="frm_"+this.id;this.body.appendChild(form)}if(form){this.form=form;Event.on(form,"submit",this._submitHandler,this,true)}},_submitHandler:function(e){Event.stopEvent(e);this.submit();this.form.blur()},setTabLoop:function(firstElement,lastElement){firstElement=firstElement||this.firstButton;lastElement=this.lastButton||lastElement;Dialog.superclass.setTabLoop.call(this,firstElement,lastElement)},setFirstLastFocusable:function(){Dialog.superclass.setFirstLastFocusable.call(this);var i,l,el,elements=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&elements&&elements.length>0){l=elements.length;for(i=0;i<l;++i){el=elements[i];if(this.form===el.form){this.firstFormElement=el;break}}for(i=l-1;i>=0;--i){el=elements[i];if(this.form===el.form){this.lastFormElement=el;break}}}},configClose:function(type,args,obj){Dialog.superclass.configClose.apply(this,arguments)},_doClose:function(e){Event.preventDefault(e);this.cancel()},configButtons:function(type,args,obj){var Button=YAHOO.widget.Button,aButtons=args[0],oInnerElement=this.innerElement,oButton,oButtonEl,oYUIButton,nButtons,oSpan,oFooter,i;removeButtonEventHandlers.call(this);this._aButtons=null;if(Lang.isArray(aButtons)){oSpan=document.createElement("span");oSpan.className="button-group";nButtons=aButtons.length;this._aButtons=[];this.defaultHtmlButton=null;for(i=0;i<nButtons;i++){oButton=aButtons[i];if(Button){oYUIButton=new Button({label:oButton.text});oYUIButton.appendTo(oSpan);oButtonEl=oYUIButton.get("element");if(oButton.isDefault){oYUIButton.addClass("default");this.defaultHtmlButton=oButtonEl}if(Lang.isFunction(oButton.handler)){oYUIButton.set("onclick",{fn:oButton.handler,obj:this,scope:this})}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){oYUIButton.set("onclick",{fn:oButton.handler.fn,obj:((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),scope:(oButton.handler.scope||this)})}this._aButtons[this._aButtons.length]=oYUIButton}else{oButtonEl=document.createElement("button");oButtonEl.setAttribute("type","button");if(oButton.isDefault){oButtonEl.className="default";this.defaultHtmlButton=oButtonEl}oButtonEl.innerHTML=oButton.text;if(Lang.isFunction(oButton.handler)){Event.on(oButtonEl,"click",oButton.handler,this,true)}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){Event.on(oButtonEl,"click",oButton.handler.fn,((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),(oButton.handler.scope||this))}oSpan.appendChild(oButtonEl);this._aButtons[this._aButtons.length]=oButtonEl}oButton.htmlButton=oButtonEl;if(i===0){this.firstButton=oButtonEl}if(i==(nButtons-1)){this.lastButton=oButtonEl}}this.setFooter(oSpan);oFooter=this.footer;if(Dom.inDocument(this.element)&&!Dom.isAncestor(oInnerElement,oFooter)){oInnerElement.appendChild(oFooter)}this.buttonSpan=oSpan}else{oSpan=this.buttonSpan;oFooter=this.footer;if(oSpan&&oFooter){oFooter.removeChild(oSpan);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.changeContentEvent.fire()},getButtons:function(){return this._aButtons||null},focusFirst:function(type,args,obj){var el=this.firstFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(oException){}}else{if(this.defaultHtmlButton){this.focusDefaultButton()}else{this.focusFirstButton()}}},focusLast:function(type,args,obj){var aButtons=this.cfg.getProperty("buttons"),el=this.lastFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(aButtons&&Lang.isArray(aButtons)){this.focusLastButton()}else{if(el){try{el.focus()}catch(oException){}}}},_getButton:function(button){var Button=YAHOO.widget.Button;if(Button&&button&&button.nodeName&&button.id){button=Button.getButton(button.id)||button}return button},focusDefaultButton:function(){var button=this._getButton(this.defaultHtmlButton);if(button){try{button.focus()}catch(oException){}}},blurButtons:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,i;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=(nButtons-1);do{oButton=aButtons[i];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.blur()}catch(oException){}}}}while(i--)}}},focusFirstButton:function(){var aButtons=this.cfg.getProperty("buttons"),oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){oButton=aButtons[0];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}},focusLastButton:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){oButton=aButtons[(nButtons-1)];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}}},configPostMethod:function(type,args,obj){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var oForm=this.form,aElements,nTotalElements,oData,sName,oElement,nElements,sType,sTagName,aOptions,nOptions,aValues,oOption,sValue,oRadio,oCheckbox,i,n;function isFormElement(p_oElement){var sTag=p_oElement.tagName.toUpperCase();return((sTag=="INPUT"||sTag=="TEXTAREA"||sTag=="SELECT")&&p_oElement.name==sName)}if(oForm){aElements=oForm.elements;nTotalElements=aElements.length;oData={};for(i=0;i<nTotalElements;i++){sName=aElements[i].name;oElement=Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];sType=oElement.type;sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked}else if(sType!="radio"){oData[sName]=oElement.value}break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":aOptions=oElement.options;nOptions=aOptions.length;aValues=[];for(n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){sValue=oOption.value;if(!sValue||sValue===""){sValue=oOption.text}aValues[aValues.length]=sValue}}oData[sName]=aValues;break}}else{sType=oElement[0].type;switch(sType){case"radio":for(n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break}}break;case"checkbox":aValues=[];for(n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value}}oData[sName]=aValues;break}}}}}return oData},destroy:function(){removeButtonEventHandlers.call(this);this._aButtons=null;var aForms=this.element.getElementsByTagName("form"),oForm;if(aForms.length>0){oForm=aForms[0];if(oForm){Event.purgeElement(oForm);if(oForm.parentNode){oForm.parentNode.removeChild(oForm)}this.form=null}}Dialog.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig)};var Dom=YAHOO.util.Dom,SimpleDialog=YAHOO.widget.SimpleDialog,DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};SimpleDialog.ICON_BLOCK="blckicon";SimpleDialog.ICON_ALARM="alrticon";SimpleDialog.ICON_HELP="hlpicon";SimpleDialog.ICON_INFO="infoicon";SimpleDialog.ICON_WARN="warnicon";SimpleDialog.ICON_TIP="tipicon";SimpleDialog.ICON_CSS_CLASSNAME="yui-icon";SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(SimpleDialog,YAHOO.widget.Dialog,{initDefaultConfig:function(){SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes})},init:function(el,userConfig){SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(SimpleDialog);Dom.addClass(this.element,SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(SimpleDialog)},registerForm:function(){SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>"},configIcon:function(type,args,obj){var sIcon=args[0],oBody=this.body,sCSSClass=SimpleDialog.ICON_CSS_CLASSNAME,oIcon,oIconParent;if(sIcon&&sIcon!="none"){oIcon=Dom.getElementsByClassName(sCSSClass,"*",oBody);if(oIcon){oIconParent=oIcon.parentNode;if(oIconParent){oIconParent.removeChild(oIcon);oIcon=null}}if(sIcon.indexOf(".")==-1){oIcon=document.createElement("span");oIcon.className=(sCSSClass+" "+sIcon);oIcon.innerHTML=" "}else{oIcon=document.createElement("img");oIcon.src=(this.imageRoot+sIcon);oIcon.className=sCSSClass}if(oIcon){oBody.insertBefore(oIcon,oBody.firstChild)}}},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&¤tX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name);}return A;},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};if(C){this._written=false;}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig,true);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null;}return B.getValue();},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B;}}return C;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments);};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F;}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D];}return F;},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D);},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E);},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D);},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E);},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement;}D.fireEvent(H,J);},I,F);}this.createEvent(H,this);}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){return this.addListener.apply(this,arguments);},subscribe:function(){return this.addListener.apply(this,arguments);},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments);},addClass:function(D){B.addClass(this.get("element"),D);},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"));},hasClass:function(D){return B.hasClass(this.get("element"),D);},removeClass:function(D){return B.removeClass(this.get("element"),D);},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D);},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D);},getStyle:function(D){return B.getStyle(this.get("element"),D);},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1]);}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});
F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false;}if(!E){return false;}if(D.parent!=E){if(F){E.insertBefore(D,F);}else{E.appendChild(D);}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D;},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D);}return C.prototype.get.call(this,D);},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G);}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G);}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G;}return;}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E);}return C.prototype.set.apply(this,arguments);},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments);},init:function(E,D){this._initElement(E,D);},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G];}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element});}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E);}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E);}this.fireEvent("available",{type:"available",target:B.get(E.element)});},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E);}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)});},this,true);},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true});},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue();},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this);}};YAHOO.augment(A,C);YAHOO.util.Element=A;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function(){var B=YAHOO.util,C=B.Dom,H=B.Event,F=window.document,J="active",D="activeIndex",E="activeTab",A="contentEl",G="element",I=function(L,K){K=K||{};if(arguments.length==1&&!YAHOO.lang.isString(L)&&!L.nodeName){K=L;L=K.element||null;}if(!L&&!K.element){L=this._createTabViewElement(K);}I.superclass.constructor.call(this,L,K);};YAHOO.extend(I,B.Element,{CLASSNAME:"yui-navset",TAB_PARENT_CLASSNAME:"yui-nav",CONTENT_PARENT_CLASSNAME:"yui-content",_tabParent:null,_contentParent:null,addTab:function(P,L){var N=this.get("tabs"),Q=this.getTab(L),R=this._tabParent,K=this._contentParent,M=P.get(G),O=P.get(A);if(!N){this._queue[this._queue.length]=["addTab",arguments];return false;}L=(L===undefined)?N.length:L;if(Q){R.insertBefore(M,Q.get(G));}else{R.appendChild(M);}if(O&&!C.isAncestor(K,O)){K.appendChild(O);}if(!P.get(J)){P.set("contentVisible",false,true);}else{this.set(E,P,true);}this._initTabEvents(P);N.splice(L,0,P);},_initTabEvents:function(K){K.addListener(K.get("activationEvent"),K._onActivate,this,K);K.addListener("activationEventChange",function(L){if(L.prevValue!=L.newValue){K.removeListener(L.prevValue,K._onActivate);K.addListener(L.newValue,K._onActivate,this,K);}});},DOMEventHandler:function(P){var Q=H.getTarget(P),S=this._tabParent,R=this.get("tabs"),M,L,K;if(C.isAncestor(S,Q)){for(var N=0,O=R.length;N<O;N++){L=R[N].get(G);K=R[N].get(A);if(Q==L||C.isAncestor(L,Q)){M=R[N];break;}}if(M){M.fireEvent(P.type,P);}}},getTab:function(K){return this.get("tabs")[K];},getTabIndex:function(O){var L=null,N=this.get("tabs");for(var M=0,K=N.length;M<K;++M){if(O==N[M]){L=M;break;}}return L;},removeTab:function(M){var L=this.get("tabs").length,K=this.getTabIndex(M);if(M===this.get(E)){if(L>1){if(K+1===L){this.set(D,K-1);}else{this.set(D,K+1);}}else{this.set(E,null);}}this._tabParent.removeChild(M.get(G));this._contentParent.removeChild(M.get(A));this._configs.tabs.value.splice(K,1);M.fireEvent("remove",{type:"remove",tabview:this});},toString:function(){var K=this.get("id")||this.get("tagName");return"TabView "+K;},contentTransition:function(L,K){if(L){L.set("contentVisible",true);}if(K){K.set("contentVisible",false);}},initAttributes:function(K){I.superclass.initAttributes.call(this,K);if(!K.orientation){K.orientation="top";}var M=this.get(G);if(!C.hasClass(M,this.CLASSNAME)){C.addClass(M,this.CLASSNAME);}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||this._createTabParent();this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||this._createContentParent();this.setAttributeConfig("orientation",{value:K.orientation,method:function(N){var O=this.get("orientation");this.addClass("yui-navset-"+N);if(O!=N){this.removeClass("yui-navset-"+O);}if(N==="bottom"){this.appendChild(this._tabParent);}}});this.setAttributeConfig(D,{value:K.activeIndex,method:function(N){},validator:function(O){var N=true;if(O&&this.getTab(O).get("disabled")){N=false;}return N;}});this.setAttributeConfig(E,{value:K.activeTab,method:function(O){var N=this.get(E);if(O){O.set(J,true);}if(N&&N!==O){N.set(J,false);}if(N&&O!==N){this.contentTransition(O,N);}else{if(O){O.set("contentVisible",true);}}},validator:function(O){var N=true;if(O&&O.get("disabled")){N=false;}return N;}});this.on("activeTabChange",this._onActiveTabChange);this.on("activeIndexChange",this._onActiveIndexChange);if(this._tabParent){this._initTabs();}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var L in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,L)){this.addListener.call(this,L,this.DOMEventHandler);}}},deselectTab:function(K){if(this.getTab(K)===this.get("activeTab")){this.set("activeTab",null);}},selectTab:function(K){this.set("activeTab",this.getTab(K));},_onActiveTabChange:function(M){var K=this.get(D),L=this.getTabIndex(M.newValue);if(K!==L){if(!(this.set(D,L))){this.set(E,M.prevValue);}}},_onActiveIndexChange:function(K){if(K.newValue!==this.getTabIndex(this.get(E))){if(!(this.set(E,this.getTab(K.newValue)))){this.set(D,K.prevValue);}}},_initTabs:function(){var P=C.getChildren(this._tabParent),N=C.getChildren(this._contentParent),M=this.get(D),Q,L,R;for(var O=0,K=P.length;O<K;++O){L={};if(N[O]){L.contentEl=N[O];}Q=new YAHOO.widget.Tab(P[O],L);this.addTab(Q);if(Q.hasClass(Q.ACTIVE_CLASSNAME)){R=Q;}}if(M){this.set(E,this.getTab(M));}else{this._configs.activeTab.value=R;this._configs.activeIndex.value=this.getTabIndex(R);}},_createTabViewElement:function(K){var L=F.createElement("div");if(this.CLASSNAME){L.className=this.CLASSNAME;}return L;},_createTabParent:function(K){var L=F.createElement("ul");if(this.TAB_PARENT_CLASSNAME){L.className=this.TAB_PARENT_CLASSNAME;}this.get(G).appendChild(L);return L;},_createContentParent:function(K){var L=F.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){L.className=this.CONTENT_PARENT_CLASSNAME;}this.get(G).appendChild(L);return L;}});YAHOO.widget.TabView=I;})();(function(){var D=YAHOO.util,I=D.Dom,L=YAHOO.lang,M="activeTab",J="label",G="labelEl",Q="content",C="contentEl",O="element",P="cacheData",B="dataSrc",H="dataLoaded",A="dataTimeout",N="loadMethod",F="postData",K="disabled",E=function(S,R){R=R||{};if(arguments.length==1&&!L.isString(S)&&!S.nodeName){R=S;S=R.element;}if(!S&&!R.element){S=this._createTabElement(R);}this.loadHandler={success:function(T){this.set(Q,T.responseText);},failure:function(T){}};E.superclass.constructor.call(this,S,R);this.DOM_EVENTS={};};YAHOO.extend(E,YAHOO.util.Element,{LABEL_TAGNAME:"em",ACTIVE_CLASSNAME:"selected",HIDDEN_CLASSNAME:"yui-hidden",ACTIVE_TITLE:"active",DISABLED_CLASSNAME:K,LOADING_CLASSNAME:"loading",dataConnection:null,loadHandler:null,_loading:false,toString:function(){var R=this.get(O),S=R.id||R.tagName;return"Tab "+S;},initAttributes:function(R){R=R||{};E.superclass.initAttributes.call(this,R);this.setAttributeConfig("activationEvent",{value:R.activationEvent||"click"});this.setAttributeConfig(G,{value:R[G]||this._getLabelEl(),method:function(S){S=I.get(S);
var T=this.get(G);if(T){if(T==S){return false;}T.parentNode.replaceChild(S,T);this.set(J,S.innerHTML);}}});this.setAttributeConfig(J,{value:R.label||this._getLabel(),method:function(T){var S=this.get(G);if(!S){this.set(G,this._createLabelEl());}S.innerHTML=T;}});this.setAttributeConfig(C,{value:R[C]||document.createElement("div"),method:function(S){S=I.get(S);var T=this.get(C);if(T){if(T===S){return false;}if(!this.get("selected")){I.addClass(S,"yui-hidden");}T.parentNode.replaceChild(S,T);this.set(Q,S.innerHTML);}}});this.setAttributeConfig(Q,{value:R[Q],method:function(S){this.get(C).innerHTML=S;}});this.setAttributeConfig(B,{value:R.dataSrc});this.setAttributeConfig(P,{value:R.cacheData||false,validator:L.isBoolean});this.setAttributeConfig(N,{value:R.loadMethod||"GET",validator:L.isString});this.setAttributeConfig(H,{value:false,validator:L.isBoolean,writeOnce:true});this.setAttributeConfig(A,{value:R.dataTimeout||null,validator:L.isNumber});this.setAttributeConfig(F,{value:R.postData||null});this.setAttributeConfig("active",{value:R.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(S){if(S===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE);}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(S){return L.isBoolean(S)&&!this.get(K);}});this.setAttributeConfig(K,{value:R.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(S){if(S===true){I.addClass(this.get(O),this.DISABLED_CLASSNAME);}else{I.removeClass(this.get(O),this.DISABLED_CLASSNAME);}},validator:L.isBoolean});this.setAttributeConfig("href",{value:R.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(S){this.getElementsByTagName("a")[0].href=S;},validator:L.isString});this.setAttributeConfig("contentVisible",{value:R.contentVisible,method:function(S){if(S){I.removeClass(this.get(C),this.HIDDEN_CLASSNAME);if(this.get(B)){if(!this._loading&&!(this.get(H)&&this.get(P))){this._dataConnect();}}}else{I.addClass(this.get(C),this.HIDDEN_CLASSNAME);}},validator:L.isBoolean});},_dataConnect:function(){if(!D.Connect){return false;}I.addClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=D.Connect.asyncRequest(this.get(N),this.get(B),{success:function(R){this.loadHandler.success.call(this,R);this.set(H,true);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(R){this.loadHandler.failure.call(this,R);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get(A)},this.get(F));},_createTabElement:function(R){var V=document.createElement("li"),S=document.createElement("a"),U=R.label||null,T=R.labelEl||null;S.href=R.href||"#";V.appendChild(S);if(T){if(!U){U=this._getLabel();}}else{T=this._createLabelEl();}S.appendChild(T);return V;},_getLabelEl:function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];},_createLabelEl:function(){var R=document.createElement(this.LABEL_TAGNAME);return R;},_getLabel:function(){var R=this.get(G);if(!R){return undefined;}return R.innerHTML;},_onActivate:function(U,T){var S=this,R=false;D.Event.preventDefault(U);if(S===T.get(M)){R=true;}T.set(M,S,R);}});YAHOO.widget.Tab=E;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.7.0",build:"1799"});
(function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,Lang=YAHOO.lang,Widget=YAHOO.widget;YAHOO.widget.TreeView=function(id,oConfig){if(id){this.init(id)}if(oConfig){if(!Lang.isArray(oConfig)){oConfig=[oConfig]}this.buildTreeFromObject(oConfig)}else if(Lang.trim(this._el.innerHTML)){this.buildTreeFromMarkup(id)}};var TV=Widget.TreeView;TV.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,_hasDblClickSubscriber:false,_dblClickTimer:null,currentFocus:null,singleNodeHighlight:false,_currentlyHighlighted:null,setExpandAnim:function(type){this._expandAnim=(Widget.TVAnim.isValid(type))?type:null},setCollapseAnim:function(type){this._collapseAnim=(Widget.TVAnim.isValid(type))?type:null},animateExpand:function(el,node){if(this._expandAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._expandAnim,el,function(){tree.expandComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"expand"});a.animate()}return true}return false},animateCollapse:function(el,node){if(this._collapseAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._collapseAnim,el,function(){tree.collapseComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"collapse"});a.animate()}return true}return false},expandComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"expand"})},collapseComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"collapse"})},init:function(id){this._el=Dom.get(id);this.id=Dom.generateId(this._el,"yui-tv-auto-id-");this.createEvent("animStart",this);this.createEvent("animComplete",this);this.createEvent("collapse",this);this.createEvent("collapseComplete",this);this.createEvent("expand",this);this.createEvent("expandComplete",this);this.createEvent("enterKeyPressed",this);this.createEvent("clickEvent",this);this.createEvent('focusChanged',this);var self=this;this.createEvent("dblClickEvent",{scope:this,onSubscribeCallback:function(){self._hasDblClickSubscriber=true}});this.createEvent("labelClick",this);this.createEvent("highlightEvent",this);this._nodes=[];TV.trees[this.id]=this;this.root=new Widget.RootNode(this);var LW=Widget.LogWriter},buildTreeFromObject:function(oConfig){var build=function(parent,oConfig){var i,item,node,children,type,NodeType,ThisType;for(i=0;i<oConfig.length;i++){item=oConfig[i];if(Lang.isString(item)){node=new Widget.TextNode(item,parent)}else if(Lang.isObject(item)){children=item.children;delete item.children;type=item.type||'text';delete item.type;switch(Lang.isString(type)&&type.toLowerCase()){case'text':node=new Widget.TextNode(item,parent);break;case'menu':node=new Widget.MenuNode(item,parent);break;case'html':node=new Widget.HTMLNode(item,parent);break;default:if(Lang.isString(type)){NodeType=Widget[type]}else{NodeType=type}if(Lang.isObject(NodeType)){for(ThisType=NodeType;ThisType&&ThisType!==Widget.Node;ThisType=ThisType.superclass.constructor){}if(ThisType){node=new NodeType(item,parent)}else{}}else{}}if(children){build(node,children)}}else{}}};build(this.root,oConfig)},buildTreeFromMarkup:function(id){var build=function(markup){var el,child,branch=[],config={},label,yuiConfig;for(el=Dom.getFirstChild(markup);el;el=Dom.getNextSibling(el)){switch(el.tagName.toUpperCase()){case'LI':label='';config={expanded:Dom.hasClass(el,'expanded'),title:el.title||el.alt||null,className:Lang.trim(el.className.replace(/\bexpanded\b/,''))||null};child=el.firstChild;if(child.nodeType==3){label=Lang.trim(child.nodeValue.replace(/[\n\t\r]*/g,''));if(label){config.type='text';config.label=label}else{child=Dom.getNextSibling(child)}}if(!label){if(child.tagName.toUpperCase()=='A'){config.type='text';config.label=child.innerHTML;config.href=child.href;config.target=child.target;config.title=child.title||child.alt||config.title}else{config.type='html';var d=document.createElement('div');d.appendChild(child.cloneNode(true));config.html=d.innerHTML;config.hasIcon=true}}child=Dom.getNextSibling(child);switch(child&&child.tagName.toUpperCase()){case'UL':case'OL':config.children=build(child);break}if(YAHOO.lang.JSON){yuiConfig=el.getAttribute('yuiConfig');if(yuiConfig){yuiConfig=YAHOO.lang.JSON.parse(yuiConfig);config=YAHOO.lang.merge(config,yuiConfig)}}branch.push(config);break;case'UL':case'OL':config={type:'text',label:'',children:build(child)};branch.push(config);break}}return branch};var markup=Dom.getChildrenBy(Dom.get(id),function(el){var tag=el.tagName.toUpperCase();return tag=='UL'||tag=='OL'});if(markup.length){this.buildTreeFromObject(build(markup[0]))}else{}},_getEventTargetTdEl:function(ev){var target=Event.getTarget(ev);while(target&&!(target.tagName.toUpperCase()=='TD'&&Dom.hasClass(target.parentNode,'ygtvrow'))){target=Dom.getAncestorByTagName(target,'td')}if(Lang.isNull(target)){return null}if(/\bygtv(blank)?depthcell/.test(target.className)){return null}if(target.id){var m=target.id.match(/\bygtv([^\d]*)(.*)/);if(m&&m[2]&&this._nodes[m[2]]){return target}}return null},_onClickEvent:function(ev){var self=this,td=this._getEventTargetTdEl(ev),node,target,toggle=function(){node.toggle();node.focus();try{Event.preventDefault(ev)}catch(e){}};if(!td){return}node=this.getNodeByElement(td);if(!node){return}target=Event.getTarget(ev);if(Dom.hasClass(target,node.labelStyle)||Dom.getAncestorByClassName(target,node.labelStyle)){this.fireEvent('labelClick',node)}if(/\bygtv[tl][mp]h?h?/.test(td.className)){toggle()}else{if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}else{if(this._hasDblClickSubscriber){this._dblClickTimer=window.setTimeout(function(){self._dblClickTimer=null;if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){toggle()}},200)}else{if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){}}}}},_onDblClickEvent:function(ev){if(!this._hasDblClickSubscriber){return}var td=this._getEventTargetTdEl(ev);if(!td){return}if(!(/\bygtv[tl][mp]h?h?/.test(td.className))){this.fireEvent('dblClickEvent',{event:ev,node:this.getNodeByElement(td)});if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}}},_onMouseOverEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])\b/gi,'ygtv$1$2h')}},_onMouseOutEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])h\b/gi,'ygtv$1$2')}},_onKeyDownEvent:function(ev){var target=Event.getTarget(ev),node=this.getNodeByElement(target),newNode=node,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.UP:do{if(newNode.previousSibling){newNode=newNode.previousSibling}else{newNode=newNode.parent}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.DOWN:do{if(newNode.nextSibling){newNode=newNode.nextSibling}else{newNode.expand();newNode=(newNode.children.length||null)&&newNode.children[0]}}while(newNode&&!newNode._canHaveFocus);if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.LEFT:do{if(newNode.parent){newNode=newNode.parent}else{newNode=newNode.previousSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.RIGHT:do{newNode.expand();if(newNode.children.length){newNode=newNode.children[0]}else{newNode=newNode.nextSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.ENTER:if(node.href){if(node.target){window.open(node.href,node.target)}else{window.location(node.href)}}else{node.toggle()}this.fireEvent('enterKeyPressed',node);Event.preventDefault(ev);break;case KEY.HOME:newNode=this.getRoot();if(newNode.children.length){newNode=newNode.children[0]}if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case KEY.END:newNode=newNode.parent.children;newNode=newNode[newNode.length-1];if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case 107:if(ev.shiftKey){node.parent.expandAll()}else{node.expand()}break;case 109:if(ev.shiftKey){node.parent.collapseAll()}else{node.collapse()}break;default:break}},render:function(){var html=this.root.getHtml(),el=this.getEl();el.innerHTML=html;if(!this._hasEvents){Event.on(el,'click',this._onClickEvent,this,true);Event.on(el,'dblclick',this._onDblClickEvent,this,true);Event.on(el,'mouseover',this._onMouseOverEvent,this,true);Event.on(el,'mouseout',this._onMouseOutEvent,this,true);Event.on(el,'keydown',this._onKeyDownEvent,this,true)}this._hasEvents=true},getEl:function(){if(!this._el){this._el=Dom.get(this.id)}return this._el},regNode:function(node){this._nodes[node.index]=node},getRoot:function(){return this.root},setDynamicLoad:function(fnDataLoader,iconMode){this.root.setDynamicLoad(fnDataLoader,iconMode)},expandAll:function(){if(!this.locked){this.root.expandAll()}},collapseAll:function(){if(!this.locked){this.root.collapseAll()}},getNodeByIndex:function(nodeIndex){var n=this._nodes[nodeIndex];return(n)?n:null},getNodeByProperty:function(property,value){for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){return n}}}return null},getNodesByProperty:function(property,value){var values=[];for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){values.push(n)}}}return(values.length)?values:null},getNodeByElement:function(el){var p=el,m,re=/ygtv([^\d]*)(.*)/;do{if(p&&p.id){m=p.id.match(re);if(m&&m[2]){return this.getNodeByIndex(m[2])}}p=p.parentNode;if(!p||!p.tagName){break}}while(p.id!==this.id&&p.tagName.toLowerCase()!=="body");return null},removeNode:function(node,autoRefresh){if(node.isRoot()){return false}var p=node.parent;if(p.parent){p=p.parent}this._deleteNode(node);if(autoRefresh&&p&&p.childrenRendered){p.refresh()}return true},_removeChildren_animComplete:function(o){this.unsubscribe(this._removeChildren_animComplete);this.removeChildren(o.node)},removeChildren:function(node){if(node.expanded){if(this._collapseAnim){this.subscribe("animComplete",this._removeChildren_animComplete,this,true);Widget.Node.prototype.collapse.call(node);return}node.collapse()}while(node.children.length){this._deleteNode(node.children[0])}if(node.isRoot()){Widget.Node.prototype.expand.call(node)}node.childrenRendered=false;node.dynamicLoadComplete=false;node.updateIcon()},_deleteNode:function(node){this.removeChildren(node);this.popNode(node)},popNode:function(node){var p=node.parent;var a=[];for(var i=0,len=p.children.length;i<len;++i){if(p.children[i]!=node){a[a.length]=p.children[i]}}p.children=a;p.childrenRendered=false;if(node.previousSibling){node.previousSibling.nextSibling=node.nextSibling}if(node.nextSibling){node.nextSibling.previousSibling=node.previousSibling}node.parent=null;node.previousSibling=null;node.nextSibling=null;node.tree=null;delete this._nodes[node.index]},destroy:function(){if(this._destroyEditor){this._destroyEditor()}var el=this.getEl();Event.removeListener(el,'click');Event.removeListener(el,'dblclick');Event.removeListener(el,'mouseover');Event.removeListener(el,'mouseout');Event.removeListener(el,'keydown');for(var i=0;i<this._nodes.length;i++){var node=this._nodes[i];if(node&&node.destroy){node.destroy()}}el.innerHTML='';this._hasEvents=false},toString:function(){return"TreeView "+this.id},getNodeCount:function(){return this.getRoot().getNodeCount()},getTreeDefinition:function(){return this.getRoot().getNodeDefinition()},onExpand:function(node){},onCollapse:function(node){},setNodesProperty:function(name,value,refresh){this.root.setNodesProperty(name,value);if(refresh){this.root.refresh()}},onEventToggleHighlight:function(oArgs){var node;if('node'in oArgs&&oArgs.node instanceof Widget.Node){node=oArgs.node}else if(oArgs instanceof Widget.Node){node=oArgs}else{return false}node.toggleHighlight();return false}};var PROT=TV.prototype;PROT.draw=PROT.render;YAHOO.augment(TV,YAHOO.util.EventProvider);TV.nodeCount=0;TV.trees=[];TV.getTree=function(treeId){var t=TV.trees[treeId];return(t)?t:null};TV.getNode=function(treeId,nodeIndex){var t=TV.getTree(treeId);return(t)?t.getNodeByIndex(nodeIndex):null};TV.FOCUS_CLASS_NAME='ygtvfocus';TV.preload=function(e,prefix){prefix=prefix||"ygtv";var styles=["tn","tm","tmh","tp","tph","ln","lm","lmh","lp","lph","loading"];var sb=[];for(var i=1;i<styles.length;i=i+1){sb[sb.length]='<span class="'+prefix+styles[i]+'"> </span>'}var f=document.createElement("div");var s=f.style;s.className=prefix+styles[0];s.position="absolute";s.height="1px";s.width="1px";s.top="-1000px";s.left="-1000px";f.innerHTML=sb.join("");document.body.appendChild(f);Event.removeListener(window,"load",TV.preload)};Event.addListener(window,"load",TV.preload)})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.Node=function(oData,oParent,expanded){if(oData){this.init(oData,oParent,expanded)}};YAHOO.widget.Node.prototype={index:0,children:null,tree:null,data:null,parent:null,depth:-1,expanded:false,multiExpand:true,renderHidden:false,childrenRendered:false,dynamicLoadComplete:false,previousSibling:null,nextSibling:null,_dynLoad:false,dataLoader:null,isLoading:false,hasIcon:true,iconMode:0,nowrap:false,isLeaf:false,contentStyle:"",contentElId:null,enableHighlight:false,highlightState:0,propagateHighlightUp:false,propagateHighlightDown:false,className:null,_type:"Node",init:function(oData,oParent,expanded){this.data={};this.children=[];this.index=YAHOO.widget.TreeView.nodeCount;++YAHOO.widget.TreeView.nodeCount;this.contentElId="ygtvcontentel"+this.index;if(Lang.isObject(oData)){for(var property in oData){if(oData.hasOwnProperty(property)){if(property.charAt(0)!='_'&&!Lang.isUndefined(this[property])&&!Lang.isFunction(this[property])){this[property]=oData[property]}else{this.data[property]=oData[property]}}}}if(!Lang.isUndefined(expanded)){this.expanded=expanded}this.createEvent("parentChange",this);if(oParent){oParent.appendChild(this)}},applyParent:function(parentNode){if(!parentNode){return false}this.tree=parentNode.tree;this.parent=parentNode;this.depth=parentNode.depth+1;this.tree.regNode(this);parentNode.childrenRendered=false;for(var i=0,len=this.children.length;i<len;++i){this.children[i].applyParent(this)}this.fireEvent("parentChange");return true},appendChild:function(childNode){if(this.hasChildren()){var sib=this.children[this.children.length-1];sib.nextSibling=childNode;childNode.previousSibling=sib}this.children[this.children.length]=childNode;childNode.applyParent(this);if(this.childrenRendered&&this.expanded){this.getChildrenEl().style.display=""}return childNode},appendTo:function(parentNode){return parentNode.appendChild(this)},insertBefore:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);p.children.splice(refIndex,0,this);if(node.previousSibling){node.previousSibling.nextSibling=this}this.previousSibling=node.previousSibling;this.nextSibling=node;node.previousSibling=this;this.applyParent(p)}return this},insertAfter:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);if(!node.nextSibling){this.nextSibling=null;return this.appendTo(p)}p.children.splice(refIndex+1,0,this);node.nextSibling.previousSibling=this;this.previousSibling=node;this.nextSibling=node.nextSibling;node.nextSibling=this;this.applyParent(p)}return this},isChildOf:function(parentNode){if(parentNode&&parentNode.children){for(var i=0,len=parentNode.children.length;i<len;++i){if(parentNode.children[i]===this){return i}}}return-1},getSiblings:function(){var sib=this.parent.children.slice(0);for(var i=0;i<sib.length&&sib[i]!=this;i++){}sib.splice(i,1);if(sib.length){return sib}return null},showChildren:function(){if(!this.tree.animateExpand(this.getChildrenEl(),this)){if(this.hasChildren()){this.getChildrenEl().style.display=""}}},hideChildren:function(){if(!this.tree.animateCollapse(this.getChildrenEl(),this)){this.getChildrenEl().style.display="none"}},getElId:function(){return"ygtv"+this.index},getChildrenElId:function(){return"ygtvc"+this.index},getToggleElId:function(){return"ygtvt"+this.index},getEl:function(){return Dom.get(this.getElId())},getChildrenEl:function(){return Dom.get(this.getChildrenElId())},getToggleEl:function(){return Dom.get(this.getToggleElId())},getContentEl:function(){return Dom.get(this.contentElId)},collapse:function(){if(!this.expanded){return}var ret=this.tree.onCollapse(this);if(false===ret){return}ret=this.tree.fireEvent("collapse",this);if(false===ret){return}if(!this.getEl()){this.expanded=false}else{this.hideChildren();this.expanded=false;this.updateIcon()}ret=this.tree.fireEvent("collapseComplete",this)},expand:function(lazySource){if(this.expanded&&!lazySource){return}var ret=true;if(!lazySource){ret=this.tree.onExpand(this);if(false===ret){return}ret=this.tree.fireEvent("expand",this)}if(false===ret){return}if(!this.getEl()){this.expanded=true;return}if(!this.childrenRendered){this.getChildrenEl().innerHTML=this.renderChildren()}else{}this.expanded=true;this.updateIcon();if(this.isLoading){this.expanded=false;return}if(!this.multiExpand){var sibs=this.getSiblings();for(var i=0;sibs&&i<sibs.length;++i){if(sibs[i]!=this&&sibs[i].expanded){sibs[i].collapse()}}}this.showChildren();ret=this.tree.fireEvent("expandComplete",this)},updateIcon:function(){if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv(([tl][pmn]h?)|(loading))\b/gi,this.getStyle())}}},getStyle:function(){if(this.isLoading){return"ygtvloading"}else{var loc=(this.nextSibling)?"t":"l";var type="n";if(this.hasChildren(true)||(this.isDynamic()&&!this.getIconMode())){type=(this.expanded)?"m":"p"}return"ygtv"+loc+type}},getHoverStyle:function(){var s=this.getStyle();if(this.hasChildren(true)&&!this.isLoading){s+="h"}return s},expandAll:function(){var l=this.children.length;for(var i=0;i<l;++i){var c=this.children[i];if(c.isDynamic()){break}else if(!c.multiExpand){break}else{c.expand();c.expandAll()}}},collapseAll:function(){for(var i=0;i<this.children.length;++i){this.children[i].collapse();this.children[i].collapseAll()}},setDynamicLoad:function(fnDataLoader,iconMode){if(fnDataLoader){this.dataLoader=fnDataLoader;this._dynLoad=true}else{this.dataLoader=null;this._dynLoad=false}if(iconMode){this.iconMode=iconMode}},isRoot:function(){return(this==this.tree.root)},isDynamic:function(){if(this.isLeaf){return false}else{return(!this.isRoot()&&(this._dynLoad||this.tree.root._dynLoad))}},getIconMode:function(){return(this.iconMode||this.tree.root.iconMode)},hasChildren:function(checkForLazyLoad){if(this.isLeaf){return false}else{return(this.children.length>0||(checkForLazyLoad&&this.isDynamic()&&!this.dynamicLoadComplete))}},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse()}else{this.expand()}}},getHtml:function(){this.childrenRendered=false;return['<div class="ygtvitem" id="',this.getElId(),'">',this.getNodeHtml(),this.getChildrenHtml(),'</div>'].join("")},getChildrenHtml:function(){var sb=[];sb[sb.length]='<div class="ygtvchildren" id="'+this.getChildrenElId()+'"';if(!this.expanded||!this.hasChildren()){sb[sb.length]=' style="display:none;"'}sb[sb.length]='>';if((this.hasChildren(true)&&this.expanded)||(this.renderHidden&&!this.isDynamic())){sb[sb.length]=this.renderChildren()}sb[sb.length]='</div>';return sb.join("")},renderChildren:function(){var node=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){node.dataLoader(node,function(){node.loadComplete()})},10)}else if(this.tree.root.dataLoader){setTimeout(function(){node.tree.root.dataLoader(node,function(){node.loadComplete()})},10)}else{return"Error: data loader not found or not specified."}return""}else{return this.completeRender()}},completeRender:function(){var sb=[];for(var i=0;i<this.children.length;++i){sb[sb.length]=this.children[i].getHtml()}this.childrenRendered=true;return sb.join("")},loadComplete:function(){this.getChildrenEl().innerHTML=this.completeRender();this.dynamicLoadComplete=true;this.isLoading=false;this.expand(true);this.tree.locked=false},getAncestor:function(depth){if(depth>=this.depth||depth<0){return null}var p=this.parent;while(p.depth>depth){p=p.parent}return p},getDepthStyle:function(depth){return(this.getAncestor(depth).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell"},getNodeHtml:function(){var sb=[];sb[sb.length]='<table id="ygtvtableel'+this.index+'"border="0" cellpadding="0" cellspacing="0" class="ygtvtable ygtvdepth'+this.depth;if(this.enableHighlight){}if(this.className){sb[sb.length]=' '+this.className}sb[sb.length]='"><tr class="ygtvrow">';for(var i=0;i<this.depth;++i){sb[sb.length]='<td class="ygtvcell '+this.getDepthStyle(i)+'"><div class="ygtvspacer"></div></td>'}if(this.hasIcon){sb[sb.length]='<td id="'+this.getToggleElId();sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.getStyle();sb[sb.length]='"><a href="#" class="ygtvspacer"> </a></td>'}sb[sb.length]='<td id="'+this.contentElId;sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.contentStyle+' ygtvcontent" ';sb[sb.length]=(this.nowrap)?' nowrap="nowrap" ':'';sb[sb.length]=' >';sb[sb.length]=this.getContentHtml();sb[sb.length]='</td></tr></table>';return sb.join("")},getContentHtml:function(){return""},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle())}}},toString:function(){return this._type+" ("+this.index+")"},_focusHighlightedItems:[],_focusedItem:null,_canHaveFocus:function(){return this.getEl().getElementsByTagName('a').length>0},_removeFocus:function(){if(this._focusedItem){Event.removeListener(this._focusedItem,'blur');this._focusedItem=null}var el;while((el=this._focusHighlightedItems.shift())){Dom.removeClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME)}},focus:function(){var focused=false,self=this;if(this.tree.currentFocus){this.tree.currentFocus._removeFocus()}var expandParent=function(node){if(node.parent){expandParent(node.parent);node.parent.expand()}};expandParent(this);Dom.getElementsBy(function(el){return/ygtv(([tl][pmn]h?)|(content))/.test(el.className)},'td',self.getEl().firstChild,function(el){Dom.addClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);if(!focused){var aEl=el.getElementsByTagName('a');if(aEl.length){aEl=aEl[0];aEl.focus();self._focusedItem=aEl;Event.on(aEl,'blur',function(){self.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});self.tree.currentFocus=null;self._removeFocus()});focused=true}}self._focusHighlightedItems.push(el)});if(focused){this.tree.fireEvent('focusChanged',{oldNode:this.tree.currentFocus,newNode:this});this.tree.currentFocus=this}else{this.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});this.tree.currentFocus=null;this._removeFocus()}return focused},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count+1},getNodeDefinition:function(){if(this.isDynamic()){return false}var def,defs=Lang.merge(this.data),children=[];if(this.expanded){defs.expanded=this.expanded}if(!this.multiExpand){defs.multiExpand=this.multiExpand}if(!this.renderHidden){defs.renderHidden=this.renderHidden}if(!this.hasIcon){defs.hasIcon=this.hasIcon}if(this.nowrap){defs.nowrap=this.nowrap}if(this.className){defs.className=this.className}if(this.editable){defs.editable=this.editable}if(this.enableHighlight){defs.enableHighlight=this.enableHighlight}if(this.highlightState){defs.highlightState=this.highlightState}if(this.propagateHighlightUp){defs.propagateHighlightUp=this.propagateHighlightUp}if(this.propagateHighlightDown){defs.propagateHighlightDown=this.propagateHighlightDown}defs.type=this._type;for(var i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}children.push(def)}if(children.length){defs.children=children}return defs},getToggleLink:function(){return'return false;'},setNodesProperty:function(name,value,refresh){if(name.charAt(0)!='_'&&!Lang.isUndefined(this[name])&&!Lang.isFunction(this[name])){this[name]=value}else{this.data[name]=value}for(var i=0;i<this.children.length;i++){this.children[i].setNodesProperty(name,value)}if(refresh){this.refresh()}},toggleHighlight:function(){if(this.enableHighlight){if(this.highlightState==1){this.unhighlight()}else{this.highlight()}}},highlight:function(_silent){return;if(this.enableHighlight){if(this.tree.singleNodeHighlight){if(this.tree._currentlyHighlighted){this.tree._currentlyHighlighted.unhighlight()}this.tree._currentlyHighlighted=this}this.highlightState=1;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].highlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},unhighlight:function(_silent){if(this.enableHighlight){this.highlightState=0;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].unhighlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},_childrenHighlighted:function(){var yes=false,no=false;if(this.enableHighlight){for(var i=0;i<this.children.length;i++){switch(this.children[i].highlightState){case 0:no=true;break;case 1:yes=true;break;case 2:yes=no=true;break}}if(yes&&no){this.highlightState=2}else if(yes){this.highlightState=1}else{this.highlightState=0}this._setHighlightClassName();if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}}},_setHighlightClassName:function(){var el=Dom.get('ygtvtableel'+this.index);if(el){el.className=el.className.replace(/\bygtv-highlight\d\b/gi,'ygtv-highlight'+this.highlightState)}}};YAHOO.augment(YAHOO.widget.Node,YAHOO.util.EventProvider)})();YAHOO.widget.RootNode=function(oTree){this.init(null,null,true);this.tree=oTree};YAHOO.extend(YAHOO.widget.RootNode,YAHOO.widget.Node,{_type:"RootNode",getNodeHtml:function(){return""},toString:function(){return this._type},loadComplete:function(){this.tree.draw()},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count},getNodeDefinition:function(){for(var def,defs=[],i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}defs.push(def)}return defs},collapse:function(){},expand:function(){},getSiblings:function(){return null},focus:function(){}});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.TextNode=function(oData,oParent,expanded){if(oData){if(Lang.isString(oData)){oData={label:oData}}this.init(oData,oParent,expanded);this.setUpLabel(oData)}};YAHOO.extend(YAHOO.widget.TextNode,YAHOO.widget.Node,{labelStyle:"ygtvlabel",labelElId:null,label:null,title:null,href:null,target:"_self",_type:"TextNode",setUpLabel:function(oData){if(Lang.isString(oData)){oData={label:oData}}else{if(oData.style){this.labelStyle=oData.style}}this.label=oData.label;this.labelElId="ygtvlabelel"+this.index},getLabelEl:function(){return Dom.get(this.labelElId)},getContentHtml:function(){var sb=[];sb[sb.length]=this.href?'<a':'<span';sb[sb.length]=' id="'+this.labelElId+'"';sb[sb.length]=' class="'+this.labelStyle+'"';if(this.href){sb[sb.length]=' href="'+this.href+'"';sb[sb.length]=' target="'+this.target+'"'}if(this.title){sb[sb.length]=' title="'+this.title+'"'}sb[sb.length]=' >';sb[sb.length]=this.label;sb[sb.length]=this.href?'</a>':'</span>';return sb.join("")},getNodeDefinition:function(){var def=YAHOO.widget.TextNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.label=this.label;if(this.labelStyle!='ygtvlabel'){def.style=this.labelStyle}if(this.title){def.title=this.title}if(this.href){def.href=this.href}if(this.target!='_self'){def.target=this.target}return def},toString:function(){return YAHOO.widget.TextNode.superclass.toString.call(this)+": "+this.label},onLabelClick:function(){return false},refresh:function(){YAHOO.widget.TextNode.superclass.refresh.call(this);var label=this.getLabelEl();label.innerHTML=this.label;if(label.tagName.toUpperCase()=='A'){label.href=this.href;label.target=this.target}}})})();YAHOO.widget.MenuNode=function(oData,oParent,expanded){YAHOO.widget.MenuNode.superclass.constructor.call(this,oData,oParent,expanded);this.multiExpand=false};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{_type:"MenuNode"});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.HTMLNode=function(oData,oParent,expanded,hasIcon){if(oData){this.init(oData,oParent,expanded);this.initContent(oData,hasIcon)}};YAHOO.extend(YAHOO.widget.HTMLNode,YAHOO.widget.Node,{contentStyle:"ygtvhtml",html:null,_type:"HTMLNode",initContent:function(oData,hasIcon){this.setHtml(oData);this.contentElId="ygtvcontentel"+this.index;if(!Lang.isUndefined(hasIcon)){this.hasIcon=hasIcon}},setHtml:function(o){this.html=(typeof o==="string")?o:o.html;var el=this.getContentEl();if(el){el.innerHTML=this.html}},getContentHtml:function(){return this.html},getNodeDefinition:function(){var def=YAHOO.widget.HTMLNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.html=this.html;return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,Calendar=YAHOO.widget.Calendar;YAHOO.widget.DateNode=function(oData,oParent,expanded){YAHOO.widget.DateNode.superclass.constructor.call(this,oData,oParent,expanded)};YAHOO.extend(YAHOO.widget.DateNode,YAHOO.widget.TextNode,{_type:"DateNode",calendarConfig:null,fillEditorContainer:function(editorData){var cal,container=editorData.inputContainer;if(Lang.isUndefined(Calendar)){Dom.replaceClass(editorData.editorPanel,'ygtv-edit-DateNode','ygtv-edit-TextNode');YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this,editorData);return}if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=false;editorData.node.destroyEditorContents(editorData);editorData.inputObject=cal=new Calendar(container.appendChild(document.createElement('div')));if(this.calendarConfig){cal.cfg.applyConfig(this.calendarConfig,true);cal.cfg.fireQueue()}cal.selectEvent.subscribe(function(){this.tree._closeEditor(true)},this,true)}else{cal=editorData.inputObject}cal.cfg.setProperty("selected",this.label,false);var delim=cal.cfg.getProperty('DATE_FIELD_DELIMITER');var pageDate=this.label.split(delim);cal.cfg.setProperty('pagedate',pageDate[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]+delim+pageDate[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]);cal.cfg.fireQueue();cal.render();cal.oDomContainer.focus()},saveEditorValue:function(editorData){var node=editorData.node,validator=node.tree.validator,value;if(Lang.isUndefined(Calendar)){value=editorData.inputElement.value}else{var cal=editorData.inputObject,date=cal.getSelectedDates()[0],dd=[];dd[cal.cfg.getProperty('MDY_DAY_POSITION')-1]=date.getDate();dd[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]=date.getMonth()+1;dd[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]=date.getFullYear();value=dd.join(cal.cfg.getProperty('DATE_FIELD_DELIMITER'))}if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value},getNodeDefinition:function(){var def=YAHOO.widget.DateNode.superclass.getNodeDefinition.call(this);if(def===false){return false}if(this.calendarConfig){def.calendarConfig=this.calendarConfig}return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,TV=YAHOO.widget.TreeView,TVproto=TV.prototype;TV.editorData={active:false,whoHasIt:null,nodeType:null,editorPanel:null,inputContainer:null,buttonsContainer:null,node:null,saveOnEnter:true};TVproto.validator=null;TVproto._nodeEditing=function(node){if(node.fillEditorContainer&&node.editable){var ed,topLeft,buttons,button,editorData=TV.editorData;editorData.active=true;editorData.whoHasIt=this;if(!editorData.nodeType){editorData.editorPanel=ed=document.body.appendChild(document.createElement('div'));Dom.addClass(ed,'ygtv-label-editor');buttons=editorData.buttonsContainer=ed.appendChild(document.createElement('div'));Dom.addClass(buttons,'ygtv-button-container');button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvok');button.innerHTML=' ';button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvcancel');button.innerHTML=' ';Event.on(buttons,'click',function(ev){var target=Event.getTarget(ev);var node=TV.editorData.node;if(Dom.hasClass(target,'ygtvok')){Event.stopEvent(ev);this._closeEditor(true)}if(Dom.hasClass(target,'ygtvcancel')){Event.stopEvent(ev);this._closeEditor(false)}},this,true);editorData.inputContainer=ed.appendChild(document.createElement('div'));Dom.addClass(editorData.inputContainer,'ygtv-input');Event.on(ed,'keydown',function(ev){var editorData=TV.editorData,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.ENTER:Event.stopEvent(ev);if(editorData.saveOnEnter){this._closeEditor(true)}break;case KEY.ESCAPE:Event.stopEvent(ev);this._closeEditor(false);break}},this,true)}else{ed=editorData.editorPanel}editorData.node=node;if(editorData.nodeType){Dom.removeClass(ed,'ygtv-edit-'+editorData.nodeType)}Dom.addClass(ed,' ygtv-edit-'+node._type);topLeft=Dom.getXY(node.getContentEl());Dom.setStyle(ed,'left',topLeft[0]+'px');Dom.setStyle(ed,'top',topLeft[1]+'px');Dom.setStyle(ed,'display','block');ed.focus();node.fillEditorContainer(editorData);return true}};TVproto.onEventEditNode=function(oArgs){if(oArgs instanceof YAHOO.widget.Node){oArgs.editNode()}else if(oArgs.node instanceof YAHOO.widget.Node){oArgs.node.editNode()}};TVproto._closeEditor=function(save){var ed=TV.editorData,node=ed.node,close=true;if(save){close=ed.node.saveEditorValue(ed)!==false}if(close){Dom.setStyle(ed.editorPanel,'display','none');ed.active=false;node.focus()}};TVproto._destroyEditor=function(){var ed=TV.editorData;if(ed&&ed.nodeType&&(!ed.active||ed.whoHasIt===this)){Event.removeListener(ed.editorPanel,'keydown');Event.removeListener(ed.buttonContainer,'click');ed.node.destroyEditorContents(ed);document.body.removeChild(ed.editorPanel);ed.nodeType=ed.editorPanel=ed.inputContainer=ed.buttonsContainer=ed.whoHasIt=ed.node=null;ed.active=false}};var Nproto=YAHOO.widget.Node.prototype;Nproto.editable=false;Nproto.editNode=function(){this.tree._nodeEditing(this)};Nproto.fillEditorContainer=null;Nproto.destroyEditorContents=function(editorData){Event.purgeElement(editorData.inputContainer,true);editorData.inputContainer.innerHTML=''};Nproto.saveEditorValue=function(editorData){};var TNproto=YAHOO.widget.TextNode.prototype;TNproto.fillEditorContainer=function(editorData){var input;if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=true;editorData.node.destroyEditorContents(editorData);editorData.inputElement=input=editorData.inputContainer.appendChild(document.createElement('input'))}else{input=editorData.inputElement}input.value=this.label;input.focus();input.select()};TNproto.saveEditorValue=function(editorData){var node=editorData.node,value=editorData.inputElement.value,validator=node.tree.validator;if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value};TNproto.destroyEditorContents=function(editorData){editorData.inputContainer.innerHTML=''}})();YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.7.0",build:"1799"});
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function(){var G=YAHOO.util.Dom,M=YAHOO.util.Event,I=YAHOO.lang,L=YAHOO.env.ua,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(O,N,R,P){var S,Q;if(I.isString(O)&&I.isString(N)){if(L.ie){Q='<input type="'+O+'" name="'+N+'"';if(P){Q+=" checked";}Q+=">";S=document.createElement(Q);}else{S=document.createElement("input");S.name=N;S.type=O;if(P){S.checked=true;}}S.value=R;}return S;}function H(O,U){var N=O.nodeName.toUpperCase(),S=this,T,P,Q;function V(W){if(!(W in U)){T=O.getAttributeNode(W);if(T&&("value" in T)){U[W]=T.value;}}}function R(){V("type");if(U.type=="button"){U.type="push";}if(!("disabled" in U)){U.disabled=O.disabled;}V("name");V("value");V("title");}switch(N){case"A":U.type="link";V("href");V("target");break;case"INPUT":R();if(!("checked" in U)){U.checked=O.checked;}break;case"BUTTON":R();P=O.parentNode.parentNode;if(G.hasClass(P,this.CSS_CLASS_NAME+"-checked")){U.checked=true;}if(G.hasClass(P,this.CSS_CLASS_NAME+"-disabled")){U.disabled=true;}O.removeAttribute("value");O.setAttribute("type","button");break;}O.removeAttribute("id");O.removeAttribute("name");if(!("tabindex" in U)){U.tabindex=O.tabIndex;}if(!("label" in U)){Q=N=="INPUT"?O.value:O.innerHTML;if(Q&&Q.length>0){U.label=Q+" ";}}}function A(P){var O=P.attributes,N=O.srcelement,R=N.nodeName.toUpperCase(),Q=this;if(R==this.NODE_NAME){P.element=N;P.id=N.id;G.getElementsBy(function(S){switch(S.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(Q,S,O);break;}},"*",N);}else{switch(R){case"BUTTON":case"A":case"INPUT":H.call(this,N,O);break;}}}YAHOO.widget.Button=function(R,O){if(!B&&YAHOO.widget.Overlay){B=YAHOO.widget.Overlay;}if(!J&&YAHOO.widget.Menu){J=YAHOO.widget.Menu;}var Q=YAHOO.widget.Button.superclass.constructor,P,N;if(arguments.length==1&&!I.isString(R)&&!R.nodeName){if(!R.id){R.id=G.generateId();}Q.call(this,(this.createButtonElement(R.type)),R);}else{P={element:null,attributes:(O||{})};if(I.isString(R)){N=G.get(R);if(N){if(!P.attributes.id){P.attributes.id=R;}P.attributes.srcelement=N;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}else{if(R.nodeName){if(!P.attributes.id){if(R.id){P.attributes.id=R.id;}else{P.attributes.id=G.generateId();}}P.attributes.srcelement=R;A.call(this,P);if(!P.element){P.element=this.createButtonElement(P.attributes.type);}Q.call(this,P.element,P.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,_nOptionRegionX:0,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked. Click to check.",RADIO_CHECKED_TITLE:"Checked. Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked. Click to check.",CHECKBOX_CHECKED_TITLE:"Checked. Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed. Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded. Click or press Esc to collapse.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed. Click inside option "+"region or press down arrow key to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded. Press Esc to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(N){if(N=="split"){this.on("option",this._onOption);}},_setLabel:function(O){this._button.innerHTML=O;var P,N=L.gecko;if(N&&N<1.9&&G.inDocument(this.get("element"))){P=this.CSS_CLASS_NAME;this.removeClass(P);I.later(0,this,this.addClass,P);}},_setTabIndex:function(N){this._button.tabIndex=N;},_setTitle:function(O){var N=O;if(this.get("type")!="link"){if(!N){switch(this.get("type")){case"radio":N=this.RADIO_DEFAULT_TITLE;break;case"checkbox":N=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":N=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":N=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":N=this.SUBMIT_TITLE;break;}}this._button.title=N;}},_setDisabled:function(N){if(this.get("type")!="link"){if(N){if(this._menu){this._menu.hide();}if(this.hasFocus()){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(N){if(this.get("type")=="link"){this._button.href=N;}},_setTarget:function(N){if(this.get("type")=="link"){this._button.setAttribute("target",N);}},_setChecked:function(O){var P=this.get("type"),N;if(P=="checkbox"||P=="radio"){if(O){this.addStateCSSClasses("checked");N=(P=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{this.removeStateCSSClasses("checked");N=(P=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}if(!this._hasDefaultTitle){this.set("title",N);}}},_setMenu:function(U){var P=this.get("lazyloadmenu"),R=this.get("element"),N,W=false,X,O,Q;function V(){X.render(R.parentNode);this.removeListener("appendTo",V);}function T(){X.cfg.queueProperty("container",R.parentNode);this.removeListener("appendTo",T);}function S(){var Y;if(X){G.addClass(X.element,this.get("menuclassname"));G.addClass(X.element,"yui-"+this.get("type")+"-button-menu");X.showEvent.subscribe(this._onMenuShow,null,this);X.hideEvent.subscribe(this._onMenuHide,null,this);X.renderEvent.subscribe(this._onMenuRender,null,this);if(J&&X instanceof J){if(P){Y=this.get("container");if(Y){X.cfg.queueProperty("container",Y);}else{this.on("appendTo",T);}}X.cfg.queueProperty("clicktohide",false);X.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);X.subscribe("click",this._onMenuClick,this,true);this.on("selectedMenuItemChange",this._onSelectedMenuItemChange);Q=X.srcElement;if(Q&&Q.nodeName.toUpperCase()=="SELECT"){Q.style.display="none";Q.parentNode.removeChild(Q);}}else{if(B&&X instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();
}K.register(X);}}this._menu=X;if(!W&&!P){if(G.inDocument(R)){X.render(R.parentNode);}else{this.on("appendTo",V);}}}}if(B){if(J){N=J.prototype.CSS_CLASS_NAME;}if(U&&J&&(U instanceof J)){X=U;W=true;S.call(this);}else{if(B&&U&&(U instanceof B)){X=U;W=true;X.cfg.queueProperty("visible",false);S.call(this);}else{if(J&&I.isArray(U)){X=new J(G.generateId(),{lazyload:P,itemdata:U});this._menu=X;this.on("appendTo",S);}else{if(I.isString(U)){O=G.get(U);if(O){if(J&&G.hasClass(O,N)||O.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){X=new B(U,{visible:false});S.call(this);}}}}else{if(U&&U.nodeName){if(J&&G.hasClass(U,N)||U.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){if(!U.id){G.generateId(U);}X=new B(U,{visible:false});S.call(this);}}}}}}}}},_setOnClick:function(N){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=N)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(N)&&I.isFunction(N.fn)){this.on("click",N.fn,N.obj,N.scope);this._onclickAttributeValue=N;}},_isActivationKey:function(N){var S=this.get("type"),O=(S=="checkbox"||S=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,Q=O.length,R=false,P;if(Q>0){P=Q-1;do{if(N==O[P]){R=true;break;}}while(P--);}return R;},_isSplitButtonOptionKey:function(P){var O=(M.getCharCode(P)==40);var N=function(Q){M.preventDefault(Q);this.removeListener("keypress",N);};if(O){if(L.opera){this.on("keypress",N);}M.preventDefault(P);}return O;},_addListenersToForm:function(){var T=this.getForm(),S=YAHOO.widget.Button.onFormKeyPress,R,N,Q,P,O;if(T){M.on(T,"reset",this._onFormReset,null,this);M.on(T,"submit",this._onFormSubmit,null,this);N=this.get("srcelement");if(this.get("type")=="submit"||(N&&N.type=="submit")){Q=M.getListeners(T,"keypress");R=false;if(Q){P=Q.length;if(P>0){O=P-1;do{if(Q[O].fn==S){R=true;break;}}while(O--);}}if(!R){M.on(T,"keypress",S);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var N=this._menu,Q=this.get("menualignment"),P=this.get("focusmenu"),O;if(this._renderedMenu){N.cfg.setProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.setProperty("preventcontextoverlap",true);N.cfg.setProperty("constraintoviewport",true);}else{N.cfg.queueProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.queueProperty("preventcontextoverlap",true);N.cfg.queueProperty("constraintoviewport",true);}this.focus();if(J&&N&&(N instanceof J)){O=N.focus;N.focus=function(){};if(this._renderedMenu){N.cfg.setProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.setProperty("maxheight",this.get("menumaxheight"));}else{N.cfg.queueProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.queueProperty("maxheight",this.get("menumaxheight"));}N.show();N.focus=O;N.align();if(R.type=="mousedown"){M.stopPropagation(R);}if(P){N.focus();}}else{if(B&&N&&(N instanceof B)){if(!this._renderedMenu){N.render(this.get("element").parentNode);}N.show();N.align();}}},_hideMenu:function(){var N=this._menu;if(N){N.hide();}},_onMouseOver:function(O){var Q=this.get("type"),N,P;if(Q==="split"){N=this.get("element");P=(G.getX(N)+(N.offsetWidth-this.OPTION_AREA_WIDTH));this._nOptionRegionX=P;}if(!this._hasMouseEventHandlers){if(Q==="split"){this.on("mousemove",this._onMouseMove);}this.on("mouseout",this._onMouseOut);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(Q==="split"&&(M.getPageX(O)>P)){this.addStateCSSClasses("hoveroption");}if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){M.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseMove:function(N){var O=this._nOptionRegionX;if(O){if(M.getPageX(N)>O){this.addStateCSSClasses("hoveroption");}else{this.removeStateCSSClasses("hoveroption");}}},_onMouseOut:function(N){var O=this.get("type");this.removeStateCSSClasses("hover");if(O!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){M.on(document,"mouseup",this._onDocumentMouseUp,null,this);}if(O==="split"&&(M.getPageX(N)>this._nOptionRegionX)){this.removeStateCSSClasses("hoveroption");}},_onDocumentMouseUp:function(P){this._activationButtonPressed=false;this._bOptionPressed=false;var Q=this.get("type"),N,O;if(Q=="menu"||Q=="split"){N=M.getTarget(P);O=this._menu.element;if(N!=O&&!G.isAncestor(O,N)){this.removeStateCSSClasses((Q=="menu"?"active":"activeoption"));this._hideMenu();}}M.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var Q,O=true;function N(){this._hideMenu();this.removeListener("mouseup",N);}if((P.which||P.button)==1){if(!this.hasFocus()){this.focus();}Q=this.get("type");if(Q=="split"){if(M.getPageX(P)>this._nOptionRegionX){this.fireEvent("option",P);O=false;}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(Q=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(Q=="split"||Q=="menu"){this._hideMenuTimer=I.later(250,this,this.on,["mouseup",N]);}}return O;},_onMouseUp:function(P){var Q=this.get("type"),N=this._hideMenuTimer,O=true;if(N){N.cancel();}if(Q=="checkbox"||Q=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(Q!="menu"){this.removeStateCSSClasses("active");}if(Q=="split"&&M.getPageX(P)>this._nOptionRegionX){O=false;}return O;},_onFocus:function(O){var N;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){N=this._button;M.on(N,"blur",this._onBlur,null,this);M.on(N,"keydown",this._onKeyDown,null,this);M.on(N,"keyup",this._onKeyUp,null,this);
this._hasKeyEventHandlers=true;}this.fireEvent("focus",O);},_onBlur:function(N){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){M.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",N);},_onDocumentKeyUp:function(N){if(this._isActivationKey(M.getCharCode(N))){this._activationKeyPressed=false;M.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(O){var N=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(O)){this.fireEvent("option",O);}else{if(this._isActivationKey(M.getCharCode(O))){if(this.get("type")=="menu"){this._showMenu(O);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(N&&N.cfg.getProperty("visible")&&M.getCharCode(O)==27){N.hide();this.focus();}},_onKeyUp:function(N){var O;if(this._isActivationKey(M.getCharCode(N))){O=this.get("type");if(O=="checkbox"||O=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(Q){var S=this.get("type"),N,R,O,P;switch(S){case"radio":case"checkbox":if(!this._hasDefaultTitle){if(this.get("checked")){N=(S=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{N=(S=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",N);}break;case"submit":if(Q.returnValue!==false){this.submitForm();}break;case"reset":R=this.getForm();if(R){R.reset();}break;case"menu":N=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",N);break;case"split":if(this._nOptionRegionX>0&&(M.getPageX(Q)>this._nOptionRegionX)){P=false;}else{this._hideMenu();O=this.get("srcelement");if(O&&O.type=="submit"&&Q.returnValue!==false){this.submitForm();}}N=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",N);break;}return P;},_onDblClick:function(O){var N=true;if(this.get("type")=="split"&&M.getPageX(O)>this._nOptionRegionX){N=false;}return N;},_onAppendTo:function(N){I.later(0,this,this._addListenersToForm);},_onFormReset:function(O){var P=this.get("type"),N=this._menu;if(P=="checkbox"||P=="radio"){this.resetValue("checked");}if(J&&N&&(N instanceof J)){this.resetValue("selectedMenuItem");}},_onFormSubmit:function(N){this.createHiddenFields();},_onDocumentMouseDown:function(Q){var N=M.getTarget(Q),P=this.get("element"),O=this._menu.element;if(N!=P&&!G.isAncestor(P,N)&&N!=O&&!G.isAncestor(O,N)){this._hideMenu();M.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(N){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(N);this._bOptionPressed=true;}},_onMenuShow:function(O){M.on(document,"mousedown",this._onDocumentMouseDown,null,this);var N,P;if(this.get("type")=="split"){N=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;P="activeoption";}else{N=this.MENUBUTTON_MENU_VISIBLE_TITLE;P="active";}this.addStateCSSClasses(P);this.set("title",N);},_onMenuHide:function(P){var O=this._menu,N,Q;if(this.get("type")=="split"){N=this.SPLITBUTTON_DEFAULT_TITLE;Q="activeoption";}else{N=this.MENUBUTTON_DEFAULT_TITLE;Q="active";}this.removeStateCSSClasses(Q);this.set("title",N);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(P,O){var N=O[0];if(M.getCharCode(N)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(P){var S=this.get("element"),O=S.parentNode,N=this._menu,R=N.element,Q=N.srcElement;if(O!=R.parentNode){O.appendChild(R);}this._renderedMenu=true;if(Q&&Q.nodeName.toLowerCase()==="select"&&Q.value){this.set("selectedMenuItem",N.getItem(Q.selectedIndex));}},_onMenuClick:function(O,N){var Q=N[1],P;if(Q){this.set("selectedMenuItem",Q);P=this.get("srcelement");if(P&&P.type=="submit"){this.submitForm();}this._hideMenu();}},_onSelectedMenuItemChange:function(N){var O=N.prevValue,P=N.newValue;if(O){G.removeClass(O.element,"yui-button-selectedmenuitem");}if(P){G.addClass(P.element,"yui-button-selectedmenuitem");}},createButtonElement:function(N){var P=this.NODE_NAME,O=document.createElement(P);O.innerHTML="<"+P+' class="first-child">'+(N=="link"?"<a></a>":'<button type="button"></button>')+"</"+P+">";return O;},addStateCSSClasses:function(N){var O=this.get("type");if(I.isString(N)){if(N!="activeoption"&&N!="hoveroption"){this.addClass(this.CSS_CLASS_NAME+("-"+N));}this.addClass("yui-"+O+("-button-"+N));}},removeStateCSSClasses:function(N){var O=this.get("type");if(I.isString(N)){this.removeClass(this.CSS_CLASS_NAME+("-"+N));this.removeClass("yui-"+O+("-button-"+N));}},createHiddenFields:function(){this.removeHiddenFields();var V=this.getForm(),Z,O,S,X,Y,T,U,N,R,W,P,Q=false;if(V&&!this.get("disabled")){O=this.get("type");S=(O=="checkbox"||O=="radio");if((S&&this.get("checked"))||(E==this)){Z=F((S?O:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(Z){if(S){Z.style.display="none";}V.appendChild(Z);}}X=this._menu;if(J&&X&&(X instanceof J)){Y=this.get("selectedMenuItem");P=X.srcElement;Q=(P&&P.nodeName.toUpperCase()=="SELECT");if(Y){U=(Y.value===null||Y.value==="")?Y.cfg.getProperty("text"):Y.value;T=this.get("name");if(Q){W=P.name;}else{if(T){W=(T+"_options");}}if(U&&W){N=F("hidden",W,U);V.appendChild(N);}}else{if(Q){V.appendChild(P);}}}if(Z&&N){this._hiddenFields=[Z,N];}else{if(!Z&&N){this._hiddenFields=N;}else{if(Z&&!N){this._hiddenFields=Z;}}}R=this._hiddenFields;}return R;},removeHiddenFields:function(){var Q=this._hiddenFields,O,P;function N(R){if(G.inDocument(R)){R.parentNode.removeChild(R);}}if(Q){if(I.isArray(Q)){O=Q.length;if(O>0){P=O-1;do{N(Q[P]);}while(P--);}}else{N(Q);}this._hiddenFields=null;}},submitForm:function(){var Q=this.getForm(),P=this.get("srcelement"),O=false,N;if(Q){if(this.get("type")=="submit"||(P&&P.type=="submit")){E=this;
}if(L.ie){O=Q.fireEvent("onsubmit");}else{N=document.createEvent("HTMLEvents");N.initEvent("submit",true,true);O=Q.dispatchEvent(N);}if((L.ie||L.webkit)&&O){Q.submit();}}return O;},init:function(O,a){var Q=a.type=="link"?"a":"button",V=a.srcelement,Z=O.getElementsByTagName(Q)[0],X;if(!Z){X=O.getElementsByTagName("input")[0];if(X){Z=document.createElement("button");Z.setAttribute("type","button");X.parentNode.replaceChild(Z,X);}}this._button=Z;this._hasDefaultTitle=(a.title&&a.title.length>0);YAHOO.widget.Button.superclass.init.call(this,O,a);var T=this.get("id"),N=T+"-button";Z.id=N;var U,W;var d=function(e){return(e.htmlFor===T);};var S=function(){W.setAttribute((L.ie?"htmlFor":"for"),N);};if(V&&this.get("type")!="link"){U=G.getElementsBy(d,"label");if(I.isArray(U)&&U.length>0){W=U[0];}}D[T]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");M.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this.on("click",this._onClick);var Y=this.get("onclick");this.set("onclick",null);this.set("onclick",Y);this.on("dblclick",this._onDblClick);if(W){this.on("appendTo",S);}this.on("appendTo",this._onAppendTo);var c=this.get("container"),P=this.get("element"),b=G.inDocument(P),R;if(c){if(V&&V!=P){R=V.parentNode;if(R){R.removeChild(V);}}if(I.isString(c)){M.onContentReady(c,this.appendTo,c,this);}else{this.on("init",function(){I.later(0,this,this.appendTo,c);});}}else{if(!b&&V&&V!=P){R=V.parentNode;if(R){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:R});R.replaceChild(P,V);this.fireEvent("appendTo",{type:"appendTo",target:R});}}else{if(this.get("type")!="link"&&b&&V&&V==P){this._addListenersToForm();}}}this.fireEvent("init",{type:"init",target:this});},initAttributes:function(O){var N=O||{};YAHOO.widget.Button.superclass.initAttributes.call(this,N);this.setAttributeConfig("type",{value:(N.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:N.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:N.value});this.setAttributeConfig("name",{value:N.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:N.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:N.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(N.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:N.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:N.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(N.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:N.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:N.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(N.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(N.menuclassname||"yui-button-menu"),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("menuminscrollheight",{value:(N.menuminscrollheight||90),validator:I.isNumber});this.setAttributeConfig("menumaxheight",{value:(N.menumaxheight||0),validator:I.isNumber});this.setAttributeConfig("menualignment",{value:(N.menualignment||["tl","bl"]),validator:I.isArray});this.setAttributeConfig("selectedMenuItem",{value:null});this.setAttributeConfig("onclick",{value:N.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(N.focusmenu===false?false:true),validator:I.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){var N=this._button,O;if(N){O=N.form;}return O;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var P=this.get("element"),O=P.parentNode,N=this._menu,R;if(N){if(K&&K.find(N)){K.remove(N);}N.destroy();}M.purgeElement(P);M.purgeElement(this._button);M.removeListener(document,"mouseup",this._onDocumentMouseUp);M.removeListener(document,"keyup",this._onDocumentKeyUp);M.removeListener(document,"mousedown",this._onDocumentMouseDown);var Q=this.getForm();if(Q){M.removeListener(Q,"reset",this._onFormReset);M.removeListener(Q,"submit",this._onFormSubmit);}this.unsubscribeAll();if(O){O.removeChild(P);}delete D[this.get("id")];R=G.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,Q);if(I.isArray(R)&&R.length===0){M.removeListener(Q,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(O,N){var P=arguments[0];if(this.DOM_EVENTS[P]&&this.get("disabled")){return false;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(R){var P=M.getTarget(R),S=M.getCharCode(R),Q=P.nodeName&&P.nodeName.toUpperCase(),N=P.type,T=false,V,X,O,W;function U(a){var Z,Y;switch(a.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(a.type=="submit"&&!a.disabled){if(!T&&!O){O=a;}}break;default:Z=a.id;if(Z){V=D[Z];if(V){T=true;if(!V.get("disabled")){Y=V.get("srcelement");if(!X&&(V.get("type")=="submit"||(Y&&Y.type=="submit"))){X=V;}}}}break;}}if(S==13&&((Q=="INPUT"&&(N=="text"||N=="password"||N=="checkbox"||N=="radio"||N=="file"))||Q=="SELECT")){G.getElementsBy(U,"*",this);if(O){O.focus();}else{if(!O&&X){M.preventDefault(R);if(L.ie){X.get("element").fireEvent("onclick");}else{W=document.createEvent("HTMLEvents");W.initEvent("click",true,true);if(L.gecko<1.9){X.fireEvent("click",W);
}else{X.get("element").dispatchEvent(W);}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var S=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",N),Q=S.length,R,O,P;if(Q>0){for(P=0;P<Q;P++){O=S[P].id;if(O){R=D[O];if(R){R.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(N){return D[N];};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);}return L;},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}}}return J;},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){return this._buttons[F];},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.7.0",build:"1799"});
(function(){var M;YAHOO.widget.Carousel=function(n,m){YAHOO.widget.Carousel.superclass.constructor.call(this,n,m)};var Q=YAHOO.widget.Carousel,a=YAHOO.util.Dom,Y=YAHOO.util.Event,k=YAHOO.lang;M="Carousel";var P={},F="afterScroll",b="allItemsRemoved",X="beforeHide",I="beforePageChange",e="beforeScroll",U="beforeShow",B="blur",T="focus",W="hide",O="itemAdded",j="itemRemoved",C="itemSelected",K="loadItems",H="navigationStateChange",c="pageChange",G="render",R="show",V="startAutoPlay",l="stopAutoPlay",J="uiUpdate";function S(n,m){var o=document.createElement(n);m=m||{};if(m.className){a.addClass(o,m.className)}if(m.parent){m.parent.appendChild(o)}if(m.id){o.setAttribute("id",m.id)}if(m.content){if(m.content.nodeName){o.appendChild(m.content)}else{o.innerHTML=m.content}}return o}function Z(o,n,m){var q;if(!o){return 0}function p(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseInt(a.getStyle(t,"marginLeft"),10)}else{u=parseInt(a.getStyle(t,s),10)}return k.isNumber(u)?u:0}function r(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseFloat(a.getStyle(t,"marginLeft"))}else{u=parseFloat(a.getStyle(t,s))}return k.isNumber(u)?u:0}if(typeof m=="undefined"){m="int"}switch(n){case"height":q=o.offsetHeight;if(q>0){q+=p(o,"marginTop")+p(o,"marginBottom")}else{q=r(o,"height")+p(o,"marginTop")+p(o,"marginBottom")+p(o,"borderTopWidth")+p(o,"borderBottomWidth")+p(o,"paddingTop")+p(o,"paddingBottom")}break;case"width":q=o.offsetWidth;if(q>0){q+=p(o,"marginLeft")+p(o,"marginRight")}else{q=r(o,"width")+p(o,"marginLeft")+p(o,"marginRight")+p(o,"borderLeftWidth")+p(o,"borderRightWidth")+p(o,"paddingLeft")+p(o,"paddingRight")}break;default:if(m=="int"){q=p(o,n)}else{if(m=="float"){q=r(o,n)}else{q=a.getStyle(o,n)}}break}return q}function L(p){var o=this,q,n=0,m=false;if(o._itemsTable.numItems===0){return 0}if(typeof p=="undefined"){if(o._itemsTable.size>0){return o._itemsTable.size}}if(k.isUndefined(o._itemsTable.items[0])){return 0}q=a.get(o._itemsTable.items[0].id);if(typeof p=="undefined"){m=o.get("isVertical")}else{m=p=="height"}if(m){n=Z(q,"height")}else{n=Z(q,"width")}if(typeof p=="undefined"){o._itemsTable.size=n}return n}function D(n){var m=this.get("numVisible");return Math.floor(n/m)*m}function f(o){var n=0,m=0;n=L.call(this);m=n*o;if(this.get("isVertical")){m-=o}return m}function d(m,n){n.scrollPageBackward();Y.preventDefault(m)}function g(m,n){n.scrollPageForward();Y.preventDefault(m)}function i(r,n){var v=this,w=v.CLASSES,m,t=v._firstItem,o=v.get("isCircular"),s=v.get("numItems"),u=v.get("numVisible"),q=n,p=t+u-1;if(q>=0&&q<s){if(!k.isUndefined(v._itemsTable.items[q])){m=a.get(v._itemsTable.items[q].id);if(m){a.removeClass(m,w.SELECTED_ITEM)}}}if(k.isNumber(r)){r=parseInt(r,10);r=k.isNumber(r)?r:0}else{r=t}if(k.isUndefined(v._itemsTable.items[r])){r=D.call(v,r);v.scrollTo(r)}if(!k.isUndefined(v._itemsTable.items[r])){m=a.get(v._itemsTable.items[r].id);if(m){a.addClass(m,w.SELECTED_ITEM)}}if(r<t||r>p){r=D.call(v,r);v.scrollTo(r)}}function h(){var o=false,r=this,n=r.CLASSES,q,m,p;if(!r._hasRendered){return}m=r.get("navigation");p=r._firstItem+r.get("numVisible");if(m.prev){if(r.get("numItems")===0||r._firstItem===0){if(r.get("numItems")===0||!r.get("isCircular")){Y.removeListener(m.prev,"click",d);a.addClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].setAttribute("disabled","true")}r._prevEnabled=false}else{o=!r._prevEnabled}}else{o=!r._prevEnabled}if(o){Y.on(m.prev,"click",d,r);a.removeClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].removeAttribute("disabled")}r._prevEnabled=true}}o=false;if(m.next){if(p>=r.get("numItems")){if(!r.get("isCircular")){Y.removeListener(m.next,"click",g);a.addClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].setAttribute("disabled","true")}r._nextEnabled=false}else{o=!r._nextEnabled}}else{o=!r._nextEnabled}if(o){Y.on(m.next,"click",g,r);a.removeClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].removeAttribute("disabled")}r._nextEnabled=true}}r.fireEvent(H,{next:r._nextEnabled,prev:r._prevEnabled})}function N(o){var p=this,m,n;if(!p._hasRendered){return}n=p.get("numVisible");if(!k.isNumber(o)){o=Math.ceil(p.get("selectedItem")/n)}m=Math.ceil(p.get("numItems")/n);p._pages.num=m;p._pages.cur=o;if(m>p.CONFIG.MAX_PAGER_BUTTONS){p._updatePagerMenu()}else{p._updatePagerButtons()}}function A(n){var m=this;if(!k.isObject(n)){return}switch(n.ev){case O:m._syncUiForItemAdd(n);break;case j:m._syncUiForItemRemove(n);break;case K:m._syncUiForLazyLoading(n);break}m.fireEvent(J)}function E(p,n){var r=this,q=r.get("currentPage"),o,m=r.get("numVisible");o=parseInt(r._firstItem/m,10);if(o!=q){r.setAttributeConfig("currentPage",{value:o});r.fireEvent(c,o)}if(r.get("selectOnScroll")){if(r.get("selectedItem")!=r._selectedItem){r.set("selectedItem",r._selectedItem)}}clearTimeout(r._autoPlayTimer);delete r._autoPlayTimer;if(r.isAutoPlayOn()){r.startAutoPlay()}r.fireEvent(F,{first:r._firstItem,last:n},r)}Q.getById=function(m){return P[m]?P[m].object:false};YAHOO.extend(Q,YAHOO.util.Element,{_animObj:null,_carouselEl:null,_clipEl:null,_firstItem:0,_hasFocus:false,_hasRendered:false,_isAnimationInProgress:false,_isAutoPlayInProgress:false,_itemsTable:null,_navBtns:null,_navEl:null,_nextEnabled:true,_pages:null,_prevEnabled:true,_recomputeSize:true,CLASSES:{BUTTON:"yui-carousel-button",CAROUSEL:"yui-carousel",CAROUSEL_EL:"yui-carousel-element",CONTAINER:"yui-carousel-container",CONTENT:"yui-carousel-content",DISABLED:"yui-carousel-button-disabled",FIRST_NAV:" yui-carousel-first-button",FIRST_NAV_DISABLED:"yui-carousel-first-button-disabled",FIRST_PAGE:"yui-carousel-nav-first-page",FOCUSSED_BUTTON:"yui-carousel-button-focus",HORIZONTAL:"yui-carousel-horizontal",ITEM_LOADING:"yui-carousel-item-loading",MIN_WIDTH:"yui-carousel-min-width",NAVIGATION:"yui-carousel-nav",NEXT_NAV:" yui-carousel-next-button",NEXT_PAGE:"yui-carousel-next",NAV_CONTAINER:"yui-carousel-buttons",PAGE_FOCUS:"yui-carousel-nav-page-focus",PREV_PAGE:"yui-carousel-prev",SELECTED_ITEM:"yui-carousel-item-selected",SELECTED_NAV:"yui-carousel-nav-page-selected",VERTICAL:"yui-carousel-vertical",VERTICAL_CONTAINER:"yui-carousel-vertical-container",VISIBLE:"yui-carousel-visible"},CONFIG:{FIRST_VISIBLE:0,HORZ_MIN_WIDTH:180,MAX_PAGER_BUTTONS:5,VERT_MIN_WIDTH:99,NUM_VISIBLE:3},STRINGS:{ITEM_LOADING_CONTENT:"Loading",NEXT_BUTTON_TEXT:"Next Page",PAGER_PREFIX_TEXT:"Go to page ",PREVIOUS_BUTTON_TEXT:"Previous Page"},addItem:function(r,n){var s=this,p,q,m,o=s.get("numItems");if(!r){return false}if(k.isString(r)||r.nodeName){q=r.nodeName?r.innerHTML:r}else{if(k.isObject(r)){q=r.content}else{return false}}p=r.className||"";m=r.id?r.id:a.generateId();if(k.isUndefined(n)){s._itemsTable.items.push({item:q,className:p,id:m})}else{if(n<0||n>=o){return false}s._itemsTable.items.splice(n,0,{item:q,className:p,id:m})}s._itemsTable.numItems++;if(o<s._itemsTable.items.length){s.set("numItems",s._itemsTable.items.length)}s.fireEvent(O,{pos:n,ev:O});return true},addItems:function(m){var o,q,p=true;if(!k.isArray(m)){return false}for(o=0,q=m.length;o<q;o++){if(this.addItem(m[o][0],m[o][1])===false){p=false}}return p},blur:function(){this._carouselEl.blur();this.fireEvent(B)},clearItems:function(){var m=this,o=m.get("numItems");while(o>0){if(!m.removeItem(0)){}if(m._itemsTable.numItems===0){m.set("numItems",0);break}o--}m.fireEvent(b)},focus:function(){var v=this,q,r,s,p,u,w,n,o,m;if(!v._hasRendered){return}if(v.isAnimating()){return}m=v.get("selectedItem");w=v.get("numVisible");n=v.get("selectOnScroll");o=(m>=0)?v.getItem(m):null;q=v.get("firstVisible");u=q+w-1;s=(m<q||m>u);r=(o&&o.id)?a.get(o.id):null;p=v._itemsTable;if(!n&&s){r=(p&&p.items&&p.items[q])?a.get(p.items[q].id):null}if(r){try{r.focus()}catch(t){}}v.fireEvent(T)},hide:function(){var m=this;if(m.fireEvent(X)!==false){m.removeClass(m.CLASSES.VISIBLE);m.fireEvent(W)}},init:function(o,n){var p=this,m=o,q=false;if(!o){return}p._hasRendered=false;p._navBtns={prev:[],next:[]};p._pages={el:null,num:0,cur:0};p._itemsTable={loading:{},numItems:0,items:[],size:0};if(k.isString(o)){o=a.get(o)}else{if(!o.nodeName){return}}Q.superclass.init.call(p,o,n);if(o){if(!o.id){o.setAttribute("id",a.generateId())}q=p._parseCarousel(o);if(!q){p._createCarousel(m)}}else{o=p._createCarousel(m)}m=o.id;p.initEvents();if(q){p._parseCarouselItems()}if(!n||typeof n.isVertical=="undefined"){p.set("isVertical",false)}p._parseCarouselNavigation(o);p._navEl=p._setupCarouselNavigation();P[m]={object:p};p._loadItems()},initAttributes:function(m){var n=this;m=m||{};Q.superclass.initAttributes.call(n,m);n.setAttributeConfig("carouselEl",{validator:k.isString,value:m.carouselEl||"OL"});n.setAttributeConfig("carouselItemEl",{validator:k.isString,value:m.carouselItemEl||"LI"});n.setAttributeConfig("currentPage",{readOnly:true,value:0});n.setAttributeConfig("firstVisible",{method:n._setFirstVisible,validator:n._validateFirstVisible,value:m.firstVisible||n.CONFIG.FIRST_VISIBLE});n.setAttributeConfig("selectOnScroll",{validator:k.isBoolean,value:m.selectOnScroll||true});n.setAttributeConfig("numVisible",{method:n._setNumVisible,validator:n._validateNumVisible,value:m.numVisible||n.CONFIG.NUM_VISIBLE});n.setAttributeConfig("numItems",{method:n._setNumItems,validator:n._validateNumItems,value:n._itemsTable.numItems});n.setAttributeConfig("scrollIncrement",{validator:n._validateScrollIncrement,value:m.scrollIncrement||1});n.setAttributeConfig("selectedItem",{method:n._setSelectedItem,validator:k.isNumber,value:-1});n.setAttributeConfig("revealAmount",{method:n._setRevealAmount,validator:n._validateRevealAmount,value:m.revealAmount||0});n.setAttributeConfig("isCircular",{validator:k.isBoolean,value:m.isCircular||false});n.setAttributeConfig("isVertical",{method:n._setOrientation,validator:k.isBoolean,value:m.isVertical||false});n.setAttributeConfig("navigation",{method:n._setNavigation,validator:n._validateNavigation,value:m.navigation||{prev:null,next:null,page:null}});n.setAttributeConfig("animation",{validator:n._validateAnimation,value:m.animation||{speed:0,effect:null}});n.setAttributeConfig("autoPlay",{validator:k.isNumber,value:m.autoPlay||0});n.setAttributeConfig("autoPlayInterval",{validator:k.isNumber,value:m.autoPlayInterval||0})},initEvents:function(){var o=this,n=o.CLASSES,m;o.on("keydown",o._keyboardEventHandler);o.on(F,h);o.on(O,A);o.on(j,A);o.on(C,function(){if(o._hasFocus){o.focus()}});o.on(K,A);o.on(b,function(p){o.scrollTo(0);h.call(o);N.call(o)});o.on(c,N,o);o.on(G,function(p){o.set("selectedItem",o.get("firstVisible"));h.call(o,p);N.call(o,p);o._setClipContainerSize()});o.on("selectedItemChange",function(p){i.call(o,p.newValue,p.prevValue);if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}o.fireEvent(C,p.newValue)});o.on(J,function(p){h.call(o,p);N.call(o,p)});o.on("firstVisibleChange",function(p){if(!o.get("selectOnScroll")){if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}}});o.on("click",function(p){if(o.isAutoPlayOn()){o.stopAutoPlay()}o._itemClickHandler(p);o._pagerClickHandler(p)});Y.onFocus(o.get("element"),function(p,r){var q=Y.getTarget(p);if(q&&q.nodeName.toUpperCase()=="A"&&a.getAncestorByClassName(q,n.NAVIGATION)){if(m){a.removeClass(m,n.PAGE_FOCUS)}m=q.parentNode;a.addClass(m,n.PAGE_FOCUS)}else{if(m){a.removeClass(m,n.PAGE_FOCUS)}}r._hasFocus=true;r._updateNavButtons(Y.getTarget(p),true)},o);Y.onBlur(o.get("element"),function(p,q){q._hasFocus=false;q._updateNavButtons(Y.getTarget(p),false)},o)},isAnimating:function(){return this._isAnimationInProgress},isAutoPlayOn:function(){return this._isAutoPlayInProgress},getElementForItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return a.get(n._itemsTable.items[m].id)}}return null},getElementForItems:function(){var o=this,n=[],m;for(m=0;m<o._itemsTable.numItems;m++){n.push(o.getElementForItem(m))}return n},getItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return n._itemsTable.items[m]}}return null},getItems:function(m){return this._itemsTable.items},getItemPositionById:function(q){var o=this,m=0,p=o._itemsTable.numItems;while(m<p){if(!k.isUndefined(o._itemsTable.items[m])){if(o._itemsTable.items[m].id==q){return m}}m++}return-1},getVisibleItems:function(){var p=this,m=p.get("firstVisible"),q=m+p.get("numVisible"),o=[];while(m<q){o.push(p.getElementForItem(m));m++}return o},removeItem:function(n){var p=this,o,m=p.get("numItems");if(n<0||n>=m){return false}o=p._itemsTable.items.splice(n,1);if(o&&o.length==1){p._itemsTable.numItems--;p.set("numItems",m-1);p.fireEvent(j,{item:o[0],pos:n,ev:j});return true}return false},render:function(n){var o=this,m=o.CLASSES;o.addClass(m.CAROUSEL);if(!o._clipEl){o._clipEl=o._createCarouselClip();o._clipEl.appendChild(o._carouselEl)}if(n){o.appendChild(o._clipEl);o.appendTo(n)}else{if(!a.inDocument(o.get("element"))){return false}o.appendChild(o._clipEl)}if(o.get("isVertical")){o.addClass(m.VERTICAL)}else{o.addClass(m.HORIZONTAL)}if(o.get("numItems")<1){return false}o._refreshUi();return true},scrollBackward:function(){var m=this;m.scrollTo(m._firstItem-m.get("scrollIncrement"))},scrollForward:function(){var m=this;m.scrollTo(m._firstItem+m.get("scrollIncrement"))},scrollPageBackward:function(){var n=this,m=n._firstItem-n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollPageForward:function(){var n=this,m=n._firstItem+n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollTo:function(AB,n){var AA=this,m,r,p,z,x,w,u,v,q,t,o,s,y;if(k.isUndefined(AB)||AB==AA._firstItem||AA.isAnimating()){return}r=AA.get("animation");p=AA.get("isCircular");w=AA._firstItem;u=AA.get("numItems");v=AA.get("numVisible");t=AA.get("currentPage");y=function(){if(AA.isAutoPlayOn()){AA.stopAutoPlay()}};if(AB<0){if(p){AB=u+AB}else{y.call(AA);return}}else{if(u>0&&AB>u-1){if(AA.get("isCircular")){AB=u-AB}else{y.call(AA);return}}}x=(AA._firstItem>AB)?"backward":"forward";s=w+v;s=(s>u-1)?u-1:s;o=AA.fireEvent(e,{dir:x,first:w,last:s});if(o===false){return}AA.fireEvent(I,{page:t});z=w-AB;AA._firstItem=AB;AA.set("firstVisible",AB);AA._loadItems();s=AB+v;s=(s>u-1)?u-1:s;q=f.call(AA,z);m=r.speed>0;if(m){AA._animateAndSetCarouselOffset(q,AB,s,n)}else{AA._setCarouselOffset(q);E.call(AA,AB,s)}},selectPreviousItem:function(){var o=this,n=0,m=o.get("selectedItem");if(m==this._firstItem){n=m-o.get("numVisible");o._selectedItem=o._getSelectedItem(m-1);o.scrollTo(n)}else{n=o.get("selectedItem")-o.get("scrollIncrement");o.set("selectedItem",o._getSelectedItem(n))}},selectNextItem:function(){var n=this,m=0;m=n.get("selectedItem")+n.get("scrollIncrement");n.set("selectedItem",n._getSelectedItem(m))},show:function(){var n=this,m=n.CLASSES;if(n.fireEvent(U)!==false){n.addClass(m.VISIBLE);n.fireEvent(R)}},startAutoPlay:function(){var m=this,n;if(k.isUndefined(m._autoPlayTimer)){n=m.get("autoPlayInterval");if(n<=0){return}m._isAutoPlayInProgress=true;m.fireEvent(V);m._autoPlayTimer=setTimeout(function(){m._autoScroll()},n)}},stopAutoPlay:function(){var m=this;if(!k.isUndefined(m._autoPlayTimer)){clearTimeout(m._autoPlayTimer);delete m._autoPlayTimer;m._isAutoPlayInProgress=false;m.fireEvent(l)}},toString:function(){return M+(this.get?" (#"+this.get("id")+")":"")},_animateAndSetCarouselOffset:function(r,p,n){var q=this,o=q.get("animation"),m=null;if(q.get("isVertical")){m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[0,r]}},o.speed,o.effect)}else{m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[r,0]}},o.speed,o.effect)}q._isAnimationInProgress=true;m.onComplete.subscribe(q._animationCompleteHandler,{scope:q,item:p,last:n});m.animate()},_animationCompleteHandler:function(m,n,q){q.scope._isAnimationInProgress=false;E.call(q.scope,q.item,q.last)},_autoScroll:function(){var n=this,o=n._firstItem,m;if(o>=n.get("numItems")-1){if(n.get("isCircular")){m=0}else{n.stopAutoPlay()}}else{m=o+n.get("numVisible")}n._selectedItem=n._getSelectedItem(m);n.scrollTo.call(n,m)},_createCarousel:function(n){var p=this,m=p.CLASSES,o=a.get(n);if(!o){o=S("DIV",{className:m.CAROUSEL,id:n})}if(!p._carouselEl){p._carouselEl=S(p.get("carouselEl"),{className:m.CAROUSEL_EL})}return o},_createCarouselClip:function(){return S("DIV",{className:this.CLASSES.CONTENT})},_createCarouselItem:function(m){return S(this.get("carouselItemEl"),{className:m.className,content:m.content,id:m.id})},_getValidIndex:function(o){var q=this,m=q.get("isCircular"),p=q.get("numItems"),n=p-1;if(o<0){o=m?p+o:0}else{if(o>n){o=m?o-p:n}}return o},_getSelectedItem:function(q){var p=this,m=p.get("isCircular"),o=p.get("numItems"),n=o-1;if(q<0){if(m){q=o+q}else{q=p.get("selectedItem")}}else{if(q>n){if(m){q=q-o}else{q=p.get("selectedItem")}}}return q},_itemClickHandler:function(p){var r=this,m=r.get("element"),n,o,q=YAHOO.util.Event.getTarget(p);while(q&&q!=m&&q.id!=r._carouselEl){n=q.nodeName;if(n.toUpperCase()==r.get("carouselItemEl")){break}q=q.parentNode}if((o=r.getItemPositionById(q.id))>=0){r.set("selectedItem",r._getSelectedItem(o));r.focus()}},_keyboardEventHandler:function(o){var p=this,n=Y.getCharCode(o),m=false;if(p.isAnimating()){return}switch(n){case 37:case 38:p.selectPreviousItem();m=true;break;case 39:case 40:p.selectNextItem();m=true;break;case 33:p.scrollPageBackward();m=true;break;case 34:p.scrollPageForward();m=true;break}if(m){if(p.isAutoPlayOn()){p.stopAutoPlay()}Y.preventDefault(o)}},_loadItems:function(){var q=this,r=q.get("firstVisible"),n=0,m=q.get("numItems"),o=q.get("numVisible"),p=q.get("revealAmount");n=r+o-1+(p?1:0);n=n>m-1?m-1:n;if(!q.getItem(r)||!q.getItem(n)){q.fireEvent(K,{ev:K,first:r,last:n,num:n-r})}},_pagerClickHandler:function(n){var p=this,r,o=Y.getTarget(n),q;function m(t){var s=p.get("carouselItemEl");if(t.nodeName.toUpperCase()==s.toUpperCase()){t=a.getChildrenBy(t,function(u){return u.href||u.value});if(t&&t[0]){return t[0]}}else{if(t.href||t.value){return t}}return null}if(o){o=m(o);if(!o){return}q=o.href||o.value;if(k.isString(q)&&q){r=q.lastIndexOf("#");if(r!=-1){q=p.getItemPositionById(q.substring(r+1));p._selectedItem=q;p.scrollTo(q);if(!o.value){p.focus()}Y.preventDefault(n)}}}},_parseCarousel:function(o){var r=this,s,m,n,q,p;m=r.CLASSES;n=r.get("carouselEl");q=false;for(s=o.firstChild;s;s=s.nextSibling){if(s.nodeType==1){p=s.nodeName;if(p.toUpperCase()==n){r._carouselEl=s;a.addClass(r._carouselEl,r.CLASSES.CAROUSEL_EL);q=true}}}return q},_parseCarouselItems:function(){var q=this,r,m,n,p,o=q._carouselEl;m=q.get("carouselItemEl");for(r=o.firstChild;r;r=r.nextSibling){if(r.nodeType==1){p=r.nodeName;if(p.toUpperCase()==m){if(r.id){n=r.id}else{n=a.generateId();r.setAttribute("id",n)}q.addItem(r)}}}},_parseCarouselNavigation:function(s){var t=this,r,u=t.CLASSES,n,q,p,m,o=false;m=a.getElementsByClassName(u.PREV_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.prev.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}}}}}r={prev:m}}m=a.getElementsByClassName(u.NEXT_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.next.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}}}}}if(r){r.next=m}else{r={next:m}}}if(r){t.set("navigation",r);o=true}return o},_refreshUi:function(){var m=this;m._hasRendered=true;m.fireEvent(G)},_setCarouselOffset:function(o){var m=this,n;n=m.get("isVertical")?"top":"left";o+=o!==0?Z(m._carouselEl,n):0;a.setStyle(m._carouselEl,n,o+"px")},_setupCarouselNavigation:function(){var r=this,p,n,m,t,q,s,o;m=r.CLASSES;q=a.getElementsByClassName(m.NAVIGATION,"DIV",r.get("element"));if(q.length===0){q=S("DIV",{className:m.NAVIGATION});r.insertBefore(q,a.getFirstChild(r.get("element")))}else{q=q[0]}r._pages.el=S("UL");q.appendChild(r._pages.el);t=r.get("navigation");if(k.isString(t.prev)||k.isArray(t.prev)){if(k.isString(t.prev)){t.prev=[t.prev]}for(p in t.prev){if(t.prev.hasOwnProperty(p)){r._navBtns.prev.push(a.get(t.prev[p]))}}}else{o=S("SPAN",{className:m.BUTTON+m.FIRST_NAV});a.setStyle(o,"visibility","visible");p=a.generateId();o.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.PREVIOUS_BUTTON_TEXT+'">'+r.STRINGS.PREVIOUS_BUTTON_TEXT+"</button>";q.appendChild(o);p=a.get(p);r._navBtns.prev=[p];n={prev:[o]}}if(k.isString(t.next)||k.isArray(t.next)){if(k.isString(t.next)){t.next=[t.next]}for(p in t.next){if(t.next.hasOwnProperty(p)){r._navBtns.next.push(a.get(t.next[p]))}}}else{s=S("SPAN",{className:m.BUTTON+m.NEXT_NAV});a.setStyle(s,"visibility","visible");p=a.generateId();s.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.NEXT_BUTTON_TEXT+'">'+r.STRINGS.NEXT_BUTTON_TEXT+"</button>";q.appendChild(s);p=a.get(p);r._navBtns.next=[p];if(n){n.next=[s]}else{n={next:[s]}}}if(n){r.set("navigation",n)}return q},_setClipContainerSize:function(n,p){var u=this,q,m,r,s,t,v,o;r=u.get("isVertical");t=u.get("revealAmount");o=r?"height":"width";q=r?"top":"left";n=n||u._clipEl;if(!n){return}p=p||u.get("numVisible");s=L.call(u,o);v=s*p;u._recomputeSize=(v===0);if(u._recomputeSize){u._hasRendered=false;return}if(t>0){t=s*(t/100)*2;v+=t;m=parseFloat(a.getStyle(u._carouselEl,q));m=k.isNumber(m)?m:0;a.setStyle(u._carouselEl,q,m+(t/2)+"px")}if(r){v+=Z(u._carouselEl,"marginTop")+Z(u._carouselEl,"marginBottom")+Z(u._carouselEl,"paddingTop")+Z(u._carouselEl,"paddingBottom")+Z(u._carouselEl,"borderTopWidth")+Z(u._carouselEl,"borderBottomWidth");a.setStyle(n,o,(v-(p-1))+"px")}else{v+=Z(u._carouselEl,"marginLeft")+Z(u._carouselEl,"marginRight")+Z(u._carouselEl,"paddingLeft")+Z(u._carouselEl,"paddingRight")+Z(u._carouselEl,"borderLeftWidth")+Z(u._carouselEl,"borderRightWidth");a.setStyle(n,o,v+"px")}u._setContainerSize(n)},_setContainerSize:function(q,m){var r=this,o=r.CONFIG,n=r.CLASSES,s,p;s=r.get("isVertical");q=q||r._clipEl;m=m||(s?"height":"width");p=parseFloat(a.getStyle(q,m),10);p=k.isNumber(p)?p:0;if(s){p+=Z(r._carouselEl,"marginTop")+Z(r._carouselEl,"marginBottom")+Z(r._carouselEl,"paddingTop")+Z(r._carouselEl,"paddingBottom")+Z(r._carouselEl,"borderTopWidth")+Z(r._carouselEl,"borderBottomWidth")+Z(r._navEl,"height")}else{p+=Z(q,"marginLeft")+Z(q,"marginRight")+Z(q,"paddingLeft")+Z(q,"paddingRight")+Z(q,"borderLeftWidth")+Z(q,"borderRightWidth")}if(!s){if(p<o.HORZ_MIN_WIDTH){p=o.HORZ_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}}r.setStyle(m,p+"px");if(s){p=L.call(r,"width");if(p<o.VERT_MIN_WIDTH){p=o.VERT_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}r.setStyle("width",p+"px")}},_setFirstVisible:function(n){var m=this;if(n>=0&&n<m.get("numItems")){m.scrollTo(n)}else{n=m.get("firstVisible")}return n},_setNavigation:function(m){var n=this;if(m.prev){Y.on(m.prev,"click",d,n)}if(m.next){Y.on(m.next,"click",g,n)}},_setNumVisible:function(n){var m=this;m._setClipContainerSize(m._clipEl,n)},_setNumItems:function(o){var n=this,m=n._itemsTable.numItems;if(k.isArray(n._itemsTable.items)){if(n._itemsTable.items.length!=m){m=n._itemsTable.items.length;n._itemsTable.numItems=m}}if(o<m){while(m>o){n.removeItem(m-1);m--}}return o},_setOrientation:function(o){var n=this,m=n.CLASSES;if(o){n.replaceClass(m.HORIZONTAL,m.VERTICAL)}else{n.replaceClass(m.VERTICAL,m.HORIZONTAL)}n._itemsTable.size=0;return o},_setRevealAmount:function(n){var m=this;if(n>=0&&n<=100){n=parseInt(n,10);n=k.isNumber(n)?n:0;m._setClipContainerSize()}else{n=m.get("revealAmount")}return n},_setSelectedItem:function(m){this._selectedItem=m},_syncUiForItemAdd:function(p){var t=this,r=t._carouselEl,m,u,o=t._itemsTable,n,q,s;q=k.isUndefined(p.pos)?o.numItems-1:p.pos;if(!k.isUndefined(o.items[q])){u=o.items[q];if(u&&!k.isUndefined(u.id)){n=a.get(u.id)}}if(!n){m=t._createCarouselItem({className:u.className,content:u.item,id:u.id});if(k.isUndefined(p.pos)){if(!k.isUndefined(o.loading[q])){n=o.loading[q]}if(n){r.replaceChild(m,n);delete o.loading[q]}else{r.appendChild(m)}}else{if(!k.isUndefined(o.items[p.pos+1])){s=a.get(o.items[p.pos+1].id)}if(s){r.insertBefore(m,s)}else{}}}else{if(k.isUndefined(p.pos)){if(!a.isAncestor(t._carouselEl,n)){r.appendChild(n)}}else{if(!a.isAncestor(r,n)){if(!k.isUndefined(o.items[p.pos+1])){r.insertBefore(n,a.get(o.items[p.pos+1].id))}}}}if(!t._hasRendered){t._refreshUi()}if(t.get("selectedItem")<0){t.set("selectedItem",t.get("firstVisible"))}},_syncUiForItemRemove:function(r){var q=this,m=q._carouselEl,o,p,n,s;n=q.get("numItems");p=r.item;s=r.pos;if(p&&(o=a.get(p.id))){if(o&&a.isAncestor(m,o)){Y.purgeElement(o,true);m.removeChild(o)}if(q.get("selectedItem")==s){s=s>=n?n-1:s;q.set("selectedItem",s)}}else{}},_syncUiForLazyLoading:function(s){var r=this,n=r._carouselEl,q,o,m=r._itemsTable,p;for(o=s.first;o<=s.last;o++){q=r._createCarouselItem({className:r.CLASSES.ITEM_LOADING,content:r.STRINGS.ITEM_LOADING_CONTENT,id:a.generateId()});if(q){if(!k.isUndefined(m.items[s.last+1])){p=a.get(m.items[s.last+1].id);if(p){n.insertBefore(q,p)}else{}}else{n.appendChild(q)}}m.loading[o]=q}},_updateNavButtons:function(q,n){var o,m=this.CLASSES,r,p=q.parentNode;if(!p){return}r=p.parentNode;if(q.nodeName.toUpperCase()=="BUTTON"&&a.hasClass(p,m.BUTTON)){if(n){if(r){o=a.getChildren(r);if(o){a.removeClass(o,m.FOCUSSED_BUTTON)}}a.addClass(p,m.FOCUSSED_BUTTON)}else{a.removeClass(p,m.FOCUSSED_BUTTON)}}},_updatePagerButtons:function(){var v=this,t=v.CLASSES,u=v._pages.cur,m,s,q,w,o=v.get("numVisible"),r=v._pages.num,p=v._pages.el;if(r===0||!p){return}a.setStyle(p,"visibility","hidden");while(p.firstChild){p.removeChild(p.firstChild)}for(q=0;q<r;q++){if(k.isUndefined(v._itemsTable.items[q*o])){a.setStyle(p,"visibility","visible");break}w=v._itemsTable.items[q*o].id;m=document.createElement("LI");if(!m){a.setStyle(p,"visibility","visible");break}if(q===0){a.addClass(m,t.FIRST_PAGE)}if(q==u){a.addClass(m,t.SELECTED_NAV)}s='<a href="#'+w+'" tabindex="0"><em>'+v.STRINGS.PAGER_PREFIX_TEXT+" "+(q+1)+"</em></a>";m.innerHTML=s;p.appendChild(m)}a.setStyle(p,"visibility","visible")},_updatePagerMenu:function(){var u=this,t=u._pages.cur,o,r,v,p=u.get("numVisible"),s=u._pages.num,q=u._pages.el,m;if(s===0){return}m=document.createElement("SELECT");if(!m){return}a.setStyle(q,"visibility","hidden");while(q.firstChild){q.removeChild(q.firstChild)}for(r=0;r<s;r++){if(k.isUndefined(u._itemsTable.items[r*p])){a.setStyle(q,"visibility","visible");break}v=u._itemsTable.items[r*p].id;o=document.createElement("OPTION");if(!o){a.setStyle(q,"visibility","visible");break}o.value="#"+v;o.innerHTML=u.STRINGS.PAGER_PREFIX_TEXT+" "+(r+1);if(r==t){o.setAttribute("selected","selected")}m.appendChild(o)}o=document.createElement("FORM");if(!o){}else{o.appendChild(m);q.appendChild(o)}a.setStyle(q,"visibility","visible")},_updateTabIndex:function(m){var n=this;if(m){if(n._focusableItemEl){n._focusableItemEl.tabIndex=-1}n._focusableItemEl=m;m.tabIndex=0}},_validateAnimation:function(m){var n=true;if(k.isObject(m)){if(m.speed){n=n&&k.isNumber(m.speed)}if(m.effect){n=n&&k.isFunction(m.effect)}else{if(!k.isUndefined(YAHOO.util.Easing)){m.effect=YAHOO.util.Easing.easeOut}}}else{n=false}return n},_validateFirstVisible:function(o){var n=this,m=n.get("numItems");if(k.isNumber(o)){if(m===0&&o==m){return true}else{return(o>=0&&o<m)}}return false},_validateNavigation:function(m){var n;if(!k.isObject(m)){return false}if(m.prev){if(!k.isArray(m.prev)){return false}for(n in m.prev){if(m.prev.hasOwnProperty(n)){if(!k.isString(m.prev[n].nodeName)){return false}}}}if(m.next){if(!k.isArray(m.next)){return false}for(n in m.next){if(m.next.hasOwnProperty(n)){if(!k.isString(m.next[n].nodeName)){return false}}}}return true},_validateNumItems:function(m){return k.isNumber(m)&&(m>=0)},_validateNumVisible:function(m){var n=false;if(k.isNumber(m)){n=m>0&&m<=this.get("numItems")}return n},_validateRevealAmount:function(m){var n=false;if(k.isNumber(m)){n=m>=0&&m<100}return n},_validateScrollIncrement:function(m){var n=false;if(k.isNumber(m)){n=(m>0&&m<this.get("numItems"))}return n}})})();YAHOO.register("carousel",YAHOO.widget.Carousel,{version:"2.7.0",build:"1799"});
BalloonConfig=function(balloon){balloon.parentID=null;balloon.fontColor='black';balloon.fontFamily='Arial, sans-serif';balloon.fontSize='12pt';balloon.minWidth=150;balloon.maxWidth=600;balloon.delayTime=500;balloon.allowFade=false;balloon.fadeIn=300;balloon.fadeOut=300;balloon.vOffset=0;balloon.padding=10;balloon.displayTime=10000;balloon.shadow=20;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/';balloon.balloonImage='balloon.png';balloon.ieImage='balloon_ie.png';balloon.stem=true;balloon.stemHeight=32;balloon.stemOverlap=3;balloon.upLeftStem='up_left.png';balloon.downLeftStem='down_left.png';balloon.upRightStem='up_right.png';balloon.downRightStem='down_right.png';balloon.closeButton='close.png';balloon.closeButtonWidth=16;balloon.helpUrl=false;balloon.allowAJAX=true;balloon.allowIframes=true;balloon.allowEventHandlers=false;balloon.allowScripts=false;balloon.escapeHTML=false};BoxConfig=function(box){box.isBox=true;box.parentID=null;box.fontColor='black';box.fontFamily='Arial, sans-serif';box.fontSize='12pt';box.bgColor='whitesmoke';box.borderStyle='1px solid black';box.minWidth=150;box.maxWidth=600;box.delayTime=500;box.allowFade=false;box.fadeIn=300;box.fadeOut=300;box.vOffset=5;box.padding=10;box.displayTime=10000;box.shadow=0;box.stem=false;box.images='/images/balloons';box.closeButton='close.png';box.closeButtonWidth=16;box.helpUrl=false;box.allowAJAX=true;box.allowIframes=true;box.allowEventHandlers=false;box.allowScripts=false;box.escapeHTML=false};
var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){BalloonConfig(this);document.onmousemove=this.setActiveCoordinates;document.onscroll=Balloon.prototype.hideTooltip;window.onbeforeunload=function(){Balloon.prototype.hideTooltip(1);balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width){if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.isKonqueror())this.allowFade=false;var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver)return false;if(balloonIsVisible&&balloonIsSticky&&!sticky)return false;try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement))return false;this.firingElement=el;if(sticky)this.hideTooltip(1);var closeBalloon=function(){var override=balloonIsSticky&&!balloonIsVisible;Balloon.prototype.hideTooltip(override);i3GEO.janela.excluiTips()};if(!mouseOver)el.onmouseup=function(){return false};el.onmouseout=closeBalloon;balloonIsSticky=sticky;this.width=width;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}if(!this.container){this.container=document.createElement('div');document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'display','inline');this.setStyle(this.container,'z-index',2);this.setStyle(this.container,'color',this.fontColor);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize)}else{this.setStyle(this.container,'display','inline')}this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.isOldIE()&&this.ieImage){this.balloonImage=this.ieImage}if(!this.preloadedImages){var images=new Array(this.balloonImage,this.closeButton);if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)this.setActiveCoordinates(evt);this.setActiveCoordinates(evt);this.currentEvent=evt;this.doShowTooltip()};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible)return false;if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);self.setStyle('balloon','display','none');self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;if(!(self.activeTop&&self.activeRight)){self.setActiveCoordinates()}var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.contents.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.showHide();self.fade(0,95,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('balloon','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.hideTooltip(1);if($i("marcaIdentifica")){document.body.removeChild($i("marcaIdentifica"))}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('balloon');if(balloon)self.parent.removeChild(balloon);balloon=document.createElement('div');balloon.setAttribute('id','balloon');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array(balloon);var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);if(balloonIsSticky){self.setStyle('contents','margin-right',10)}else if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;self.setStyle(balloon,'background','url('+self.balloonImage+') top left no-repeat');self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'padding-top',fullPadding);self.setStyle(balloon,'padding-left',fullPadding);self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}}if(hOrient=='left'){var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{self.setStyle(balloon,'left',self.activeRight-self.xOffset)}if(!self.width){var width=self.getLoc('contents','width');if(self.isIE())width+=50;if(width>self.maxWidth)width=self.maxWidth+50;if(width<self.minWidth)width=self.minWidth;self.setStyle(balloon,'width',width)}else{self.setStyle(balloon,'width',self.width)}var balloonPad=self.padding+self.shadow;var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');if(hOrient=='left')balloonLeft+=balloonPad;if(hOrient=='right')balloonRight+=balloonPad;var pageRight=pageLeft+pageWidth;if(hOrient=='right'&&balloonRight>(pageRight-30)){self.setStyle(balloon,'width',(pageRight-balloonLeft)-50)}else if(hOrient=='left'&&balloonLeft<(pageLeft+30)){self.setStyle(balloon,'width',(balloonRight-pageLeft)-50)}var lineWidth=self.getLoc(balloon,'width');var lineHeight=self.getLoc(balloon,'height');self.setStyle('topRight','height',lineHeight);self.setStyle('bottomLeft','width',lineWidth);var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap)self.setStyle('topRight','height',lineHeight-vOverlap[1]);if(hOverlap)self.setStyle('bottomLeft','width',lineWidth-hOverlap[0]);if(vOrient=='up'){var activeTop=self.activeTop-self.vOffset-self.stemHeight-lineHeight;self.setStyle(balloon,'top',activeTop-self.yOffset);self.setStyle(balloon,'display','inline')}else{var activeTop=self.activeTop+self.vOffset+self.stemHeight;self.setStyle(balloon,'top',activeTop-self.yOffset)}self.setOpacity(1)};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;var speed=Math.round(millisec/100);var timer=0;if(opacStart>opacEnd){if(self.fadeOK){for(o=opacStart;o>=opacEnd;o--){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}setTimeout("Balloon.prototype.setStyle('balloon','display','none')",millisec)}else{self.setStyle('balloon','display','none')}}else if(opacStart<opacEnd&&self.fadeOK){for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!self.fadeOK)return false;var o=parseFloat((opc||0)/100);var el=self.isIE()?'contents':'balloon';var b=document.getElementById(el);if(!b)return false;self.setStyle(b,'opacity',o);self.setStyle(b,'filter','alpha(opacity= '+opc+')');self.setStyle(b,'MozOpacity',o);self.setStyle(b,'KhtmlOpacity',o)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutAutoClose)}if(balloonIsSticky&&self)self.currentElement=null;balloonIsVisible=false;balloonIsSticky=true;var closeButton=document.getElementById('closeButton');if(closeButton){YAHOO.util.Dom.setStyle(closeButton,'display','none')}if(!self){var hideBalloon=document.getElementById('balloon');if(hideBalloon)Balloon.prototype.setStyle(hideBalloon,'display','none')}else if(self.activeBalloon){if(!override&&self.fadeOK&&!self.isIE())self.fade(95,0,self.fadeOut);else self.setStyle(self.activeBalloon,'display','none')}Balloon.prototype.showHide(1)};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(event){var self=currentBalloonClass;if(!self)return false;var b=self.activeBalloon;try{if(typeof(event.id)=="string"){var pos=i3GEO.util.pegaPosicaoObjeto(event);self.activeTop=pos[1]-10;self.activeLeft=pos[0]-10;self.activeRight=self.activeLeft+20;self.activeBottom=self.activeTop+20;return true}}catch(e){}var evt=event||window.event||self.currentEvent;if(!evt){return false}var XY=self.eventXY(evt);self.activeTop=XY[1]-10;self.activeLeft=XY[0]-10;self.activeRight=self.activeLeft+20;self.activeBottom=self.activeTop+20;return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}return XY};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el)return false;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/))val+='px';if(typeof(el)!='object')el=document.getElementById(el);if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn);this.fadeOut=parseInt(this.fadeOut)};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){if(!visible){var balloonSelects=document.getElementById('contents').getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){var originalCaption=caption;var notAllowed='are not allowed in popup balloons in this web site.Please contact the site administrator for assistance.';var notSupported='AJAX is not supported for popup balloons in this web site. Please contact the site administrator for assistance.';if(this.helpUrl&&!this.allowAJAX){}if(caption.match(/^url:/)){this.activeUrl=caption.replace(/^url:/,'');caption=''}else if(caption.match(/^(https?:|\/|ftp:)\S+$/i)){this.activeUrl=caption;caption=''}if(this.activeUrl&&!this.allowAJAX){}if(caption.match(/^load:/)){var load=caption.split(':');if(!document.getElementById(load[1]))alert('problem locating element '+load[1]);caption=document.getElementById(load[1]).innerHTML;this.loadedFromElement=true}if(caption.match(/\<\s*iframe/i)&&!this.allowIframes){}if(caption.match(/\bon(load|mouse|click|unload|before)[^=]*=/i)&&!this.allowEventHandlers){}if(caption.match(/\<\s*script/i)&&!this.allowScripts){}this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.indexOf('Konqueror')!=-1};
i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:""},finaliza:"",temaAtivo:"",contadorAtualiza:0,cria:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,i;if(window.location.href.split("?")[1]){i3GEO.configura.sid=window.location.href.split("?")[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}g_panM="nao";g_sid=i3GEO.configura.sid;try{i3GEO.configura.locaplic=g_locaplic}catch(e){g_locaplic=i3GEO.configura.locaplic}try{i3GEO.configura.diminuixM=g_diminuixM}catch(e){}try{i3GEO.configura.diminuixN=g_diminuixN}catch(e){}try{i3GEO.configura.diminuiyM=g_diminuiyM}catch(e){}try{i3GEO.configura.diminuiyN=g_diminuiyN}catch(e){}diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;try{diminuiy+=i3GEO.util.getScrollerWidth()}catch(e){}menos=0;if($i("contemFerramentas")){menos+=parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){menos+=parseInt($i("ferramentas").style.width,10)}novow=parseInt(screen.availWidth,10)-diminuix;novoh=parseInt(screen.availHeight,10)-diminuiy;if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}try{if(novow<800){novow=800;novoh=600}}catch(e){}document.body.style.width=novow-diminuix;document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10)}if(temp.style.height){h=parseInt(temp.style.height,10)}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}i3GEO.Interface.cria(w,h);i3GEO.parametros={mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:w,h:h,locsistemas:"",locidentifica:"",r:"",locmapas:"",extentref:"",kmlurl:"",mensageminicia:""};if(w<550){i=$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml);if(i){i.style.display="none"}}},inicia:function(){var monyaMapa,mashup;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){var tempo,titulo,temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){i3GEO.janela.fechaAguarde("montaMapa");document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){tempo="";titulo="";eval(retorno.data.variaveis);try{if(titulo!==""){top.document.title=titulo}}catch(e){}i3GEO.ajuda.mostraJanela("Tempo de desenho em segundos: "+tempo,"");try{i3GEO.parametros.mapexten=mapexten;i3GEO.parametros.mapscale=parseInt(mapscale,10);i3GEO.parametros.mapres=mapres;i3GEO.parametros.pixelsize=g_celula;i3GEO.parametros.mapfile=mapfile;i3GEO.parametros.cgi=cgi;i3GEO.parametros.extentTotal=mapexten;i3GEO.parametros.mapimagem=mapimagem;i3GEO.parametros.geoip=geoip;i3GEO.parametros.listavisual=listavisual;i3GEO.parametros.utilizacgi=utilizacgi;i3GEO.parametros.versaoms=versaoms;i3GEO.parametros.mensagens=mensagens;i3GEO.parametros.locsistemas=locsistemas;i3GEO.parametros.locidentifica=locidentifica;i3GEO.parametros.r=r;i3GEO.parametros.locmapas=locmapas;i3GEO.parametros.extentref=extentref;i3GEO.parametros.versaoms=versaoms;i3GEO.parametros.versaomscompleta=versaomscompleta;i3GEO.parametros.kmlurl=kmlurl;i3GEO.parametros.mensageminicia=mensagemInicia}catch(e){alert("Erro durante a definicao de i3GEO.parametros "+e)}i3GEO.gadgets.quadros.inicia(10);i3GEO.gadgets.quadros.grava("extensao",mapexten);i3GEO.arvoreDeCamadas.cria("",retorno.data.temas,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.gadgets.mostraBuscaRapida();i3GEO.gadgets.mostraVersao();i3GEO.guias.cria();if($i("arvoreAdicionaTema")){i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"arvoreAdicionaTema")}if($i("mst")){$i("mst").style.display="block"}i3GEO.atualiza(retorno);temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}if(i3GEO.configura.entorno==="sim"){i3GEO.configura.entorno="nao";i3GEO.navega.entorno.ativaDesativa()}i3GEO.navega.autoRedesenho.ativa();if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3GEO.parametros.mapscale}if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if(document.getElementById("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("g_janelaMen")){abreJM=i3GEO.util.pegaCookie("g_janelaMen");i3GEO.configura.iniciaJanelaMensagens=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}i3GEO.janela.fechaAguarde("montaMapa");if(i3GEO.configura.liberaGuias==="sim"){i3GEO.guias.libera()}}if($i("mst")){$i("mst").style.visibility="visible"}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia()};i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{i3GEO.janela.abreAguarde("montaMapa",$trad("o5"));i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}eval(i3GEO.finaliza)},atualiza:function(retorno){var corpoMapa,erro,tempo,mapscale,mapexten;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")+" atualizando");i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var legimagem,c;legimagem="";c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};try{eval(retorno.data.variaveis)}catch(e){erro.call();return}if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale="";mapexten="";eval(retorno.data.variaveis);try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(mapscale)}i3GEO.parametros.mapexten=mapexten;i3GEO.parametros.mapscale=mapscale;i3GEO.parametros.mapres=mapres;i3GEO.parametros.pixelsize=g_celula;i3GEO.parametros.mapimagem=mapimagem}catch(e){}i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}i3GEO.parametros.mapexten=mapexten;if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.eventos.navegaMapa();if(i3GEO.configura.entorno==="sim"){i3GEO.navega.entorno.geraURL();i3GEO.navega.entorno.ajustaPosicao()}i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+tempo,"")}}};i3GEOF=[];
if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;var app=navigator.appName.substring(0,1);if(app==='N'){navn=true}else{navm=true}g_operacao="";g_tipoacao="zoomli";g_postpx="px";g_tipotop="top";g_tipoleft="left";if(navm){g_postpx="";g_tipotop="pixelTop";g_tipoleft="pixelLeft"}$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var i=this.indexOf(s);if(i!==-1){this.splice(i,1)}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor){document.cookie=nome+"="+valor+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key;keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{clearTimeout(tempoBotaoAplicar)}catch(e){}var novoel,xy;tempoBotaoAplicar=eval("setTimeout('"+nomeFuncao+"\(\)',(i3GEO.configura.tempoAplicar))");autoRedesenho("reinicia");if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,currentIconMode,d,c,i,linha,conteudo;if(!$i(onde)){return}try{arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>";d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/ã|á|à|â/gi;palavra=palavra.replace(re,"a");re=/é/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0,teste;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ;if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.nodeType===3){targ=targ.parentNode}tparent=targ.parentNode;return(tparent)},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var o,c;o=document.getElementById(idobjeto);c=eval("cursores."+tipo+".ie");if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){o.style.cursor=c}else{if(o){if(navm){o.style.cursor="URL(\""+locaplic+eval("cursores."+tipo+".ie")+"\"),auto"}else{o.style.cursor="URL(\""+locaplic+eval("cursores."+tipo+".ff")+"\"),auto"}}}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w="21px"}if(arguments.length<4||h===""){h="25px"}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=w;novoel.style.height=h;novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}},posicionaImagemNoMapa:function(id){var i,mx,my;i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my;i.style.left=objposicaocursor.telax-mx},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/"+i3GEO.configura.visual+"/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center";$i(idPai).onmouseover=function(){this.className="digitarMouseover"};$i(idPai).onmouseout=function(){this.className=""}}return"<input tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container){try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10);document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-4)+"px";i.left=(xi-4)+"px";i.width="4px";i.height="4px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=i3GEO.configura.locaplic+"/imagens/dot1.gif";temp=novoimg.style;temp.width="6px";temp.height="6px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=path.split(".");i3GEO.contadorAtualiza++;if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janela,elemento,tipo){if(arguments.length==2){tipo="rgb"}var ins,temp,novoel,wdocaiframe,fix=false,wlargura="400",waltura="240",wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento+"&tipo="+tipo,nx="",ny="",texto="Cor",id="i3geo_janelaCor",modal=true,classe="hd",wlargura_="400px";YAHOO.namespace("janelaCor.xp");if($i(id)){YAHOO.janelaCor.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12;temp.height=waltura;wdocaiframe.style.display="block";wdocaiframe.src=wsrc}if(nx===""||nx==="center"){fix=true}YAHOO.janelaCor.xp.panel=new YAHOO.widget.ResizePanel(id,{zIndex:5000,modal:modal,width:wlargura_,fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCor.xp.panel.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp,retorno;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);retorno="";ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{dom="erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei,tempoFadei;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{clearTimeout(tempoFadei);if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade,p,tempoFade;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{clearTimeout(tempoFade);obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id){var head,script;if(!$i(id)||id===""){head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){eval(ini)}}}else{script.onload=function(){eval(ini)}}}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var rgb=str.split(",");function hex(x){var hexDigits=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return hexDigits[(x-x%16)/16]+hexDigits[x%16]};return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,lista,temp;monta=function(retorno){var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<option value="+tema+" >"+nome+"</option>"}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,lista,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){alert(e)}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length==5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!=undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado==="sim"){combo+="<option value=TRUE selected >sim</option>"}else{combo+="<option value=TRUE >sim</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >não</option>"}else{combo+="<option value=FALSE >não</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var cp,monta=function(retorno){var ins=new Array(),i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");n=retorno.data.length;for(i=1;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"}};$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};
g_traducao={"p1":[{pt:"O I3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre. <a href='http://mapas.mma.gov.br/download' target=blank > Download</a>",it:"I3geo è un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Tipo de imagem",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tamaño",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable surrounding",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable logo",es:"Activar/desactivar logomarca",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Selection color",es:"Color de la selección",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color del fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grado de coordenadas",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Template",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"s1":[{pt:"Ajuda?",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"Análise",en:"Analysis",es:"Análisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"u1":[{pt:"Sobre o I3Geo",en:"About",es:"Sobre I3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Sistema",en:"System",es:"Sistema",it:"Sistema"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Portal do software público",en:"Portal do software público",es:"Portal do software público",it:"Portale del software pubblico"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometrías",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de polígonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grado de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hexágonos",en:"Grid of Hexagons",es:"Grado de hexágonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Entorno (Buffer)",it:"Buffer"}],"u11":[{pt:"Centróide",en:"Centroid",es:"Centro geométrico",it:"Baricentro"}],"u11a":[{pt:"Distância entre pontos",en:"Point distance",es:"Distancia de puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N point in polygon",es:"N puntos en polígono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en polígono/matriz",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribuição de pontos",en:"Point distribution",es:"Distribución de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Tomar imágenes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS",en:"Convert to WMS",es:"Convertir en WMS",it:"Converti in WMS"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grado",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Polígono",en:"Polygon",es:"Poligonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolv",es:"Dissolve",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupa",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"arraste o tema aqui para excluir",en:"Drag the layer here to remove",es:"Arrastre el tema aqui para excluirlo",it:"Trascina qui per rimuovere"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Turn the layer on/off on the map. Wait a few moments to get the map redesigned or press the button to apply it.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea rediseñado, o haga clic en el botón aplicar que se mostrará.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sarà visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn all layers layer on",es:"Haga clic para conectar los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn all layers layer off",es:"Haga clic para desconectar los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa seleção",en:"Clear selection",es:"Limpia la selección",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a seleção",en:"Zoom to selection",es:"Zoom a la selección",it:"Zoom della selezione"}],"t5":[{pt:"Limpa seleção existente nesse tema",en:"Clear selection",es:"Limpia la selección existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download in shapefile format",es:"Haga clic para hacer el download",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"dragging or wait",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the draw order",es:"Arrastre para cambiar la orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema é compatível com a escala do mapa",en:"The scale of the layer is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema è compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema é incompatível com a escala do mapa",en:"The scale of the layer is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema è incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema não é conhecida",en:"The scale of the layer is not known",es:"La escala del tema no es conocida",it:"La scala del tema non è conosciuta"}],"t12":[{pt:"excluir",en:"delete",es:"Excluir",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"up",es:"Sube",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Drag the layer up",es:"Haga clic para subir ese tema en la orden de diseño",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"down",es:"Baja",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Drag the layer down",es:"Haga clic para bajar este tema en la orden de diseño",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"zoom to a layer",es:"Zoom para el tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to adjust the map in order to show the whole layer",es:"Haga clic para ajustar el mapa de forma para que muestre todo el tema",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Opções",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Subtitulo",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency.",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati più bassi siano visti"}],"t20":[{pt:"Opacidade:",en:"Opacity",es:"Opacidad",it:"Opacità"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Change layer name.",es:"Cambia el nombre actual del tema. Utilice para mejorar el subtitulo del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema con base en sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar...",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts on the subject, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto...",en:"Label...",es:"Texto...",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que serão mostradas quando o mouse é estacionado sobre um elemento desse tema.",en:"Set the tooltips that will be shown when the mouse is over the element of that layer.",es:"Defina las etiquetas que se mostrarán cuando el ratón se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Etiquetas...",en:"Tooltip...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informações, com base na tabela de atributos.",en:"Filter based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtro...",en:"Filter...",es:"Filtro...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to that layer.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela...",en:"Table...",es:"Tabla...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the editor of legend, allowing the modification of the form of representation of this theme.",es:"Abre el editor de subtítulo, permitiendo la alteración de la forma de representación de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda...",en:"Legend edit...",es:"Editar subtítulo...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"The data shows that layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompaña el ratón",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela...",en:"Show in window",es:"Muestra en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema visível apenas em determinadas escalas",en:"the layer is visible in specific scales",es:"capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gráfico",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to SLD.",es:"Exporta a legenda para o padrão SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"SLD...",en:"SLD...",es:"SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",es:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"SQL...",en:"SQL...",es:"SQL...",it:"SQL..."}],"a1":[{pt:"procurar tema:",en:"search layer:",es:"Buscar datos:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Upload de shape file",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload dbf or CSV file",es:"Upload de archivo dbf o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Download de datos",it:"Download dei dati"}],"a4":[{pt:"Conectar com servidor WMS",en:"WMS server connection",es:"Conectar con el servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"WMS-T server connection",es:"Conectar con el servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"GeoRss connection",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to connect or disconnect layer, showing it or not on the map. After changing the layer status, wait a few moments to be redesigned the map, or click in the button apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea rediseñado, o haga clic en el botón aplicar que aparecerá",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verrà visualizzato."}],"a9":[{pt:"fonte",en:"font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"código:",en:"code",es:"Código",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agrega",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca rápida...",en:"Quick search...",es:"Búsqueda rápida...",it:"Ricerca rapida ..."}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"dinâmico",en:"dynamic",es:"Dinámico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz´-lo no mapa. O centro do mapa ser´ deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazará para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangˆncia geográfica da inicialização.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajustándola para mostrar la misma área geográfica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d3":[{pt:"Amplia o mapa - coloca o ponto clicado no centro da tela ou amplia a região indicada por um retângulo.Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.",en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.",es:"Amplía el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o amplía la región indicada por un rectángulo. Después de activarla, haga clic y arrastre el ratón sobre el mapa en el área de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d4":[{pt:"Desloca a região visível no mapa. Após ativada, clique e arraste o mouse sobre o mapa para deslocar a região visível.",en:"Shifts the region visible on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desloca la región visible en el mapa",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d5":[{pt:"Amplia o mapa tendo como referência o centro atual.",en:"Magnify the map with the reference the current center.",es:"Amplía el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d6":[{pt:"Reduz o mapa tendo como referência o centro atual.",en:"Reduces the map as having reference the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d7":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarla haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7a":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, stop the mouse for a few moments at the desired point or click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarla, pare el ratón por algunos instantes en el punto deseado o haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d8":[{pt:"Mostra a extensão geográfica atual em coordenadas geográficas",en:"It shows the extent of current geographic coordinates",es:"Muestra la extensión geográfica actual en coordenadas geográficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d9":[{pt:"Abre/fecha o mapa de referência",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d10":[{pt:"Digite o novo valor de escala e clique no botão aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el botón aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrangência atual do mapa. Faça um zoom no mapa antes de abrir essa opção. Regiôes muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current scope of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very long search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opción. Regiones muy extensas pueden ocasionar una búsqueda muy lenta",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dellapertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usuário no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3d",en:"Generates file for 3d",es:"Genera archivo para 3d",it:"Genera file per 3d"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de satélite da região vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region's main views on the map",es:"Abre Google Maps, mostrando una imagen de satélite de la región en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Busca documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d17":[{pt:"Projeto Confluence. Pontos de intersecção de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersección de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d18":[{pt:"Abre lente de ampliação",en:"Opens lens to expansion",es:"Abre lente de ampliación",it:"Apri lente di ingrandimento"}],"d19":[{pt:"Coloca as guias em uma janela móvel",en:"Open the tabs in a window mobile",es:"Coloca las guías en una ventana móvil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configuraçôes iniciais.",en:"Reload the map with the initial configurations.",es:"Rediseña el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d21":[{pt:"Mede a distância entre dois ou mais pontos clicados no mapa (menor distância). O cálculo de distância é aproximado e sua precisão depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (less distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o más puntos marcados en el mapa (menor distancia). El cálculo de distancia es aproximado y su precisión depende de la escala del mapa",it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza). Il calcolo della distanza è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21a":[{pt:"Mede a área de um polígono desenhado na tela. O cálculo de ária é aproximado e sua precisão depende da escala do mapa.",en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mede a área de um polígono desenhado na tela. O cálculo de ária é aproximado e sua precisão depende da escala do mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d22":[{pt:"Insere pontos no mapa em coordenadas geográficas. Ospontos incluídos podem ser transformados em linhas ou polígonos. Os pontos são armazenados em um tema temporário, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. Items included can be converted into lines or polygons. Items are stored in a temporary layer, can be to download shapefile.",es:"Inserte puntos en el mapa en coordenadas geográficas. Los puntos incluidos pueden transformarse en líneas o polígonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse el download del archivo shapefile.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilità di effettuare il download del file Shapefile."}],"d23":[{pt:"Insere um gráfico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores numéricos na tabela de atributos.",en:"Insert a graphic in the clicked point as the exist attributes in the chosen layer. The layer must have items with numerical values in the table of attributes.",es:"Inserte un gráfico en el punto marcado según los atributos existentes en el tema elejido. El tema debe tener puntos con valores numéricos en la tabla de atributos",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para seleção de elementos de um tema. Os elementos selecionados podem ser utilizados em outras operaçôes, como buffer e seleção por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other buffer or selection operation by layer .",es:"Abre las herramientas para selección de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras ",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa opção para adicionar informaçôes ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opción para agregar información al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d26":[{pt:"Escolha o visual para os botões e outras características visuais do mapa",en:"Choose look for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras características visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}]};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+i3GEO.util.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+i3GEO.idioma.SELETORES[i]+'\')" ';if(i3GEO.idioma.SELETORES[i]==="en"){ins+='alt="Ingles" id="uk" />'}if(i3GEO.idioma.SELETORES[i]==="pt"){ins+='alt="Portugues" id="brasil" />'}if(i3GEO.idioma.SELETORES[i]==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(i3GEO.idioma.SELETORES[i]==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};var $trad=function(id){return(i3GEO.idioma.traduzir(id))};try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}
if(typeof(i3GEO)==='undefined'){i3GEO=[]}cpJSON=new cpaint();cpJSON.set_response_type("JSON");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("variavel i3GEO.configura.locaplic não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHPgrafico",funcao)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHP",funcao)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao)},excluitema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=excluitema&temas="+tema+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",funcao)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"reordenatemas",funcao)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaHTML",funcao)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe;cpJSON.call(p,"inverteStatusClasse",funcao)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ligaDesligaTemas",funcao)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ativalogo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ativalogo",funcao)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"inserefeature",funcao)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"identificaunico",funcao)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=recuperamapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"recuperamapa",funcao)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo;cpJSON.call(p,"retornaReferenciaDinamica",funcao)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referencia&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"retornaReferencia",funcao)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao)},zoomponto:function(funcao,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomponto",funcao)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid){var retorno,p;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}if(ext==='undefined'){alert("extensao nao definida");return}retorno=function(retorno){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(ext);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(ext);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.atualiza(retorno)}};p=locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid;cpJSON.call(p,"mudaext",retorno)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem;cpJSON.call(p,"mudaescala",funcao)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"crialente",funcao)},geradestaque:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geradestaque",funcao)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"selecaoPT",funcao)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema;cpJSON.call(p,"selecaobox",funcao)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo;cpJSON.call(p,"selecaobox",funcao)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo;cpJSON.call(p,"selecaoatrib2",funcao)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo;cpJSON.call(p,"selecaotema",funcao)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"sobetema",funcao)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?&funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"descetema",funcao)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"fontetema",funcao)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){if(i3GEO.Interface.ATUAL==="googlemaps"){eval(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(mapexten);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="openlayers"){eval(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(mapexten);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.atualiza(retorno)}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomtema",retorno)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){if(i3GEO.Interface.ATUAL==="googlemaps"){eval(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(mapexten);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="openlayers"){eval(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(mapexten);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.atualiza(retorno)}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomsel",retorno)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"limpasel",funcao)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudatransp",funcao)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudanome",funcao)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path;cpJSON.call(p,"adicionaTemaSHP",funcao)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path;cpJSON.call(p,"adicionaTemaIMG",funcao)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao=5&g_sid="+sid;if(opcao!=="tip"){p+="&tema="+tema}cpJSON.call(p,"identifica",funcao)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"reiniciaMapa",funcao)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas&map_file=&procurar="+procurar;cpJSON.call(p,"procurartemas",funcao)},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=adtema&temas="+temas+"&g_sid="+sid;cpJSON.call(p,"adtema",funcao)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao)},flamingo:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=montaFlamingo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"montaFlamingo",funcao)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=openlayers&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"openlayers",funcao)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;cpJSON.call(p,"corpo",funcao)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa&"+parametros;cpJSON.call(p,"criaMapa",funcao)},inicia:function(funcao,embedLegenda,w,h){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;cpJSON.call(p,"iniciaMapa",funcao)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php?funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema;cpJSON.call(p,"listaItensTema",funcao)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema;cpJSON.call(p,"listaRegistros",funcao)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=extregistros®istro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg";cpJSON.call(p,"listaEpsg",funcao)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema;cpJSON.call(p,"chavegoogle",funcao)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao)}};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d27"),id:"interface"}],submenus:{"ajudaMenu":[{text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{text:$trad("u3"),url:"http://pt.wikibooks.org/wiki/I3geo",target:"_blank"},{text:$trad("u4"),url:"http://mapas.mma.gov.br/wikibooki3geo",target:"_blank"},{text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{text:"i3Geo Blog",url:"http://sistemas.mma.gov.br/blogs/index.php?blog=6",target:"_blank"},{text:"Lista de funções",url:"http://mapas.mma.gov.br/i3geo/ajuda_usuario.php",target:"_blank"}],"analise":[{text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{text:$trad("t37"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"}],"janelas":[{text:$trad("u15"),url:"javascript:initJanelaZoom('1');initJanelaZoom('2')"},{text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"}],"arquivos":[{text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{text:$trad("u19"),url:"javascript:i3GEO.gadgets.quadros.listaImagens()"},{text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"},{text:$trad("u21"),url:"../geradordelinks.htm"}],"interface":[{text:"Normal",url:"javascript:window.location = i3GEO.configura.locaplic+'/aplicmap/geral.htm?'+i3GEO.configura.sid"},{text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/aplicmap/openlayers.htm?'+i3GEO.configura.sid"},{text:"Flash",url:"javascript:window.location = i3GEO.configura.locaplic+'/aplicmap/flamingo.htm?'+i3GEO.configura.sid"},{text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/aplicmap/googlemaps.phtml?'+i3GEO.configura.sid"},{text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/aplicmap/googleearth.phtml?'+i3GEO.configura.sid"}]}},tipoimagem:"nenhum",tipotip:"balao",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:13,diminuixN:18,diminuiyM:106,diminuiyN:103,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"/imagens/cursores/area.png",ie:"crosshair"},"distancia":{ff:"/imagens/cursores/distancia.png",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p6",url:"javascript:i3GEO.navega.entorno.ativaDesativa()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p11",url:"javascript:i3GEO.mapa.dialogo.template()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:2500,iniciaJanelaMensagens:true,mostraRosaDosVentos:"nao",liberaGuias:"nao",entorno:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:$trad("d1"),constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),funcaoonclick:function(){var temp;temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){OLpanel.activateControl(OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){OLpanel.activateControl(OLpan);return}panMapaInicia=function(exy){var k;leftinicial=0;topinicial=0;if($i("img")&&(g_tipoacao==="pan")){try{if(arguments.length>0){if(navm){k=event.button}else{k=exy.button}if(k===2){return}}}catch(h){}g_panM="sim";if($i(i3GEO.Interface.IDCORPO)){leftinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10);topinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)}clicinicialx=objposicaocursor.imgx;clicinicialy=objposicaocursor.imgy;ddinicialx=objposicaocursor.ddx;ddinicialy=objposicaocursor.ddy;boxrefObj=$i("boxref");if(boxrefObj){proporcaoBox=i3GEO.parametros.w/parseInt(boxrefObj.style.width,10);boxrefObjLeft=parseInt(boxrefObj.style.left,10);boxrefObjTop=parseInt(boxrefObj.style.top,10)}}};panMapaDesloca=function(){var nx,ny,l,t;if($i(i3GEO.Interface.IDMAPA)&&(g_panM==="sim")){nx=objposicaocursor.telax-leftinicial-clicinicialx;ny=objposicaocursor.telay-topinicial-clicinicialy;if(i3GEO.configura.entorno==="nao"){l=0;if(parseInt($i("i3geo").style.left,10)){l=parseInt($i("i3geo").style.left,10)}$i(i3GEO.Interface.IDMAPA).style.left=nx-l;t=0;if(parseInt($i("i3geo").style.top,10)){t=parseInt($i("i3geo").style.top,10)}$i(i3GEO.Interface.IDMAPA).style.top=ny-t;if(boxrefObj){boxrefObj.style.left=boxrefObjLeft-(nx/proporcaoBox);boxrefObj.style.top=boxrefObjTop-(ny/proporcaoBox)}}else{$left("img",i3GEO.parametros.w*-1+nx);$left("imgS",i3GEO.parametros.w*-1+nx);$left("imgL",i3GEO.parametros.w+nx);$left("imgO",i3GEO.parametros.w*-3+nx);$left("imgN",i3GEO.parametros.w*-1+nx);$top("img",i3GEO.parametros.h*-1+ny);$top("imgS",i3GEO.parametros.h*-1+ny);$top("imgL",i3GEO.parametros.h*-1+ny);$top("imgN",i3GEO.parametros.h*-1+ny);$top("imgO",i3GEO.parametros.h*-1+ny)}}};panMapaTermina=function(){if(g_tipoacao==="pan"){marcadorZoom="";g_panM="nao";var f="i3GEO.navega.timerNavega = null;if("+"i3GEO.navega.xy2xy('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+ddinicialx+","+ddinicialy+","+objposicaocursor.ddx+","+objposicaocursor.ddy+",'"+i3GEO.parametros.mapexten+"','"+i3GEO.configura.tipoimagem+"'"+") == false"+"){"+"i3GEO.navega.zoompontoIMG('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+objposicaocursor.imgx+","+objposicaocursor.imgy+")"+"}";clearTimeout(i3GEO.navega.timerNavega);i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}};if(i3GEO.eventos.MOUSEDOWN.toString().search("panMapaInicia()")<0){i3GEO.eventos.MOUSEDOWN.push("panMapaInicia()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("panMapaDesloca()")<0){i3GEO.eventos.MOUSEMOVE.push("panMapaDesloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("panMapaTermina()")<0){i3GEO.eventos.MOUSEUP.push("panMapaTermina()")}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),funcaoonclick:function(){var temp;if(i3GEO.Interface.ATUAL==="padrao"){$i("img").title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';i3GEO.barraDeBotoes.BOTAOPADRAO="identifica";cliqueIdentifica=function(){if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoIdentifica)}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),funcaoonclick:function(){var temp;if(i3GEO.Interface.ATUAL==="padrao"){$i("img").title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';i3GEO.barraDeBotoes.BOTAOPADRAO="identificaBalao";verificaTip=function(){if(g_operacao!=="identifica"||i3GEOF.identifica){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),funcaoonclick:function(){if(typeof(i3GEOF.mostraExten)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/mostraexten/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.mostraExten.criaJanelaFlutuante()","i3GEOF.mostraExten_script")}}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),funcaoonclick:function(){if(typeof(i3GEOF.wiki)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/wiki/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.wiki.criaJanelaFlutuante()","i3GEOF.wiki_script")}}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",funcaoonclick:function(){if(typeof(i3GEOF.buscaFotos)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/buscafotos/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.buscaFotos.criaJanelaFlutuante()","i3GEOF.buscaFotos_script")}}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),funcaoonclick:function(){if(typeof(i3GEOF.imprimir)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/imprimir/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.imprimir.criaJanelaFlutuante()","i3GEOF.imprimir_script")}}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),funcaoonclick:function(){if(typeof(i3GEOF.t3d)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/3d/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.t3d.criaJanelaFlutuante()","i3GEOF.t3d_script")}}},{iddiv:"google",tipo:"",dica:$trad("d15"),funcaoonclick:function(){i3GEO.util.criaBox();g_operacao="navega";if(navn){i3GEO.janela.cria((i3GEO.parametros.w/2)+40+"px",(i3GEO.parametros.h/2)+50+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>")}else{i3GEO.janela.cria("500px","380px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>")}atualizagoogle=function(){var doc;try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}if(window.parent.wdocai.panTogoogle){window.parent.wdocai.panTogoogle()}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.events.register("moveend",i3geoOL,function(e){try{window.parent.wdocai.panTogoogle()}catch(x){}})}}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.events.register("moveend",i3geoOL,function(e){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),funcaoonclick:function(){if(typeof(i3GEOF.confluence)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/confluence/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.confluence.criaJanelaFlutuante()","i3GEOF.confluence_script")}}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),funcaoonclick:function(){var buscarapida=$i("valorBuscaRapida");if(buscarapida){buscarapida.value=""}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.arvoreDeCamadas.CAMADAS="";i3GEO.contadorAtualiza++;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i("img")){$i("img").title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia","img",i3GEO.configura.locaplic)}g_tipoacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i("img")){$i("img").title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area","img",i3GEO.configura.locaplic)}g_tipoacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();if($i("img")){$i("img").title="clique para incluir o gráfico";$i("img").style.cursor="pointer"}}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}};
function i3GEOmantemCompatibilidade(){try{i3GEO.configura.oMenuData=oMenuData}catch(e){}try{i3GEO.configura.tipoimagem=g_tipoimagem}catch(e){}try{i3GEO.configura.tipotip=g_tipotip}catch(e){}try{i3GEO.configura.funcaoTip=g_funcaoTip}catch(e){}try{i3GEO.configura.map3d=g_3dmap}catch(e){}try{i3GEO.configura.embedLegenda=g_embedLegenda}catch(e){}try{i3GEO.configura.templateLegenda=g_templateLegenda}catch(e){}try{if(objmapa.finaliza!="")i3GEO.finaliza=objmapa.finaliza}catch(e){};g_arvoreClick="";g_arvoreClicks="";if($i("longlat")){atualizalonglat=function(){$i("longlat").innerHTML=objposicaocursor.dmsx+" "+objposicaocursor.dmsy};YAHOO.util.Event.addListener($i("img"),"mousemove",atualizalonglat)}try{if(g_opcoesTemas=="nao"){i3GEO.arvoreDeCamadas.OPCOESTEMAS=false}}catch(e){};try{i3GEO.maparef.fatorZoomDinamico=g_zoomRefDinamico}catch(e){};try{i3GEO.configura.mashuppar=g_mashuppar}catch(e){};try{if(!$i("arvoreAdicionaTema")){i3GEO.arvoreDeTemas.IDHTML=objmapa.guiaMenu+"obj"}else{i3GEO.arvoreDeTemas.IDHTML="arvoreAdicionaTema"}}catch(e){};try{if(g_uploaddbf=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf=false}}catch(e){};try{if(g_uploadlocal=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal=false}}catch(e){};try{if(g_downloadbase=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase=false}}catch(e){};try{if(g_conectarwms=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms=false}}catch(e){};try{if(g_conectargeorss=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss=false}}catch(e){};try{if(g_nuvemTags=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags=false}}catch(e){};try{if(g_kml=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml=false}}catch(e){};try{if(g_qrcode=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode=false}}catch(e){};try{if(g_tipoacao!=""){i3GEO.barraDeBotoes.BOTAOPADRAO=g_tipoacao}}catch(e){}try{if(g_listaPropriedades){i3GEO.configura.listaDePropriedadesDoMapa=g_listaPropriedades}}catch(e){};try{if(g_tempo_aplicar){i3GEO.configura.tempoAplicar=g_tempo_aplicar}}catch(e){};try{if(g_janelaMen=="nao"){i3GEO.configura.iniciaJanelaMensagens=false}}catch(e){};try{if(g_locaplic){i3GEO.configura.locaplic=g_locaplic}}catch(e){};try{if(g_tempotip){i3GEO.configura.tempoMouseParado=g_tempotip}}catch(e){};try{if(g_mostraRosa){i3GEO.configura.mostraRosaDosVentos=g_mostraRosa}}catch(e){};try{if(g_visual){i3GEO.configura.visual=g_visual}}catch(e){};try{if(g_mapaRefDisplay){i3GEO.configura.mapaRefDisplay=g_mapaRefDisplay}}catch(e){};try{if(g_docaguias){i3GEO.configura.liberaGuias=g_docaguias}}catch(e){};if(window.location.href.split("?")[1]){g_sid=window.location.href.split("?")[1];if(g_sid.split("#")[0]){g_sid=g_sid.split("#")[0]}}else{g_sid=""}i3GEO.configura.sid=g_sid;try{i3GEO.guias.ATUAL=g_guiaativa}catch(e){}try{i3GEO.navega.autoRedesenho.INTERVALO=g_autoRedesenho}catch(e){}try{i3GEO.eventos.NAVEGAMAPA=g_funcoesNavegaMapaDefault}catch(e){}try{i3GEO.eventos.MOUSEMOVE=g_funcoesMousemoveMapaDefault}catch(e){}try{i3GEO.eventos.MOUSECLIQUE=g_funcoesClickMapaDefault}catch(e){}try{i3GEO.configura.entorno=g_entorno}catch(e){}try{i3GEO.navega.lente.POSICAOX=g_posicaoLenteX=0}catch(e){}try{i3GEO.navega.lente.POSICAOY=g_posicaoLenteY}catch(e){}try{i3GEO.navega.destacaTema.TAMANHO=destacaTamanho}catch(e){}if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}try{objmapa.atualizaListaTemas=function(temas){alert("atualizaListaTemas foi depreciado. Utilize i3GEO.arvoreDeCamadas")}}catch(e){}}if(typeof(i3GEO)=='undefined'){i3GEO=[]}cpObj=new cpaint();cpObj.set_async("true");cpObj.set_response_type("JSON");function Mapa(e,m){i3GEO.cria();this.inicializa=function(){i3GEO.finaliza=this.finaliza;i3GEO.inicia()}}objaguarde={abre:function(){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"))},fecha:function(){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};function iCookie(nome,valor){i3GEO.util.insereCookie(nome,valor)}function pCookie(nome){i3GEO.util.pegaCookie(nome)}function trocalingua(l){i3GEO.idioma.trocaIdioma(l);alert("trocalingua foi depreciado utilize i3GEO.idioma")}function initJanelaMen(){i3GEO.ajuda.abreJanela();alert("initJanelaMen foi depreciado utilize i3GEO.ajuda")}function pegalistademenus(retorno){alert("Funcao pegalistademenus foi depreciado. Utilize i3GEO.arvoreDeTemas")}function wdocaf(wlargura,waltura,wsrc,nx,ny,texto){var janela=i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto)}function redimwdocaf(w,h){i3GEO.janela.alteraTamanho(w,h);alert("redimwdocaf foi depreciado utilize i3GEO.janela")}function wdocaf2(wlargura,waltura,wsrc,nx,ny,texto){var id=YAHOO.util.Dom.generateId();i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto,id,true)}function wdocafechaf(odoca){alert("wdocafechaf foi depreciado")}function mostradicasf(objeto,dica,hlpt){i3GEO.ajuda.mostraJanela(dica);alert("mostradicasf foi depreciado utilize i3GEO.ajuda")}function mudaboxnf(tipo,obj,nomeFuncao){alert("mudaboxnf foi depreciado")}function procurartemas(texto){alert("procurartemas foi depreciado")}function expandeTema(itemID){var tema=itemID.split("legenda");if(tema.length==2){g_arvoreClick=itemID;tema=tema[1];var p=g_locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaHTML&template=legenda2.htm&tema="+tema+"&g_sid="+g_sid;cpObj.call(p,"criaLegenda",expandeLegendaVer)}alert("expandeTema foi depreciado")}function pegavalSistemas(sis){alert("Funcao pegavalSistemas foi depreciada - veja i3GEO.arvoreDeTemas")}function processevent1(exy1){}function removeAcentos(palavra){return(i3GEO.util.removeAcentos(palavra));alert("removeAcentos foi depreciado utilize i3GEO.util")}function ativaMensagemBanner(){alert("ativaMensagemBanner fooi depreciado utilize i3GEO.ajuda")}function mensagemBanner(){}function mensagemf(m){alert("mensagemf foi depreciado");try{if(!$i("mensagem")){var novoel=document.createElement("div");novoel.id='mensagem';novoel.innerHTML='<table width="50" style="border: 1px solid #000000;"> <tr> <td onclick="mensagemf()" style="text-align:left;cursor:pointer" class="tdclara"> <img src="'+g_locaplic+'/imagens/excluir.png" /> </td> <td style="text-align:left" class="tdclara"> <input style="text-align:left" class="textocb" type="text" id="mensagemt" size="70" value="" /> </td></tr> </table>';if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}}if(m==null){$i("mensagem").style.visibility="hidden"}else{$i("mensagemt").value=m;$i("mensagem").style.visibility="visible"}var pos=pegaPosicaoObjeto($i("img"));pos[1]=pos[1]+parseInt($i("img").style.height)-22;eval('document.getElementById("mensagem").style.'+g_tipoleft+' = pos[0] + g_postpx');eval('document.getElementById("mensagem").style.'+g_tipotop+' = pos[1] + g_postpx')}catch(e){alert("Impossivel criar mensagem."+e)}}function aguarde(){alert("aguarde foi depreciado utilize i3GEO.janela");this.abre=function(aguardeId,texto){i3GEO.janela.abreAguarde(aguardeId,texto)};this.fecha=function(aguardeId){i3GEO.janela.fechaAguarde(aguardeId)}}function zoomiauto(){alert("zoomiauto foi depreciado utilize i3GEO.navega");i3GEO.navega.zoomin(g_locaplic,g_sid)}function zoomoauto(){alert("zoomoauto foi depreciado utilize i3GEO.navega");i3GEO.navega.zoomout(g_locaplic,g_sid)}function convdmsddf(cd,cm,cs){alert("convdmsddf foi depreciado utilize i3GEO.calculo");return(i3GEO.calculo.dsm2dd(cd,cm,cs))}function zoomPonto(){alert("utilize i3GEO.navega.zoomponto")}function zoomIP(){alert("zoomIP foi depreciado. Utilize i3GEO.navega.zoomIP")}function zoomtot(){alert("zoomtot foi depreciado. Utilize i3GEO.navega.zoomExt")}function panFixo(direcao,w,h,escala){alert("panFixo foi depreciado. Utilize i3GEO.navega.panFixo")}function protocolo(){alert("protocolo foi depreciado utilize i3GEO.util");return(i3GEO.util.protocolo())}function borra(){}function pegaPosicaoObjeto(obj){alert("pegaPosicaoObjeto foi depreciado utilize i3GEO.util");return(i3GEO.util.pegaPosicaoObjeto(obj))}function i3geo_pegaElementoPai(e){alert("i3geo_pegaElementoPai foi depreciado utilize i3GEO.util");return(i3GEO.util.pegaElementoPai(e))}function convddtela(vx,vy,docmapa){alert("convddtela foi depreciado utilize i3GEO.calculo");return(i3GEO.calculo.dd2tela(vx,vy,docmapa,i3GEO.parametros.extent,i3GEO.parametros.pixelsize))}function convdmsf(x,y){alert("convdmsf foi depreciado utilize i3GEO.calculo");return(i3GEO.calculo.dd2dms(x,y))}function calcddf(xfign,yfign,g_celula,imgext){alert("calcddf foi depreciado utilize i3GEO.calculo");return(i3GEO.calculo.tela2dd(xfign,yfign,g_celula,imgext))}function movecursor(){if($i("obj")){if($i("openlayers")||$i("flamingo")){$i("obj").style.display="none"}else{var obje=$i("obj").style;if($i("img")){eval("obje."+g_tipotop+"= objposicaocursor.telay + 9 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 9 + g_postpx")}else{eval("obje."+g_tipotop+"= objposicaocursor.telay - 15 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 15 + g_postpx")}}}if($i("box1")){var bx=$i("box1");if(bx.style.visibility!="visible"){bx.style.left=objposicaocursor.telax+g_postpx;bx.style.top=objposicaocursor.telay+g_postpx}}}function pegaCoordenadaUTM(){alert("pegaCoordenadaUTM foi depreciado utilize i3GEO.gadgets");i3GEO.gadgets.mostraCoordenadasUTM(g_locaplic,"mostraUTM")}function ativaLocalizarxy(iddiv){alert("ativaLocalizarxy foi depreciado utilize i3GEO.gadgets");i3GEO.gadgets.mostraCoordenadasGEO(iddiv)}function ativaEscalaNumerica(iddiv){alert("ativaEscalaNumerica foi depreciado utilize i3GEO.gadgets");i3GEO.gadgets.mostraEscalaNumerica(iddiv)}function ativaBuscaRapida(iddiv){alert("ativaBuscaRapida foi depreciado utilize i3GEO.gadgets");i3GEO.gadgets.mostraBuscaRapida(iddiv)}function buscaRapida(){i3geo_buscarapida()}function criaboxg(){i3GEO.util.criaBox();i3GEO.util.criaPin();alert("criaboxg foi depreciado utilize i3GEO.util")}function initJanelaZoom(qual){i3GEO.barraDeBotoes.reativa(qual-1)}function sobeferramentas(){}function desceferramentas(){}function mostraRosaDosVentos(){alert("mostraRosaDosVentos foi depreciado utilize i3GEO.navega");i3GEO.navega.mostraRosaDosVentos()}function mudaVisual(visual){alert("visual foi depreciado utilize i3GEO.visual");i3GEO.gadgets.visual.troca(visual)}function visual(iddiv){alert("visual foi depreciado utilize i3GEO.visual");i3GEO.gadgets.visual.inicia(iddiv)}function arvoreclick(itemID){if(itemID.search("tema")==0){if($i(itemID).checked==true){$i(itemID).checked=false}else{$i(itemID).checked=true}}}function pegaTema(celula){var nos=celula.parentNode.childNodes;var tempi=nos.length;for(var no=0;no<tempi;no++){if(nos[no].type=="checkbox"){return nos[no].value}}}function gerafilmef(qs){}function gravaQuadro(variavel,valor){i3GEO.gadgets.quadros.grava(variavel,valor)}function avancaQuadro(){i3GEO.gadgets.quadros.avanca()}function zoomAnterior(){}function zoomProximo(){}function opcoesQuadros(){}function filmef(o){}function rebobinaf(){}function filmezf(o){}function quadrofilme(){}function filmeanimaf(){}function filmeanimarodaf(janima){}function pegaimagens(){}function calculaArea(pontos,pixel){return(i3GEO.calculo.area(pontos,pixel))}function calculadistancia(lga,lta,lgb,ltb){return(i3GEO.calculo.distancia(lga,lta,lgb,ltb))}function initJanelaRef(){i3GEO.maparef.inicia()}function ajaxReferencia(retorno){i3GEO.maparef.processaImagem(retorno)}function clicouRef(){}function movimentoRef(obj){}function mostraTip(retorno){if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}var i=$i("i3geo_rosa");if(i)i.style.display="none";var mostra=false;var retorno=retorno.data;if((retorno!="erro")&&(retorno!=undefined)){if($i("img")){$i("img").title=""}if(retorno!=""){var res="<div id='cabecatip' style='text-align:left;background-color:rgb(240,240,240)'><span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:objmapaparado=\"cancela\"'>parar </span>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:i3GEO.janela.TIPS.push($i(\"tip\"));$i(\"tip\").id=\"\";$i(\"cabecatip\").innerHTML =\"\";$i(\"cabecatip\").id =\"\"' >fixar</span></div>";var temas=retorno.split("!");var tema=temas.length-1;if(tema>=0){do{var titulo=temas[tema].split("@");if(g_tipotip=="completo"){res+="<span style='text-align:left;font-size:9pt'><b>"+titulo[0]+"</b></span><br>"}var ocorrencias=titulo[1].split("*");var ocorrencia=ocorrencias.length-1;if(ocorrencia>=0){do{if(ocorrencias[ocorrencia]!=""){var pares=ocorrencias[ocorrencia].split("##");var paresi=pares.length;for(var par=0;par<paresi;par++){var valores=pares[par].split("#");if(g_tipotip=="completo"){res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'>"+valores[0]+" <i>"+valores[1]+"</i></span><br>";var mostra=true}else{res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'><i>"+valores[1]+"</i></span><br>";var mostra=true}}}}while(ocorrencia--)}}while(tema--)}if(!mostra){$i("tip").style.display="none";return}if($i("janelaMen")){$i("janelaMenTexto").innerHTML=res}else{var i=$i("tip");i.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=i.style;ist.top=objposicaocursor.telay-10;ist.left=objposicaocursor.telax-20;ist.display="block"}}}}function trataErro(){i3GEO.janela.fechaAguarde()}function mostraguiaf(guia){i3GEO.guias.mostra(guia)}function ativaGuias(){for(var g=0;g<12;g++){if($i("guia"+g))var gpai=$i("guia"+g).parentNode}if(gpai){gpai.id="guiasYUI";gpai.className="yui-navset";var ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">';try{if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).innerHTML=$trad("g1")}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).innerHTML=$trad("g2")}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).innerHTML=$trad("g3")}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).innerHTML=$trad("g4")}}catch(e){};for(var g=0;g<12;g++){if($i("guia"+g)){var tituloguia=$i("guia"+g).innerHTML;var re=new RegExp(" ","g");var tituloguia=tituloguia.replace(re,'');ins+='<li><a href="#"><em><div id="guia'+g+'" >'+tituloguia+'</div></em></a></li>'}}ins+="</ul>";gpai.innerHTML=ins;for(var g=0;g<12;g++){if($i("guia"+g)){eval('$i("guia'+g+'").onclick = function(){g_guiaativa = "guia'+g+'";mostraguiaf('+g+');}');$i("guia"+g).onmouseover=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="#bfdaff"};$i("guia"+g).onmouseout=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="transparent"};if($i("guia"+g+"obj")){$i("guia"+g+"obj").style.overflow="auto";$i("guia"+g+"obj").style.height=i3GEO.parametros.h}}}}if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).onclick=function(){g_guiaativa=objmapa.guiaTemas;mostraguiaf(1)}}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).onclick=function(){g_guiaativa=objmapa.guiaMenu;mostraguiaf(2);if(!$i("arvoreAdicionaTema")){var ondeArvore=objmapa.guiaMenu+"obj"}else{var ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).onclick=function(){g_guiaativa=objmapa.guiaLegenda;mostraguiaf(4);objmapa.atualizaLegendaHTML()}}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).onclick=function(){g_guiaativa=objmapa.guiaListaMapas;mostraguiaf(5);if($i("banners")){$i("banners").innerHTML==$trad("o1");var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpObj.call(p,"pegaMapas",pegaMapas)}else{alert("id banners nao encontrado")}}}}function docaguias(){i3GEO.guias.libera()}function autoRedesenho(opcao){}function movePan(){alert("movePan foi depreciado")}function selecao(){}function cliqueSelecao(){}function zoomboxf(tipo){}function i3geo_comboGruposMenu(funcaoOnchange,idDestino,idCombo,largura,altura){}function i3geo_comboSubGruposMenu(funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){}function i3geo_comboTemasMenu(funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura){}function remapaf(){i3GEO.atualiza("")}function limpacontainerf(){}function inseremarcaf(xi,yi,funcaoOnclick,container){i3GEO.utl.insereMarca.cria(xi,yi,funcaoOnclick,container)}function moveSelecaoPoli(){}function cliqueSelecaoPoli(){}function capturaposicao(e){alert("capturaposicao foi depreciado utilize i3GEO.eventos")}function ativaEntorno(){}function geraURLentorno(){}function ajustaEntorno(){}function lenteDeAumento(){alert("lenteDeAumento foi depreciado utilize i3GEO.navega.lente.ativaDesativa()")}function ajaxabrelente(retorno){}function movelentef(){}function destacaTema(tema){alert("destacaTema foi depreciado utilize i3GEO.navega")}function ajaxdestaca(){alert("ajaxdestaca foi depreciado, utilize i3GEO.navega")}function ativaClicks(docMapa){}function incluir(path){i3GEO.util.adicionaSHP(path)}function pontosdist(){this.xpt=[];this.ypt=[];this.dist=[];this.xtela=[];this.ytela=[];this.ximg=[];this.yimg=[];this.linhas=[]}function mudaiconf(i){i3GEO.barraDeBotoes.ativaIcone(i)}function calcposf(){i3GEO.mapa.ajustaPosicao()}function recuperamapa(){}function criaContainerRichdraw(){alert("criaContainerRichdraw foi depreciado utilize i3GEO.desenho")}function desenhoRichdraw(tipo,objeto,n){}function ajaxhttp(){try{var objhttp1=new XMLHttpRequest()}catch(ee){try{var objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{var objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){var objhttp1=false}}}return(objhttp1)}function ajaxexecAS(programa,funcao){var ohttp=ajaxhttp();ohttp.open("POST",programa,true);var retorno="";ohttp.onreadystatechange=function(){if(ohttp.readyState==4){retorno=ohttp.responseText;var reg=/Warning/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}var reg=/erro/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}if(funcao!="volta"){eval(funcao+'("'+retorno+'")')}}};ohttp.send(null)}function ajaxexec(programa,funcao){var objhttp=ajaxhttp();objhttp.open('GET',programa,false);objhttp.send(null);if(objhttp.status==200){if(funcao!="volta"){eval(funcao+'("'+objhttp.responseText+'")')}else{return objhttp.responseText}}}function ajaxLegendaHTML(retorno){}function ajaxLegendaImagem(retorno){}function mede(){}function cliqueMede(){}function moveMede(){}function area(){}function cliqueArea(){}function moveArea(){}function textofid(){}function inserexy(){}function cliqueInseretoponimo(){}function cliqueInserexy(){}function inseregrafico(){}function cliqueInseregrafico(){}function ativaHistoricoZoom(iddiv){}function ajaxhttp(){return i3GEO.util.ajaxhttp()}function ajaxCorpoMapa(retorno){i3GEO.mapa.corpo.veirifca(retorno)}function ajaxredesenha(retorno){i3GEO.atualiza(retorno)}function ajaxIniciaParametros(retorno){i3GEO.atualiza(retorno)}function montaMenuSuspenso(iddiv){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=iddiv;i3GEO.gadgets.mostraMenuSuspenso()}
if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.calculo={dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal=='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,latlng,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL=="googlemaps"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));latlng=new GLatLng(vy,vx);xyn=i3GeoMap.fromLatLngToContainerPixel(latlng);xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL=="openlayers"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length==3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length==4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod,mx,sx,mm,restos,my,sy,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext){try{var amext,longdd,latdd;if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[1]);$polygon_area=0;for($i=0;$i<=$array_length;$i++){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area="Sao necessarios pelo menos tres pontos para o calculo"}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6371*c;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pix,piy,pos,amext,dx,dy,x1,y1,x2,y2;eval('pix = parseInt(document.getElementById("'+idrect+'").style.'+g_tipoleft+")");eval('piy = parseInt(document.getElementById("'+idrect+'").style.'+g_tipotop+")");if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dx=((amext[0]*-1)-(amext[2]*-1))/-1;dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,rectmap,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");rectmap=mapext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w;box.style.height=h;box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.desenho={richdraw:"",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}i3GEO.desenho.richdraw.editCommand('fillcolor','red');i3GEO.desenho.richdraw.editCommand('linecolor','gray');i3GEO.desenho.richdraw.editCommand('linewidth','1px');i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo)}catch(erro){alert("Erro ao tentar criar container richdraw")}},criaDivContainer:function(){if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;ne.position="absolute";ne.width=i3GEO.parametros.w;ne.height=i3GEO.parametros.h;ne.border="1px solid black";ne.display="none";ne.top=pos[1];ne.left=pos[0];document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var pos,r,elemento,elementos,dy,dx,w;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if((tipo==="resizeLinha")||(tipo==="resizePoligono")&&navn){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){window.status=n+" erro ao movimentar a linha "}}if((tipo==="resizeLinha")&&navm){try{r=$i(i3GEO.desenho.richdraw.container.id);elemento=r.lastChild;if(elemento.innerHTML!==""){elementos=r.childNodes;if(elementos.length>3){elemento=elementos[elementos.length-3]}else{elemento=elementos[elementos.length-2]}}r.removeChild(elemento);dy=objposicaocursor.imgy;dx=objposicaocursor.imgx-(i3GEO.parametros.w/2);i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2)-1,pontosdistobj.yimg[n-1]-3,dx,dy-3)}catch(erro){window.status=n+" erro ao movimentar a linha "}}if((tipo==="resizePoligono")&&navm){try{r=$i(i3GEO.desenho.richdraw.container.id);r.removeChild(r.lastChild);r.removeChild(r.lastChild);dy=objposicaocursor.imgy;dx=objposicaocursor.imgx-(i3GEO.parametros.w/2);i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2)-1,pontosdistobj.yimg[n-1]-3,dx,dy-3);i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[0])-(i3GEO.parametros.w/2)-1,pontosdistobj.yimg[0]-3,dx,dy-3)}catch(erro){window.status=n+" erro ao movimentar a linha "}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);if(navn){try{i3GEO.desenho.richdraw.renderer.create('circ','','rgb(250,250,250)',i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w,w)}catch(erro){}}else{try{i3GEO.desenho.richdraw.renderer.create('circ','','rgb(250,250,250)',i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1]-w,pontosdistobj.yimg[n-1]-w,w*2,w*2)}catch(erro){}}}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','','rgb(250,250,250)',i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(erro){}}}}};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,ATUAL:"padrao",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",redesenha:function(){if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.Interface.padrao.redesenha()}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.redesenha()}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.redesenha()}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.redesenha()}if(i3GEO.Interface.ATUAL==="flamingo"){i3GEO.Interface.flamingo.redesenha()}},cria:function(w,h){if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.Interface.padrao.cria(w,h)}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.cria(w,h)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.cria(w,h)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.cria(w,h)}if(i3GEO.Interface.ATUAL==="flamingo"){i3GEO.Interface.flamingo.cria(w,h)}},inicia:function(w,h){if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.Interface.padrao.inicia()}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.inicia()}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.inicia()}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.inicia()}if(i3GEO.Interface.ATUAL==="flamingo"){i3GEO.Interface.flamingo.inicia()}},ativaBotoes:function(){if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.Interface.padrao.ativaBotoes()}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ativaBotoes()}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.ativaBotoes()}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.ativaBotoes()}if(i3GEO.Interface.ATUAL==="flamingo"){i3GEO.Interface.flamingo.ativaBotoes()}},padrao:{TRANSICAO:false,redesenha:function(){var ndiv,i;if(!$i("img")){i3GEO.janela.fechaAguarde();return}$i("img").onload=function(){var imagem,temp;imagem=$i("img");imagem.onload="";i3GEO.gadgets.quadros.grava("imagem",i3GEO.parametros.mapimagem);i3GEO.gadgets.quadros.grava("extensao",i3GEO.parametros.mapexten);temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("legenda",legimagem)};if(i3GEO.gadgets.quadros.geraLegenda===true){i3GEO.mapa.legendaIMAGEM.obtem(temp)}if(i3GEO.Interface.padrao.TRANSICAO===true){if($i("imgtemp")){i3GEO.util.desaparece("imgtemp",50,5,true)}i3GEO.util.aparece("img",50,5)}else{if($i("imgtemp")){i3GEO.util.desaparece("imgtemp",15,5,true)}i3GEO.util.aparece("img",5,5)}i3GEO.janela.fechaAguarde("ajaxCorpoMapa")};if(!$i("imgtemp")){ndiv=document.createElement("div");ndiv.id="imgtemp";ndiv.style.position="absolute";ndiv.style.border="1px solid blue";document.getElementById("corpoMapa").appendChild(ndiv)}if(g_tipoacao==="pan"&&i3GEO.barraDeBotoes.BOTAOCLICADO==="pan"){$i("imgtemp").style.left=parseInt($i("img").style.left,10);$i("imgtemp").style.top=parseInt($i("img").style.top,10);$i("imgtemp").style.width=i3GEO.parametros.w;$i("imgtemp").style.height=i3GEO.parametros.h}$i("imgtemp").style.backgroundImage='url("'+$i("img").src+'")';$i("imgtemp").style.display="block";i=$i("img");i.style.display="none";i.style.left=0;i.style.top=0;i.src=i3GEO.parametros.mapimagem},cria:function(){var ins="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img' />",temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.innerHTML=ins}i3GEO.Interface.IDMAPA="img"},ativaMenuContexto:function(){var temp,oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;temp=$i("contexto_"+i3GEO.Interface.IDMAPA);if(temp){temp.parentNode.removeChild(temp)}oFieldContextMenuItemData=[{text:" <span class='container-close'></span>"},{text:"<img class='rosamais' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Aproxima</span>",onclick:{fn:i3GEO.navega.zoomin}},{text:"<img class='rosamenos' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Afasta</span>",onclick:{fn:i3GEO.navega.zoomout}},{text:"<img class='rosanorte' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Norte</span>",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:"<img class='rosasul' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Sul</span>",onclick:{fn:i3GEO.navega.panFixoSul}},{text:"<img class='rosaleste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Leste</span>",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:"<img class='rosaoeste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Oeste</span>",onclick:{fn:i3GEO.navega.panFixoOeste}},{text:"Captura",onclick:{fn:i3GEO.gadgets.quadros.listaImagens}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+i3GEO.Interface.IDMAPA,{trigger:i3GEO.Interface.IDMAPA,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+i3GEO.Interface.IDMAPA;if(id){$i(id).style.zIndex=50000}};oFieldContextMenu.subscribe("render",onFieldMenuRender)},inicia:function(){var elemento,i,estilo;if($i("contemImg")){elemento="contemImg"}else{elemento="img"}i3GEO.mapa.ajustaPosicao(elemento);i=$i("img");if(!i){return}i.style.width=i3GEO.parametros.w+"px";i.style.height=i3GEO.parametros.h+"px";estilo=$i(i3GEO.Interface.IDCORPO).style;estilo.width=i3GEO.parametros.w+"px";estilo.height=i3GEO.parametros.h+"px";estilo.clip='rect('+0+" "+(i3GEO.parametros.w)+" "+(i3GEO.parametros.h)+" "+0+')';objmapaparado="nao";i3GEO.gadgets.mostraMenuSuspenso();i3GEO.eventos.ativa(i);i3GEO.gadgets.mostraCoordenadasGEO();i3GEO.gadgets.mostraCoordenadasUTM();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraEscalaGrafica();i3GEO.gadgets.visual.inicia();i3GEO.ajuda.ativaLetreiro(i3GEO.parametros.mensagens);i3GEO.Interface.padrao.ativaBotoes();i3GEO.idioma.mostraSeletor();if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes1")||i3GEO.barraDeBotoes.AUTO===true){x1=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y1=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if(($i("barraDeBotoes1")&&$i("barraDeBotoes2"))||i3GEO.barraDeBotoes.AUTO===true){x1=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT+40}if($i("barraDeBotoes1")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1)}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes();if(document.getElementById("botao3d")){if(i3GEO.configura.map3d===""){document.getElementById("botao3d").style.display="none"}}if(i3GEO.Interface.ATIVAMENUCONTEXTO){i3GEO.Interface.padrao.ativaMenuContexto()}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}}},flamingo:{redesenha:function(){var w=parseInt($i("flamingo").style.width,10);if(w===i3GEO.parametros.w){$i("flamingo").style.height=parseInt($i("flamingo").style.height,10)+1}else{$i("flamingo").style.height=parseInt($i("flamingo").style.height,10)-1}i3GEO.janela.fechaAguarde()},cria:function(w,h){var i,f,ins;i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("flamingo");if(!f){ins='<div id=flamingo style="width:0px;height:0px;text-align:left;background-image:url(/"'+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg/")"></div>';i.innerHTML=ins}f=$i("flamingo");f.style.width=w;f.style.height=h;i3GEO.Interface.IDMAPA="flamingo"}},inicia:function(){var monta=function(retorno){$i("flamingo").style.height=i3GEO.parametros.h+45;childPopups=[];childPopupNr=0;var so=new SWFObject(i3GEO.configura.locaplic+"/pacotes/flamingo/flamingo/flamingo.swf?config="+retorno.data,"flamingoi","100%","100%","8","#eaeaea");so.addParam("wmode","transparent");so.write("flamingo")};i3GEO.php.flamingo(monta);i3GEO.eventos.ativa($i("flamingo"));i3GEO.maparef.atualiza();if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}},ativaBotoes:function(){}},openlayers:{redesenha:function(){if($i("openlayers_OpenLayers_Container")){var a,b,c,no,divs1,n1,divs2,n2,imgs,nimg;no=$i("openlayers_OpenLayers_Container");divs1=no.getElementsByTagName("div");n1=divs1.length;for(a=0;a<n1;a++){divs2=divs1[a].getElementsByTagName("div");n2=divs2.length;for(b=0;b<n2;b++){imgs=divs2[b].getElementsByTagName("img");nimg=imgs.length;for(c=0;c<nimg;c++){imgs[c].src+="&x"}}}i3GEO.Interface.openlayers.recalcPar()}i3GEO.janela.fechaAguarde()},cria:function(w,h){var i,f,ins;i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers"},inicia:function(){var montaMapa=function(){var url,pz,pos;url=window.location.protocol+"//"+window.location.host+i3GEO.parametros.cgi+"?";url+="map="+i3GEO.parametros.mapfile+"&mode=map&SRS=epsg:4326&";i3geoOL=new OpenLayers.Map('openlayers',{controls:[]});i3geoOLlayer=new OpenLayers.Layer.MapServer("Temas I3Geo",url,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{'buffer':1},{isBaseLayer:true,opacity:1});i3geoOLlayer.setVisibility(true);i3geoOL.addLayer(i3geoOLlayer);i3geoOL.events.register("moveend",i3geoOL,function(e){i3GEO.Interface.openlayers.recalcPar();g_operacao="";g_tipoacao=""});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,dc;if(navm){p=new OpenLayers.Pixel(e.x,e.y)}else{p=e.xy}lonlat=i3geoOL.getLonLatFromPixel(p);d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.telax=p.x;objposicaocursor.telay=p.y;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];dc=$i("i3geo");if($i("openlayers_OpenLayers_Container")){dc=$i("openlayers_OpenLayers_Container")}while(dc.offsetParent){dc=dc.offsetParent;objposicaocursor.telax=objposicaocursor.telax+dc.offsetLeft;objposicaocursor.telay=objposicaocursor.telay+dc.offsetTop}}catch(e){}});pz=new OpenLayers.Control.PanZoomBar({numZoomLevels:5});i3geoOL.addControl(pz);pz.div.style.zIndex=5000;i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher());i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.addControl(new OpenLayers.Control.ScaleLine());i3geoOL.addControl(new OpenLayers.Control.OverviewMap());i3geoOL.addControl(new OpenLayers.Control.KeyboardDefaults());i3GEO.eventos.ativa($i("openlayers"));pos=i3GEO.util.pegaPosicaoObjeto($i("openlayers"));if($i("aguarde")){$top("aguarde",pos[1]);$left("aguarde",pos[0])}OLpan=new OpenLayers.Control.Navigation();OLzoom=new OpenLayers.Control.ZoomBox();OLpanel=new OpenLayers.Control.Panel();OLpanel.addControls([OLpan,OLzoom]);i3geoOL.addControl(OLpanel);i3GEO.Interface.openlayers.ativaBotoes()};i3GEO.php.openlayers(montaMapa);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.ajuda.ativaLetreiro(i3GEO.parametros.mensagens);i3GEO.idioma.mostraSeletor();i3GEO.gadgets.mostraCoordenadasGEO();i3GEO.gadgets.mostraCoordenadasUTM();i3GEO.gadgets.mostraEscalaNumerica()},ativaBotoes:function(){var imagemxy,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){g_operacao="";g_tipoacao="";var bounds=i3geoOL.getExtent().toBBOX().split(",");i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=i3geoOL.getScale();atualizaEscalaNumerica(parseInt(i3GEO.parametros.mapscale,10))},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)}},googlemaps:{OPACIDADE:0.8,TIPOMAPA:"G_PHYSICAL_MAP",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],redesenha:function(){try{if(i3GeoMap!==""){posfixo=posfixo+"&";i3GeoMap.removeOverlay(i3GEOTileO);var i3GEOTile=new GTileLayer(null,0,18,{tileUrlTemplate:i3GEO.Interface.googlemaps.criaTile()+posfixo,isPng:true,opacity:i3GEO.Interface.googlemaps.OPACIDADE});i3GEOTileO=new GTileLayerOverlay(i3GEOTile);i3GeoMap.addOverlay(i3GEOTileO)}}catch(e){}},cria:function(w,h){var i,f,ins;posfixo="&";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");f.style.width=w;f.style.height=h}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv"},inicia:function(){var pos,myMapType,pol,ret,pt1,pt2,bottomLeft,bottomRight,sw,ne,z,i3GEOTile;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");pt1=(((ret[0]*-1)-(ret[2]*-1))/2)+ret[0]*1;pt2=(((ret[1]-ret[3])/2)*-1)+ret[1]*1;i3GeoMap=new GMap2($i(i3GEO.Interface.IDMAPA));i3GeoMap.addMapType(G_PHYSICAL_MAP);if(i3GEO.Interface.googlemaps.TIPOMAPA==="G_SATELLITE_MAP"){i3GeoMap.setMapType(G_SATELLITE_MAP)}if(i3GEO.Interface.googlemaps.TIPOMAPA==="G_PHYSICAL_MAP"){i3GeoMap.setMapType(G_PHYSICAL_MAP)}if(i3GEO.Interface.googlemaps.TIPOMAPA==="G_HYBRID_MAP"){i3GeoMap.setMapType(G_HYBRID_MAP)}i3GeoMap.addControl(new GLargeMapControl());i3GeoMap.addControl(new GMapTypeControl());bottomLeft=new GControlPosition(G_ANCHOR_BOTTOM_LEFT,new GSize(0,40));i3GeoMap.addControl(new GScaleControl(),bottomLeft);bottomRight=new GControlPosition(G_ANCHOR_BOTTOM_RIGHT);i3GeoMap.addControl(new GOverviewMapControl(),bottomRight);sw=new GLatLng(ret[1],ret[0]);ne=new GLatLng(ret[3],ret[2]);z=i3GeoMap.getBoundsZoomLevel(new GLatLngBounds(sw,ne));i3GeoMap.setCenter(new GLatLng(pt2,pt1),z);i3GEOTile=new GTileLayer(null,0,18,{tileUrlTemplate:i3GEO.Interface.googlemaps.criaTile(),isPng:true,opacity:i3GEO.Interface.googlemaps.OPACIDADE});i3GEOTileO=new GTileLayerOverlay(i3GEOTile);i3GeoMap.addOverlay(i3GEOTileO);myMapType=new GMapType([i3GEOTile],new GMercatorProjection(18),'i3Geo');i3GeoMap.addMapType(myMapType);GEvent.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao=""});GEvent.addListener(i3GeoMap,"dragend",function(){i3GEO.Interface.googlemaps.recalcPar()});GEvent.addListener(i3GeoMap,"zoomend",function(){i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao=""});i3GEO.Interface.googlemaps.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.gadgets.mostraCoordenadasGEO();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraInserirKml();pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));GEvent.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMap.fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}});g_operacao="";g_tipoacao="";if(i3GEO.parametros.kmlurl!==""){i3GEO.mapa.insereKml(true,i3GEO.parametros.kmlurl)}i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();i3GEO.Interface.googlemaps.adicionaListaKml()},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},criaWMS:function(){var cgi,parametros;cgi=i3GEO.configura.locaplic+"/classesphp/parse_cgi.php?g_sid="+i3GEO.configura.sid;parametros="&map_size="+parseInt($i(i3GEO.Interface.IDMAPA).style.width,10);parametros+=","+parseInt($i(i3GEO.Interface.IDMAPA).style.height,10);parametros+="&mapext="+i3GEO.Interface.googlemaps.bbox();parametros+="&map_imagecolor=-1 -1 -1&map_transparent=on";return(cgi+parametros)},criaTile:function(){var cgi,parametros;cgi=i3GEO.util.protocolo()+"://"+window.location.host+i3GEO.parametros.cgi+"?";parametros="map="+i3GEO.parametros.mapfile;parametros+='&mode=tile';parametros+='&tilemode=gmap';parametros+='&tile={X}+{Y}+{Z}';parametros+='&map_imagetype='+i3GEO.Interface.OUTPUTFORMAT;return(cgi+parametros)},ativaBotoes:function(){var imagemxy,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT+70;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor/200;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){var bounds,sw,ne;g_operacao="";g_tipoacao="";bounds=i3GeoMap.getBounds();sw=bounds.getSouthWest();ne=bounds.getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala()},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol,ret,pt1,pt2,sw,ne,z;pol=mapexten;ret=pol.split(" ");pt1=(((ret[0]*-1)-(ret[2]*-1))/2)+ret[0]*1;pt2=(((ret[1]-ret[3])/2)*-1)+ret[1]*1;sw=new GLatLng(ret[1],ret[0]);ne=new GLatLng(ret[3],ret[2]);z=i3GeoMap.getBoundsZoomLevel(new GLatLngBounds(sw,ne));i3GeoMap.setCenter(new GLatLng(pt2,pt1),z)},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);zoom=function(){if(pan){eval("var ll = "+ngeoxml+".getDefaultCenter()");eval(ngeoxml+".gotoDefaultViewport(i3GeoMap)")}};eval(ngeoxml+" = new GGeoXml(url,zoom)");if(ativo===true){eval("i3GeoMap.addOverlay("+ngeoxml+")")}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googlemaps.ARVORE.getRoot();node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+=" <span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{alert("Arvore de camadas nao encontrada. Nao e possivel adicionar a arvore de KML");return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Google Maps</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false},ativaDesativaCamadaKml:function(obj){if(!obj.checked){eval("i3GeoMap.removeOverlay("+obj.value+")")}else{eval("i3GeoMap.addOverlay("+obj.value+")")}}},googleearth:{redesenha:function(){try{if(typeof(linki3geo)!=='undefined'){linki3geo.setHref(linki3geo.getHref()+"&")}}catch(e){alert(e)}},cria:function(w,h){var i,i3GeoMap3d,i3GeoMap;i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w;i3GeoMap3d.style.height=h+45;i.style.height=h+45;i3GeoMap3d.id="i3GeoMap3d";i.appendChild(i3GeoMap3d)}i3GEO.Interface.IDMAPA="i3GeoMap3d";google.load("earth","1");i3GeoMap=null},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);kmlUrl=i3GEO.configura.locaplic+"/pacotes/kmlmapserver/kmlservice.php?map="+i3GEO.parametros.mapfile+"&typename=estadosl&request=kml&mode=map&";linki3geo=i3GeoMap.createLink('');linki3geo.setHref(kmlUrl);nl=i3GeoMap.createNetworkLink('');nl.setLink(linki3geo);nl.setFlyToView(true);i3GeoMap.getFeatures().appendChild(nl);var options=i3GeoMap.getOptions();options.setMouseNavigationEnabled(true);options.setStatusBarVisibility(true);options.setOverviewMapVisibility(true);options.setScaleLegendVisibility(true);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW)},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){}}};i3GEO.interface=i3GEO.Interface;
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={GEOXML:[],ajustaPosicao:function(elemento){if(arguments.length===0){return}if(!$i(elemento)){return}var imagemxi,imagemyi,imagemxref,imagemyref,dc,c;try{imagemxi=0;imagemyi=0;imagemxref=0;imagemyref=0;dc=$i(elemento);while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi=imagemxi+dc.offsetLeft;imagemyi=imagemyi+dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){var noArvoreCamadas=$i("arrastar_"+codigo),noAtualArvoreCamadas=$i("arrastar_"+i3GEO.temaAtivo);i3GEO.temaAtivo=codigo;if(noAtualArvoreCamadas){noAtualArvoreCamadas.style.textDecoration=""}if(noArvoreCamadas){noArvoreCamadas.style.textDecoration="underline"}},ativaLogo:function(){i3GEO.contadorAtualiza++;i3GEO.php.ativalogo(i3GEO.atualiza)},verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(retorno===undefined)){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.janela.fechaAguarde();return}if(i3GEO.mapa.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(i3GEO.mapa.recupera.TENTATIVA===1){i3GEO.mapa.recupera.TENTATIVA=2;i3GEO.contadorAtualiza++;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(i3GEO.mapa.recupera.TENTATIVA===0){i3GEO.mapa.recupera.TENTATIVA++;i3GEO.mapa.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var temp=function(retorno){var s,ins,elementos,i;if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){s=i3GEO.configura.locaplic+"/imagens/solta.gif";ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+="<img onclick='i3GEO.mapa.legendaHTML.libera()' id=soltaLeg src="+s+" title='clique para liberar'/><br>"}ins+="<div id='corpoLegi' >"+retorno.data.legenda+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i++){elementos[i].style.display="none"}}};i3GEO.mapa.legendaHTML.obtem(temp)},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.contadorAtualiza++;i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd">Legenda</div>';temp+='<div id="wlegenda" style="text-align:left;background-color:white" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.Panel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:false});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i++){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show()};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{autoredesenha:function(){if(typeof(i3GEOF.opcoesTempo)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/opcoes_autoredesenha/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesTempo.criaJanelaFlutuante()","i3GEOF.opcoesTempo_script")}},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}if(typeof(i3GEOF.salvaMapa)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/salvamapa/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.salvaMapa.criaJanelaFlutuante()","i3GEOF.salvaMapa_script")}},carregaMapa:function(){if(typeof(i3GEOF.carregaMapa)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/carregamapa/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.carregaMapa.criaJanelaFlutuante()","i3GEOF.carregaMapa_script")}},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertews/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteMapaWS.criaJanelaFlutuante()","i3GEOF.converteMapaWS_script")}},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertemapakml/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteMapaKml.criaJanelaFlutuante()","i3GEOF.converteMapaKml_script")}},queryMap:function(){if(typeof(i3GEOF.opcoesQuery)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/opcoes_querymap/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuery.criaJanelaFlutuante()","i3GEOF.opcoesQuery_script")}},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){if(typeof(i3GEOF.opcoesTamanho)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/opcoes_tamanho/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesTamanho.criaJanelaFlutuante()","i3GEOF.opcoesTamanho_script")}},tipoimagem:function(){if(typeof(i3GEOF.tipoimagem)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/tipoimagem/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.tipoimagem.criaJanelaFlutuante()","i3GEOF.tipoimagem_script")}},corFundo:function(){if(typeof(i3GEOF.gradeCoord)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/opcoes_fundo/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesFundo.criaJanelaFlutuante()","i3GEOF.opcoesFundo_script")}},opcoesEscala:function(){if(typeof(i3GEOF.opcoesEscala)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/opcoes_escala/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesEscala.criaJanelaFlutuante()","i3GEOF.opcoesEscala_script")}},opcoesLegenda:function(){if(typeof(i3GEOF.opcoesLegenda)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/opcoes_legenda/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesLegenda.criaJanelaFlutuante()","i3GEOF.opcoesLegenda_script")}},gradeCoord:function(){if(typeof(i3GEOF.gradeCoord)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/gradecoord/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.gradeCoord.criaJanelaFlutuante()","i3GEOF.gradeCoord_script")}},cliqueTexto:function(){if(typeof(i3GEOF.inseretxt)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/inseretxt/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.inseretxt.criaJanelaFlutuante()","i3GEOF.inseretxt_script")}},selecao:function(){if(typeof(i3GEOF.selecao)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/selecao/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.selecao.criaJanelaFlutuante()","i3GEOF.selecao_script")}},cliquePonto:function(){if(typeof(i3GEOF.inserexy)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/inserexy2/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.inserexy.criaJanelaFlutuante()","i3GEOF.inserexy_script")}},cliqueGrafico:function(){if(typeof(i3GEOF.insereGrafico)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/inseregrafico/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.insereGrafico.criaJanelaFlutuante()","i3GEOF.insereGrafico_script")}},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j++){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="padrao"){$i("img").style.cursor="wait"}retorna=function(retorno){var temp,rfes,n,balloon,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;try{retorno=retorno.data;if(retorno!==""){res="";temas=retorno;ntemas=temas.length;for(j=0;j<ntemas;j++){titulo=temas[j].nome;if(i3GEO.configura.tipotip==="completo"||i3GEO.configura.tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";for(r=0;r<ntips;r++){ds=temas[j].resultado.dados;if(ds!==" "){nds=ds.length;for(s=0;s<nds;s++){eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(i3GEO.configura.tipotip==="completo"||i3GEO.configura.tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}}}if(ins!==""){res=res+titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}return}else{if(i3GEO.configura.tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{i3GEO.util.criaPin('marcaIdentifica',i3GEO.configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();balloon.delayTime=0;res="<div style=text-align:left >"+res+"</div>";balloon.showTooltip($i("marcaIdentifica"),res);$i('marcaIdentifica').onclick=$i("closeButton").onclick}}}if(i3GEO.Interface.ATUAL==="padrao"){temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}}catch(e){if(i3GEO.Interface.ATUAL==="padrao"){temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5")}}};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.tema={exclui:function(tema){g_operacao="excluitema";var p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p);i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.excluitema(i3GEO.atualiza,tema);i3GEO.mapa.ativaTema("")},fonte:function(tema){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(retorno){i3GEO.janela.fechaAguarde();if(retorno.data!=="erro"){window.open(retorno.data)}else{alert("Não existe fonte registrada para esse tema")}};i3GEO.php.fontetema(temp,tema)},sobe:function(tema){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.sobetema(i3GEO.atualiza,tema)},desce:function(tema){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.descetema(i3GEO.atualiza,tema)},zoom:function(tema){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){g_operacao="limpasel";i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.limpasel(i3GEO.atualiza,tema)},mudatransp:function(idtema){g_operacao="transparencia";var valor;if($i("tr"+idtema)){valor=$i("tr"+idtema).value}else{alert("Ocorreu um erro")}if(valor!==""){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.mudatransp(i3GEO.atualiza,idtema,valor)}else{alert("Valor não definido.")}},mudanome:function(idtema){g_operacao="mudanome";var valor;if($i("nn"+idtema)){valor=$i("nn"+idtema).value}else{alert("Ocorreu um erro")}if(valor!==""){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert("Nome não definido")}},mostralegendajanela:function(idtema,nome,tipoOperacao){var retorna,janela;if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}retorna=function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda};if(!$i("janelaLegenda"+idtema)){janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(retorna,idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},dialogo:{abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}},graficotema:function(idtema){if(typeof(i3GEOF.graficoTema)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/graficotema/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.graficoTema.criaJanelaFlutuante()","i3GEOF.graficoTema_script")}},toponimia:function(idtema){if(typeof(i3GEOF.toponimia)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/toponimia/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.toponimia.criaJanelaFlutuante()","i3GEOF.toponimia_script")}},filtro:function(idtema){if(typeof(i3GEOF.filtro)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/filtro/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.filtro.criaJanelaFlutuante()","i3GEOF.filtro_script")}},procuraratrib:function(idtema){if(typeof(i3GEOF.busca)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/busca/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.busca.criaJanelaFlutuante()","i3GEOF.busca_script")}},tabela:function(idtema){if(typeof(i3GEOF.tabela)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/tabela/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.tabela.criaJanelaFlutuante()","i3GEOF.tabela_script")}},etiquetas:function(idtema){if(typeof(i3GEOF.etiqueta)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/etiqueta/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.etiqueta.criaJanelaFlutuante()","i3GEOF.etiqueta_script")}},editaLegenda:function(idtema){if(typeof(i3GEOF.legenda)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/legenda/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.legenda.criaJanelaFlutuante()","i3GEOF.legenda_script")}},download:function(idtema){if(typeof(i3GEOF.download)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/download/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.download.criaJanelaFlutuante('"+idtema+"')","i3GEOF.download_script")}},sld:function(idtema){i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' > </a>")},editorsql:function(idtema){if(typeof(i3GEOF.editorsql)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/editorsql/index.js.php";i3GEO.mapa.ativaTema(idtema);i3GEO.util.scriptTag(js,"i3GEOF.editorsql.criaJanelaFlutuante('"+idtema+"')","i3GEOF.editorsql_script")}}}};
if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.analise={dialogo:{graficoInterativo:function(){if(typeof(i3GEOF.graficointerativo)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/graficointerativo/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.graficointerativo.criaJanelaFlutuante()","i3GEOF.graficointerativo_script")}},gradePontos:function(){if(typeof(i3GEOF.gradeDePontos)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/gradepontos/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.gradeDePontos.criaJanelaFlutuante()","i3GEOF.gradeDePontos_script")}},gradePol:function(){if(typeof(i3GEOF.gradeDePontos)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/gradepol/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.gradeDePoligonos.criaJanelaFlutuante()","i3GEOF.gradeDePoligonos_script")}},gradeHex:function(){if(typeof(i3GEOF.gradeDeHex)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/gradehex/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.gradeDeHex.criaJanelaFlutuante()","i3GEOF.gradeDePoligonos_script")}},analisaGeometrias:function(){if(typeof(i3GEOF.analisaGeometrias)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/analisageometrias/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.analisaGeometrias.criaJanelaFlutuante()","i3GEOF.analisaGeometrias_script")}},pontosdistri:function(){if(i3GEO.parametros.r=="nao"){alert("Opção não disponível")}else{if(typeof(i3GEOF.pontosDistri)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/pontosdistri/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.pontosDistri.criaJanelaFlutuante()","i3GEOF.pontosDistri_script")}}},pontoempoligono:function(){if(typeof(i3GEOF.pontoEmPoligono)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/pontoempoligono/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.pontoEmPoligono.criaJanelaFlutuante()","i3GEOF.pontoEmPoligono_script")}},nptPol:function(){if(typeof(i3GEOF.nptpol)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/nptpol/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.nptpol.criaJanelaFlutuante()","i3GEOF.nptpol_script")}},buffer:function(){if(typeof(i3GEOF.buffer)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/buffer/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.buffer.criaJanelaFlutuante()","i3GEOF.buffer_script")}},distanciaptpt:function(){if(typeof(i3GEOF.distanciaptpt)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/distanciaptpt/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.distanciaptpt.criaJanelaFlutuante()","i3GEOF.distanciaptpt_script")}},centroide:function(){if(typeof(i3GEOF.centroide)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/centroide/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.centroide.criaJanelaFlutuante()","i3GEOF.centroide_script")}},dissolve:function(){if(typeof(i3GEOF.agrupaElementos)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/dissolve/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.dissolve.criaJanelaFlutuante()","i3GEOF.dissolve_script")}},agrupaElementos:function(){if(typeof(i3GEOF.agrupaElementos)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/agrupaelementos/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.agrupaElementos.criaJanelaFlutuante()","i3GEOF.agrupaElementos_script")}}},medeDistancia:{inicia:function(){pontosdistobj=[];i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}$i("mostradistancia").style.display="block";i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px";g_tipoacao="mede"}else{i3GEO.desenho.richdraw.fecha();if($i("mostradistancia")){$i("mostradistancia").style.display="none"}if($i("pontosins")){$i("pontosins").style.display="none"}}},criaJanela:function(){var novoel,ins,imagemxy;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" > <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" > </a></div>';ins+='<div class="bd" style="text-align:left;padding:3px;" >';ins+='<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>';ins+='<div style="text-align:left;font-size:10px" >';ins+="<span style='color:navy;cursor:pointer;text-align:left;' >";ins+="<table><tr><td><input style='cursor:pointer' type='checkbox' id='pararraios' checked /></td><td>Raios</td><td> </td>";ins+="<td><input style='cursor:pointer' type='checkbox' id='parartextos' checked /></td><td>Textos<td></tr></table></span>";ins+='</div>';ins+='</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}else{if($i("mostradistancia_calculo")){$i("mostradistancia_calculo").innerHTML=""}}YAHOO.namespace("janelaDocamede.xp");YAHOO.janelaDocamede.xp.panel=new YAHOO.widget.Panel("mostradistancia",{width:300,fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.janelaDocamede.xp.panel.render();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));YAHOO.janelaDocamede.xp.panel.moveTo(imagemxy[0]+150,imagemxy[1]);YAHOO.util.Event.addListener(YAHOO.janelaDocamede.xp.panel.close,"click",i3GEO.analise.medeDistancia.fechaJanela)},fechaJanela:function(){i3GEO.desenho.richdraw.fecha();if($i("pontosins")){document.body.removeChild($i("pontosins"))}YAHOO.util.Event.removeListener(YAHOO.janelaDocamede.xp.panel.close,"click");i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.barraDeBotoes.ativaBotoes()},clique:function(){var n,d;if(g_tipoacao=="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}else{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}catch(e){}if(n>0){d=parseInt(i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy),10);pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if($i("pararraios")&&$i("pararraios").checked===true){i3GEO.desenho.aplica("insereCirculo","",n);if(navm){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}if($i("parartextos")&&$i("parartextos").checked===true){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}}i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.fechaJanela,"divGeometriasTemp")}},movimento:function(){var n,d,r,decimal,da,mostra;if(g_tipoacao=="mede"){if($i("mostradistancia")){$i("mostradistancia").style.display="block"}n=pontosdistobj.xpt.length;if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=i3GEO.calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=i3GEO.calculo.dd2dms(r,r);r=r[0];if(i3GEO.parametros.mapscale>500000){d=parseInt(d,10)}else{d=d+"";d=d.split(".");decimal=d[1].substr(0,3);d=d[0]+"."+decimal;d=d*1}da=d+pontosdistobj.dist[n-1];mostra=$i("mostradistancia_calculo");if(mostra){mostra.innerHTML=" Dist acum.= "+da+" atual= "+d+" km <br> Direção (DMS)= "+r}i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}},medeArea:{inicia:function(){var temp;i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}YAHOO.util.Event.addListener(YAHOO.janelaDocaarea.xp.panel.close,"click",i3GEO.analise.medeArea.fechaJanela);temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");g_areapixel=retorno.data;if(g_areapixel<0){alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema.")}else{alert("Clique no mapa para desenhar o poligono. Clique duas vezes para concluir");i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="green";i3GEO.desenho.richdraw.lineWidth="2px"}};if(i3GEO.Interface.ATUAL=="padrao"){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.areaPixel(temp,i3GEO.parametros.pixelsize)}else{alert("Operacao nao disponivel")}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins="<div class='hd' >Área aproximada <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=6&idajuda=51' > </a></div>";ins+='<div class="bd" style="text-align:left;padding:3px;" >';ins+='<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>';ins+='</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}YAHOO.namespace("janelaDocaarea.xp");YAHOO.janelaDocaarea.xp.panel=new YAHOO.widget.Panel("mostraarea",{width:220,fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.janelaDocaarea.xp.panel.render();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));YAHOO.janelaDocaarea.xp.panel.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){i3GEO.desenho.richdraw.fecha();if($i("pontosArea")){document.body.removeChild($i("pontosArea"))}i3GEO.eventos.MOUSECLIQUE.remove("cliqueArea()");i3GEO.eventos.MOUSEMOVE.remove("moveArea()");i3GEO.barraDeBotoes.ativaBotoes()},clique:function(){var n,m;if(g_tipoacao=="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}else{pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n],(pontosdistobj.ximg[0])-(i3GEO.parametros.w/2),pontosdistobj.yimg[0])}}catch(e){}}try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}else{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}catch(e){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);if($i("mostraarea_calculo")){$i("mostraarea_calculo").innerHTML="<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2)}if(n>3){}i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.fechaJanela,"pontosArea")}},movimento:function(){var n,d,decimal,da;if(g_tipoacao=="area"){n=pontosdistobj.xpt.length;if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);if(i3GEO.parametros.mapscale>500000){d=parseInt(d,10)}else{d=d+"";d=d.split(".");decimal=d[1].substr(0,3);d=d[0]+"."+decimal;d=d*1}da=d+pontosdistobj.dist[n-1];if(navn){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,0)}i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:35,TOP:4,RIGHT:0,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef;if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(i3GEO.maparef.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;">';ins+='<span id=maparefmaismenosZoom > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";if(i3GEO.maparef.SELETORTIPO){ins+="<select id='refDinamico' onchange='javascript:i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="text-align:left;padding:3px;border-bottom-width:1px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;" id=imagemReferencia src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;document.body.appendChild(novoel);if(i3GEO.maparef.TRANSICAOSUAVE){novoel=$i("imagemReferencia");if(navm){novoel.style.filter='alpha(opacity='+i3GEO.maparef.OPACIDADE+')'}else{novoel.style.opacity=i3GEO.maparef.OPACIDADE/100}novoel.onmouseover=function(){if(navm){novoel.style.filter='alpha(opacity=100)'}else{novoel.style.opacity=1}};novoel.onmouseout=function(){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.maparef.OPACIDADE+')'}else{novoel.style.opacity=i3GEO.maparef.OPACIDADE/100}}}}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";YAHOO.namespace("janelaRef.xp");temp="none";if(i3GEO.maparef.PERMITEDESLOCAR){temp="shadow"}YAHOO.janelaRef.xp.panel=new YAHOO.widget.Panel("i3geo_winRef",{height:"200px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.janelaRef.xp.panel.render();r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 179px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;YAHOO.janelaRef.xp.panel.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(YAHOO.janelaRef.xp.panel.close,"click");YAHOO.janelaRef.xp.panel.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(YAHOO.janelaRef.xp.panel.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if(typeof(atualizaLocalizarxy)==="function"){if(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml){YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",atualizaLocalizarxy)}}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza();$i("i3geo_winRef_h").className="hd2"},atualiza:function(){var dinamico,tiporef,temp,re;dinamico=false;if($i("refDinamico")){tiporef=$i("refDinamico").value}else{tiporef="fixo"}if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(($i("imagemReferencia").src==="")||(i3GEO.parametros.cgi!=="sim")){i3GEO.php.referencia(i3GEO.maparef.processaImagem);if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference');i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src)}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{if($i("imagemReferencia")){i3GEO.gadgets.quadros.grava("referencia",$i("imagemReferencia").src)}i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var w,tiporef,m,novoel,boxrefdd,box;i3GEO.janela.fechaAguarde("ajaxreferencia1");if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;if($i("imagemReferencia")){m=new Image();m.src=refimagem;$i("imagemReferencia").src=m.src}i3GEO.gadgets.quadros.grava("referencia",refimagem);tiporef="fixo";if($i("refDinamico")){tiporef=$i("refDinamico").value}box=$i("boxref");if(tiporef!=="fixo"){if(box){box.style.display="none"}return}if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telaminxy,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref);x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref);ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};box=$i("boxref")}i3GEO.calculo.ext2rect("boxref",extentref,i3GEO.parametros.mapexten,g_celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120||w<10){box.style.display="none"}else{box.style.display="block";box.style.top=parseInt(box.style.top,10)+4;box.style.left=parseInt(box.style.left,10)+4}}},click:function(){try{i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}};
if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:"",TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(){window.open(i3GEO.configura.locaplic+"/documentacao/index.html")},abreJanela:function(){try{var nx,ny,pos,corpo,texto,janela;if(i3GEO.ajuda.ATIVAJANELA===false){return}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YAHOO.util.Dom.getXY(corpo);nx=pos[0]-267;ny=i3GEO.parametros.h-70}texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';janela=i3GEO.janela.cria("262","auto","",nx,ny," ","i3geo_janelaMensagens",false);janela[2].innerHTML=texto;YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);i3GEO.ajuda.ativaCookie()}}catch(e){}},ativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display=="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size==1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!=" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();var j=$i("i3geo_janelaMensagens_c");if(j){document.body.removeChild(j)}},mostraJanela:function(texto){var j,k;j=$i(i3GEO.ajuda.DIVAJUDA);if(j){if(texto===""){j.innerHTML="-"}else{j.innerHTML=texto}}else{k=$i("janelaMenTexto");if(k&&i3GEO.ajuda.TRANSICAOSUAVE){j=$i("i3geo_janelaMensagens");if(texto!==""){if(navm){j.style.filter='alpha(opacity=100)'}else{j.style.opacity=1}}else{if(navm){j.style.filter='alpha(opacity='+i3GEO.ajuda.OPACIDADE+')'}else{j.style.opacity=i3GEO.ajuda.OPACIDADE/100}}}if(k){k.innerHTML=texto}}},mostraLetreiro:function(){for(count=0;count<BPos;count++){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout('i3GEO.ajuda.mostraLetreiro();',140)}}};try{if(i3GEO.ajuda.MENSAGEMPADRAO===""){try{if(g_mensagempadrao!==""){i3GEO.ajuda.MENSAGEMPADRAO=g_mensagempadrao}else{i3GEO.ajuda.MENSAGEMPADRAO=$trad("p1")}}catch(e){i3GEO.ajuda.MENSAGEMPADRAO=$trad("p1")}}}catch(e){}if(document.getElementById("bannerMensagem")){i3GEO.ajuda.DIVLETREIRO="bannerMensagem"}
if(typeof(i3GEO)==='undefined'){i3GEO=[]}YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TIPS:[],ULTIMOZINDEX:0,prepara:function(){i3GEO.util.escondePin();i3GEO.util.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){var i,wlargura_,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr;if(i3GEO.janela.ANTESCRIA){for(i=0;i<i3GEO.janela.ANTESCRIA.length;i++){eval(i3GEO.janela.ANTESCRIA[i])}}if(arguments.length<7||id===""){id="wdoca";modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===7){modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===8){classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===9){funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===10){funcaoMinimiza=null}wlargura_=parseInt(wlargura,10)+0+"px";if($i(id)){YAHOO.janelaDoca.xp.panel.destroy()}if($i(id+"_c")){$i("i3geo").removeChild($i(id+"_c"))}if($i(id)){$i("i3geo").removeChild($i(id))}ins='<div id="'+id+'_cabecalho" class="hd" >';ins+="<img id='"+id+"_imagemCabecalho' style='position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />";ins+=texto;if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza' ></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="display:block;padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12;temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{$i(id+'_corpo').style.height=parseInt(waltura,10);if(navn){$i(id+'_corpo').style.width=parseInt(wlargura,10)-10}else{$i(id+'_corpo').style.width=parseInt(wlargura,10)-4}}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}if(waltura==="auto"){YAHOO.janelaDoca.xp.panel=new YAHOO.widget.Panel(id,{modal:modal,width:wlargura_,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{YAHOO.janelaDoca.xp.panel=new YAHOO.widget.ResizePanel(id,{iframe:false,underlay:underlay,modal:modal,width:wlargura_,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){pos=[nx,ny];YAHOO.janelaDoca.xp.panel.moveTo(pos[0],pos[1]+50)}YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);YAHOO.janelaDoca.xp.panel.render();if(modal===true){if($i(id+"_mask")){$i(id+"_mask").style.zIndex=9000}}if($i(id+"_c")){$i(id+"_c").style.zIndex=10000}if(i3GEO.Interface.ATUAL==="googleearth"){classe="bd"}temp=$i(id+'_cabecalho');temp.className=classe;if(funcaoCabecalho){temp.onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(YAHOO.janelaDoca.xp.panel.close,"click",i3GEO.janela.fecha,YAHOO.janelaDoca.xp.panel,{id:id},true);i3GEO.janela.ULTIMOZINDEX++;return([YAHOO.janelaDoca.xp.panel,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i;if(temp){if(temp.style.display==="block"){temp.style.display="none"}else{temp.style.display="block"}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}},fecha:function(event){var i,old;if(i3GEO.Interface.ATUAL==="googleearth"){}i3GEO.util.escondePin();i3GEO.util.escondeBox();if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}if($i("flamingoi")){$i("flamingoi").style.display="block"}if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if($i(this.id+"_c")){document.body.removeChild($i(this.id+"_c"))}if($i(this.id)){document.body.removeChild($i(this.id))}try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;if(this.id){eval(this.id+" = null;")}}old=$i(this.id+"_script");if(old!==null){old.parentNode.removeChild(old);old=null;eval("delete "+this.id)}}catch(erro){}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w;i.style.height=h}},abreAguarde:function(id,texto){var pos,index,contador;document.body.style.cursor="wait";if($i(id+"_mask")){document.body.removeChild($i(id+"_mask"))}if($i(id+"_c")){document.body.removeChild($i(id+"_c"))}YAHOO.namespace("aguarde."+id);pos=[0,0];if($i("corpoMapa")){pos=YAHOO.util.Dom.getXY($i("corpoMapa"))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>";contador="";for(index=0;index<i3GEO.contadorAtualiza;index++){contador=contador+"."}eval('YAHOO.aguarde.'+id+' = new YAHOO.widget.Panel("'+id+'",{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:'+i3GEO.janela.AGUARDEMODAL.toString()+',monitorresize:false})');if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){eval('YAHOO.aguarde.'+id+'.setBody(texto)');eval('YAHOO.aguarde.'+id+'.body.style.padding="5px"')}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){eval('YAHOO.aguarde.'+id+'.setHeader("<span><img id=aguardeGifAberto src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span> <span style=font-size:8px >'+contador+'</span>")')}eval('YAHOO.aguarde.'+id+'.render(document.body)');if($i("flamingo")){eval('YAHOO.aguarde.'+id+'.moveTo(0,0)')}else{eval('YAHOO.aguarde.'+id+'.moveTo('+pos[0]+','+pos[1]+')')}eval('YAHOO.aguarde.'+id+'.show()');if($i(id+"_mask")){$i(id+"_mask").style.zIndex=5000}if($i(id+"_c")){$i(id+"_c").style.zIndex=6000}},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9;ist.left=objposicaocursor.telax-5;ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var tickSize,keyIncrement,scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,Dom,lang,slider,bg,thumb,valuearea,textfield;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;Dom=YAHOO.util.Dom;lang=YAHOO.lang;bg="slider-bg";thumb="slider-thumb";valuearea="slider-value";textfield="slider-converted-value";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;keyIncrement=20;tickSize=20;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},fechaAguarde:function(id){document.body.style.cursor="default";if(arguments.length>0){try{if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}if($i(id+"_c")){$i("i3geo").removeChild($i(id+"_c"))}if($i(id+"_mask")){$i("i3geo").removeChild($i(id+"_mask"))}}catch(e){}}else{try{if($i("ajaxdestaca_c")){i3GEO.janela.fechaAguarde("ajaxdestaca")}if($i("ajaxabrelente_c")){i3GEO.janela.fechaAguarde("ajaxabrelente")}if($i("ajaxiniciaParametros_c")){i3GEO.janela.fechaAguarde("ajaxiniciaParametros")}if($i("i3GEO.atualiza_c")){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}if($i("ajaxCorpoMapaEntorno_c")){i3GEO.janela.fechaAguarde("ajaxCorpoMapaEntorno")}if($i("ajaxCorpoMapa_c")){i3GEO.janela.fechaAguarde("ajaxCorpoMapa")}if($i("ajaxLegenda_c")){i3GEO.janela.fechaAguarde("ajaxLegenda")}if($i("ajaxReferencia_c")){i3GEO.janela.fechaAguarde("ajaxReferencia")}if($i("ajaxEscalaGrafica_c")){i3GEO.janela.fechaAguarde("ajaxEscalaGrafica")}if($i("montaMapa_c")){i3GEO.janela.fechaAguarde("montaMapa")}if($i("aguardedoc_c")){i3GEO.janela.fechaAguarde("aguardedoc")}if($i("ajaxCorpoMapa1_c")){i3GEO.janela.fechaAguarde("ajaxCorpoMapa1")}}catch(e){}}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");oBody.style.width=nNewWidth-nBodyOffset+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight}}}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){}
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.guias={CONFIGURA:{"temas":{titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{titulo:"+"+$trad("g1"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){ondeArvore="guia2obj";if(typeof(objmapa)!=='undefined'){if(typeof(objmapa.guiaMenu)!=='undefined'){ondeArvore=objmapa.guiaMenu+"obj"}}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{nome=mapa[ig1].NOME;if(mapa[ig1].PUBLICADO){if(mapa[ig1].PUBLICADO==="NAO"||mapa[ig1].PUBLICADO==="nao"){nome="<s>"+nome+"</s>"}}lkd=mapa[ig1].LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+mapa[ig1].TEMAS+"&layers="+mapa[ig1].LIGADOS;if(mapa[ig1].EXTENSAO!==""){link+="&mapext="+mapa[ig1].EXTENSAO}if(mapa[ig1].OUTROS!==""){link+="&"+mapa[ig1].OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+mapa[ig1].IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ATUAL:"temas",IDGUIAS:"guiasYUI",cria:function(onde){var onf,outf,guiaconteudo,id,guia,guias,nguias,g,re,ng,tituloguia,i,ins;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(i3GEO.guias.CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){eval("i3GEO.guias.CONFIGURA.guia"+g+"=[]");eval("i3GEO.guias.CONFIGURA.guia"+g+".titulo = '"+tituloguia+"'");eval("i3GEO.guias.CONFIGURA.guia"+g+".id = 'guia"+g+"'");eval("i3GEO.guias.CONFIGURA.guia"+g+".idconteudo = 'guia"+g+"obj'");if($i('guia'+g).onclick){eval("i3GEO.guias.CONFIGURA.guia"+g+".click = "+$i("guia"+g).onclick)}}}}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a href="#"><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins;onf=function(){var bcg,cor;bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"){bcg.background="#bfdaff"}};outf=function(){var bcg,cor;bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"){bcg.background="transparent"}};for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}guiaconteudo.onmouseover=onf;guiaconteudo.onmouseout=outf;temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";temp.style.height=i3GEO.parametros.h}}}i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)},ajustaAltura:function(){var guia,guias,nguias;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";guia.style.height=i3GEO.parametros.h}}},mostra:function(guia){var guias,nguias,g;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){if($i(i3GEO.guias.CONFIGURA[guia].idconteudo)){$i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display="block";$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.background="white";i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,letras,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(i3GEO.guias.IDGUIAS)){$i(i3GEO.guias.IDGUIAS).style.display="none"}i=$i("contemFerramentas");if(i){i.style.display="none"}w=parseInt($i("contemFerramentas").style.width,10);i=$i("visual");if(i){i.style.width="0px";i.innerHTML=""}pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;if(navm){pos=""}i=$i("img");if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i("corpoMapa");if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i=$i("contemImg");if(i){i.style.height=a+pos;i.style.width=l+pos}if(i3GEO.configura.entorno==="sim"){letras=["L","O"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}letras=["N","S"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w*2+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h*2+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w*3+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";temp='<div class="hd">Guias</div>';temp+='<div class="bd" id="conteudojanelaguias"></div>';novoel.innerHTML=temp;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}YAHOO.namespace("janelaguias.xp");YAHOO.janelaguias.xp.panel=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:false});YAHOO.janelaguias.xp.panel.render();i=$i(i3GEO.guias.IDGUIAS);$i("janelaguias").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("janelaguias").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.background="white";$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.border="1px solid black";$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.borderTop="0px solid black";$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.width="270px";$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.left="-1px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudatamanho(temp,a,l)}else{YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.show()}},mostraGuiaFerramenta:function(guia,namespace){var g;if(arguments.length===1){namespace="guia"}for(g=0;g<12;g++){if($i(namespace+g+"obj")){$i(namespace+g+"obj").style.display="none"}}if($i(guia+"obj")){$i(guia+"obj").style.display="block"}}};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,LIGARDESLIGARTODOS:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,CAMADAS:"",ARVORE:null,IDHTML:null,SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(arguments.length===5){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}this.SID=g_sid;this.LOCAPLIC=g_locaplic;if(onde!==""){this.IDHTML=onde}if(this.IDHTML===""){return}this.atualiza(temas);if(this.finaliza!=""){eval(this.finaliza)}},atualiza:function(temas){if(arguments.length===0){temas=this.CAMADAS;this.CAMADAS=""}if(this.comparaTemas(temas,this.CAMADAS)){return}var currentIconMode,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,incluidos=[];if(!document.getElementById(i3GEO.arvoreDeCamadas.IDHTML)){return}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).innerHTML="";this.CAMADAS=temas;YAHOO.example.treeExample=function(){function changeIconMode(){newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML);root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}buildTree()}();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){titulo+="<img id='i3geo_lixeira' title='"+$trad("t2")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(i3GEO.arvoreDeCamadas.LIGARDESLIGARTODOS===true){titulo+=" <img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />";titulo+=" <img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}titulo+="</td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;if(i3GEO.configura.grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i++){ltema=temas[i];d={html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema",idlegenda:ltema.name};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);if(i3GEO.arvoreDeCamadas.PERMITEEXPANDIRTEMAS===true){if(i3GEO.arvoreDeCamadas.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,currentIconMode)}else{temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}temaNode.expanded=i3GEO.arvoreDeCamadas.EXPANDIDA;temaNode.enableHighlight=false}}else{nk=temas.length;c=i3GEO.configura.grupoLayers.length;for(i=0;i<c;i++){d={html:"<b>"+i3GEO.configura.grupoLayers[i].nome+"</b>"};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.expanded=false;temaNode.enableHighlight=false;n=i3GEO.configura.grupoLayers[i].layers.length;for(j=0;j<n;j++){for(k=0;k<nk;k++){ltema=temas[k];if(ltema.name===i3GEO.configura.grupoLayers[i].layers[j]){d={html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,currentIconMode);temaNode.expanded=false;temaNode.enableHighlight=false;incluidos.push(ltema.name)}}}}d={html:"<b>Outros</b>"};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.expanded=false;temaNode.enableHighlight=false;c=incluidos.length;for(k=0;k<nk;k++){ltema=temas[k];n=false;for(j=0;j<c;j++){if(incluidos[j]===ltema.name){n=true}}if(n===false){d={html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,currentIconMode);temaNode.expanded=false;temaNode.enableHighlight=false}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){this.ativaDragDrop()}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}if(i3GEO.temaAtivo!==""){i3GEO.mapa.ativaTema(i3GEO.temaAtivo)}},ativaDragDrop:function(){var Dom,Event,DDM;Dom=YAHOO.util.Dom;Event=YAHOO.util.Event;DDM=YAHOO.util.DragDropMgr;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var ddtarget,i,ltema,ddlist;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){ddtarget=new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){ddlist=new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();if($i("i3geo_lixeira")){$i("i3geo_lixeira").style.border="0px solid blue"}},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,noid;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1"));tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.contadorAtualiza++;i3GEO.php.excluitema(i3GEO.atualiza,tema);i3GEO.mapa.ativaTema("")}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));destEl=Dom.get(id);noid=id.split("arrastar_")[1];destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");i3GEO.contadorAtualiza++;i3GEO.php.reordenatemas(i3GEO.atualiza,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y},onDragOver:function(e,id){var srcEl,destEl;srcEl=this.getEl();destEl=Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var d,conteudo,opcoesNode,idtema,ltema,farol,mfarol,tnome,iconesNode;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />";tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";tnome+=" <img class='sobe' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";tnome+=" <img class='desce' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";tnome+=" <img class='fonte' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";if((ltema.zoomtema==="sim")&&(i3GEO.Interface.ATUAL!=="flamingo")){tnome+=" <img class='extent' src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}d={html:tnome};iconesNode=new YAHOO.widget.HTMLNode(d,node,false,true);iconesNode.enableHighlight=false;iconesNode.isLeaf=true}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){conteudo=$trad("t18a");d={html:conteudo,idopcoes:ltema.name};opcoesNode=new YAHOO.widget.HTMLNode(d,node,false,true);opcoesNode.enableHighlight=false;opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true){conteudo=$trad("p3");d={html:conteudo,idlegenda:ltema.name};opcoesNode=new YAHOO.widget.HTMLNode(d,node,i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA,true);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1);opcoesNode.enableHighlight=false}node.loadComplete()},mostraOpcoes:function(node){var idtema,ltema,tnome,d,n;idtema=node.data.idopcoes;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+" <a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}d={html:tnome};n=new YAHOO.widget.HTMLNode(d,node,false,true);n.enableHighlight=false;n.isLeaf=true;if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","8","")+" <a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}d={html:tnome};n=new YAHOO.widget.HTMLNode(d,node,false,true);n.enableHighlight=false;n.isLeaf=true;if((ltema.type<3)&&(ltema.connectiontype!==7)){if(i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node);if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node);i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node);if(i3GEO.parametros.versaoms>4){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if(ltema.type<4){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t38"),$trad("t39"),'i3GEO.tema.dialogo.sld(\"'+ltema.name+'\")',node);if(ltema.editorsql=="sim"||ltema.editorsql=="SIM"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome,d,n;tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";d={html:tnome};n=new YAHOO.widget.HTMLNode(d,node,false,true);n.enableHighlight=false;n.isLeaf=true},mostraLegenda:function(node){var idtema,ltema,retorna;idtema=node.data.idlegenda;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);retorna=function(retorno){var original,i,re,tabela,linhas,linha,colunas,id,exp,incluir,d,nodeLeg,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");id=colunas[0]+"-"+colunas[1];re=new RegExp("'","g");exp=colunas[3].replace(re,'"');tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";d={html:incluir};nodeLeg=new YAHOO.widget.HTMLNode(d,node,false,false);nodeLeg.enableHighlight=false;node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},inverteStatusClasse:function(leg){var temp=function(){i3GEO.atualiza("")};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html;if(tema.status===2){ck=' CHECKED '}else{ck=""}html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='text-align:left;font-size:11px;' ><input class=inputsb style='cursor:pointer;' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";if(tema.contextoescala==="sim"){html+=" <img src="+i3GEO.util.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel==="sim"){html+=" <img src="+i3GEO.util.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img src="+i3GEO.util.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((tema.download==="sim")||(tema.download==="SIM")){html+=" <img src="+i3GEO.util.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+=" <span style='cursor:move' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span style='cursor:move' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala;farol="maisamarelo.png";l=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(l>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}if($i("farol"+ltema.name)){$i("farol"+ltema.name).src=i3GEO.configura.locaplic+"/imagens/"+farol}}while(l--)}},aplicaTemas:function(tipo){if(arguments.length==0){tipo="normal"}var t,temp,ligar,desligar;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca")}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca")}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(tipo==="normal"){ligar=t[0].toString();desligar=t[1].toString()}if(tipo==="ligartodos"){ligar=t[2].toString();desligar=""}if(tipo==="desligartodos"){ligar="";desligar=t[2].toString()}i3GEO.php.ligatemas(temp,desligar,ligar)},listaLigadosDesligados:function(tipo){if(arguments.length===0){tipo="manter"}var nos,ligados,desligados,todos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");ligados=[];desligados=[];todos=[];n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j++){c=cs[j];if(c.name==="layer"){if(c.checked===true){ligados.push(c.value)}else{desligados.push(c.value)}todos.push(c.value);if(tipo==="marca"){c.checked=true}if(tipo==="desmarca"){c.checked=false}}}i++}catch(e){i++}}while(i<n);return([ligados,desligados,todos])},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i++){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema){var c,i,v="";c=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<c;i++){if(i3GEO.arvoreDeCamadas.CAMADAS[i].name===idtema){v=i3GEO.arvoreDeCamadas.CAMADAS[i]}}return v},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];temp=eval("ltema."+propriedade);if(operador==="igual"){if(temp===valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!==valor){resultado.push(ltema)}}i++}while(i<nelementos)}return resultado}};i3GEO.arvoreDeCamadas.IDHTML="listaTemas";
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,zoomin:function(locaplic,sid){if(arguments.length===2){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(arguments.length===2){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.contadorAtualiza++;i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+");";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.janela.abreAguarde('i3GEO.atualiza',$trad('o1'));i3GEO.contadorAtualiza++;i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="padrao"){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"i3GEO.php.mudaescala(i3GEO.atualiza,"+escala+");";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x,y,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}if(direcao==="norte"){y=h/6;x=w/2}if(direcao==="sul"){y=h-(h/6);x=w/2}if(direcao==="leste"){x=w-(w/6);y=h/2}if(direcao==="oeste"){x=w/6;y=h/2}if(direcao==="nordeste"){y=h/6;x=w-(w/6)}if(direcao==="sudeste"){y=h-(h/6);x=w-(w/6)}if(direcao==="noroeste"){y=h/6;x=w/6}if(direcao==="sudoeste"){y=h-(h/6);x=w/6}f="i3GEO.navega.timerNavega = null;i3GEO.janela.abreAguarde('i3GEO.atualiza','"+$trad('o1')+"');"+"i3GEO.contadorAtualiza++;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27;i.style.left=objposicaocursor.telax-27;i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa opção.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.contadorAtualiza++;i3GEO.atualiza("");i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0;i.height=0;i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+g_postpx;i.top=objposicaocursor.telay+g_postpx;boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel,temp;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2}if(hb>2){b.height=hb-2}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel);if(i3GEO.Interface.ATUAL==="padrao"){$i("img").title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"zoom","i3geoboxZoom",i3GEO.configura.locaplic);temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}}},desloca:function(){var bxs,ppx,py;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,limpa,f;if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom").style;bxs.display="none";bxs.visibility="hidden";bxs.width=0;bxs.height=0};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},entorno:{ativaDesativa:function(){var letras,l;if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}if(i3GEO.configura.entorno==="sim"){letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.display="none";$i("img"+letras[l]).src=""}}$left("img",0);$top("img",0);i3GEO.configura.entorno="nao";alert("Entorno desativado");$i("img").style.visibility="visible";$i("img").style.display="block"}else{i3GEO.navega.entorno.geraURL();letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w;$i("img"+letras[l]).style.height=i3GEO.parametros.h;$i("img"+letras[l]).style.display="block"}}i3GEO.configura.entorno="sim";i3GEO.navega.entorno.ajustaPosicao();alert("Entorno ativado. o desenho do mapa pode demorar mais.")}},geraURL:function(){var nny,nnx,sy,sx,lx,ly,ox,oy,u,sul,norte,leste,oeste;nny=(i3GEO.parametros.h/2)*-1;nnx=i3GEO.parametros.w/2;sy=i3GEO.parametros.h+(i3GEO.parametros.h/2);sx=i3GEO.parametros.w/2;lx=i3GEO.parametros.w+(i3GEO.parametros.w/2);ly=i3GEO.parametros.h/2;ox=(parseInt(i3GEO.parametros.w/2,10))*-1;oy=i3GEO.parametros.h/2;u=window.location.protocol+"\/\/"+window.location.host+i3GEO.parametros.cgi+"?map="+i3GEO.parametros.mapfile;u+="&mode=map&imgext="+i3GEO.parametros.mapexten+"&mapsize="+nnx+" "+oy;sul=u+"&imgxy="+sx/2+" "+sy/2;norte=u+"&imgxy="+nnx/2+" "+nny/2;leste=u+"&imgxy="+lx/2+" "+ly/2;oeste=u+"&imgxy="+ox/2+" "+oy/2;$i("imgS").src=sul;$i("imgN").src=norte;$i("imgL").src=leste;$i("imgO").src=oeste},ajustaPosicao:function(){$left("img",i3GEO.parametros.w*-1);$left("imgS",i3GEO.parametros.w*-1);$left("imgL",i3GEO.parametros.w);$left("imgO",i3GEO.parametros.w*-3);$left("imgN",i3GEO.parametros.w*-1);$top("img",i3GEO.parametros.h*-1);$top("imgS",i3GEO.parametros.h*-1);$top("imgL",i3GEO.parametros.h*-1);$top("imgN",i3GEO.parametros.h*-1);$top("imgO",i3GEO.parametros.h*-1)}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1'+g_postpx;temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5;olenteimg.style.height=volta[1]*1.5;olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i("corpoMapa"));eval("olente.style."+g_tipoleft+" = pos[0] + i3GEO.navega.lente.POSICAOX + g_postpx");eval("olente.style."+g_tipotop+" = pos[1] + i3GEO.navega.lente.POSICAOY + g_postpx");eval("oboxlente.style."+g_tipoleft+" = pos[0] + i3GEO.navega.lente.POSICAOX + g_postpx");eval("oboxlente.style."+g_tipotop+" = pos[1] + i3GEO.navega.lente.POSICAOY + g_postpx");oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.janela.abreAguarde("ajaxabrelente",$trad("o1"));i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos,esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i("img"))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-40)+" "+(esq+40)+" "+(topo+40)+" "+(esq-40)+")";i=$i("lente").style;i.clip=clipt;eval("i."+g_tipotop+"= (pos[1] - (topo - 40)) + g_postpx");eval("i."+g_tipoleft+"= (pos[0] - (esq - 40)) + g_postpx")}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela;if(!$i("img_d")){novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt($i("corpoMapa").style.left,10);$i("div_d").style.top=parseInt($i("corpoMapa").style.top,10);$i("img_d").style.left=0;$i("img_d").style.top=0;$i("img_d").style.width=i3GEO.parametros.w;$i("img_d").style.height=i3GEO.parametros.h;$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(150,0,"","center","center","Parar destaque ","ativadesativaDestaque");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.janela.abreAguarde("ajaxdestaca","Aguarde...gerando imagem");i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout("g_fatordezoom = 0;$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR)};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.timerNavega)}i3GEO.navega.timerNavega=setTimeout("g_fatordezoom = 0;$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR)};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);g_fatordezoom=0;verticalSlider.setValue(35,true)}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=corpo.style.top;iclone.style.left=corpo.style.left;$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){var iclone,corpo,nt,nl,velhoh,velhow,nh,nw,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw;iclone.style.height=nh;if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}}}}};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){i3GEO.eventos.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUE)},executaEventos:function(eventos){try{var f,temp;if(eventos.length>0){f=eventos.length-1;if(f>=0){do{eval(eventos[f])}while(f--)}}}catch(e){}},posicaoMouseMapa:function(e){var teladd,teladms,container,targ,pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;try{container=e.target.parentNode.id}catch(erro){}if(container!=="divGeometriasTemp"){if((i3GEO.Interface.ATUAL==="googlemaps")||(i3GEO.Interface.ATUAL==="openlayers")){return}}if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if((i3GEO.configura.entorno==="sim")&&(g_panM==="sim")){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout('i3GEO.eventos.mouseParado()',i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k;if(navm){k=event.button}else{k=exy.button}if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){if(arguments.length===0){var ixg="ixg",ixm="ixm",ixs="ixs",iyg="iyg",iym="iym",iys="iys",x,y;if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}else{var doc=document;x,y}if(g_tipoacao!=="capturaponto"){return}else{try{x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}catch(m){}}}};
if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true},FATORESTRELA:"1",INCLUISISTEMAS:true,INCLUIWMS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",IDHTML:null,LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,cor,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;cor="rgb(51, 102, 102)";for(i=0;i<nraiz;i++){html="<span style='color:"+cor+"' title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1);tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,tempNodeS;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i++){cabeca=retorno.data[i].nome+" - "+retorno.data[i].titulo;if(cabeca!="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:retorno.data[i].nome},node,false,true);tempNode.enableHighlight=false;if(!retorno.data[i].estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(retorno.data[i].estilos){ns=retorno.data[i].estilos.length;for(j=0;j<ns;j++){tempNodeS=new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,retorno.data[i].nome,retorno.data[i].estilos[j].nome,retorno.data[i].estilos[j].titulo,retorno.data[i].srs.toString(),retorno.data[i].formatsinfo.toString(),retorno.data[i].version.toString(),retorno.data[i].formats.toString(),cor)},tempNode,false,true);tempNode.isleaf=true;tempNodeS.enableHighlight=false}}if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="javascript:i3GEO.janela.abreAguarde(\"ajaxredesenha\",\""+$trad("o1")+"\");this.checked=false;i3GEO.php.adicionaTemaWMS("+temp+",";adiciona+="\""+servico+"\",";adiciona+="\""+layer+"\",";adiciona+="\""+estilo+"\",";adiciona+="\""+proj+"\",";adiciona+="\""+formatoimg+"\",";adiciona+="\""+versao+"\",";adiciona+="\""+titulo+"\",";adiciona+="\"\",";adiciona+="\"nao\",";adiciona+="\""+formatoinfo+"\")";html+="onclick='"+adiciona+"' ";html+=" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >";html+=layer+" - "+titulo;html+="</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i++){for(k=0,jj=m;k<jj;k++){if(retorno.data[i].idmenu==i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(funcao!==""){funcao.call()}};i3GEO.php.listadrives(retorno)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes){if(this.ARVORE){return}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}var nargs=arguments.length;if(nargs==4||nargs==5){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(nargs==5){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}this.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){this.ARVORE=null;this.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)},montaArvore:function(){var newVal,currentIconMode,d,tempNode,retorno,nomeSis,root,insp,outrasOpcoes,dados,c,i,j,conteudo;YAHOO.example.treeExample=function(){function changeIconMode(){newVal=parseInt(this.value,10);if(newVal!=currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML);tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}buildTree()}();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>";insp+="<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>";insp+="<td><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>";insp+="<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" title='"+$trad("a1")+"' src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema(document.getElementById(\"i3geo_buscatema\").value)' style='cursor:pointer;top:2px;position:relative;' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp},root,false,false);tempNode.enableHighlight=false}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>"},root,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>"},root,false,true);tempNode.enableHighlight=false;drives=i3GEO.arvoreDeTemas.DRIVES;iglt=drives.length;ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho},tempNode,false,true);drive.enableHighlight=false;drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig++}while(ig<iglt)};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='../admin' target=blank >Sistema de administração</a>",idmenu:""},root,false,true);tempNode.enableHighlight=false;tempNode=new YAHOO.widget.HTMLNode({html:"<a href='../admin/html/arvore.html' target=blank >Editor de menus</a>",idmenu:""},root,false,true);tempNode.enableHighlight=false}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){tempNode=new YAHOO.widget.HTMLNode({html:"<b> OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>",idwms:"raiz"},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i++){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!="nao"){conteudo="<b> <span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"}else{conteudo="<b> <span title='nao publicado' style=color:red; >"+dados[i].nomemenu+"</span>"}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu},root,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,currentIconMode);if(dados[i].status=="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>"},root,false,true);tempNode.enableHighlight=false}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO=="NAO"||sis[ig].PUBLICADO=="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis},tempNode,false,true);sisNode.enableHighlight=false;funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2++){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc},sisNode,false,true);funcNode.enableHighlight=false;funcNode.isLeaf=true}ig++}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){i3GEO.arvoreDeTemas.ARVORE.draw()}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,html,i,d;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i++){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download=="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc=="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}}for(i=0;i<c;i++){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download=="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc=="nao"){mostra=false}if(mostra){if(grupos[i].publicado){if(grupos[i].publicado=="NAO"){grupos[i].nome="<span title='nao publicado' style=color:red; >"+grupos[i].nome+"</span>"}}d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i++){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download=="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc=="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}}for(i=0;i<c;i++){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download=="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc=="nao"){mostra=false}if(mostra){if(subgrupos[i].publicado){if(subgrupos[i].publicado=="NAO"){subgrupos[i].nome="<span title='nao publicado' style=color:red; >"+subgrupos[i].nome+"</span>"}}d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i++){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download=="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc=="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado=="NAO"){temas[i].nome="<span title='nao publicado' style=color:red; >"+temas[i].nome+"</span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false;if(cor=="rgb(51, 102, 102)"){cor="rgb(47, 70, 50)"}else{cor="rgb(51, 102, 102)"}}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig++){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+conteudo},node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);tempNode.enableHighlight=false}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig++){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";nodeSHP=new YAHOO.widget.HTMLNode({html:conteudo,caminho:node.data.caminho+"/"+conteudo},node,false,true);nodeSHP.enableHighlight=false;nodeSHP.isLeaf=true}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}html+=" type='checkbox' value='"+tema.tid+"' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;color:"+cor+";padding-left:3px;' >";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte!==""&&node.data.fonte!=" "){tempNode=new YAHOO.widget.HTMLNode({html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";tempNode=new YAHOO.widget.HTMLNode({html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(node.data.ogc!="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz=="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({html:"<a title='' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}if(n>0){html="<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>"}else{html="<img src='"+i3GEO.util.$im("e0.png")+"'/>"}tempNode=new YAHOO.widget.HTMLNode({html:html},node,false,true);tempNode.enableHighlight=false;tempNode.isLeaf=true}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0;if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh===true){ins+="<td><img class='refresh' onclick='i3GEO.arvoreDeTemas.atualiza()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='Refresh'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img class='uploaddbf' onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a2b")+"'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.upload()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a2")+"'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' class='download' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a3")+"'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms===true){ins+="<td><img class='conectarwms' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a4")+"'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img class='conectarwmst' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a4b")+"'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img class='conectargeorss' onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a5")+"'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.carousel===true){ins+="<td><img class='carouselTemas' onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title=''/><td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i++}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i++}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk;if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!="erro")&&(retorno!==undefined)){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg++){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st++){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download=="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc=="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!=" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta++}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(){var tsl,temp;clearTimeout(tempoBotaoAplicar);tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");tsl=i3GEO.arvoreDeTemas.listaTemasAtivos();i3GEO.arvoreDeTemas.desativaCheckbox();if(tsl.length>0){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));temp=function(retorno){i3GEO.janela.fechaAguarde("i3GEO.atualiza");if(retorno.data.erro){alert(retorno.data.erro);return}i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!=i3GEO.guias.ATUAL){i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig++){if(ob[ig].publicado!="nao"&&ob[ig].publicado!="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var obGrupos,ins,ig;obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig++){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig++){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>";if(retorno.data.temas[i]){sg=retorno.data.temas;for(ig=0;ig<sg.length;ig++){ins+="<option value="+sg[ig].tid+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)},dialogo:{carouselTemas:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")}},nuvemTags:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")}},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' > </a>")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' > </a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' > </a>")},upload:function(){if(typeof(i3GEOF.upload)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/upload/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")}},uploaddbf:function(){if(typeof(i3GEOF.uploaddbf)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")}},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}};
if(typeof(i3GEO)=='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaIcone:function(icone){var estilo,temp,ist,cor,ko;i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO=="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo=="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="laranja"||i3GEO.barraDeBotoes.COMPORTAMENTO=="vermelho"||i3GEO.barraDeBotoes.COMPORTAMENTO=="cinza"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="laranja"){cor="orange"}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="vermelho"){cor="red"}if(i3GEO.barraDeBotoes.COMPORTAMENTO=="cinza"){cor="gray"}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b;if(arguments.length===0){padrao=i3GEO.barraDeBotoes.BOTAOPADRAO}i3GEO.barraDeBotoes.BOTAOCLICADO=padrao;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{if($i(l[b].iddiv)){if(l[b].conteudo){eval('$i(l[b].iddiv).innerHTML = "'+l[b].conteudo+'"')}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(){i3GEO.ajuda.mostraJanela("'+l[b].dica+'","");}');eval('$i("'+l[b].iddiv+'").onmouseout = function(){i3GEO.ajuda.mostraJanela("");};')}if(l[b].funcaoonclick){$i(l[b].iddiv).onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}}while(b--)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y){var tipo,mostra,numerobotoes=0,i,temp,elementos,nelementos=0,e,wj,recuo,novoel,alturadisponivel;if(i3GEO.barraDeBotoes.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><caption style="text-align:center"> </caption><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+"<p style='font-size:4px;'> </p>"+'<img title="zoom" alt="zoom" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+"<p style='font-size:4px;'> </p>"+'<img title="desloca" alt="desloca" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+"<p style='font-size:4px;'> </p>"+'<img title="geral" alt="geral" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){novoel=document.createElement("div");novoel.id="barraDeBotoes2";temp="<table style='width:100%'><caption style='text-align:center'> </caption>"+" <tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='sobeferramentas'/></td></tr>"+" </table>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:2px;'> </p>"+" <img title='identifica' alt='identifica' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='identifica'/>"+" </div>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='info' alt='info' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='identificaBalao'/>"+" </div>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='mede' alt='mede' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='mede'/>"+" </div>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='area' alt='area' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='area'/>"+" </div>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='imprimir' alt='imprimir' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='imprimir'/>"+" </div>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='reinicia' alt='reinicia' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='reinicia'/>"+" </div>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='extensao' alt='extensao' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='exten'/>"+" </div> "+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='referencia' alt='referencia' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='referencia'/>"+" </div> "+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='insere xy' alt='insere xy' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='inserexy'/>"+" </div> "+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='texto' alt='texto' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='textofid'/>"+" </div>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='selecao' alt='selecao' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='selecao'/>"+" </div>"+" <div style='display:inline;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='google' alt='google' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='google'/>"+" </div>"+" <div style='display:none;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='fotos' alt='fotos' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='buscafotos'/>"+" </div>"+" <div style='display:none;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='busca na wikipedia' alt='busca na wikipedia' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='wiki'/>"+" </div>"+" <div style='display:none;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='lente' alt='lente' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='lentei'/>"+" </div>"+" <div style='display:none;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='confluencias' alt='confluencias' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='confluence'/>"+" </div>"+" <div style='display:none;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='Insere gráficos' alt='Insere gráficos' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='inseregrafico'/>"+" </div> "+" <div style='display:none;background-color:rgb(250,250,250);'>"+" <p style='font-size:4px;'> </p>"+" <img title='3d' alt='3d' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='v3d'/>"+" </div>"+" <table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><p style='font-size:2px;'> </p><img title='desce' alt='' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='desceferramentas'/></td></tr></table>";novoel.innerHTML=temp;document.body.appendChild(novoel)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(i3GEO.barraDeBotoes.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.OPACIDADE+')'}else{novoel.style.opacity=i3GEO.barraDeBotoes.OPACIDADE/100}}else{if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=0.85}}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:-6px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){if($i("i3geo_rosa")){$i("i3geo_rosa").style.display="none"}if(i3GEO.barraDeBotoes.OPACIDADE){if(navm){novoel.style.filter='alpha(opacity=90)'}else{novoel.style.opacity=0.85}}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){if(navm){novoel.style.filter='alpha(opacity='+i3GEO.barraDeBotoes.OPACIDADE+')'}else{novoel.style.opacity=i3GEO.barraDeBotoes.OPACIDADE/100}}};document.body.appendChild(novoel);if(i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";alturadisponivel=i3GEO.parametros.h-4;numerobotoes=parseInt(alturadisponivel/35,10);elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id=="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{elementos[i].style.display="inline";i=i+1}while(i<numerobotoes-1)}catch(e){}if(elementos.length<=numerobotoes){if($i("sobeferramentas")){$i("sobeferramentas").style.display="none"}if($i("desceferramentas")){$i("desceferramentas").style.display="none"}}}}}YAHOO.namespace("janelaBotoes.xp");if(i3GEO.barraDeBotoes.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{height:i3GEO.parametros.h-4,width:wj,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}if(i3GEO.barraDeBotoes.SOICONES===true){temp=$i("i3geo_barra2");if(temp){temp.style.borderWidth="0 0 0 0"}temp=$i("i3geo_barra1");if(temp){temp.style.borderWidth="0 0 0 0"}}if((barraZoom===true)&&i3GEO.Interface.ATUAL=="padrao"){i3GEO.navega.barraDeZoom.ativa()}YAHOO.janelaBotoes.xp.panel.render();if(i3GEO.barraDeBotoes.AUTOALTURA===true){y=y-i3GEO.Interface.BARRABOTOESTOP+2;x=x-3}YAHOO.janelaBotoes.xp.panel.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display=="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display==tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display=="block")||(e.style.display=="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display==tipo){break}if(e.style.display=="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}i3GEO.barraDeBotoes.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO){i3GEO.barraDeBotoes.ativaMenuContexto(idconteudonovo)}if($i(idconteudonovo+"_h")){$i(idconteudonovo+"_h").className="hd2"}},ativaMenuContexto:function(idbarra){var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender,id;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" <span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){eval("var id = 'contexto_"+idbarra+"'");$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){var n,i;if(arguments.length==1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i++){i3GEO.barraDeBotoes.BARRAS[i].show()}}},recria:function(id){var n,temp,novoel,barraZoom,x,y;n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i++){if(i3GEO.barraDeBotoes.BARRAS[i].id==id){temp=$i("contexto_"+id);if(temp){temp.parentNode.removeChild(temp)}novoel=document.createElement("div");novoel.id="barraTemporaria"+i;novoel.innerHTML=$i(i3GEO.barraDeBotoes.BARRAS[i].id+"_").innerHTML;document.body.appendChild(novoel);barraZoom=false;temp=$i("vertMaisZoom");if(temp){if(navm){temp=temp.parentNode}else{temp=temp.parentNode.parentNode}if(temp.id==id){barraZoom=true}}x=parseInt($i(i3GEO.barraDeBotoes.BARRAS[i].id+"_c").style.left,10);y=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+10;i3GEO.barraDeBotoes.BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,i3GEO.barraDeBotoes.BARRAS[i].id+"x",barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i++){if(i3GEO.barraDeBotoes.BARRAS[i].id==id){$i(id+"_c").style.visibility="hidden"}}}};
function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){pontosdistobj=new pontosdist();elem.innerHTML="";elem.style.display="none";if(g_tipoacao=="mede"){mudaiconf("pan")}if(document.getElementById("mostradistancia")){document.getElementById("mostradistancia").style.display="none"}}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};
function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"},"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida"},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraVersao":{idhtml:"versaoi3geo"}},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}var temp=$i(id);try{temp.innerHTML=i3GEO.parametros.mensageminicia}catch(e){}},mostraCoordenadasUTM:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)){return}atualizaCoordenadasUTM=function(){if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}var tempUtm,s,n,i,t;s=document.getElementsByTagName("script");n=s.length;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]==="i3GEOF"){return}}tempUtm=function(retorno){var funcao,temp;funcao="$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';";funcao+="if(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml)";funcao+="{$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.gadgets.mostraCoordenadasGEO();}";setTimeout(funcao,3400);temp=$i(i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";temp.innerHTML="<div>UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+"</div>"}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}},mostraCoordenadasGEO:function(id){try{var ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("xm")){ins="<table style='text-align:center'><tr>";ins+="<td>X: </td>";ins+="<td>"+$inputText(id,"315","xg","grau","3","-00")+" </td>";ins+="<td>"+$inputText("","","xm","minuto","3","00")+" </td>";ins+="<td>"+$inputText("","","xs","segundo","5","00.00")+" </td>";ins+="<td>Y:"+$inputText("","","yg","grau","3","-00")+" </td>";ins+="<td>"+$inputText("","","ym","minuto","3","00")+" </td>";ins+="<td>"+$inputText("","","ys","segundo","5","00.00")+"</td>";temp='var xxx = i3GEO.calculo.dms2dd($i("xg").value,$i("xm").value,$i("xs").value);';temp+='var yyy = i3GEO.calculo.dms2dd($i("yg").value,$i("ym").value,$i("ys").value);';temp+='i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,xxx,yyy);';ins+="<td><img class='tic' title='zoom' onclick='"+temp+"' src='"+i3GEO.util.$im("branco.gif")+"' id=procurarxy /></td>";ins+="</tr></table>";$i(id).innerHTML=ins;$i3geo_temp_xg=$i("xg");$i3geo_temp_xm=$i("xm");$i3geo_temp_xs=$i("xs");$i3geo_temp_yg=$i("yg");$i3geo_temp_ym=$i("ym");$i3geo_temp_ys=$i("ys");atualizaLocalizarxy=function(){var x,y;try{x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");$i3geo_temp_xg.value=x[0];$i3geo_temp_xm.value=x[1];$i3geo_temp_xs.value=x[2];$i3geo_temp_yg.value=y[0];$i3geo_temp_ym.value=y[1];$i3geo_temp_ys.value=y[2]}catch(m){}};if($i(i3GEO.Interface.IDMAPA)){YAHOO.util.Event.addListener($i(i3GEO.Interface.IDMAPA),"mousemove",atualizaLocalizarxy)}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"280","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.googlemaps.adicionaKml(true);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}if($i(id)){atualizaEscalaNumerica=function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{e.value=parseInt(i3GEO.parametros.mapscale,10)}};if(!$i("i3geo_escalanum")){i=$inputText(id,"155","i3geo_escalanum",$trad("d10"),"15",parseInt(i3GEO.parametros.mapscale,10));ins="<table><tr><td>1:"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaNumerica()")}}else{atualizaEscalaNumerica=function(){}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);i3GEO.gadgets.quadros.grava("escala",scaimagem);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="<img class='menuarrow' src=\""+g_localimg+"/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}if($i(id)){i3geo_buscaRapida=function(){if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}wdocaf("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};i=$inputText(id,"200","valorBuscaRapida","digite o texto para busca","30",$trad("o2"));ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i;ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='i3geo_buscaRapida()' /></td></tr></table>";temp=$i(id);if(temp){temp.innerHTML=ins}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins;$i("i3geo_zoomanterior").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual>0){marcadorZoom=marcadorZoom-1;if(marcadorZoom>=0){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}else{marcadorZoom=0}}};$i("i3geo_zoomproximo").onclick=function(){if(marcadorZoom===""){marcadorZoom=i3GEO.gadgets.quadros.quadroatual}if(i3GEO.gadgets.quadros.quadroatual<i3GEO.gadgets.quadros.quadrosfilme.length){marcadorZoom=marcadorZoom+1;if(marcadorZoom<i3GEO.gadgets.quadros.quadrosfilme.length){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}}else{marcadorZoom=i3GEO.gadgets.quadros.quadrosfilme.length}}}},visual:{inicia:function(id){var l,visuais,li;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraVisual.idhtml}if($i(id)){if(i3GEO.parametros.listavisual!==""){l=i3GEO.parametros.listavisual.split(",");visuais="";li=l.length-1;if(li>=0){do{visuais+="<img title='"+l[li]+"' style=cursor:pointer onclick='i3GEO.gadgets.visual.troca(\""+l[li]+"\")' src='"+i3GEO.configura.locaplic+"/imagens/visual/"+l[li]+".png' /> "}while(li--)}$i(id).innerHTML=visuais;$i(id).onmouseover=function(){i3GEO.ajuda.mostraJanela($trad("d26"))};$i(id).onmouseout=function(){i3GEO.ajuda.mostraJanela("")}}}},troca:function(visual){var monta=function(retorno){var imgstemp,imgs,i,temp,elementos,elt,caminho,j,busca,nimagem;try{i3GEO.janela.fechaAguarde("i3GEO.atualiza");imgstemp=retorno.data.arquivos;imgs=[];i=imgstemp.length-1;if(i>=0){do{temp=imgstemp[i].split(".");if((temp[1]==="png")||(temp[1]==="gif")||(temp[1]==="jpg")){imgs.push(imgstemp[i])}}while(i--)}elementos=document.getElementsByTagName("img");elt=elementos.length;caminho=i3GEO.configura.locaplic+"/imagens/visual/"+visual+"/";j=imgs.length-1;if(j>=0){do{for(i=0;i<elt;i++){if((elementos[i].src.search("branco")>-1)&&((elementos[i].className!=="")||(elementos[i].id!==""))){elementos[i].src=caminho+"branco.gif"}if(elementos[i].src.search("visual")>-1){elementos[i].style.backgroundImage="url('"+caminho+"sprite.png')"}}}while(j--)}j=imgs.length-1;if(j>=0){do{busca=imgs[j].split(".");if($i(busca[0])){$i(busca[0]).src=caminho+imgs[j]}}while(j--)}elementos=["barraSuperior","barraInferior","vertMaisZoom","vertMenosZoom","foldermapa","foldermapa1","tic"];i=elementos.length-1;if(i>=0){do{if($i(elementos[i])){nimagem=$i(elementos[i]).style.backgroundImage.replace(i3GEO.configura.visual,visual);$i(elementos[i]).style.backgroundImage=nimagem}}while(i--)}i3GEO.configura.visual=visual}catch(e){alert("Ocorreu um erro. mudaVisual"+e);i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.listaarquivos(monta,"imagens/visual/"+visual)}},quadros:{quadrosfilme:[],quadroatual:0,geraLegenda:false,inicia:function(qs,lugarquadros){if(arguments.length===1){lugarquadros=i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml}var q,i,temp,p;q="<table class=tablefilme ><tr><td><div class='menuarrow' title='opções' onclick='i3GEO.gadgets.quadros.opcoes(this)' style='cursor:pointer'></div></td>";for(i=0;i<qs;i++){q+="<td><img class='quadro' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" id='quadro"+i+"' ";q+="onmouseover='i3GEO.gadgets.quadros.trocaMapa(this.id);i3GEO.ajuda.mostraJanela(\"Clique para aplicar a extensão geográfica do quadro ao mapa\")' ";q+="onclick='i3GEO.gadgets.quadros.zoom(this.id)' /></td>";i3GEO.gadgets.quadros.quadrosfilme[i]=[]}q+="</tr></table>";if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){document.getElementById(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).innerHTML=q;$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml).onmouseout=function(){$i("img").style.display="block";if($i("imgClone")){temp=$i("imgClone");p=temp.parentNode;p.removeChild(temp);i3GEO.ajuda.mostraJanela('')}}}i3GEO.gadgets.quadros.quadroatual=0;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.quadros.avanca()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.quadros.avanca()")}},grava:function(variavel,valor){eval("i3GEO.gadgets.quadros.quadrosfilme["+i3GEO.gadgets.quadros.quadroatual+"]."+variavel+" = '"+valor+"'");if($i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml)){$i("quadro"+i3GEO.gadgets.quadros.quadroatual).className="quadro1"}},avanca:function(){try{var nquadros=i3GEO.gadgets.quadros.quadrosfilme.length;if((nquadros-1)===(i3GEO.gadgets.quadros.quadroatual)){i3GEO.gadgets.quadros.inicia(nquadros)}else{i3GEO.gadgets.quadros.quadroatual++}}catch(e){}},zoom:function(quadro){var indice=quadro.replace("quadro","");i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[indice].extensao)},trocaMapa:function(quadro){var indice,i,c,iclone;indice=quadro.replace("quadro","");i=$i("img");c=$i("imgClone");if(i){if(!c){iclone=document.createElement('IMG');iclone.style.position="relative";iclone.id="imgClone";iclone.style.border="1px solid blue";i.parentNode.appendChild(iclone);iclone.src=i.src;iclone.style.width=i3GEO.parametros.w;iclone.style.heigth=i3GEO.parametros.h;iclone.style.top=i.style.top;iclone.style.left=i.style.left;c=$i("imgClone")}try{if(!i3GEO.gadgets.quadros.quadrosfilme[indice].imagem){return}c.src=i3GEO.gadgets.quadros.quadrosfilme[indice].imagem;c.style.display="block";i.style.display="none"}catch(e){}}},opcoes:function(obj){if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";var volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{if(typeof(i3GEOF.opcoesQuadros)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/opcoes_quadros/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.opcoesQuadros.criaJanelaFlutuante()","i3GEOF.opcoesQuadros_script")}}},anima:function(Qanima,t){var doc;if(arguments.length===0){Qanima=0;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;t=doc.getElementById("tempoanima").value}if(Qanima>i3GEO.gadgets.quadros.quadrosfilme.length){clearTimeout(tAnima);$i("imgClone").style.display="none";$i("img").style.display="block";return}i3GEO.gadgets.quadros.trocaMapa("quadro"+Qanima);Qanima++;tAnima=setTimeout('i3GEO.gadgets.quadros.anima('+Qanima+','+t+')',t)},listaImagens:function(){var volta,wi,mensagem,i;if(i3GEO.parametros.utilizacgi==="sim"){i3GEO.parametros.utilizacgi="nao";volta=function(){alert("Armazenamento de imagens ativado. As proximas imagens ficarao disponiveis")};i3GEO.php.desativacgi(volta)}else{wi=window.open("");mensagem="<br><b>Não existem imagens guardadas.";wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o botão da direita do mouse sobre a imagem para fazer o download<br>");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Imagem: "+i+"<br>");wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"<br>");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].imagem+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].referencia+"' />");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].legenda+"' />")}}i--}while(i>=0)}wi.document.write("<br>Fim</body></html>");wi.document.close()}}},mostraMenuSuspenso:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=id}var objid,ins,sobe,alinhamento,n,i,estilo,t,onMenuBarBeforeRender,temp;objid=$i(id);if(objid){objid.className="yuimenubar";if($i("contemMenu")){$i("contemMenu").className="yui-navset"}if(!i3GEO.configura.oMenuData.menu){ins="";ins+='<div class="bd" style="display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >';ins+='<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';sobe="";if(navn){sobe="line-height:0px;"}ins+='<li class="yuimenubaritem" style="padding-bottom:5px" ><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuajuda" > '+$trad("s1")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuanalise" > '+$trad("s2")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menujanelas" > '+$trad("s3")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuarquivos" > '+$trad("s4")+'</a></li>';ins+='<li class="yuimenubaritem" style="padding-bottom:5px"><a style="border: 0px solid white;" href="#" class="yuimenubaritemlabel" id="menuinterface" > '+$trad("d27")+'</a></li>';ins+='</ul>';ins+='</div>';objid.innerHTML=ins}else{ins="";alinhamento="";if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){alinhamento="left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;"}ins+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >';ins+='<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=i3GEO.configura.oMenuData.menu.length;for(i=0;i<n;i++){if(i3GEO.parametros.w<550){i3GEO.configura.oMenuData.menu[i].id="";estilo="padding-bottom:3px;top:0px;border: 0px solid white;"}else{estilo="padding-bottom:3px;top:0px;border: 0px solid white;"}t="";if(i3GEO.configura.oMenuData.menu[i].target){t="target="+i3GEO.configura.oMenuData.menu[i].target}ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+i3GEO.configura.oMenuData.menu[i].id+'" > '+i3GEO.configura.oMenuData.menu[i].nome+'</a></li>'}ins+='</ul>';ins+='</div>';objid.innerHTML=ins}onMenuBarBeforeRender=function(p_sType,p_sArgs){var conta,nomeMenu;if(i3GEO.parametros.w>=500){conta=0}else{conta=0}for(nomeMenu in i3GEO.configura.oMenuData.submenus){if(i3GEO.configura.oMenuData.submenus[nomeMenu]!==""){i3GEOoMenuBar.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:i3GEO.configura.oMenuData.submenus[nomeMenu]})}conta=conta+1}};i3GEOoMenuBar=new YAHOO.widget.MenuBar(id,{autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});i3GEOoMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBar.render();temp=objid.style;temp.backgroundPosition="0px -1px";if(navn){temp.border="0px solid white"}else{temp.border="1px dotted white"}}}};