var FCKeditor=function(_1,_2,_3,_4,_5){
this.InstanceName=_1;
this.Width=_2||"100%";
this.Height=_3||"200";
this.ToolbarSet=_4||"Default";
this.Value=_5||"";
this.BasePath="/pub/fckeditor/";
this.CheckBrowser=true;
this.DisplayErrors=true;
this.EnableSafari=false;
this.Config=new Object();
this.OnError=null;
};
FCKeditor.prototype.Create=function(){
if(!this.InstanceName||this.InstanceName.length==0){
this._ThrowError(701,"You must specify a instance name.");
return;
}
document.write("<div>");
if(!this.CheckBrowser||this._IsCompatibleBrowser()){
document.write("<input type=\"hidden\" id=\""+this.InstanceName+"\" name=\""+this.InstanceName+"\" value=\""+this._HTMLEncode(this.Value)+"\" />");
document.write(this._GetConfigHtml());
document.write(this._GetIFrameHtml());
}else{
var _6=this.Width.toString().indexOf("%")>0?this.Width:this.Width+"px";
var _7=this.Height.toString().indexOf("%")>0?this.Height:this.Height+"px";
document.write("<textarea name=\""+this.InstanceName+"\" rows=\"4\" cols=\"40\" style=\"WIDTH: "+_6+"; HEIGHT: "+_7+"\" wrap=\"virtual\">"+this._HTMLEncode(this.Value)+"</textarea>");
}
document.write("</div>");
};
FCKeditor.prototype.ReplaceTextarea=function(){
if(!this.CheckBrowser||this._IsCompatibleBrowser()){
var _8=document.getElementById(this.InstanceName);
if(!_8){
_8=document.getElementsByName(this.InstanceName)[0];
}
if(!_8||_8.tagName!="TEXTAREA"){
alert("Error: The TEXTAREA id \""+this.InstanceName+"\" was not found");
return;
}
_8.style.display="none";
this._InsertHtmlBefore(this._GetConfigHtml(),_8);
this._InsertHtmlBefore(this._GetIFrameHtml(),_8);
}
};
FCKeditor.prototype._InsertHtmlBefore=function(_9,_a){
if(_a.insertAdjacentHTML){
_a.insertAdjacentHTML("beforeBegin",_9);
}else{
var _b=document.createRange();
_b.setStartBefore(_a);
var _c=_b.createContextualFragment(_9);
_a.parentNode.insertBefore(_c,_a);
}
};
FCKeditor.prototype._GetConfigHtml=function(){
var _d="";
for(var o in this.Config){
if(_d.length>0){
_d+="&amp;";
}
_d+=escape(o)+"="+escape(this.Config[o]);
}
return "<input type=\"hidden\" id=\""+this.InstanceName+"___Config\" value=\""+_d+"\" />";
};
FCKeditor.prototype._GetIFrameHtml=function(){
var _f="fckeditor.original.html";
var _10=this.BasePath+"editor/"+_f+"?InstanceName="+this.InstanceName;
if(this.ToolbarSet){
_10+="&Toolbar="+this.ToolbarSet;
}
return "<iframe id=\""+this.InstanceName+"___Frame\" src=\""+_10+"\" width=\""+this.Width+"\" height=\""+this.Height+"\" frameborder=\"no\" scrolling=\"no\"></iframe>";
};
FCKeditor.prototype._IsCompatibleBrowser=function(){
var _11=navigator.userAgent.toLowerCase();
if(_11.indexOf("msie")!=-1&&_11.indexOf("mac")==-1&&_11.indexOf("opera")==-1){
var _12=navigator.appVersion.match(/MSIE (.\..)/)[1];
return (_12>=5.5);
}else{
if(navigator.product=="Gecko"&&navigator.productSub>=20030210){
return true;
}else{
if(this.EnableSafari&&_11.indexOf("safari")!=-1){
return (_11.match(/safari\/(\d+)/)[1]>=312);
}else{
return false;
}
}
}
};
FCKeditor.prototype._ThrowError=function(_13,_14){
this.ErrorNumber=_13;
this.ErrorDescription=_14;
if(this.DisplayErrors){
document.write("<div style=\"COLOR: #ff0000\">");
document.write("[ FCKeditor Error "+this.ErrorNumber+": "+this.ErrorDescription+" ]");
document.write("</div>");
}
if(typeof (this.OnError)=="function"){
this.OnError(this,_13,_14);
}
};
FCKeditor.prototype._HTMLEncode=function(_15){
if(typeof (_15)!="string"){
_15=_15.toString();
}
_15=_15.replace(/&/g,"&amp;");
_15=_15.replace(/"/g,"&quot;");
_15=_15.replace(/</g,"&lt;");
_15=_15.replace(/>/g,"&gt;");
_15=_15.replace(/'/g,"&#39;");
return _15;
};
window.document.jsfForm=function(){
if(this.forms.length==1){
return this.forms[0];
}
for(var i=0;i<this.forms.length;i++){
if(this.forms[i]["bookmarkURLHF"]!=undefined){
return this.forms[i];
}
}
return null;
};
String.prototype.endsWith=function(_17){
var _18=this.lastIndexOf(_17);
return _18!=-1&&_18+_17.length==this.length;
};
function getEventElement(_19){
_19=(_19)?_19:window.event;
return (_19.target)?_19.target:_19.srcElement;
}
function forceSubmit(){
stdSubmit(document.jsfForm());
}
function forceCommandSubmit(_1a){
subCmdSubmit(document.jsfForm().id,_1a,null);
}
function dontKeepScrollPosition(){
var _1b=document.jsfForm();
if(_1b["akPBDisabled"]!=undefined){
_1b["akPBDisabled"].value="1";
}
return true;
}
function findParentOfType(_1c,_1d){
var _1e=_1c;
while(_1e.parentNode!=null){
if(_1e.parentNode.nodeName==_1d){
return _1e.parentNode;
}
_1e=_1e.parentNode;
}
return null;
}
function findElementsEndingWithId(_1f,_20,_21,_22){
if(_1f==null){
_1f=window.document;
}
if(_21==null){
_21=new Array();
}
var _23=_1f.childNodes;
for(var i=0;i<_23.length;i++){
var _25=_23[i].id;
if(_25!=null){
var _26=_25.lastIndexOf(_20);
if(_26!=-1&&_26+_20.length==_25.length){
_21.push(_23[i]);
if(_22){
return _21;
}
}
}
if(_23[i].hasChildNodes()){
var _27=_21.length;
findElementsEndingWithId(_23[i],_20,_21,_22);
if(_27<_21.length&&_22){
return _21;
}
}
}
return _21;
}
function findElementsEndingWithName(_28,_29,_2a,_2b){
if(_28==null){
_28=window.document;
}
if(_2a==null){
_2a=new Array();
}
var _2c=_28.childNodes;
for(var i=0;i<_2c.length;i++){
var _2e=_2c[i].name;
if(_2e!=null){
var _2f=_2e.lastIndexOf(_29);
if(_2f!=-1&&_2f+_29.length==_2e.length){
_2a.push(_2c[i]);
if(_2b){
return _2a;
}
}
}
if(_2c[i].hasChildNodes()){
var _30=_2a.length;
findElementsEndingWithName(_2c[i],_29,_2a,_2b);
if(_30<_2a.length&&_2b){
return _2a;
}
}
}
return _2a;
}
function findElementByClass(_31,_32){
if(_31==null){
_31=window.document;
}
var _33=_31.childNodes;
for(var i=0;i<_33.length;i++){
if(_33[i].className==_32){
return _33[i];
}
}
for(var i=0;i<_33.length;i++){
if(_33[i].hasChildNodes()){
elem=findElementByClass(_33[i],_32);
if(elem!=null){
return elem;
}
}
}
return null;
}
function getElementHeight(_35,_36){
elem=findElementByClass(_35,_36);
if(elem!=null){
rect=elem.getBoundingClientRect();
return rect.bottom-rect.top;
}
return 0;
}
function previousSiblingWithTag(_37,_38){
var _39=_37.previousSibling;
if(_39!=null){
if(_39.tagName!=null&&_39.tagName.toLowerCase()==_38.toLowerCase()){
return _39;
}else{
return previousSiblingWithTag(_39,_38);
}
}
return null;
}
function nextSiblingWithTag(_3a,_3b){
var _3c=_3a.nextSibling;
if(_3c!=null){
if(_3c.tagName!=null&&_3c.tagName.toLowerCase()==_3b.toLowerCase()){
return _3c;
}else{
return nextSiblingWithTag(_3c,_3b);
}
}
return null;
}
function nextSiblingWithoutTag(_3d,_3e){
var _3f=_3d.nextSibling;
if(_3f!=null){
if(_3f.tagName!=null&&_3f.tagName.toLowerCase()!=_3e.toLowerCase()){
return _3f;
}else{
return nextSiblingWithoutTag(_3f,_3e);
}
}
return null;
}
function getCenterPanelHeight(_40){
var _41=0;
var _42=0;
var _43=previousSiblingWithTag(_40,"span");
var _44=nextSiblingWithTag(_40,"span");
if(_43!=null){
var _45=_43.getBoundingClientRect();
_41=_45.bottom-_45.top;
}
if(_44!=null){
var _46=_44.getBoundingClientRect();
_42=_46.bottom-_46.top;
}
return document.documentElement.clientHeight-_41-_42;
}
function bookmarkMe(){
url=document.jsfForm()["bookmarkURLHF"].value;
name=document.jsfForm()["bookmarkNameHF"].value;
if(url!=null){
window.external.AddFavorite(url,name);
}
return false;
}
function execDefaultCmdOnEnterKeyPress(_47){
var _48=getKeyPressed(_47);
var _49=13;
if(_48==_49){
var btn=findDefaultCmd(null);
if(btn!=null){
btn.onclick();
}
}
}
function getKeyPressed(_4b){
var _4c;
if(window.event){
_4c=_4b.keyCode;
}else{
if(_4b.which){
_4c=_4b.which;
}
}
return _4c;
}
function findDefaultCmd(_4d){
var _4e=findElementsEndingWithId(null,"defaultCmd",null,true);
if(_4e.length>0){
return _4e[0];
}
return null;
}
function clearInputTime(_4f){
var _50=findElementsEndingWithId(null,_4f+"-h",null,true);
if(_50.length>0){
_50[0].value="--";
}
var _50=findElementsEndingWithId(null,_4f+"-m",null,true);
if(_50.length>0){
_50[0].value="--";
}
var _50=findElementsEndingWithId(null,_4f+"-a",null,true);
if(_50.length>0){
_50[0].value="--";
}
return false;
}
function clearInputDate(_51){
var _52=findCalendarByID(_51);
if(_52!=null){
document.jsfForm()[_52.hiddenFieldID].value="emptied";
showInputDateIfEmptyFacet(_51);
}
return false;
}
function getInputDateDate(_53){
var _54=findCalendarByID(_53);
if(_54!=null&&document.jsfForm()[_54.hiddenFieldID].value.length>0){
return parseDate(document.jsfForm()[_54.hiddenFieldID].value,_54.ifFormat,new Object());
}
return null;
}
function setInputDateDate(_55,_56){
var _57=findCalendarByID(_55);
if(_57!=null){
document.jsfForm()[_57.hiddenFieldID].value=_56.print(_57.ifFormat);
window.document.getElementById(_57.spanID).innerHTML=_56.print(_57.daFormat);
}
}
function getElementIntValue(_58){
var _59=null;
var _5a=findElementsEndingWithId(null,_58,null,true);
if(_5a.length>0){
_59=_5a[0];
}else{
return -1;
}
if(_59.tagName=="INPUT"){
return parseInt(_59.value);
}
return parseInt(_59.innerHTML);
}
function manageTableSelCount(_5b,_5c,_5d,_5e){
_5b=(_5b)?_5b:window.event;
var src=getEventElement(_5b);
if(src.tagName!="INPUT"||src.type!="checkbox"){
return;
}
var _60=null;
var _61=null;
var _62=null;
if(_5c!=null){
elements=findElementsEndingWithId(null,_5c,null,true);
if(elements.length>0){
_61=elements[0];
}
}
if(_5d!=null){
elements=findElementsEndingWithId(null,_5d,null,true);
if(elements.length>0){
_62=elements[0];
}
}
elements=findElementsEndingWithId(null,_5e,null,true);
if(elements.length>0){
_60=elements[0];
}
var _63=findParentOfType(src,"THEAD");
if(_63!=null){
if(src.type=="checkbox"){
if(src.checked){
if(_61!=null&&_62!=null){
_62.innerHTML=_61.value;
}
_60.value="3";
}else{
if(_62!=null){
_62.innerHTML="0";
}
_60.value="2";
}
formCheckAll(src);
}
}else{
if(_62!=null){
var _64=findParentOfType(src,"TBODY");
if(_64!=null&&src.type=="checkbox"){
var _65=parseInt(_62.innerHTML);
_65=src.checked?_65+1:_65-1;
_62.innerHTML=_65.toString();
formSyncCheckAll2(src,true);
}
}
}
}
function clearQuickFinder(_66){
var qf=window.document.getElementById(_66);
if(qf){
qf.value="";
qf.fireEvent("onchange");
}
}
function activateQuickFinderValidation(_68){
var _69=window.document.getElementById(_68+".disValid");
if(_69.length>0){
var _6a=_69[0];
_6a.value="false";
}
}
function reloadWindow(){
window.location.reload(true);
}
function getTableSelectionCount(_6b){
var _6c=findElementsEndingWithId(null,_6b,null,true)[0];
var _6d=window.document.getElementById(_6c.id+"._selCount");
return parseInt(_6d.value);
}
function disableCommand(_6e,_6f){
var _70=findElementsEndingWithId(null,_6e,null,true)[0];
disableCommandButton(_70.id,2,false,_6f);
}
function disableActionBar(_71,_72){
var _73=findElementsEndingWithId(null,_71,null,true)[0];
disableCommandButton(_73.id,3,false,_72);
}
function inputRichTextInsertHtml(_74,_75){
var _76=findElementsEndingWithId(null,_74,null,true)[0];
EditorUtils.insertHtmlText(_76.id,_75);
}
function getHelpPane(_77){
var _78=findElementsEndingWithId(null,_77,null,true);
if(_78!=null&&_78.length>0){
return _78[0];
}
return null;
}
function displayHelp(_79,_7a,_7b){
if(_7a!=null){
if(_7b==null){
_7b="inline";
}
var _7c=getHelpPane(_7a);
if(_7c!=null){
_7c.style.display=_7b;
_7c.style.visibility="";
}
}
activateHelpContext(_79);
return false;
}
function hideHelp(_7d){
var _7e=getHelpPane(_7d);
if(_7e!=null){
_7e.style.display="none";
_7e.style.visibility="hidden";
}
return false;
}
function popupHelpWindow(_7f,_80){
helpWindow=_7f();
if(_80!=null){
getHelpPane(_80);
helpIFrameDiv=findElementsEndingWithId(null,"iframe",null,true)[0];
if(helpIFrameDiv!=null){
if(helpIFrameDiv.childNodes){
var _81=helpIFrameDiv.childNodes[0];
helpWindow.location=_81.src;
}
}
hideHelp(_80);
}
return false;
}
function isRichTextWithId(_82,pId){
return _82.id.endsWith(pId+"___Frame");
}
var BalloonComponent={changeContent:function(_84,_85){
BalloonRenderer.contentReady(_84,_85);
}};
function BalloonAjaxHandler(){
}
BalloonAjaxHandler.prototype.onInit=function(){
};
BalloonAjaxHandler.prototype.onError=function(_86,_87){
};
BalloonAjaxHandler.prototype.onProgress=function(_88,_89){
};
BalloonAjaxHandler.prototype.onLoad=function(xml){
var _8b=AjaxActionComponent.getContentElement(xml);
var _8c=AjaxActionComponent.getCallerContextComponentId(xml);
var _8d=ElementUtils.cloneItem(_8b);
BalloonComponent.changeContent(_8c,_8d);
};
var AjaxActionComponent={getContentElement:function(_8e){
return _8e.getElementsByTagName("content")[0].firstChild;
},getCallerContextElement:function(_8f){
return _8f.getElementsByTagName("callerContext")[0];
},getCallerContextComponentId:function(_90){
return this.getCallerContextElement(_90).getElementsByTagName("componentId")[0].firstChild.nodeValue;
}};
var AKCore={messagesResGroupId_:-1,adaptExternalLinks:function(){
var _91=document.jsfForm();
if(!_91.getElementsByTagName){
return;
}
var _92=_91.getElementsByTagName("a");
for(var i=0;i<_92.length;i++){
var _94=_92[i];
if(_94.getAttribute("href")&&_94.getAttribute("rel")=="external"){
_94.target="_blank";
}
}
}};
var contextPath_;
var tocPage_;
var buildVersion_;
var useVerStatFiles_;
var msgSenderIFrame_;
var sessionAboutToEndWindow_;
var sessionEndedWindow_;
var sessionBeaconBeatID_=-1;
var sessionWarningID_=-1;
var sessionTimeoutID_=-1;
var sessionTimeoutInterval;
var sessionWarningInterval;
var beaconBeatInterval;
var sessionExpired=false;
var currentCmd=null;
var currentModal;
var elementWithWaitCursor;
var waitingWindows_=[];
var waitCursorTimeout_=2000;
var leavingDomain_=true;
function WaitingWindow(_95,_96,_97,_98,_99){
this.commandId=_95;
this.url=_96;
this.delay=_97;
this.withCancel=_98;
this.disabled=_99;
waitingWindows_.push(this);
}
function findWaitingWindow(_9a){
var ww=null;
if(_9a){
for(i=0;ww==null&&i<waitingWindows_.length;i++){
if(_9a.lastIndexOf(waitingWindows_[i].commandId)!=-1){
ww=waitingWindows_[i];
}
}
}
for(i=0;ww==null&&i<waitingWindows_.length;i++){
if(waitingWindows_[i].commandId=="-1"){
ww=waitingWindows_[i];
}
}
if(ww&&ww.disabled){
ww=null;
}
return ww;
}
function show(pId,_9d){
var _9e=document.getElementById(pId);
if(_9e){
_9e.style.visibility="visible";
if(_9d){
_9e.style.display="block";
}
}
}
function hide(pId,_a0){
var _a1=document.getElementById(pId);
if(_a1){
_a1.style.visibility="hidden";
if(_a0){
_a1.style.display="none";
}
}
}
function addEvent(el,_a3,_a4){
if(el.attachEvent){
el.attachEvent("on"+_a3,_a4);
}else{
if(el.addEventListener){
el.addEventListener(_a3,_a4,true);
}else{
el["on"+_a3]=_a4;
}
}
}
function addEventByEndingID(id,_a6,_a7){
var _a8=findElementsEndingWithId(null,id,null,false);
for(i=0;i<_a8.length;i++){
addEvent(_a8[i],_a6,_a7);
}
}
function removeEvent(el,_aa,_ab){
if(el.detachEvent){
el.detachEvent("on"+_aa,_ab);
}else{
if(el.removeEventListener){
el.removeEventListener(_aa,_ab,true);
}else{
el["on"+_aa]=null;
}
}
}
function hasClass(el,_ad){
if(!(el&&el.className)){
return false;
}
var cls=el.className.split(" ");
for(var i=cls.length;i>0;){
if(cls[--i]==_ad){
return true;
}
}
return false;
}
function removeClass(el,_b1){
if(!(el&&el.className)){
return;
}
var cls=el.className.split(" ");
var ar=[];
for(var i=cls.length;i>0;){
if(cls[--i]!=_b1){
ar[ar.length]=cls[i];
}
}
el.className=ar.join(" ");
}
function addClass(el,_b6){
if(!el){
return;
}
if(!el.className){
el.className=_b6;
return;
}
var cls=el.className.split(" ");
var ar=[];
for(var i=cls.length;i>0;){
if(cls[--i]!=_b6){
ar[ar.length]=cls[i];
}else{
return;
}
}
ar[ar.length]=_b6;
el.className=ar.join(" ");
}
function addClasses(el,_bb){
if(!el){
return;
}
if(!el.className){
el.className=_bb;
return;
}
var cls=_bb.split(" ");
for(var i=cls.length;i>0;){
if(cls[--i]!=""){
addClass(el,cls[i]);
}
}
}
function addParameter(url,_bf,_c0){
url+=url.indexOf("?")==-1?"?":"&";
url+=_bf+"="+Core.encodeURIComponent(_c0);
return url;
}
function stopSubmit(_c1){
if(_c1.stop){
_c1.stop();
}else{
_c1.document.execCommand("Stop");
}
}
function stdSubmit(_c2,_c3){
if(typeof _c2.onsubmit=="function"){
_c2.onsubmit();
}
manageKeepScrollPos(_c2);
if(_c2["formChanged"]){
checkFormDataChangesOnsubmit(_c2);
}
setWaitCursorForSubmit(_c3);
var ww=findWaitingWindow(_c3);
if(ww){
setTimeout(function(){
openWaitingWindow(ww);
},ww.delay);
}else{
setTimeout(function(){
emptyCmdHF(window);
clearWaitCursorForSubmit(window);
},waitCursorTimeout_);
}
var tz=0;
var now=new Date();
if(now.getTimezoneOffset){
tz=now.getTimezoneOffset();
}
_c2["tz"].value=formatTimezone(tz);
try{
logViewInfo("stdSubmit: pre-submit");
leavingDomain_=false;
_c2.submit(true);
logViewInfo("stdSubmit: post-submit");
}
catch(e){
emptyCmdHF(window);
clearWaitCursorForSubmit(window);
alert(e.description);
}
}
function logViewInfo(_c7){
}
function setWaitCursorForSubmit(_c8){
var _c9=document.getElementById(_c8);
window.document.body.style.cursor="wait";
if(_c9){
elementWithWaitCursor=_c9;
elementWithWaitCursor.style.cursor="wait";
}
}
function clearWaitCursorForSubmit(_ca){
_ca.document.body.style.cursor="default";
if(_ca.elementWithWaitCursor){
_ca.elementWithWaitCursor.style.cursor="pointer";
_ca.elementWithWaitCursor=null;
}
}
function cmdSubmit(_cb,_cc,_cd,_ce,_cf){
if(!isAnEmbeddedDialogOpened()){
var _d0=false;
var cmd=document.getElementById(_cc);
if(!cmd||typeof (cmd.disabled)=="undefined"||!cmd.disabled){
var _d2=document.forms[_cb];
currentCmd=_d2["jsfCmdId"].value;
if(currentCmd==null||currentCmd.length==0){
doSubmit=true;
_d2["jsfCmdId"].value=_cc;
if(_cd){
doSubmit=eval(_cd);
}
var _d3=typeof (doSubmit);
if(_d3=="boolean"){
if(doSubmit){
subCmdSubmit(_cb,_cc,_ce);
}else{
_d2["jsfCmdId"].value="";
}
}else{
if(_d3=="object"){
doSubmit.openerHaveActionToExecute=_cf;
doSubmit.onCloseFnc=function(){
_d2["jsfCmdId"].value=_cc;
subCmdSubmit(_cb,_cc,_ce);
};
_d2["jsfCmdId"].value="";
}else{
currentCmd=null;
}
}
}
}
}
}
function subCmdSubmit(_d4,_d5,_d6){
var _d7=document.forms[_d4];
_d7["jsfCmdId"].value=_d5;
_d7["jsfCmdParams"].value=_d6||"";
stdSubmit(_d7,_d5);
}
function manageKeepScrollPos(_d8){
if(_d8["akPBXOffset"]&&_d8["akPBYOffset"]){
var _d9=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;
_d8["akPBXOffset"].value=document.all?_d9.scrollLeft:window.pageXOffset;
_d8["akPBYOffset"].value=document.all?_d9.scrollTop:window.pageYOffset;
}
}
function restoreScrollPos(x,y){
window.scrollTo(x,y);
}
function emptyCmdHF(_dc){
var _dd=_dc.document.jsfForm();
if(_dd&&_dd["jsfCmdId"]){
_dd["jsfCmdId"].value="";
}
}
function getIFrameDoc(_de){
if(_de.contentDocument){
return _de.contentDocument;
}
if(_de.contentWindow){
return _de.contentWindow.document;
}
try{
if(_de.document){
return _de.document;
}
}
catch(e){
}
return null;
}
function sendUIMessage2(msg){
if(!document.createElement){
return true;
}
var url=contextPath_+"/UIMessageReceiver.jss?msg="+msg;
if(!msgSenderIFrame_&&document.createElement){
try{
var _e1=document.createElement("iframe");
_e1.setAttribute("id","RSIFrame");
_e1.style.border="0px";
_e1.style.width="0px";
_e1.style.height="0px";
_e1.style.display="none";
_e1.style.visibility="hidden";
_e1.title="";
_e1.src=url;
msgSenderIFrame_=document.body.appendChild(_e1);
if(document.frames){
msgSenderIFrame_=document.frames["RSIFrame"];
}
}
catch(exception){
iframeHTML="<iframe id=\"RSIFrame\" title=\"\" style=\"";
iframeHTML+="border:0px;";
iframeHTML+="width:0px;";
iframeHTML+="height:0px;";
iframeHTML+="display:none;";
iframeHTML+="visibility:hidden;";
iframeHTML+="\"></iframe>";
document.body.innerHTML+=iframeHTML;
msgSenderIFrame_={};
msgSenderIFrame_.document={};
msgSenderIFrame_.document.location={};
msgSenderIFrame_.document.location.iframe=document.getElementById("RSIFrame");
msgSenderIFrame_.document.location.replace=function(_e2){
this.iframe.src=_e2;
};
}
}
if(navigator.userAgent.indexOf("Gecko")!=-1&&!msgSenderIFrame_.contentDocument){
var _e3="sendUIMessage2('"+url+"')";
setTimeout(_e3,10);
return false;
}
var _e4=getIFrameDoc(msgSenderIFrame_);
if(_e4==null){
return true;
}
_e4.location.replace(url);
return false;
}
function openWaitingWindow(pWW){
var _e6=pWW.url;
if(pWW.withCancel){
_e6+="&cancel=1";
}
openModalDialog(_e6,250,100);
}
function openModalDialog(url,_e8,_e9){
var _ea=(new Date()).getSeconds().toString();
var _eb=(screen.width-_e8)/2;
var top=(screen.height-_e9)/2;
var _ed="left="+_eb+",top="+top+",width="+_e8+",height="+_e9+",center=yes,resizable=yes,scroll=yes,help=no,status=no";
logViewInfo("openModalDialog: pre-window.open");
currentModal=window.open(url,_ea,_ed);
if(currentModal){
currentModal.focus();
}
logViewInfo("openModalDialog: post-window.open");
}
function checkModal(){
setTimeout("finishChecking()",50);
return true;
}
function finishChecking(){
if(currentModal&&!currentModal.closed){
currentModal.focus();
}
}
function installSessionBeacon(_ee,_ef,_f0){
sessionTimeoutInterval=_ee;
sessionWarningInterval=_ef;
beaconBeatInterval=_f0;
initSessionBeacon();
}
function reviveSession(_f1){
sendUIMessage2("sessionBeaconBeat");
resetSessionBeacon();
}
function resetSessionBeacon(){
sessionAboutToEndWindow_=null;
sessionEndedWindow=null;
initSessionBeacon();
}
function initSessionBeacon(){
var _f2=false;
try{
_f2=window.frameElement;
}
catch(e){
_f2=false;
}
if(!_f2){
if(sessionBeaconBeatID_!=-1){
window.clearTimeout(sessionBeaconBeatID_);
}
if(sessionWarningID_!=-1){
window.clearTimeout(sessionWarningID_);
}
if(sessionTimeoutID_!=-1){
window.clearTimeout(sessionTimeoutID_);
}
if(beaconBeatInterval>0){
sessionBeaconBeatID_=setInterval("sendUIMessage2('sessionBeaconBeat')",beaconBeatInterval);
}
if(sessionWarningInterval>0){
sessionWarningID_=setTimeout("manageSessionWarning()",sessionWarningInterval);
}
if(sessionTimeoutInterval>0){
sessionTimeoutID_=setTimeout("manageSessionTimeout()",sessionTimeoutInterval);
}
}
}
function invalidateSession(){
logViewInfo("invalidateSession");
if(!sessionExpired){
window.clearTimeout(sessionWarningID_);
window.clearTimeout(sessionTimeoutID_);
window.clearTimeout(sessionBeaconBeatID_);
sendUIMessage2("invalidateSession");
sessionAboutToEndWindow_=null;
sessionExpired=true;
}
}
function manageSessionWarning(){
if(!sessionExpired){
var _f3=findAlert("sessionWarning");
if(!_f3){
_f3=createAlert("sessionWarning","","","warning",null);
_f3.addCommand("?ok?","okBtn",reviveSession);
}
var _f4=contextPath_+"/akira/pub/session/sessionWarning.jsf";
_f4+="?formId="+document.jsfForm().id;
_f4+="&msgResGroupId="+messagesResGroupId_;
showEmbeddedAlert(_f4,window,_f3,null);
sessionAboutToEndWindow_=window;
}
}
function manageSessionTimeout(){
if(!sessionExpired){
var _f5=createAlert("sessionExpired","","","info",null);
_f5.addCommand("?ok?","okBtn",gotoTOC);
var _f6=contextPath_+"/akira/pub/session/sessionTimeout.jsf";
_f6+="?formId="+document.jsfForm().id;
_f6+="&msgResGroupId="+messagesResGroupId_;
showEmbeddedAlert(_f6,window,_f5,invalidateSession);
sessionEndedWindow_=window;
}
}
function recordUserActivity(){
initSessionBeacon();
}
function gotoTOC(){
var url;
if(sessionTimeoutUrl_){
var _f8=sessionTimeoutUrl_.substring(0,4).toUpperCase();
if(_f8=="HTTP"){
url=sessionTimeoutUrl_;
}else{
url=contextPath_+sessionTimeoutUrl_;
}
}else{
url=tocPage_||contextPath_+"/index.jsp";
}
gotoUrl(url);
}
function gotoUrl(url){
if(sessionEndedWindow_){
if(sessionEndedWindow_.dialogArguments){
sessionEndedWindow_.dialogArguments.location=url;
}else{
sessionEndedWindow_.location=url;
}
}
}
function installCoreRequiredEvents(){
emptyCmdHF(window);
addEvent(window,"focus",checkModal);
addEvent(window.document.body,"click",checkModal);
addEvent(window,"unload",onUnload);
AKCore.adaptExternalLinks();
logViewInfo("load");
}
function onUnload(_fa){
logViewInfo("unload");
if(_fa.clientX&&_fa.clientY){
if(_fa.clientX<0&&_fa.clientY<0){
invalidateSession();
}
}
var _fb=document.jsfForm();
if(_fb&&_fb["akPBISWLD"]&&!_fb["akPBISWLD"].dontcheckdomain&&leavingDomain_){
invalidateSession();
}
}
function formatTimezone(_fc){
var tz="GMT"+(_fc<=0?"+":"-");
var _fe=Math.abs(_fc);
var _ff=_fe%60;
var _100=(_fe-_ff)/60;
if(_100<10){
_100="0"+_100;
}
if(_ff<10){
_ff="0"+_ff;
}
return tz+_100+":"+_ff;
}
var expanders_=[];
var expandersGroups_=[];
var expandersGroupsByExpanders_=[];
function ExpanderGroup(pId){
this.id=pId;
this.expandersIds=[];
this.firstClickDone=false;
}
function addExpanderToGroup(_102,_103){
var _104=expandersGroups_[_102];
if(_104==null){
_104=new ExpanderGroup(_102);
expandersGroups_[_102]=_104;
}
_104.expandersIds[_104.expandersIds.length]=_103;
expandersGroupsByExpanders_[_103]=_104;
}
function Expander(pId,_106,_107,_108,_109,_10a,_10b,_10c,_10d,_10e){
this.id=pId;
this.expandedId=_106;
this.expandedContentId=_107;
this.collapsedId=_108;
this.formId=_109;
this.forId=_10a;
this.expandedValue=_10b;
this.collapsedValue=_10c;
this.stateValue=_10d;
this.expandedDisplayStyle=_10e;
this.expandedContentDisplayStyle=_10e;
if(this.forId){
this.expandedForDisplayStyle=_10e;
}
}
function addExpander(pId,_110,_111,_112,_113,_114,_115,_116,_117,_118){
var _119=new Expander(pId,_110,_111,_112,_113,_114,_115,_116,_117,_118);
expanders_[pId]=_119;
}
function expand(pId,_11b){
var _11c=expanders_[pId];
var _11d=expandersGroupsByExpanders_[pId];
if(_11d==null||_11b==true){
document.forms[_11c.formId][_11c.id].value=_11c.expandedValue;
show(_11c.expandedId,true);
document.getElementById(_11c.expandedId).style.cssText=_11c.expandedDisplayStyle;
show(_11c.expandedContentId,true);
document.getElementById(_11c.expandedContentId).style.cssText=_11c.expandedContentDisplayStyle;
if(_11c.forId){
show(_11c.forId,true);
document.getElementById(_11c.forId).style.cssText=_11c.expandedForDisplayStyle;
}
hide(_11c.collapsedId,true);
_11c.stateValue=_11c.expandedValue;
}
}
function collapse(pId,_11f){
var _120=expanders_[pId];
var _121=expandersGroupsByExpanders_[pId];
if(_121==null||_11f==true){
var _120=expanders_[pId];
document.forms[_120.formId][_120.id].value=_120.collapsedValue;
hide(_120.expandedId,true);
hide(_120.expandedContentId,true);
if(_120.forId){
hide(_120.forId,true);
}
show(_120.collapsedId,true);
document.getElementById(_120.collapsedId).style.cssText=_120.expandedDisplayStyle;
_120.stateValue=_120.collapsedValue;
}
}
function selectExpanderGroupSection(_122,_123){
var _124=expandersGroups_[_122];
var _125=expanders_[_123];
if(_124.expandersIds.length==2){
for(i=0;i<_124.expandersIds.length;i++){
var _126=expanders_[_124.expandersIds[i]];
if(_126.stateValue==_126.expandedValue){
collapse(_126.id,true);
}else{
expand(_126.id,true);
}
}
}else{
if(_125.stateValue==_125.collapsedValue||!_124.firstClickDone){
_124.firstClickDone=true;
expand(_125.id,true);
for(i=0;i<_124.expandersIds.length;i++){
var _126=expanders_[_124.expandersIds[i]];
if(_126.id!=_123){
if(_126.stateValue==_126.expandedValue){
collapse(_126.id,true);
}
}
}
}
}
}
function leftTrim(_127){
while(_127.substring(0,1)==" "){
_127=_127.substring(1,_127.length);
}
return _127;
}
function rightTrim(_128){
while(_128.substring(_128.length-1,_128.length)==" "){
_128=_128.substring(0,_128.length-1);
}
return _128;
}
function trimAll(_129){
_129=leftTrim(_129);
_129=rightTrim(_129);
return _129;
}
function computeWindowOffsetLeft(_12a){
var _12b=0;
var _12c=_12a;
while(typeof (_12c.parentNode)!="undefined"&&_12c.parentNode){
var _12c=_12c.parentNode;
if(typeof (_12c.offsetLeft)!="undefined"){
_12b+=_12c.offsetLeft;
}
}
return _12b+_12a.offsetLeft;
}
function computeWindowOffsetTop(_12d){
var _12e=0;
var _12f=_12d;
while(typeof (_12f.parentNode)!="undefined"&&_12f.parentNode){
var _12f=_12f.parentNode;
if(typeof (_12f.offsetLeft)!="undefined"){
_12e+=_12f.offsetTop;
}
}
return _12e+_12d.offsetTop;
}
var Core={hideShowCovered:function(_130){
var _131=function(){
function getVisib(obj){
var _133=obj.style.visibility;
if(!_133){
if(document.defaultView&&typeof (document.defaultView.getComputedStyle)=="function"){
if(!AgentUtils.is_khtml){
_133=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");
}else{
_133="";
}
}else{
if(obj.currentStyle){
_133=obj.currentStyle.visibility;
}else{
_133="";
}
}
}
return _133;
}
var tags=new Array("applet","iframe","select");
var el=self.element;
var EX1=0;
var EX2=0;
var EY1=0;
var EY2=0;
if(getVisib(_130)!="hidden"){
var p=HTMLUtils.getAbsolutePosition(_130);
EX1=p.x;
EX2=_130.offsetWidth+EX1;
EY1=p.y;
EY2=_130.offsetHeight+EY1;
}
for(var k=tags.length;k>0;){
var ar=document.getElementsByTagName(tags[--k]);
var cc=null;
for(var i=ar.length;i>0;){
cc=ar[--i];
p=HTMLUtils.getAbsolutePosition(cc);
var CX1=p.x;
var CX2=cc.offsetWidth+CX1;
var CY1=p.y;
var CY2=cc.offsetHeight+CY1;
if(self.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){
if(!cc.__msh_save_visibility){
cc.__msh_save_visibility=getVisib(cc);
}
cc.style.visibility=cc.__msh_save_visibility;
}else{
if(!cc.__msh_save_visibility){
cc.__msh_save_visibility=getVisib(cc);
}
cc.style.visibility="hidden";
}
}
}
};
if(AgentUtils.is_khtml){
setTimeout("continuation_for_the_khtml_browser()",10);
}else{
_131();
}
},encodeURIComponent:function(uri){
return encodeURIComponent(uri);
}};
function CellCoords(_144,pRow,_146,_147,_148){
this.table=_144;
this.groupName=pRow.parentNode.tagName.toLowerCase();
this.row=pRow;
this.cell=_146;
this.rowIndex=_147;
this.columnIndex=_148;
}
var HTMLUtils={NO_BREAK_SPACE:"\xa0",addLabel:function(_149,pId,_14b,_14c){
var el=this.addElement(_149,"label");
if(pId){
el.id=pId;
}
if(_14b){
el.htmlFor=_14b;
}
this.addText(el,_14c);
return el;
},getLabel:function(_14e){
return ElementUtils.getChildElementByTagName(_14e,"LABEL");
},getInput:function(_14f){
return ElementUtils.getChildElementByTagName(_14f,"INPUT");
},ELEMENT_NODE:1,TEXT_NODE:3,addInput:function(_150,_151,pId,_153){
var el=this.addElement(null,"input");
el.setAttribute("type",_151||"text");
if(pId){
el.setAttribute("id",pId);
}
el.setAttribute("value",_153);
if(_150){
_150.appendChild(el);
}
return el;
},addTextArea:function(_155,pId,_157,_158,_159){
var el=this.addElement(null,"textarea");
if(pId){
el.setAttribute("id",pId);
}
el.setAttribute("value",_159);
el.setAttribute("rows",_157);
el.setAttribute("cols",_158);
if(_155){
_155.appendChild(el);
}
return el;
},addSelect:function(_15b,pId,_15d,_15e){
var el=this.addElement(null,"select");
if(pId){
el.setAttribute("id",pId);
}
el.setAttribute("size",""+_15d);
if(_15e){
el.setAttribute("multiple","multiple");
}
if(_15b){
_15b.appendChild(el);
}
return el;
},addSelectOption:function(_160,_161,_162,_163){
var el=this.addElement(null,"option");
el.setAttribute("value",_161);
if(_163){
el.setAttribute("selected","selected");
}
this.addText(el,_162||_161);
if(_160){
_160.appendChild(el);
}
return el;
},addFieldSet:function(_165,pId){
var el=this.addElement(null,"fieldset");
if(pId){
el.setAttribute("id",pId);
}
if(_165){
_165.appendChild(el);
}
return el;
},addLegend:function(_168,_169){
var el=this.addElement(_168,"legend");
if(_169){
this.addText(el,_169);
}
return el;
},addSpan:function(_16b,_16c){
var el=this.addElement(_16b,"span");
if(_16c){
this.addText(el,_16c);
}
return el;
},addDiv:function(_16e,_16f){
var el=this.addElement(_16e,"div");
if(_16f){
this.addText(el,_16f);
}
return el;
},addList:function(_171){
return this.addElement(_171,"ul");
},addListItem:function(_172){
return this.addElement(_172,"li");
},addImg:function(_173,pSrc){
var el=this.addElement(_173,"img");
el.src=pSrc;
return el;
},addAnchor:function(_176,_177){
var el=this.addElement(_176,"a");
el.href=_177;
return el;
},addElement:function(_179,_17a){
var el=document.createElement(_17a);
if(_179!=null){
_179.appendChild(el);
}
return el;
},addGrid:function(_17c,_17d,_17e){
var _17f=this.addDiv(_17c);
for(var i=0;i<_17d;i++){
var _181=this.addDiv(_17f);
for(var j=0;j<_17e;j++){
cell=this.addSpan(_181);
cell.setAttribute("className",j===0?"cell first-line-cell":"cell");
EventUtils.addEvent(cell,"click",addCellElement,false);
this.addText(cell,"cell "+i+", "+j);
}
}
return _17f;
},addTable:function(_183,_184,_185,_186,_187,_188,_189){
var _18a=this.addElement(_183,"table");
_18a.summary="";
this._addTableClass(_18a,_188,"table");
this._addTableGroup(_18a,"thead",_184,_187,_188,_189);
this._addTableGroup(_18a,"tfoot",_185,_187,_188,_189);
this._addTableGroup(_18a,"tbody",_186,_187,_188,_189);
return _18a;
},_addTableClass:function(_18b,_18c,_18d){
if(_18c&&_18c[_18d]){
var val=_18c[_18d];
if(typeof val=="function"){
val=val(_18b);
}
if(val){
StyleUtils.addClasses(_18b,val);
}
}
},_addTableGroup:function(_18f,_190,_191,_192,_193,_194){
if(_191>0){
var _195=_190=="thead"?"th":"td";
var _196=this.addElement(_18f,_190);
this._addTableClass(_196,_193,_190);
for(var _197=0;_197<_191;_197++){
var row=this.addElement(_196,"tr");
this._addTableClass(row,_193,_197%2===0?"trEven":"trOdd");
for(var _199=0;_199<_192;_199++){
var cell=this.addElement(row,_195);
this._addTableClass(cell,_193,_195);
if(_194){
_194(_18f,_190,_197,_199,cell);
}
}
}
}
},addTableRow:function(_19b,_19c,_19d,_19e){
return this._addTableRow(_19b,"tbody",_19c,_19d,_19e);
},_addTableRow:function(_19f,_1a0,_1a1,_1a2,_1a3){
var _1a4=ElementUtils.getChildElementByTagName(_19f,_1a0.toUpperCase());
if(!_1a4){
return null;
}
var _1a5=_1a0=="thead"?"th":"td";
var _1a6=_1a4.firstChild;
var _1a7=0;
var _1a8=null;
while(_1a6){
if(ElementUtils.isElement(_1a6,"TR")){
if(_1a7==_1a1){
_1a8=_1a6;
break;
}
_1a7++;
}
_1a6=_1a6.nextSibling;
}
var row=this.addElement(null,"tr");
if(_1a8){
_1a4.insertBefore(row,_1a8);
}else{
_1a4.appendChild(row);
}
for(var _1aa=0;_1aa<_1a2;_1aa++){
var cell=this.addElement(row,_1a5);
if(_1a3){
_1a3(_19f,_1a0,_1a1,_1aa,cell);
}
}
return row;
},removeTableRow:function(_1ac,_1ad){
this._removeTableRow(_1ac,"tbody",_1ad);
},_removeTableRow:function(_1ae,_1af,_1b0){
var _1b1=ElementUtils.getChildElementByTagName(_1ae,_1af.toUpperCase());
if(!_1b1){
return;
}
var _1b2=_1b1.firstChild;
var _1b3=0;
var row=null;
while(_1b2&&_1b3<=_1b0){
if(ElementUtils.isElement(_1b2,"TR")){
row=_1b2;
_1b3++;
}
_1b2=_1b2.nextSibling;
}
if(row){
_1b1.removeChild(row);
}
},addTableColumn:function(_1b5,_1b6,_1b7){
this._addTableColumn(_1b5,"thead",_1b6,_1b7);
this._addTableColumn(_1b5,"tfoot",_1b6,_1b7);
this._addTableColumn(_1b5,"tbody",_1b6,_1b7);
},_addTableColumn:function(_1b8,_1b9,_1ba,_1bb){
var _1bc=ElementUtils.getChildElementByTagName(_1b8,_1b9.toUpperCase());
if(!_1bc){
return;
}
var _1bd=_1b9=="thead"?"th":"td";
var _1be=_1bd.toUpperCase();
var _1bf=_1bc.firstChild;
var _1c0=0;
while(_1bf){
if(ElementUtils.isElement(_1bf,"TR")){
var row=_1bf;
var cell;
if(_1bd=="th"&&row.cells.length==1){
cell=row.cells[0];
cell.colSpan=(cell.colSpan||1)+1;
}else{
var _1c3=row.firstChild;
var _1c4=0;
var _1c5=null;
while(_1c3){
if(ElementUtils.isElement(_1c3,_1be)){
if(_1c4==_1ba){
_1c5=_1c3;
break;
}
var _1c6=_1c3.colSpan||1;
_1c4+=_1c6;
}
_1c3=_1c3.nextSibling;
}
cell=this.addElement(null,_1bd);
if(_1c5){
row.insertBefore(cell,_1c5);
}else{
row.appendChild(cell);
}
if(_1bb){
_1bb(_1b8,_1b9,_1c0,_1ba,cell);
}
}
}
_1bf=_1bf.nextSibling;
_1c0++;
}
},removeTableColumn:function(_1c7,_1c8){
this._removeTableColumn(_1c7,"thead",_1c8);
this._removeTableColumn(_1c7,"tfoot",_1c8);
this._removeTableColumn(_1c7,"tbody",_1c8);
},_removeTableColumn:function(_1c9,_1ca,_1cb){
var _1cc=ElementUtils.getChildElementByTagName(_1c9,_1ca.toUpperCase());
if(!_1cc){
return;
}
var _1cd=_1ca=="thead"?"th":"td";
var _1ce=_1cd.toUpperCase();
var _1cf=_1cc.firstChild;
while(_1cf){
if(ElementUtils.isElement(_1cf,"TR")){
var row=_1cf;
var _1d1=row.firstChild;
var _1d2=0;
var cell=null;
while(_1d1&&_1d2<=_1cb){
if(ElementUtils.isElement(_1d1,_1ce)){
cell=_1d1;
_1d2+=_1d1.colSpan||1;
}
_1d1=_1d1.nextSibling;
}
if(cell){
var _1d4=cell.colSpan||1;
if(_1d4==1){
row.removeChild(cell);
}else{
cell.colSpan=_1d4-1;
}
}
}
_1cf=_1cf.nextSibling;
}
},spanTableCells:function(_1d5,_1d6,_1d7,_1d8,_1d9,_1da){
return this._spanTableCells(_1d5,"tbody",_1d6,_1d7,_1d8,_1d9,_1da);
},_spanTableCells:function(_1db,_1dc,_1dd,_1de,_1df,_1e0,_1e1){
var cell=this._getTableGroupCell(_1db,_1dc,_1dd,_1de);
if(_1df!==0){
var _1e3=cell.rowSpan||1;
_1e3+=_1df;
if(_1e3>0){
cell.rowSpan=_1e3;
}
if(_1df>0){
var _1e4=_1dd+_1e3;
for(var n=_1df;n-->0;){
var row=_1db.rows[--_1e4];
var _1e7=row.cells[_1de];
row.removeChild(_1e7);
}
}else{
var _1e4=_1dd+_1e3;
for(var n=_1df;n++<0;){
var row=_1db.rows[_1e4++];
var _1e8=row.insertCell(_1de);
if(_1e1){
_1e1(_1db,_1dc,_1e4,_1de,_1e8);
}
}
}
}
if(_1e0!=0){
var _1e9=cell.colSpan||1;
_1e9+=_1e0;
if(_1e9>0){
cell.colSpan=_1e9;
}
var row=cell.parentNode;
if(_1e0>0){
for(var n=_1e0;n-->0;){
var _1ea=cell.nextSibling;
row.removeChild(_1ea);
}
}else{
var _1eb=_1de;
for(var n=_1e0;n++<0;){
var _1e8=row.insertCell(++_1eb);
if(_1e1){
_1e1(_1db,_1dc,_1dd,_1eb,_1e8);
}
}
}
}
},getTableCell:function(_1ec,_1ed,_1ee){
return this._getTableGroupCell(_1ec,"tbody",_1ed,_1ee);
},getTableHeaderCell:function(_1ef,_1f0,_1f1){
return this._getTableGroupCell(_1ef,"thead",_1f0,_1f1);
},getTableGroupCell:function(_1f2,_1f3,_1f4,_1f5){
return this._getGroupTableCell(_1f2,_1f3,_1f4,_1f5);
},_getTableGroupCell:function(_1f6,_1f7,_1f8,_1f9){
var _1fa=ElementUtils.getChildElementByTagName(_1f6,_1f7.toUpperCase());
if(!_1fa){
return;
}
var _1fb=_1fa.firstChild;
var _1fc=0;
var row=null;
while(_1fb&&_1fc<=_1f8){
if(ElementUtils.isElement(_1fb,"TR")){
row=_1fb;
_1fc++;
}
_1fb=_1fb.nextSibling;
}
if(!row){
return null;
}
var _1fe=_1f7=="thead"?"TH":"TD";
var _1ff=row.firstChild;
var _200=0;
var cell=null;
while(_1ff&&_200<=_1f9){
if(ElementUtils.isElement(_1ff,_1fe)){
cell=_1ff;
_200++;
}
_1ff=_1ff.nextSibling;
}
return cell;
},isEmptyTableCell:function(_202){
return (_202&&_202.firstChild)==null;
},getTableCellCoords:function(_203){
var row=_203.parentNode;
var _205=row&&row.parentNode;
var _206=_205&&_205.tagName=="THEAD"?"TH":"TD";
var _207=_205&&_205.parentNode;
if(!ElementUtils.isElement(_207,"TABLE")){
return null;
}
var _208=_205.firstChild;
var _209=0;
while(_208){
if(ElementUtils.isElement(_208,"TR")){
if(row==_208){
break;
}
_209++;
}
_208=_208.nextSibling;
}
var _20a=row.firstChild;
var _20b=0;
while(_20a){
if(ElementUtils.isElement(_20a,_206)){
if(_203==_20a){
break;
}
_20b++;
}
_20a=_20a.nextSibling;
}
return new CellCoords(_207,row,_203,_209,_20b);
},getTableOfCell:function(_20c){
var row=_20c.parentNode;
var _20e=row.parentNode;
return _20e.parentNode;
},getTableNbRows:function(_20f){
return this._getTableNbRows(_20f,"tbody");
},_getTableNbRows:function(_210,_211){
var _212=ElementUtils.getChildElementByTagName(_210,_211.toUpperCase());
if(!_212){
return 0;
}
var _213=_212.firstChild;
var _214=0;
while(_213){
if(ElementUtils.isElement(_213,"TR")){
_214++;
}
_213=_213.nextSibling;
}
return _214;
},getTableNbColumns:function(_215){
return this._getTableNbColumns(_215,"tbody");
},_getTableNbColumns:function(_216,_217){
var _218=_217=="thead"?"TH":"TD";
var _219=ElementUtils.getChildElementByTagName(_216,_217.toUpperCase());
if(!_219){
return 0;
}
var _21a=_219.firstChild;
var _21b=0;
while(_21a){
var _21c=0;
if(ElementUtils.isElement(_21a,"TR")){
var _21d=_21a.firstChild;
while(_21d){
if(ElementUtils.isElement(_21d,_218)){
_21c+=_21d.colSpan||1;
}
_21d=_21d.nextSibling;
}
}
_21a=_21a.nextSibling;
_21b=Math.max(_21c,_21b);
}
return _21b;
},forEachTableCells:function(_21e,_21f){
this._forEachTableCells(_21e,"thead",_21f);
this._forEachTableCells(_21e,"tfoot",_21f);
this._forEachTableCells(_21e,"tbody",_21f);
},_forEachTableCells:function(_220,_221,_222){
var _223=ElementUtils.getChildElementByTagName(_220,_221.toUpperCase());
if(!_223){
return;
}
var _224=_221=="thead"?"TH":"TD";
var _225=_223.firstChild;
var _226=0;
while(_225){
if(ElementUtils.isElement(_225,"TR")){
var row=_225;
var _228=row.firstChild;
var _229=0;
while(_228){
if(ElementUtils.isElement(_228,_224)){
var cell=_228;
_222(_220,_221,_226,_229,cell);
_229++;
}
_228=_228.nextSibling;
}
_226++;
}
_225=_225.nextSibling;
}
},forEachTableRowCells:function(_22b,_22c,_22d){
this._forEachTableRowCells(_22b,"tbody",_22c,_22d);
},_forEachTableRowCells:function(_22e,_22f,_230,_231){
var _232=ElementUtils.getChildElementByTagName(_22e,_22f.toUpperCase());
if(!_232){
return;
}
var _233=_22f=="thead"?"TH":"TD";
var _234=_232.firstChild;
var _235=0;
while(_234){
if(ElementUtils.isElement(_234,"TR")){
var row=_234;
if(_235==_230){
var _237=row.firstChild;
var _238=0;
while(_237){
if(ElementUtils.isElement(_237,_233)){
var cell=_237;
_231(_22e,_22f,_235,_238,cell);
_238++;
}
_237=_237.nextSibling;
}
break;
}
_235++;
}
_234=_234.nextSibling;
}
},forEachTableColumnCells:function(_23a,_23b,_23c){
this._forEachTableColumnCells(_23a,"tbody",_23b,_23c);
},_forEachTableColumnCells:function(_23d,_23e,_23f,_240){
var _241=ElementUtils.getChildElementByTagName(_23d,_23e.toUpperCase());
if(!_241){
return;
}
var _242=_23e=="thead"?"TH":"TD";
var _243=_241.firstChild;
var _244=0;
while(_243){
if(ElementUtils.isElement(_243,"TR")){
var row=_243;
var _246=row.firstChild;
var _247=0;
while(_246&&_247<=_23f){
if(ElementUtils.isElement(_246,_242)){
var cell=_246;
if(_247==_23f){
_240(_23d,_23e,_244,_247,cell);
}
_247++;
}
_246=_246.nextSibling;
}
_244++;
}
_243=_243.nextSibling;
}
},addTableCellsEvent:function(_249,_24a,_24b,_24c){
var _24d=_24a;
var func=_24b;
var _24f=_24c;
this.forEachTableCells(_249,function(_250,_251,_252,_253,_254){
EventUtils.addEvent(_254,_24d,func,_24f);
});
},addText:function(_255,_256){
var el=document.createTextNode(_256||"");
if(_255){
_255.appendChild(el);
}
return el;
},replaceText:function(_258,_259){
var el=_258.firstChild;
if(el){
el.replaceData(0,el.length,_259||"");
return el;
}else{
return this.addText(_258,_259);
}
},getHTML:function(_25b){
if(ElementUtils.isElement(_25b,"TEXTAREA")){
return _25b.value;
}else{
return _25b.innerHTML;
}
},setHTML:function(_25c,_25d){
if(ElementUtils.isElement(_25c,"TEXTAREA")){
_25c.value=_25d;
}else{
_25c.innerHTML=_25d||"";
}
},getAbsolutePosition:function(_25e){
var SL=0,ST=0;
var _261=/^div$/i.test(_25e.tagName);
if(_261&&_25e.scrollLeft){
SL=_25e.scrollLeft;
}
if(_261&&_25e.scrollTop){
ST=_25e.scrollTop;
}
var pt={x:_25e.offsetLeft-SL,y:_25e.offsetTop-ST};
if(_25e.offsetParent){
var tmp=HTMLUtils.getAbsolutePosition(_25e.offsetParent);
pt.x+=tmp.x;
pt.y+=tmp.y;
}
return pt;
}};
var EventUtils={addEvent:function(_264,_265,_266,_267){
if(_264.addEventListener){
var _268=_267||false;
_264.addEventListener(_265,_266,_268);
}else{
if(_264.attachEvent){
_264.attachEvent("on"+_265,_266);
}else{
_264["on"+_265]=_266;
}
}
},stopPropagation:function(_269){
_269.cancelBubble=true;
if(_269.stopPropagation){
_269.stopPropagation();
}
},getElement:function(_26a){
if(AgentUtils.isIE){
return window.event.srcElement;
}else{
return _26a.currentTarget;
}
},getTargetElement:function(_26b){
if(AgentUtils.isIE){
return window.event.srcElement;
}else{
return _26b.target;
}
}};
var ElementUtils={ELEMENT_NODE:1,TEXT_NODE:3,isElement:function(_26c,_26d){
return _26c&&_26c.nodeType==this.ELEMENT_NODE&&_26c.tagName==_26d;
},findElement:function(_26e,_26f){
var nw=Coordinates.northwestOffset(_26e,true);
var se=Coordinates.southeastOffset(_26e,true);
if(_26f.inside(nw,se)){
var _272=_26e.firstChild;
while(_272){
if(_272.nodeType==HTMLUtils.ELEMENT_NODE){
var _273=this.findElement(_272,_26f);
if(_273){
return _273;
}
}
_272=_272.nextSibling;
}
return _26e;
}
return null;
},findTargetElement:function(_274,_275){
var el=this.findElement(_274,_275);
while(el&&!StyleUtils.hasClass(el,"drop-target")){
el=el.parentNode;
}
return el;
},traverse:function(_277,_278){
var _279=_277.firstChild;
while(_279){
if(_279.nodeType==HTMLUtils.ELEMENT_NODE){
_278(_279);
this.traverse(_279,_278);
}
_279=_279.nextSibling;
}
},getElementTextByTagName:function(_27a,_27b,_27c){
var _27d=this.getChildElementByTagName(_27a,_27b);
if(_27d){
var _27e=this.getElementText(_27d);
if(_27e){
return _27e;
}
}
return _27c?_27c:"";
},getElementBooleanByTagName:function(_27f,_280,_281){
var _282=this.getChildElementByTagName(_27f,_280);
if(_282){
var _283=this.getElementText(_282);
if(_283){
_283=_283.toLowerCase();
return _283=="true"||_283=="yes"||_283=="1";
}
}
return _281?_281:false;
},getElementIntByTagName:function(_284,_285,_286){
var _287=this.getChildElementByTagName(_284,_285);
if(_287){
var _288=this.getElementText(_287);
if(_288){
var _289=parseInt(_288);
if(isFinite(_289)){
return _289;
}
}
}
return _286?_286:0;
},getChildElementByTagName:function(_28a,_28b){
var _28c=_28a&&_28a.firstChild;
while(_28c){
if(this.isElement(_28c,_28b)){
return _28c;
}
_28c=_28c.nextSibling;
}
return null;
},getChildrenElementsByTagName:function(_28d,_28e){
var _28f=[];
this._getChildrenElementsByTagNameSub(_28d,_28e,_28f);
return _28f;
},_getChildrenElementsByTagNameSub:function(_290,_291,_292){
var _293=_290&&_290.firstChild;
while(_293){
if(this.isElement(_293,_291)){
_292[_292.length]=_293;
}
this._getChildrenElementsByTagNameSub(_293,_291,_292);
_293=_293.nextSibling;
}
return _292;
},getChildElementByClassName:function(_294,_295){
var _296=_294&&_294.firstChild;
while(_296){
if(StyleUtils.hasClass(_296,_295)){
return _296;
}
_296=_296.nextSibling;
}
return null;
},getChildrenElementsByClassName:function(_297,_298){
var _299=[];
this._getChildrenElementsByClassNameSub(_297,_298,_299);
return _299;
},_getChildrenElementsByClassNameSub:function(_29a,_29b,_29c){
var _29d=_29a&&_29a.firstChild;
while(_29d){
if(StyleUtils.hasClass(_29d,_29b)){
_29c[_29c.length]=_29d;
}
this._getChildrenElementsByClassNameSub(_29d,_29b,_29c);
_29d=_29d.nextSibling;
}
return _29c;
},getElementText:function(_29e){
var _29f="";
var _2a0=_29e&&_29e.firstChild;
while(_2a0){
if(_2a0.nodeType==this.TEXT_NODE){
if(_29f){
_29f+=" ";
}
_29f+=_2a0.nodeValue;
}
_2a0=_2a0.nextSibling;
}
return _29f;
},cloneItem:function(_2a1){
if(_2a1.nodeType==this.TEXT_NODE){
return document.createTextNode(_2a1.nodeValue);
}else{
if(_2a1.nodeType==this.ELEMENT_NODE){
var el=document.createElement(_2a1.tagName);
var _2a3=_2a1.attributes;
for(var i=0;i<_2a3.length;i++){
var attr=_2a3.item(i);
if(attr.nodeName=="class"){
StyleUtils.addClasses(el,attr.nodeValue);
}else{
if(attr.nodeName=="style"){
el.style.cssText=attr.nodeValue;
}else{
el.setAttribute(attr.nodeName,attr.nodeValue);
}
}
}
var _2a6=_2a1.firstChild;
for(;_2a6!=null;_2a6=_2a6.nextSibling){
var _2a7=this.cloneItem(_2a6);
if(_2a7!=null){
el.appendChild(_2a7);
}
}
return el;
}
}
return null;
}};
var AgentUtils={isIE:/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent),isIE5:this.isIE&&/msie 5\.0/i.test(navigator.userAgent),isOpera:/opera/i.test(navigator.userAgent),isKhtml:/Konqueror|Safari|KHTML/i.test(navigator.userAgent)};
var StyleUtils={removeClass:function(el,_2a9){
if(!(el&&el.className)){
return;
}
var cls=el.className.split(" ");
var ar=[];
for(var i=cls.length;i>0;){
if(cls[--i]!=_2a9){
ar[ar.length]=cls[i];
}
}
el.className=ar.join(" ");
},addClass:function(el,_2ae){
this.removeClass(el,_2ae);
if(!el.className){
el.className=_2ae;
}else{
el.className+=" "+_2ae;
}
},addClasses:function(el,_2b0){
if(!el){
return;
}
if(!el.className){
el.className=_2b0;
return;
}
var cls=_2b0.split(" ");
for(var i=cls.length;i>0;){
if(cls[--i]){
this.addClass(el,cls[i]);
}
}
},hasClass:function(el,_2b4){
if(!(el&&el.className)){
return false;
}
var cls=el.className.split(" ");
for(var i=0,n=cls.length;i<n;i++){
if(cls[i]==_2b4){
return true;
}
}
return false;
},addHoverEffect:function(el,_2b9){
if(!AgentUtils.isIE){
return;
}
var self=el;
var _2bb=_2b9?_2b9:"hover";
EventUtils.addEvent(self,"mouseover",function(_2bc){
StyleUtils.addClass(self,_2bb);
},false);
EventUtils.addEvent(self,"mouseout",function(_2bd){
StyleUtils.removeClass(self,_2bb);
},false);
},setOpacity:function(_2be,_2bf){
if(_2be.style.opacity){
_2be.style.opacity=_2bf;
}else{
if(_2be.filters){
var _2c0=_2bf*100;
var _2c1="progid:DXImageTransform.Microsoft.Alpha";
var _2c2=_2be.filters.alpha;
if(!_2c2){
_2be.style.filter+=_2c1+"(Opacity=100) alpha()";
_2c2=_2be.filters.alpha;
}
_2c2.opacity=_2c0;
}else{
if(_2be.style.MozOpacity){
_2be.style.MozOpacity=_2bf;
}
}
}
}};
var DragUtils={makeDragSource:function(_2c3,_2c4){
if(!_2c4){
_2c4=_2c3;
}
Drag.makeDraggable(_2c3);
if(_2c4!=_2c3){
_2c3.setDragHandle(_2c4);
}
_2c3.setDragThreshold(5);
_2c3.onDragStart=onDragStart;
_2c3.onDrag=onDrag;
_2c3.onDragEnd=onDragEnd;
_2c3.onDragSetCursor=onDragSetCursor;
StyleUtils.addClass(_2c3,"drag-source");
StyleUtils.addClass(_2c4,"drag-handle");
},makeDragSourceCloned:function(_2c5,_2c6){
if(!_2c6){
_2c6=_2c5;
}
EventUtils.addEvent(_2c6,"mousedown",DragUtils.startDragClone);
_2c6.dragSource=_2c5;
StyleUtils.addClass(_2c6,"drag-handle");
},startDragClone:function(_2c7){
var _2c8=EventUtils.getElement(_2c7);
var _2c9=_2c8.dragSource;
var _2ca=_2c9.cloneNode(true);
_2c9.parentNode.appendChild(_2ca);
_2ca.dragSource=_2c9;
mousePos=getMouseCoordinates(_2c7);
var dim=DragUtils.dimension(_2c9);
_2ca.style.position="absolute";
_2ca.style.left=(mousePos.x-10)+"px";
_2ca.style.right=(dim.x+dim.w)+"px";
var top=mousePos.y-10;
_2ca.style.top=top+"px";
StyleUtils.setOpacity(_2c9,0.5);
Drag.makeDraggable(_2ca);
_2ca.setDragThreshold(5);
_2ca.onDragStart=onDragStart;
_2ca.onDrag=onDrag;
_2ca.onDragEnd=onDragEnd;
_2ca.onDragSetCursor=onDragSetCursor;
_2ca.onDragCleanUp=DragUtils.endDrag;
if(document.selection){
document.selection.empty();
}
Drag.startDrag(_2ca,_2c7);
},endDrag:function(){
var _2cd=this;
if(_2cd.parentNode){
_2cd.parentNode.removeChild(_2cd);
}
StyleUtils.setOpacity(_2cd.dragSource,1);
_2cd.dragSource=null;
},DU_ATTRIBUTES:function(){
return " minx, miny, maxx, maxy, threshold, thresholdy, thresholdx,";
},isDragAttribute:function(_2ce){
return this.DU_ATTRIBUTES().indexOf(" "+_2ce+",")!=-1;
},dimension:function(_2cf){
var dim={};
dim.x=-1;
dim.y=-1;
dim.w=0;
dim.h=0;
if(_2cf==document){
dim.x=_2cf.body.scrollLeft;
dim.y=_2cf.body.scrollTop;
dim.w=_2cf.body.clientWidth;
dim.h=_2cf.body.clientHeight;
}else{
if(_2cf){
var el=_2cf;
var left=el.offsetLeft;
while((el=el.offsetParent)){
left+=el.offsetLeft;
}
el=_2cf;
var top=el.offsetTop;
while((el=el.offsetParent)){
top+=el.offsetTop;
}
dim.x=left;
dim.y=top;
dim.w=_2cf.offsetWidth;
dim.h=_2cf.offsetHeight;
}
}
return dim;
}};
function getMouseCoordinates(_2d4){
var posx=0;
var posy=0;
if(_2d4.pageX||_2d4.pageY){
posx=_2d4.pageX;
posy=_2d4.pageY;
}else{
if(_2d4.clientX||_2d4.clientY){
var _2d7=document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;
var _2d8=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;
posx=_2d4.clientX+_2d7;
posy=_2d4.clientY+_2d8;
}
}
return new Coordinate(posx,posy);
}
function mouseY(evt){
if(evt.pageY){
return evt.pageY;
}else{
if(evt.clientY){
return evt.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
}else{
return null;
}
}
}
function mouseX(evt){
if(evt.pageX){
return evt.pageX;
}else{
if(evt.clientX){
return evt.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
}else{
return null;
}
}
}
var DateUtils={ONE_YEAR:365*24*60*60*1000,addPeriod:function(_2db,_2dc){
var then=new Date();
then.setTime(then.getTime()+_2dc);
return then;
}};
var CookieUtils={getValue:function(_2de,_2df){
var _2e0=document.cookie;
var _2e1=_2de+"=";
var _2e2=_2e0.indexOf("; "+_2e1)+2;
if(_2e2==1){
_2e2=_2e0.indexOf(_2e1);
if(_2e2!==0){
return _2df?_2df:"";
}
}
_2e2+=_2e1.length;
toPos=_2e0.indexOf(";",_2e2);
if(toPos==-1){
toPos=_2e0.length;
}
var _2e3=_2e0.substring(_2e2,toPos);
return unescape(_2e3);
},setValue:function(_2e4,_2e5,_2e6){
var _2e7=_2e6?_2e6:DateUtils.addPeriod(new Date(),DateUtils.ONE_YEAR);
var _2e8=_2e4+"="+escape(_2e5)+"; expires="+_2e7.toGMTString();
document.cookie=_2e8;
}};
var alerts_=[];
var splitStartingX_=-1;
var splitStartingY_=-1;
var splitVertical_;
var splitter_=null;
var ratioPrevious;
var ratioNext;
var rectPrev;
var rectNext;
var disabledButtons_=[];
var actionGroups_=[];
var calendarsParams_=[];
var calendarOnLoadEventAttached=false;
var currentTimeInput;
var currentTimeInputInterval;
var currentTimeInputTimeout;
function qfValidateEnterKeyPressed(evt,_2ea){
var _2eb=13;
evt=(evt)?evt:window.event;
var _2ec=getEventElement(evt);
if(_2ec.value&&evt.keyCode==_2eb){
var form=_2ec.form;
theInput=form[_2ea+".event"];
if(theInput.value=="valueChanged"){
theInput.value="find";
resetModalReturnedValueHF(_2ea);
form.submit();
}
return false;
}
return true;
}
function qfFieldContentChange(evt,_2ef){
evt=(evt)?evt:window.event;
var _2f0=getEventElement(evt);
var form=_2f0.form;
var _2f2=form[_2ef+".event"];
var _2f3=form[_2ef+".initialValue"];
_2f0.value=trimAll(_2f0.value);
if(_2f3!=null&&_2f0.value==_2f3.value){
_2f2.value="";
}else{
if(_2f0.value!=null&&_2f0.value!=""){
_2f2.value="valueChanged";
}else{
_2f2.value="emptiedField";
}
}
resetModalReturnedValueHF(_2ef);
}
function qfButtonClick(evt,_2f5){
var _2f6=getEventElement(evt);
var form=_2f6.form;
var _2f8=window.document.jsfForm()[_2f5+".event"];
var _2f9=window.document.jsfForm()[_2f5+".disValid"];
if(_2f9){
_2f9.value="false";
}
if(_2f8.value=="valueChanged"){
_2f8.value="find";
}else{
if(_2f8.value=="emptiedField"){
_2f8.value="emptiedFieldClick";
}else{
_2f8.value="openSelector";
}
}
resetModalReturnedValueHF(_2f5);
return true;
}
function manageQFSelWinReturnedValues(_2fa){
var qfHf=null;
var _2fc=findElementsEndingWithId(null,".event",null,false);
for(i=0;i<_2fc.length;i++){
if(_2fc[i].tagName.toLowerCase()=="input"){
if(_2fc[i].value=="selectorWindowOpened"){
qfHf=_2fc[i];
}
}
}
var qfId=null;
if(qfHf){
qfId=qfHf.id.substring(0,qfHf.id.length-".event".length);
}
if(qfId){
window.document.getElementById(qfId+".swcrv").value=_2fa[0];
window.document.getElementById(qfId).value=_2fa[1];
}
}
function resetModalReturnedValueHF(_2fe){
var _2ff=window.document.jsfForm()[_2fe+".modalResult"];
if(_2ff){
_2ff.value="";
}
}
function getWindowTop(_300,_301){
try{
if(_300.parent==_300){
return _300;
}
if(_300.parent.location.hostname!=_301){
return _300;
}
}
catch(e){
return _300;
}
return getWindowTop(_300.parent,_301);
}
function findAlert(_302){
for(var i=0;i<alerts_.length;i++){
var _304=alerts_[i];
if(_304.alertClientId==_302){
return _304;
}
}
return null;
}
function AlertWindow(_305,_306,_307,_308,_309,_30a,_30b,_30c,_30d){
this.alertClientId=_305;
this.messageTitle=_306;
this.message=_307;
this.type=_308;
this.formHtmlId=_309;
this.commands=[];
this.addCommand=addCommand;
this.processClick=true;
this.hasFacetMessage=_30a;
this.opener=_30b;
this.embeddedDialog=!_30c||_30d?new EmbeddedDialog(_305,_30d):null;
}
function addCommand(_30e,_30f,_310,_311){
this.commands.push(new AlertCommand(_30e,_30f,_310,_311));
}
function AlertCommand(_312,_313,_314,_315){
this.text=_312;
this.cmdId=_313;
this.onClickFunction=_314;
this.noActionToPerform=_315;
}
function createAlert(_316,_317,_318,_319,_31a,_31b,_31c,_31d){
if(_31d=="null"){
_31d=null;
}
if(_31c==null||_31c=="null"){
_31c=false;
}else{
if(_31c=="true"){
_31c=true;
}else{
_31c=false;
}
}
var _31e=new AlertWindow(_316,_317,_318,_319,_31a,_31b,window,_31c,_31d);
alerts_.push(_31e);
return _31e;
}
function overrideEmbeddedAlertCommandClick(_31f){
var _320=findAlert(_31f);
var _321=_320.embeddedDialog;
if(!_321.initialized){
initEmbeddedDialog(_321.dialogId);
}
for(var i=0;i<_320.commands.length;i++){
var cmd=_320.commands[i];
overrideCommandClick(_321,cmd);
}
_321.commandsOverrided=true;
}
function overrideCommandClick(_324,cmd){
var _326=findElementsEndingWithId(_324.dialogContent,cmd.cmdId,null,true)[0];
if(_326==null){
_326=findElementsEndingWithName(_324.dialogContent,cmd.cmdId,null,true)[0];
}
if(cmd.noActionToPerform){
_326.onclick=function(){
hideEmbeddedDialog(_324,cmd);
return false;
};
}else{
if(cmd.onClickFunction==null){
cmd.onClickFunction=_326.onclick;
}
_326.onclick=function(){
hideEmbeddedDialog(_324,cmd);
if(_324.openerHaveActionToExecute&&_324.onCloseFnc){
_324.onCloseFnc();
}else{
cmd.onClickFunction();
}
return false;
};
}
}
function showModalAlert(sURL,_328,_329){
var _32a=getWindowTop(window,window.location.hostname);
if(_32a.showModalDialog){
var _32b="dialogWidth:400px;dialogHeight:0px;center:yes;resizable:no;scroll:yes;help:no;status:yes";
var _32c;
var _32d;
var pos=sURL.indexOf("alertClientId=");
if(pos>=0){
pos=pos+"alertClientId=".length;
var pos2=sURL.indexOf("&",pos);
if(pos2>=0){
_32d=sURL.substr(pos,pos2-pos);
}else{
alertId=sURL.substr(pos);
}
var _330=findAlert(_32d);
_330.innerHTML=_330.htmlContent;
}
if(_329){
logViewInfo("showModalAlert: pre-windowtop.showModelessDialog");
_32c=_32a.showModelessDialog(sURL,_328,_32b);
logViewInfo("showModalAlert: post-windowtop.showModelessDialog");
}else{
logViewInfo("showModalAlert: pre-windowtop.showModalDialog");
_32c=_32a.showModalDialog(sURL,_328,_32b);
logViewInfo("showModalAlert: post-windowtop.showModalDialog");
}
return _32c;
}else{
var _32b="top=200,left=140,width=400,height=200,directories=no,location=no,menubar=no,toolbar=no,resizable=no,scrollbars=yes,status=yes,center=yes;";
logViewInfo("showModalAlert: pre-window.open");
var _32d;
var pos=sURL.indexOf("alertClientId=");
if(pos>=0){
pos=pos+"alertClientId=".length;
var pos2=sURL.indexOf("&",pos);
if(pos2>=0){
_32d=sURL.substr(pos,pos2-pos);
}else{
alertId=sURL.substr(pos);
}
var _330=findAlert(_32d);
_330.innerHTML=_330.htmlContent;
}
currentAlert_=_32a.open(sURL,"_blank",_32b);
logViewInfo("showModalAlert: post-window.open");
if(currentAlert_){
currentAlert_.dialogArguments=_328;
currentAlert_.simulateModal=true;
}
return currentAlert_;
}
}
function showEmbeddedAlert(sURL,_332,_333,_334){
if(!document.createElement){
return true;
}
if(document.createElement){
try{
var _335=document.createElement("iframe");
_335.setAttribute("id","RSIFrame");
_335.style.border="0px";
_335.style.width="0px";
_335.style.height="0px";
_335.style.display="none";
_335.style.visibility="hidden";
_335.title="";
_335.src=sURL;
_335.name="alertIFrame";
alertIFrame=document.body.appendChild(_335);
if(document.frames){
alertIFrame=document.frames["RSIFrame"];
}
}
catch(exception){
iframeHTML="<iframe id=\"RSIFrame\" name=\"alertIFrame\" title=\"\" style=\"";
iframeHTML+="border:0px;";
iframeHTML+="width:0px;";
iframeHTML+="height:0px;";
iframeHTML+="display:none;";
iframeHTML+="visibility:hidden;";
iframeHTML+="\"></iframe>";
document.body.innerHTML+=iframeHTML;
alertIFrame={};
alertIFrame.document={};
alertIFrame.document.location={};
alertIFrame.document.location.iframe=document.getElementById("RSIFrame");
alertIFrame.document.location.replace=function(_336){
this.iframe.src=_336;
};
}
}
if(navigator.userAgent.indexOf("Gecko")!=-1&&!alertIFrame.contentDocument){
var func="showModalAlert('"+sURL+"', '"+_332+"', "+showAsModeless+")";
setTimeout(func,10);
return false;
}
var _338=getIFrameDoc(alertIFrame);
if(_338==null){
return true;
}
addEvent(alertIFrame,"load",function(){
processEmbeddedAlert(alertIFrame,_333);
if(_334){
_334();
}
});
return false;
}
function processEmbeddedAlert(_339,_33a){
var _33b=getIFrameDoc(_339);
var _33c=findElementsEndingWithId(_33b,_33a.alertClientId+"-fr",null,true)[0];
if(_33c){
var _33d=document.createElement("DIV");
_33d.id=_33c.id;
_33d.style.display="none";
_33d.innerHTML=_33c.innerHTML;
_33c.parentNode.removeChild(_33c);
document.body.appendChild(_33d);
showEmbeddedDialog(_33a.embeddedDialog);
}
}
function EmbeddedDialog(_33e,_33f){
this.pageTitle=null;
this.dialogId=_33e;
if(_33f!="null"){
this.pageContentId=_33f;
}
this.parentNode=null;
this.originalContent=null;
this.dialogContent=null;
this.pageContent=null;
this.fullPageAlert=false;
this.onCloseFnc=null;
this.initialized=false;
this.commandsOverrided=false;
this.openerHaveActionToExecute=true;
this.fadeTimer=null;
this.bgOpacity=0;
this.dialogBG=null;
this.resizeFnc=null;
this.opened=false;
this.checkboxesStates=[];
this.disabledInputs=[];
this.positionPadder=null;
this.adjustPositionTimer=null;
this.keydownFnc=null;
}
function isAnEmbeddedDialogOpened(){
for(i=0;i<alerts_.length;i++){
var al=alerts_[i];
if(al.embeddedDialog){
if(al.embeddedDialog.opened==true){
return true;
}
}
}
return false;
}
function keepFocusInEmbeddedDialog(_341,_342){
}
function hideEmbeddedDialog(_343,cmd){
_343.parentNode.removeChild(_343.dialogContent);
if(!_343.fullPageAlert){
_343.parentNode.appendChild(_343.pageContent);
}
if(_343.dialogBG){
_343.dialogBG.parentNode.removeChild(_343.dialogBG);
_343.dialogBG=null;
removeEvent(window,"resize",_343.resizeFnc);
_343.resizeFnc=null;
_343.bgOpacity=0;
}
_343.parentNode=null;
_343.pageContent=null;
for(var i=0;i<window.document.jsfForm().elements.length;i++){
if(window.document.jsfForm().elements[i].type=="checkbox"){
if(_343.checkboxesStates[i]){
window.document.jsfForm().elements[i].checked=_343.checkboxesStates[i];
}
}
}
while(_343.disabledInputs.length>0){
var _346=_343.disabledInputs.pop();
_346.disabled=false;
_346.style.visibility="visible";
}
if(_343.fadeTimer){
clearInterval(_343.fadeTimer);
_343.fadeTimer=null;
}
_343.bgOpacity=0;
if(_343.adjustPositionTimer){
clearInterval(_343.adjustPositionTimer);
_343.adjustPositionTimer=null;
}
var _347=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
removeEvent(_347,"keydown",_343.keydownFnc);
_343.opened=false;
window.document.title=_343.pageTitle;
window.location="#";
}
function adjustEmbeddedDialogPosition(_348){
var _349=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
_348.positionPadder.style.height=_349.scrollTop+"px";
}
function resizeEmbeddedDialogBackground(_34a){
var _34b=_34a.pageContent;
if(_34a.dialogBG&&_34a.fullPageAlert&&_34b.scrollWidth){
_34a.dialogContent.style.width=_34b.scrollWidth>_34b.clientWidth?_34b.scrollWidth+"px":_34b.clientWidth+"px";
_34a.dialogContent.style.height=_34b.scrollHeight>_34b.clientHeight?_34b.scrollHeight+"px":_34b.clientHeight+"px";
_34a.dialogBG.style.width=_34a.dialogContent.style.width;
_34a.dialogBG.style.height=_34a.dialogContent.style.height;
}
}
function showModal(sURL,_34d,_34e,_34f,_350,_351,_352){
var _353=getWindowTop(window,window.location.hostname);
if(_351&&_352){
sURL=escape(sURL+"&"+_351+"="+_352);
}
var _354=contextPath_+"/akira/pub/modalFrameset.jsp?modalUrl="+escape(sURL)+"&title="+_34d;
if(_353.showModalDialog){
var _355="dialogWidth:"+_34f+";dialogHeight:"+_350+";center:yes;resizable:yes;scroll:yes;help:no;status:yes";
logViewInfo("showModal: pre-windowtop.showModalDialog");
var _356=_353.showModalDialog(_354,_34e,_355);
logViewInfo("showModal: post-windowtop.showModalDialog");
return _356;
}else{
var _355="top=200,left=140,width="+_34f+",height="+_350+",directories=no,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,status=yes,center=yes;";
logViewInfo("showModal: pre-windowtop.open");
currentModal=_353.open(_354,"_blank",_355);
logViewInfo("showModal: post-windowtop.open");
if(currentModal){
currentModal.dialogArguments=_34e;
currentModal.simulateModal=true;
}
}
}
function openModal(sURL,_358,_359,_35a,_35b){
window.document.jsfForm().modalClientId.value=_359;
var _35c=getWindowTop(window,window.location.hostname);
var _35d=contextPath_+"/akira/pub/modalFrameset.jsp?modalUrl="+escape(sURL)+"&title="+_358;
if(_35c.showModalDialog){
var _35e="dialogWidth:"+_35a+";dialogHeight:"+_35b+";center:yes;resizable:yes;scroll:yes;help:no;status:yes";
logViewInfo("openModal: pre-windowtop.showModalDialog");
var _35f=_35c.showModalDialog(_35d,window,_35e);
logViewInfo("openModal: post-windowtop.showModalDialog");
return _35f;
}else{
var _35e="top=200,left=140,width="+_35a+",height="+_35b+",directories=no,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,status=yes,center=yes;";
logViewInfo("openModal: pre-windowtop.open");
currentModal=_35c.open(_35d,"_blank",_35e);
logViewInfo("openModal: post-windowtop.open");
if(currentModal){
currentModal.dialogArguments=window;
currentModal.simulateModal=true;
}
}
}
function openWindow(sURL,_361,_362,_363){
var left=(screen.width-_362)/2;
var top=(screen.height-_363)/2;
var f="left="+left+",top="+top+",width="+_362+"px,height="+_363+"px,center=yes,location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=no,toolbar=no";
logViewInfo("openWindow: pre-window.open");
var _367=window.open(sURL,_361,f,false);
logViewInfo("openWindow: post-window.open");
return _367;
}
function adjustWindowWidth(){
if((/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent))||(/msie 5\.0/i.test(navigator.userAgent)&&(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)))){
var _368=parseInt(window.dialogWidth.substring(0,window.dialogWidth.length-2));
var _369=window.document.body.scrollWidth+40;
var _36a=top.screen.width;
if(_369>_36a){
_369=_36a;
}
window.dialogWidth=_369+"px";
var _36b=(_36a/2)-(_369/2);
window.dialogLeft=_36b+"px";
}
}
function adjustWindowHeight(){
if((/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent))||(/msie 5\.0/i.test(navigator.userAgent)&&(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)))){
var _36c=parseInt(window.dialogHeight.substring(0,window.dialogHeight.length-2));
var _36d=window.document.body.scrollHeight;
var _36e=window.document.body.bottomMargin;
var _36f=_36c+((_36d+parseInt(_36e))-_36c)+40;
var _370=top.screen.height;
if(_36f>_370){
_36f=_370;
}
window.dialogHeight=_36f+"px";
var _371=(_370/2)-(_36f/2);
window.dialogTop=_371+"px";
}
}
function showSource(pEvt){
pEvt=(pEvt)?pEvt:window.event;
if(pEvt.altKey&&pEvt.shiftKey){
var _373=null;
try{
_373=window.open("about:blank","_blank","location=0, menubar=1, resizable=1, scrollbars=1, status=0, titlebar=1, toolbar=0");
}
catch(exception){
_373=top.open("about:blank","_blank","location=0, menubar=1, resizable=1, scrollbars=1, status=0, titlebar=1, toolbar=0");
}
if(_373){
var _374=null;
var _375=window.document.childNodes;
for(var i=0;i<_375.length;i++){
if(_374==null){
_374="";
}else{
_374+="\r\n";
}
_374+=_375[i].outerHTML;
}
_373.document.writeln("<html>");
_373.document.writeln("<head>");
_373.document.writeln("</head>");
_373.document.writeln("<body style=\"background-color: white; font-family: monospace; font-size: 12px;\">");
_373.document.writeln("</body>");
_373.document.writeln("</html>");
_373.document.body.innerText=_374;
}
}
}
function sendUIMessage(_377){
var _378=open(contextPath_+"/UIMessageReceiver.jss?msg="+_377,"messenger","top="+screen.availHeight+", left="+screen.availWidth+", width=100, height=100, resizable=no, scrollbars=no, menubar=no, toolbar=no, directories=no, location=no, status=no");
if(_378){
_378.close();
}
}
function prepareSplitter2(_379){
var _37a=window.document.getElementById(_379);
var _37b=_37a.previousSibling;
var next=nextSiblingWithoutTag(_37a,"script");
var _37d=eval("document.jsfForm()['"+_379+"prevSize'];");
_37b.runtimeStyle.width=_37d.value;
_37d=eval("document.jsfForm()['"+_379+"nextSize'];");
next.runtimeStyle.width=_37d.value;
}
function onSplitterMouseDown(pEvt,_37f){
pEvt=(pEvt)?pEvt:window.event;
splitStartingX_=pEvt.clientX;
splitStartingY_=pEvt.clientY;
splitVertical_=_37f;
splitter_=getEventElement(pEvt);
splitter_.setCapture();
var _380=splitter_.previousSibling;
var next=nextSiblingWithoutTag(splitter_,"script");
var _382=_380.currentStyle.width;
var _383=next.currentStyle.width;
ratioPrevious=parseFloat(_382.substring(0,_382.length-1));
ratioNext=parseFloat(_383.substring(0,_383.length-1));
rectPrev=_380.getBoundingClientRect();
rectNext=next.getBoundingClientRect();
addEvent(document,"mousemove",onSplitterMouseMove);
addEvent(document,"mouseup",onSplitterMouseUp);
}
function onSplitterMouseUp(pEvt){
pEvt=(pEvt)?pEvt:window.event;
removeEvent(document,"mousemove",onSplitterMouseMove);
removeEvent(document,"mouseup",onSplitterMouseUp);
var _385=splitter_.previousSibling;
var next=nextSiblingWithoutTag(splitter_,"script");
var _387=eval("document.jsfForm()['"+splitter_.id+"prevSize'];");
_387.value=_385.currentStyle.width;
_387=eval("document.jsfForm()['"+splitter_.id+"nextSize'];");
_387.value=next.currentStyle.width;
splitter_.releaseCapture();
splitStartingX_=-1;
splitStartingY_=-1;
splitter_=null;
}
function onSplitterMouseMove(pEvt){
pEvt=(pEvt)?pEvt:window.event;
if(pEvt.button){
var _389=splitter_.previousSibling;
var next=nextSiblingWithoutTag(splitter_,"script");
if(splitVertical_){
var diff=pEvt.clientX-splitStartingX_;
var _38c=ratioPrevious+ratioNext;
var _38d=(rectPrev.right-rectPrev.left)+diff;
var _38e=(rectNext.right-rectNext.left)-diff;
var _38f=_38d+_38e;
var _390=(_38d/_38f*_38c);
var _391=(ratioPrevious+ratioNext)-_390;
if(_390>=0&&_390<=100&&_391>=0&&_391<=100){
var _392=_389.currentStyle.width;
var _393=next.currentStyle.width;
_389.runtimeStyle.width=_390+"%";
next.runtimeStyle.width=_391+"%";
var _394=_389.getBoundingClientRect();
var _395=next.getBoundingClientRect();
if((rectPrev.top==rectNext.top)&&(_394.top!=rectPrev.top||_395.top!=rectNext.top)){
_389.runtimeStyle.width=_392;
next.runtimeStyle.width=_393;
}
}
}else{
}
}
}
function onModalWindowUnload(pEvt){
pEvt=(pEvt)?pEvt:window.event;
if(pEvt.clientY<0||pEvt.altKey==true){
sendUIMessage("modCloAbr");
}
}
function installDialogRequiredEvents(){
addEvent(window.document,"click",showSource);
if(window.name=="__MODAL_FRAME_CONTENT"){
addEvent(window,"beforeunload",onModalWindowUnload);
}
}
installDialogRequiredEvents();
function addActionGroup(_397,_398){
actionGroups_[_397]=new ActionGroup(_397,_398);
return actionGroups_[_397];
}
function findActionGroup(_399){
return actionGroups_[_399];
}
function ActionGroup(_39a,_39b){
this.sActionGroupClientId=_39a;
this.dropDown=_39b;
this.actionGroupCommands=[];
this.addActionGroupCommand=addActionGroupCommand;
this.findActionGroupCommand=findActionGroupCommand;
}
function addActionGroupCommand(_39c,_39d,_39e,_39f){
this.actionGroupCommands.push(new ActionGroupCommand(_39c,_39d,_39e,_39f));
}
function findActionGroupCommand(_3a0){
for(i=0;i<this.actionGroupCommands.length;i++){
if(this.actionGroupCommands[i].sActionGroupCommandClientId==_3a0){
return this.actionGroupCommands[i];
}
}
return null;
}
function ActionGroupCommand(_3a1,_3a2,_3a3,_3a4){
this.sActionGroupCommandClientId=_3a1;
this.sJavascript=_3a2;
this.bIsInDropDown=_3a3;
this.bIsInitiallyDisabled=_3a4;
this.execute=executeActionGroupCommand;
}
function executeActionGroupCommand(){
eval(this.sJavascript);
return false;
}
function actionGroupDropDownChange(_3a5,_3a6){
if(_3a6.options[_3a6.selectedIndex].value!=-1){
result=findActionGroup(_3a5).findActionGroupCommand(_3a6.options[_3a6.selectedIndex].value).execute();
if(result==false){
_3a6.selectedIndex=0;
}
}else{
_3a6.selectedIndex=0;
}
return false;
}
function disableCommandButton(_3a7,_3a8,_3a9,_3aa){
var _3ab=window.document.getElementById(_3a7);
var _3ac=(_3a9!=null&&_3a9==true);
if(_3a8==1){
disableTagWithDisabledAttribute(_3a7,_3ac,_3aa);
}else{
if(_3a8==2){
disableNiceCommandButton(_3a7,_3ac,_3aa);
}else{
if(_3a8==3){
disableActionGroup(_3a7,_3ac,_3aa);
}else{
if(_3a8==4){
disableQuickFinder(_3a7,_3ac,_3aa);
}else{
if(_3a8==5){
disableInputDateTime(_3a7,_3ac,_3aa);
}else{
if(_3a8==6){
disableInputTime(_3a7,_3ac,_3aa);
}
}
}
}
}
}
}
function disableTagWithDisabledAttribute(_3ad,_3ae,_3af){
var _3b0=window.document.getElementById(_3ad);
if(_3af==null&&_3ae==true){
_3b0.disabled=!_3b0.disabled;
}else{
if(_3af!=null){
_3b0.disabled=_3af;
}else{
_3b0.disabled=true;
}
}
}
function disableNiceCommandButton(_3b1,_3b2,_3b3){
var _3b4=window.document.getElementById(_3b1);
var _3b5=_3b4.getAttribute("originalState")!=null;
var _3b6=window.document.getElementById(_3b1+"_img");
var _3b7=_3b4.className.split(" ");
if(_3b3==null&&_3b2==true){
if(_3b7[0].lastIndexOf("-off")==(_3b7[0].length-4)&&!_3b5){
_3b7[0]=_3b7[0].substr(0,(_3b7[0].length-4));
_3b4.disabled=false;
if(_3b6!=null){
var _3b8=_3b6.src;
_3b6.src=_3b8.substr(0,_3b8.lastIndexOf("-off"))+_3b8.substr(_3b8.lastIndexOf("."),_3b8.length);
}
}else{
_3b7[0]=_3b7[0]+"-off";
_3b4.disabled=true;
if(_3b6!=null){
var _3b8=_3b6.src;
_3b6.src=_3b8.substr(0,_3b8.lastIndexOf("."))+"-off"+_3b8.substr(_3b8.lastIndexOf("."),_3b8.length);
}
}
}else{
if(_3b3!=null){
if(_3b3==true){
if(_3b7[0].lastIndexOf("-off")!=(_3b7[0].length-4)){
_3b7[0]=_3b7[0]+"-off";
_3b4.disabled=true;
if(_3b6!=null){
var _3b8=_3b6.src;
_3b6.src=_3b8.substr(0,_3b8.lastIndexOf("."))+"-off"+_3b8.substr(_3b8.lastIndexOf("."),_3b8.length);
}
}
}else{
if((_3b7[0].lastIndexOf("-off")==(_3b7[0].length-4)||_3b4.disabled==true)&&!_3b5){
_3b7[0]=_3b7[0].substr(0,(_3b7[0].length-4));
_3b4.disabled=false;
if(_3b6!=null){
var _3b8=_3b6.src;
_3b6.src=_3b8.substr(0,_3b8.lastIndexOf("-off"))+_3b8.substr(_3b8.lastIndexOf("."),_3b8.length);
}
}
}
}else{
if(_3b7[0].lastIndexOf("-off")!=(_3b7[0].length-4)){
_3b7[0]=_3b7[0]+"-off";
_3b4.disabled=true;
if(_3b6!=null){
var _3b8=_3b6.src;
_3b6.src=_3b8.substr(0,_3b8.lastIndexOf("."))+"-off"+_3b8.substr(_3b8.lastIndexOf("."),_3b8.length);
}
}
}
}
_3b4.className=_3b7.join(" ");
if(_3b4.tagName=="A"){
if(_3b4.className.lastIndexOf("-off")>-1){
if(disabledButtons_[_3b4.id]==null){
var _3b9=HTMLUtils.addSpan(null,null);
_3b9.className=_3b4.className;
for(var i=0;i<_3b4.childNodes.length;i++){
var _3bb=_3b4.childNodes[i].cloneNode(true);
_3bb.id=_3bb.id+"-cln";
_3b9.appendChild(_3bb);
}
addSuffixToId(_3b9,"-cln",true);
_3b4.parentNode.insertBefore(_3b9,_3b4);
var _3bc=HTMLUtils.addSpan(_3b9,AccessibilityRes.disabled);
StyleUtils.addClasses(_3bc,"hidden-audible");
_3b4.style.display="none";
disabledButtons_[_3b4.id]=_3b9;
}
}else{
var _3bd=disabledButtons_[_3b4.id];
if(_3bd!=null){
_3b4.parentNode.removeChild(_3bd);
_3b4.style.display="";
disabledButtons_[_3b4.id]=null;
}
}
}
}
function addSuffixToId(_3be,_3bf,_3c0){
if(_3be.id){
_3be.id=_3be.id+_3bf;
}
if(_3c0==true){
for(var i=0;i<_3be.childNodes.length;i++){
addSuffixToId(_3be.childNodes[i],_3bf,_3c0);
}
}
}
function disableTimeSpinner(_3c2,_3c3,_3c4){
var _3c5=window.document.getElementById(_3c2+"-s");
var _3c6=_3c5.className.split(" ");
var _3c7=_3c6[0].lastIndexOf("-off");
if(_3c4==null&&_3c3){
if(_3c7==(_3c6[0].length-4)){
_3c6[0]=_3c6[0].substr(0,(_3c6[0].length-4));
}else{
_3c6[0]=_3c6[0]+"-off";
}
}else{
if(_3c4!=null){
if(_3c4){
if(_3c7!=(_3c6[0].length-4)){
_3c6[0]=_3c6[0]+"-off";
}
}else{
if(_3c7==(_3c6[0].length-4)){
_3c6[0]=_3c6[0].substr(0,(_3c6[0].length-4));
}
}
}else{
if(_3c7!=(_3c6[0].length-4)){
_3c6[0]=_3c6[0]+"-off";
}
}
}
_3c5.className=_3c6.join(" ");
}
function disableActionGroup(_3c8,_3c9,_3ca){
var _3cb=window.document.getElementById(_3c8);
var _3cc=findActionGroup(_3c8);
var _3cd=window.document.getElementById(_3cc.sActionGroupClientId);
if(_3ca==null&&_3c9==true){
_3cd.disabled=!_3cd.disabled;
if(_3cc.dropDown!=null){
_3cc.dropDown.disabled=!_3cc.dropDown.disabled;
}
}else{
if(_3ca!=null){
_3cd.disabled=_3ca;
if(_3cc.dropDown!=null){
_3cc.dropDown.disabled=_3ca;
}
}else{
_3cd.disabled=true;
if(_3cc.dropDown!=null){
_3cc.dropDown.disabled=true;
}
}
}
var _3ce=_3cc.actionGroupCommands.length;
for(i=0;i<_3ce;i++){
var _3cf=_3cc.actionGroupCommands[i];
if(_3cf.bIsInDropDown==false){
disableNiceCommandButton(_3cf.sActionGroupCommandClientId,_3c9,_3cc.dropDown!=null?_3cc.dropDown.disabled:_3ca);
}
}
}
function disableQuickFinder(_3d0,_3d1,_3d2){
disableTagWithDisabledAttribute(_3d0,_3d1,_3d2);
disableNiceCommandButton(_3d0+".action",_3d1,_3d2);
}
function disableInputDateTime(_3d3,_3d4,_3d5){
disableTagWithDisabledAttribute(_3d3+".display",_3d4,_3d5);
}
function disableInputTime(_3d6,_3d7,_3d8){
disableTagWithDisabledAttribute(_3d6+"-h",_3d7,_3d8);
disableTagWithDisabledAttribute(_3d6+"-m",_3d7,_3d8);
disableTagWithDisabledAttribute(_3d6+"-a",_3d7,_3d8);
disableTimeSpinner(_3d6,_3d7,_3d8);
}
function CalendarParam(_3d9,_3da,_3db,_3dc,_3dd,_3de,_3df){
this.componentID=_3d9;
this.hiddenFieldID=_3da;
this.spanID=_3db;
this.ifEmptyFacetID=_3dc;
this.daFormat=_3dd;
this.ifFormat=_3de;
this.params=_3df;
}
function addCalendarParams(_3e0,_3e1,_3e2,_3e3,_3e4,_3e5,_3e6){
var _3e7=new CalendarParam(_3e0,_3e1,_3e2,_3e3,_3e4,_3e5,_3e6);
calendarsParams_.push(_3e7);
if(!calendarOnLoadEventAttached){
addEvent(window,"load",initCalendars);
calendarOnLoadEventAttached=true;
}
}
function initCalendars(){
for(i=0;i<calendarsParams_.length;i++){
Calendar.setup(calendarsParams_[i].params);
}
}
function findCalendarByID(_3e8){
for(var i=0;i<calendarsParams_.length;i++){
if(calendarsParams_[i].componentID.lastIndexOf(_3e8)!=-1){
return calendarsParams_[i];
}
}
return null;
}
function showInputDateIfEmptyFacet(_3ea){
var _3eb=findCalendarByID(_3ea);
window.document.getElementById(_3eb.spanID).innerHTML=window.document.getElementById(_3eb.ifEmptyFacetID).innerHTML;
}
function setInputTime(_3ec,_3ed,_3ee,_3ef){
var date=new Date();
date.setHours(_3ed);
date.setMinutes(_3ee);
date.setSeconds(_3ef);
setInputDate(_3ec,date.getYear(),date.getMonth(),date.getDate(),_3ed,_3ee,_3ef);
}
function adjustTextArea(_3f1){
if(_3f1){
var _3f2=2;
var _3f3=2;
var _3f4=18;
var _3f5=9;
var _3f6=escape(_3f1.value).split("%0D%0A");
if(_3f6){
_3f2=_3f6.length;
}
if(_3f2>document.body.clientHeight/_3f4){
_3f2=document.body.clientHeight/_3f4;
}
if(_3f6){
var _3f7=document.body.clientWidth-computeWindowOffsetLeft(_3f1);
for(n=0;n<(_3f6.length);n++){
var _3f8=unescape(_3f6[n]);
if(_3f3<_3f8.length){
_3f3=_3f8.length;
}
if(_3f3>_3f7/_3f5){
_3f3=_3f7/_3f5;
_3f2+=_3f8.length/(_3f7/_3f5);
}
}
}else{
_3f3=_3f1.value.length;
}
if((_3f3+1)>=_3f1.initialCols){
_3f1.cols=(_3f3+1);
}else{
_3f1.cols=_3f1.initialCols;
}
if((_3f2+1)>=_3f1.initialRows){
_3f1.rows=(_3f2+1);
}else{
_3f1.rows=_3f1.initialRows;
}
}
}
function prepareTextArea(){
tas=document.getElementsByTagName("TEXTAREA");
for(var uli=0;uli<tas.length;uli++){
var ta=tas[uli];
if(ta.onkeyup!=null&&ta.onkeydown!=null){
ta.initialCols=ta.cols;
ta.initialRows=ta.rows;
adjustTextArea(ta);
}
}
}
function changeTimeMouseDown(pEvt,_3fc,_3fd,_3fe,_3ff){
pEvt=(pEvt)?pEvt:window.event;
var _400=getEventElement(pEvt);
var _401=_400.offsetHeight/2;
var _402=_400;
while(_402){
_401+=_402.offsetTop;
if(!_402.offsetParent){
break;
}
_402=_402.offsetParent;
}
var up=pEvt.clientY<_401;
if(currentTimeInput==null||currentTimeInput==undefined||!isOurTimeInput(_3fc,currentTimeInput)){
currentTimeInput=window.document.getElementById(_3fc+"-h");
}
if(currentTimeInput!=null&&currentTimeInput!=undefined){
if(pEvt.type=="dblclick"){
changeTime(up,_3fe,_3ff);
}else{
var _404=_400.className;
if(_404.lastIndexOf("-off")==-1){
_400.setAttribute("akOldClass",_404);
_400.className=up?_3fd+"-up":_3fd+"-down";
changeTime(up,_3fe,_3ff);
window.clearTimeout(currentTimeInputTimeout);
currentTimeInputTimeout=setTimeout(function(){
startRollingTime(up,_3fe,_3ff);
},400);
}
}
}
}
function isOurTimeInput(_405,_406){
var id=currentTimeInput.id;
return id==_405+"-h"||id==_405+"-m"||id==_405+"-a";
}
function startRollingTime(pUp,_409,_40a){
if(currentTimeInput!=null){
window.clearInterval(currentTimeInputInterval);
currentTimeInputInterval=window.setInterval(function(){
changeTime(pUp,_409,_40a);
},110);
}
}
function changeTime(pUp,_40c,_40d){
if(currentTimeInput!=null){
if(currentTimeInput.id.lastIndexOf("-a")==currentTimeInput.id.length-2){
currentTimeInput.value=currentTimeInput.value=="am"?"pm":"am";
}else{
var _40e=parseInt(removeHeadingZero(currentTimeInput.value));
if(isNaN(_40e)){
currentTimeInput.value="1";
}else{
if(currentTimeInput.id.lastIndexOf("-m")==currentTimeInput.id.length-2){
_40e=pUp?_40e+_40c:_40e-_40c;
if(pUp){
_40e=Math.floor(_40e/_40c)*_40c;
}else{
_40e=Math.ceil(_40e/_40c)*_40c;
}
if(_40e<0){
currentTimeInput.value=""+(60-_40c);
}else{
if(_40e>=60){
currentTimeInput.value="00";
}else{
var _40f=_40e<10?"0":"";
currentTimeInput.value=_40f+_40e;
}
}
}else{
if(currentTimeInput.id.lastIndexOf("-h")==currentTimeInput.id.length-2){
var _410=_40e;
_40e=pUp?_40e+1:_40e-1;
if(_40d){
if(_40e<0){
currentTimeInput.value="23";
}else{
if(_40e>=24){
currentTimeInput.value="0";
}else{
currentTimeInput.value=""+_40e;
}
}
}else{
if(_40e<=0){
currentTimeInput.value="12";
}else{
if(_40e>=13){
currentTimeInput.value="1";
}else{
currentTimeInput.value=""+_40e;
}
}
}
}
}
}
}
currentTimeInput.select();
}
}
function removeHeadingZero(val){
if(val.length>1&&val.charAt(0)=="0"){
return val.substring(1,val.length);
}
return val;
}
function changeTimeMouseUp(pEvt){
pEvt=(pEvt)?pEvt:window.event;
window.clearTimeout(currentTimeInputTimeout);
window.clearInterval(currentTimeInputInterval);
var _413=getEventElement(pEvt);
var _414=_413.getAttribute("akOldClass");
if(_414!=undefined&&_414!=null&&_414!=""){
_413.className=_414;
_413.setAttribute("akOldClass","");
currentTimeInput.select();
}
}
function prepareTimeInput(pEvt){
pEvt=(pEvt)?pEvt:window.event;
currentTimeInput=getEventElement(pEvt);
currentTimeInput.select();
}
function onkeypressTimeInput(pEvt){
pEvt=(pEvt)?pEvt:window.event;
var elem=getEventElement(pEvt);
elem.setAttribute("akOldValue",elem.value);
var _418=String.fromCharCode(pEvt.keyCode);
if(_418.match(/^\d+$/)==null){
pEvt.cancelBubble=true;
pEvt.returnValue=false;
return false;
}
return true;
}
function onkeydownTimeInput(pEvt){
pEvt=(pEvt)?pEvt:window.event;
var elem=getEventElement(pEvt);
elem.setAttribute("akOldValue",elem.value);
}
function validateHourKeyUp(pEvt,_41c){
pEvt=(pEvt)?pEvt:window.event;
var elem=getEventElement(pEvt);
var _41e=elem.getAttribute("akOldValue");
if(_41e!=null){
var _41f=parseInt(removeHeadingZero(elem.value));
if(isNaN(_41f)||(_41c&&(_41f<0||_41f>23))||(!_41c&&(_41f<1||_41f>12))){
elem.value=_41e;
elem.setAttribute("akOldValue",null);
elem.select();
}
}
}
function adjustMinute(pEvt){
pEvt=(pEvt)?pEvt:window.event;
var elem=getEventElement(pEvt);
if(elem.value.length==1){
elem.value="0"+elem.value;
}
}
function validateMinuteKeyUp(pEvt,_423,_424){
pEvt=(pEvt)?pEvt:window.event;
var elem=getEventElement(pEvt);
var _426=elem.getAttribute("akOldValue");
if(_426!=undefined&&_426!=null){
var _427=parseInt(removeHeadingZero(elem.value));
if(isNaN(_427)||_427<0||_427>59||(_424&&_427%_423!=0)){
if(!isNaN(_427)&&_424&&_427%_423!=0){
if(_427<10){
_427*=10;
}
_427=Math.min(Math.ceil(_427/_423)*_423,60-_423);
elem.value=_427+"";
elem.select();
}else{
elem.value=_426;
elem.select();
}
}
elem.setAttribute("akOldValue",null);
}
}
function onkeypressTimeInputAmPm(pEvt){
pEvt=(pEvt)?pEvt:window.event;
var elem=getEventElement(pEvt);
var _42a=String.fromCharCode(pEvt.keyCode);
if(_42a=="a"||_42a=="A"){
elem.value="am";
}else{
if(_42a=="p"||_42a=="P"){
elem.value="pm";
}
}
elem.select();
pEvt.cancelBubble=true;
pEvt.returnValue=false;
return false;
}
function prepareSelectableDataTable(_42b,_42c,_42d){
if(_42c!=null){
var _42e=findElementsEndingWithId(null,_42c,null,true)[0];
var _42f=window.document.getElementById(_42b+"._selCountFmt");
_42f.value=_42e.innerHTML;
}
var _430=window.document.getElementById(_42b+"._selCount");
updateTableSelCount(_42b,_430.value,_42c,_42d);
}
function updateTableSelCount(_431,_432,_433,_434){
var _435=window.document.getElementById(_431+"._selCount");
var _436=parseInt(_435.value);
_435.value=_432;
if(_433!=null){
var _437=findElementsEndingWithId(null,_433,null,true)[0];
var _438=window.document.getElementById(_431+"._selCountFmt").value;
_437.innerHTML=_438.replace(/\{0\}/,_432);
}
if(_434!=null){
eval(_434+"('"+_431+"', "+_432+", "+_436+");");
}
}
function manageTableSelCount2(pEvt,_43a,_43b,_43c){
pEvt=(pEvt)?pEvt:window.event;
var src=getEventElement(pEvt);
if(src.tagName!="INPUT"||(src.type!="checkbox"&&src.type!="radio")){
return;
}
var _43e=window.document.getElementById(_43a+"._total");
var _43f=window.document.getElementById(_43a+"._selmode");
var _440=window.document.getElementById(_43a+"._selCountFmt");
var _441=getSelectedRowCount(src);
var _442=parseInt(window.document.getElementById(_43a+"._selCount").value);
var _443=findParentOfType(src,"THEAD");
if(_443!=null){
if(src.type=="checkbox"){
if(src.checked){
var _444=parseInt(_43e.value)+parseInt(_442)-parseInt(_441.nbSelectedRows);
_441.value=_43e.value;
updateTableSelCount(_43a,_444.toString(),_43b,_43c);
_43f.value="2";
}else{
var _444=parseInt(_442)-(parseInt(_43e.value)-(parseInt(_43e.value)-parseInt(_441.nbSelectedRows)));
_441.value=0;
updateTableSelCount(_43a,_444.toString(),_43b,_43c);
_43f.value="2";
}
formCheckAll(src);
}
}else{
var _445=findParentOfType(src,"TBODY");
if(_445!=null&&src.type=="checkbox"){
_442=src.checked?_442+1:_442-1;
_441.value=src.checked?parseInt(_441.value)+1:parseInt(_441.value)-1;
updateTableSelCount(_43a,_442.toString(),_43b,_43c);
formSyncCheckAll2(src,false);
}else{
if(src.type=="radio"){
updateTableSelCount(_43a,"1",_43b,_43c);
}
}
}
}
function initEmbeddedDialog(_446){
var _447=findAlert(_446);
var _448=_447.embeddedDialog;
if(!_448.initialized){
var _449=findElementsEndingWithId(document,_448.dialogId+"-fr",null,true)[0];
_448.originalContent=document.createElement("DIV");
if(_448.htmlContent!=null){
_448.originalContent.innerHTML=_448.htmlContent;
}else{
_448.originalContent.innerHTML=_449.innerHTML;
}
_448.positionPadder=document.createElement("DIV");
_448.originalContent.insertBefore(_448.positionPadder,_448.originalContent.childNodes[0]);
if(_448.originalContent!=null){
if(_448.originalContent.parentNode!=null){
_448.originalContent.parentNode.removeChild(_448.originalContent);
}
_448.initialized=true;
}
}
}
function showEmbeddedDialog(_44a){
for(i=0;i<alerts_.length;i++){
var _44c=alerts_[i];
var _44d=_44c.embeddedDialog;
if(_44d!=null&&_44d.opened){
hideEmbeddedDialog(_44d,null);
}
}
for(var i=0;i<window.document.jsfForm().elements.length;i++){
if(window.document.jsfForm().elements[i].type=="checkbox"){
_44a.checkboxesStates[i]=window.document.jsfForm().elements[i].checked;
}
}
if(!_44a.initialized){
initEmbeddedDialog(_44a.dialogId);
}
if(_44a.pageContentId!=null){
_44a.pageContent=findElementsEndingWithId(window.document.body,_44a.pageContentId,null,true)[0];
}else{
_44a.pageContent=window.document.body;
}
if(_44a.pageContent.tagName=="BODY"){
_44a.parentNode=window.document.body;
}else{
_44a.parentNode=_44a.pageContent.parentNode;
}
if(_44a.pageContent.tagName=="BODY"){
var _44e=document.createElement("DIV");
_44e.className="alert-full-page";
_44a.fullPageAlert=true;
var _44e=document.createElement("DIV");
_44e.className="alert-full-page-container";
var _44f=HTMLUtils.addAnchor(_44e,"");
_44f.id="alertAnchor";
_44f.href="#";
_44f.tabIndex=0;
_44e.appendChild(_44f);
_44e.appendChild(_44a.originalContent);
_44a.dialogContent=_44e;
var bg=document.createElement("DIV");
bg.className="alert-full-page-bg";
_44e.appendChild(bg);
_44a.dialogBG=bg;
resizeEmbeddedDialogBackground(_44a);
adjustEmbeddedDialogPosition(_44a);
_44a.fadeTimer=setInterval(function(){
fadeEmbeddedDialogBG(_44a,60);
},5);
var _451=document.getElementsByTagName("INPUT");
for(var i=0;i<_451.length;i++){
var _452=_451[i];
if(!_452.disabled&&_452.type!="hidden"){
_452.style.visibility="hidden";
_44a.disabledInputs.push(_452);
}
}
var _453=document.getElementsByTagName("SELECT");
for(var i=0;i<_453.length;i++){
var _454=_453[i];
_454.style.visibility="hidden";
_44a.disabledInputs.push(_454);
}
var _455=document.getElementsByTagName("TEXTAREA");
for(var i=0;i<_455.length;i++){
var _456=_455[i];
_456.style.visibility="hidden";
_44a.disabledInputs.push(_456);
}
}else{
_44a.parentNode.removeChild(_44a.pageContent);
}
_44a.parentNode.appendChild(_44a.dialogContent);
_44a.opened=true;
if(!_44a.commandsOverrided){
overrideEmbeddedAlertCommandClick(_44a.dialogId);
}
var _457=ElementUtils.getChildrenElementsByClassName(_44a.dialogContent,"alert-title");
if(_457!=null&&_457.length>0){
_44a.pageTitle=window.document.title;
window.document.title=_457[0].innerHTML;
}
var _458=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
_44a.keydownFnc=function(_459){
keepFocusInEmbeddedDialog(_459,_44a);
};
addEvent(_458,"keydown",_44a.keydownFnc);
setTimeout(function(){
window.location="#alertAnchor";
},100);
var _45a=document.getElementById("alertAnchor");
if(_45a!=null){
_45a.focus();
}
}
function fadeEmbeddedDialogBG(_45b,_45c){
_45b.bgOpacity+=1;
if(_45b.bgOpacity<_45c){
var bg=_45b.dialogBG;
if(bg!=null){
if(typeof (bg.filters)!="undefined"&&typeof (bg.filters.alpha)!="undefined"){
bg.filters.alpha.opacity=_45b.bgOpacity;
}else{
if(typeof (bg.style.MozOpacity)!="undefined"){
bg.style.MozOpacity=_45b.bgOpacity/100;
}else{
if(typeof (bg.style.KHTMLOpacity)!="undefined"){
bg.style.KHTMLOpacity=_45b.bgOpacity/100;
}else{
bg.style.opacity=_45b.bgOpacity/100;
}
}
}
}
}else{
if(_45b.fadeTimer!=null){
clearInterval(_45b.fadeTimer);
_45b.fadeTimer=null;
}
_45b.bgOpacity=0;
}
}
var BalloonRenderer={TIP_WIDTH:20,TIP_HEIGHT:25,TIP_XOFFSET:27,TIP_YOFFSET:6,DEFAULT_HIDE_DELAY:350,DEFAULT_SHOW_DELAY:500,TIP_SUFFIX:"_tip",MIDDLE_SUFFIX:"_middle",BLOCKER_SUFFIX:"_blocker",BALLOON_SUFFIX:"_balloon",INITIALIZING:1,INITIALIZED:2,SHOW_REQUESTED:3,SHOWN:4,HIDE_REQUESTED:5,HIDING:6,HIDDEN:7,show:function(_45e,_45f,_460){
_45e=(_45e)?_45e:window.event;
var _461=_45f+this.BALLOON_SUFFIX;
var _462=document.getElementById(_461);
if(_462==null){
_462=HTMLUtils.addDiv(window.document.body);
_462.id=_461;
_462.balloonInfo=new BalloonRenderer.BalloonInfo(this.INITIALIZING,mouseX(_45e),mouseY(_45e));
_462.balloonInfo.initialContent=document.getElementById(_45f);
_462.balloonInfo.initialContentParent=_462.balloonInfo.initialContent.parentNode;
}else{
if(_462.balloonInfo.state==this.HIDE_REQUESTED||_462.balloonInfo.state==this.HIDING||_462.balloonInfo.state==this.SHOW_REQUESTED){
return;
}
}
_462.balloonInfo.state=this.SHOW_REQUESTED;
setTimeout("BalloonRenderer._show('"+_461+"', "+_460+");",this.DEFAULT_SHOW_DELAY);
},_show:function(_463,_464){
var _465=document.getElementById(_463);
if(_465.balloonInfo.state==this.SHOW_REQUESTED){
if(!_465.balloonInfo.fullyInitialized){
this.buildBalloon(_465.id);
}
BalloonRenderer.positionBalloon(_465,_465.balloonInfo.initialContent);
_465.balloonInfo.state=this.SHOWN;
if(_464!=null){
_464();
}
}
},buildBalloon:function(_466){
var _467=document.getElementById(_466);
addClass(_467,"balloon");
var _468=HTMLUtils.addDiv(_467);
addClass(_468,"balloon-top");
HTMLUtils.addSpan(_468);
var _469=HTMLUtils.addDiv(_467);
addClass(_469,"balloon-middle");
_469.id=_466+this.MIDDLE_SUFFIX;
addClass(HTMLUtils.addDiv(_467),"balloon-bottom");
addEvent(_467,"mouseover",function(){
BalloonRenderer.mouseOverBalloon(_466);
});
addEvent(_467,"mouseout",function(){
BalloonRenderer.mouseOutBalloon(_466);
});
_467.balloonInfo.state=this.INITIALIZED;
_467.balloonInfo.fullyInitialized=true;
},buildTip:function(_46a){
var _46b=document.getElementById(_46a+this.TIP_SUFFIX);
if(_46b==null){
_46b=HTMLUtils.addDiv(window.document.body);
_46b.id=_46a+this.TIP_SUFFIX;
addClass(_46b,"balloon-tip");
addEvent(_46b,"mouseover",function(){
BalloonRenderer.mouseOverBalloon(_46a);
});
addEvent(_46b,"mouseout",function(){
BalloonRenderer.mouseOutBalloon(_46a);
});
}
return _46b;
},mouseOverBalloon:function(_46c){
var _46d=document.getElementById(_46c);
_46d.balloonInfo.isOverBalloon=true;
_46d.balloonInfo.state=this.SHOWN;
},mouseOutBalloon:function(_46e){
var _46f=document.getElementById(_46e);
_46f.balloonInfo.isOverBalloon=false;
this.hide(_46e.substr(0,_46e.length-this.BALLOON_SUFFIX.length));
},positionBalloon:function(_470,_471){
var _472=this.buildTip(_470.id);
var _473=document.getElementById(_470.id+this.MIDDLE_SUFFIX);
if(_473.firstChild!=null){
_473.removeChild(_473.firstChild);
}
_473.appendChild(_471);
_471.style.display="block";
_470.style.display="block";
var _474=_470.offsetHeight;
var _475=_470.offsetWidth;
var _476=window.scrollY||document.documentElement.scrollTop;
var _477=document.body.offsetWidth;
var xPos=_470.balloonInfo.initialPosX;
var yPos=_470.balloonInfo.initialPosY;
var _47a=xPos-this.TIP_XOFFSET;
var _47b=yPos-_474-this.TIP_HEIGHT;
removeClass(_472,"balloon-tip-topL");
removeClass(_472,"balloon-tip-topR");
removeClass(_472,"balloon-tip-bottomL");
removeClass(_472,"balloon-tip-bottomR");
_472.style.display="block";
if(_47b>_476){
_470.style.top=_47b+"px";
_472.style.top=_47b+_474-this.TIP_YOFFSET+"px";
if(_47a+_475<_477){
addClass(_472,"balloon-tip-bottomL");
_470.style.left=_47a+"px";
_472.style.left=_47a+this.TIP_XOFFSET+"px";
}else{
_47a=xPos;
addClass(_472,"balloon-tip-bottomR");
_470.style.left=_47a-_475+this.TIP_XOFFSET+"px";
_472.style.left=_47a-this.TIP_XOFFSET+"px";
}
}else{
_47b=yPos+this.TIP_HEIGHT+this.TIP_YOFFSET;
_470.style.top=_47b+"px";
_472.style.top=_47b-this.TIP_HEIGHT+"px";
if(_47a+_475<_477){
addClass(_472,"balloon-tip-topL");
_470.style.left=_47a+"px";
_472.style.left=_47a+this.TIP_XOFFSET+"px";
}else{
_47a=xPos;
addClass(_472,"balloon-tip-topR");
_470.style.left=_47a-_475+this.TIP_XOFFSET+"px";
_472.style.left=_47a-this.TIP_XOFFSET+"px";
}
}
Core.hideShowCovered(_470);
},hide:function(_47c){
var _47d=document.getElementById(_47c+this.BALLOON_SUFFIX);
_47d.balloonInfo.state=this.HIDE_REQUESTED;
setTimeout("BalloonRenderer._hide('"+_47c+"');",this.DEFAULT_HIDE_DELAY);
},_hide:function(_47e){
var _47f=document.getElementById(_47e+this.BALLOON_SUFFIX);
if(_47f.balloonInfo.state==this.HIDE_REQUESTED){
_47f.balloonInfo.state=this.HIDING;
var _480=document.getElementById(_47f.id+this.TIP_SUFFIX);
var _481=document.getElementById(_47f.id+this.MIDDLE_SUFFIX);
if(_481!=null&&_481.firstChild!=null){
_481.removeChild(_481.firstChild);
}
_47f.style.display="none";
if(_480!=null){
_480.style.display="none";
}
if(_47f.balloonInfo.initialContent!=null){
_47f.balloonInfo.initialContent.style.display="none";
_47f.balloonInfo.initialContentParent.appendChild(_47f.balloonInfo.initialContent);
}
Core.hideShowCovered(_47f);
_47f.balloonInfo.state=this.HIDDEN;
}
},contentReady:function(_482,_483){
var _484=document.getElementById(_482+this.BALLOON_SUFFIX);
if(_484.balloonInfo.state==this.INITIALIZED||_484.balloonInfo.state==this.SHOWN||_484.balloonInfo.state==this.SHOW_REQUESTED){
BalloonRenderer.positionBalloon(_484,_483);
_484.balloonInfo.state=this.SHOWN;
}
},BalloonInfo:function(_485,_486,_487){
this.state=_485;
this.initialPosX=_486;
this.initialPosY=_487;
this.fullyInitialized=false;
this.isOverBalloon=false;
this.initialContent=null;
this.initialContentParent=null;
}};
var DataTrainRenderer={SPEED:25,DELAY:10,moveTrainTo:function(_488,_489){
var _48a=document.getElementById(_488);
if(_48a.trainWidth<=_48a.windowWidth){
_48a.style.left=(_48a.windowWidth-_48a.trainWidth-15)/2+"px";
_48a.style.padding="0";
_48a.leftShifter.src=_48a.leftShifterDisabledImage;
_48a.rightShifter.src=_48a.rightShifterDisabledImage;
}else{
if(_489+_48a.offsetWidth<=_48a.windowWidth){
_48a.style.left=(-1*_48a.offsetWidth)+_48a.windowWidth+"px";
_48a.leftShifter.src=_48a.leftShifterEnabledImage;
_48a.rightShifter.src=_48a.rightShifterDisabledImage;
}else{
if(_489<0){
_48a.style.left=_489+"px";
_48a.leftShifter.src=_48a.leftShifterEnabledImage;
_48a.rightShifter.src=_48a.rightShifterEnabledImage;
return true;
}else{
_48a.style.left="0px";
_48a.leftShifter.src=_48a.leftShifterDisabledImage;
_48a.rightShifter.src=_48a.rightShifterEnabledImage;
}
}
}
return false;
},move:function(_48b,_48c){
var _48d=document.getElementById(_48b);
var _48e=Math.abs(DataTrainRenderer.SPEED/_48c)<=1?DataTrainRenderer.SPEED*(_48c>0?1:-1):_48c;
if(_48e==0){
return;
}
if(DataTrainRenderer.moveTrainTo(_48b,parseInt(_48d.style.left)+_48e)==true){
setTimeout("DataTrainRenderer.move('"+_48b+"', "+(_48c-_48e)+")",DataTrainRenderer.DELAY);
}
},shiftLeft:function(_48f){
var _490=document.getElementById(_48f);
DataTrainRenderer.move(_490.id,_490.windowWidth-_490.wagonWidth);
},shiftRight:function(_491){
var _492=document.getElementById(_491);
DataTrainRenderer.move(_492.id,-1*(_492.windowWidth-_492.wagonWidth));
},initTrain:function(_493,_494,vwc,_496,_497,_498,_499,_49a,_49b){
var _49c=document.getElementById(_493);
var _49d=_49c.parentNode;
var _49e=findElementsEndingWithId(null,_493+"-wagon",null,false);
var _49f=_49e.length;
var _4a0=0;
if(_49f>0){
_4a0=_49e[0].parentNode.parentNode.childNodes[0].offsetWidth+_49e[0].parentNode.parentNode.childNodes[1].offsetWidth+_49e[0].parentNode.parentNode.childNodes[2].offsetWidth;
}
for(i=0;i<_49e.length;i++){
var cur=_49e[i];
cur.childNodes[0].style.top=(cur.offsetHeight-cur.childNodes[0].offsetHeight)/2+"px";
}
_49c.trainWidth=_49f*_4a0;
_49c.style.width=_49c.trainWidth+15+"px";
_49c.windowWidth=_49d.offsetWidth;
_49c.wagonWidth=_4a0;
_49c.styleClassRoot=_496;
_49c.leftShifter=document.getElementById(_493+"-ls");
_49c.rightShifter=document.getElementById(_493+"-rs");
_49c.leftShifterEnabledImage=_49b+"/"+_497;
_49c.rightShifterEnabledImage=_49b+"/"+_499;
_49c.leftShifterDisabledImage=_49b+"/"+_498;
_49c.rightShifterDisabledImage=_49b+"/"+_49a;
DataTrainRenderer.moveTrainTo(_49c.id,(-1*_494*_4a0));
}};
var MenuHierarchyRenderer={HIERARCHIES:[],updateMenu:function(_4a2,_4a3){
var menu=EventUtils.getElement(_4a2);
var _4a5=document.getElementById("hierarchyStatus"+"-"+menu.id.substring(0,menu.id.lastIndexOf("-")));
if(menu){
var _4a6=_4a5.value.indexOf(menu.id);
if(_4a6!=-1){
var _4a7=_4a6+menu.id.length+1;
var _4a8=_4a5.value.indexOf(";",_4a7);
var _4a9=_4a5.value.indexOf(",",_4a8);
var _4aa=_4a5.value.substring(_4a6,_4a9);
var _4ab=_4a5.value.substring(_4a7,_4a8);
var _4ac=menu.id+"="+_4ab+";"+menu.selectedIndex;
_4a5.value=_4a5.value.replace(_4aa,_4ac);
}
}
if(menu&&menu.dependency){
this.clearMenu(menu.dependency,_4a3);
var _4ad=menu.options[menu.selectedIndex].value;
var _4ae=_4a5.value.indexOf(menu.dependency.id);
if(_4ae==-1){
_4a5.value=_4a5.value.concat(menu.dependency.id+"="+_4ad+";"+menu.dependency.selectedIndex+",");
}else{
var _4af=menu.dependency.id+"="+_4ad+";"+menu.dependency.selectedIndex;
var pos=_4a5.value.indexOf(menu.dependency.id);
var pos2=pos+menu.dependency.id.length+1;
var pos3=_4a5.value.indexOf(";",pos2);
var pos4=_4a5.value.indexOf(",",pos3);
var _4b4=_4a5.value.substring(pos,pos4);
_4a5.value=_4a5.value.replace(_4b4,_4af);
}
var _4b5=this.HIERARCHIES[_4a3][_4ad];
if(_4b5){
for(i=0;i<_4b5.length;i++){
menu.dependency.options[i]=new Option(_4b5[i].text,_4b5[i].value);
}
if(menu.dependency.options.length>1){
removeClass(menu.dependency.parentNode,"hidden-audible");
menu.dependency.disabled=false;
}
}else{
var _4b6=document.jsfForm()[_4a3+"-r"];
var url=_4b6.value;
url=addParameter(url,"q",_4ad);
var _4b8=new HTTPClient();
_4b8.init(url);
_4b8.asyncGET(new MenuHierarchyHandler(menu.dependency,_4a3,_4ad));
}
}
},refreshMenu:function(_4b9,_4ba){
var menu=document.getElementById(_4b9);
var _4bc=document.getElementById("hierarchyStatus"+"-"+_4b9.substring(0,_4b9.lastIndexOf("-")));
if(_4bc.value!=""){
var pos=_4bc.value.indexOf(_4b9);
if(pos==-1){
return;
}
var pos2=pos+_4b9.length+1;
var _4bf=_4bc.value.substring(pos2,_4bc.value.indexOf(";",pos2));
var _4c0=document.jsfForm()[_4ba+"-r"];
var url=_4c0.value;
url=addParameter(url,"q",_4bf);
var _4c2=new HTTPClient();
_4c2.init(url);
_4c2.asyncGET(new MenuHierarchyHandler(menu,_4ba,_4bf));
}
},clearMenu:function(_4c3,_4c4){
while(_4c3.options.length>0){
_4c3.options[0]=null;
}
var _4c5=this.HIERARCHIES[_4c4]["-1000"];
_4c3.options[0]=new Option(_4c5[0].text,_4c5[0].value);
if(_4c3.dependency){
this.clearMenu(_4c3.dependency,_4c4);
}
addClass(_4c3.parentNode,"hidden-audible");
_4c3.disabled=true;
},cloneOptions:function(_4c6){
var _4c7=new Array(_4c6.length);
for(i=0;i<_4c6.length;i++){
_4c7[i]=new Option(_4c6[i].text,_4c6[i].value);
}
return _4c7;
},loadOptions:function(_4c8,_4c9,_4ca,_4cb){
var _4cc=_4cb.documentElement.childNodes;
var _4cd=1;
for(var i=0;i<_4cc.length;i++){
var item=_4cc.item(i);
if(item.nodeName!="option"){
continue;
}
var _4d0=item.childNodes[0].childNodes[0].nodeValue;
var _4d1=item.childNodes[1].childNodes[0].nodeValue;
_4c8.options[_4cd++]=new Option(_4d1,_4d0);
}
this.HIERARCHIES[_4c9][_4ca]=this.cloneOptions(_4c8.options);
var _4d2=document.getElementById("hierarchyStatus"+"-"+_4c8.id.substring(0,_4c8.id.lastIndexOf("-")));
var pos=_4d2.value.indexOf(_4c8.id);
if(pos!=-1){
var pos2=_4d2.value.indexOf(";",pos);
var pos3=_4d2.value.indexOf(",",pos2);
var _4d6=_4d2.value.substring(pos2+1,pos3);
_4c8.selectedIndex=_4d6;
}
if(_4c8.options.length>1){
removeClass(_4c8.parentNode,"hidden-audible");
_4c8.disabled=false;
}
}};
function MenuHierarchyHandler(_4d7,_4d8,_4d9){
this.menu=_4d7;
this.hierarchyId=_4d8;
this.parentValue=_4d9;
}
MenuHierarchyHandler.prototype.onInit=function(){
};
MenuHierarchyHandler.prototype.onError=function(){
};
MenuHierarchyHandler.prototype.onProgress=function(){
};
MenuHierarchyHandler.prototype.onLoad=function(_4da){
MenuHierarchyRenderer.loadOptions(this.menu,this.hierarchyId,this.parentValue,_4da);
};
var SuggestiveInputRenderer={KEYUP:38,KEYDOWN:40,KEYENTER:13,KEYTAB:9,DELAY:100,CACHES:[],initSuggestiveInput:function(_4db,_4dc,_4dd){
var _4de=document.getElementById(_4db);
var _4df=[];
_4df[""]=[];
this.CACHES[_4db]=_4df;
_4de.queryURL=_4dd;
_4de.styleClassRoot=_4dc;
_4de.autocomplete="off";
addEvent(_4de,"keydown",this.keydownHandler);
addEvent(_4de,"change",this.changeHandler);
addEvent(_4de,"blur",this.blurHandler);
var _4e0=document.getElementById(_4db+"-hidden");
if(_4e0.value){
_4e0.inputValue=_4de.value;
}
},changeHandler:function(_4e1){
theEvent=_4e1?_4e1:event;
SuggestiveInputRenderer._changeHandler(getEventElement(theEvent));
},_changeHandler:function(_4e2){
this.unselect(_4e2);
},blurHandler:function(_4e3){
theEvent=_4e3?_4e3:event;
SuggestiveInputRenderer._blurHandler(getEventElement(theEvent));
},_blurHandler:function(_4e4){
SuggestiveInputRenderer.hideSuggestions(_4e4);
},keydownHandler:function(_4e5){
theEvent=_4e5?_4e5:event;
SuggestiveInputRenderer._keydownHandler(theEvent,getEventElement(theEvent));
},_keydownHandler:function(_4e6,_4e7){
var _4e8=SuggestiveInputRenderer.getSuggestionsDiv(_4e7);
var key=getKeyPressed(_4e6);
if(_4e8.style.visibility=="hidden"&&key!=this.KEYTAB||(key!=this.KEYUP&&key!=this.KEYDOWN&&key!=this.KEYENTER&&key!=this.KEYTAB)){
window.clearTimeout(_4e7.timeoutID);
_4e7.timeoutID=window.setTimeout("SuggestiveInputRenderer.showSuggestions(\""+_4e7.id+"\");",this.DELAY);
return true;
}
var _4ea=this.getSelectedDivIndex(_4e8);
if((key==this.KEYENTER)||(key==this.KEYTAB)){
if(_4ea>=0){
var _4eb=this.setSelectedDiv(_4e8,_4ea);
SuggestiveInputRenderer._selectResult(_4eb);
}
return false;
}else{
if(key==this.KEYUP){
this.setSelectedDiv(_4e8,_4ea-1);
}else{
if(key==this.KEYDOWN){
this.setSelectedDiv(_4e8,_4ea+1);
}
}
}
return true;
},showSuggestions:function(_4ec){
var _4ed=document.getElementById(_4ec);
var _4ee=_4ed.value.toLowerCase();
var _4ef=SuggestiveInputRenderer.CACHES[_4ed.id][_4ee.toUpperCase()];
if(!this.unselect(_4ed)){
return;
}
if(!_4ef){
window.clearTimeout(_4ed.timeoutID);
_4ed.timeoutID=window.setTimeout("SuggestiveInputRenderer.doQuery(\""+_4ed.id+"\");",this.DELAY);
}else{
var _4f0=SuggestiveInputRenderer.getSuggestionsDiv(_4ed);
var x=_4ed.offsetLeft;
var y=_4ed.offsetTop+_4ed.offsetHeight;
var _4f3=_4ed;
while(_4f3.offsetParent){
_4f3=_4f3.offsetParent;
x+=_4f3.offsetLeft;
y+=_4f3.offsetTop;
}
_4f0.style.left=x+"px";
_4f0.style.top=y+"px";
while(_4f0.childNodes.length>0){
_4f0.removeChild(_4f0.childNodes[0]);
}
for(var i=0;i<_4ef.length;i++){
var _4f5=HTMLUtils.addDiv(_4f0);
addClass(_4f5,_4ed.styleClassRoot+"-sug-div");
_4f5.id="test";
_4f5.onmousedown=SuggestiveInputRenderer.selectResult;
_4f5.onmousemove=SuggestiveInputRenderer.highlightResult;
_4f5.onmouseout=SuggestiveInputRenderer.unhighlightResult;
_4f5.inputID=_4ec;
var _4f6=HTMLUtils.addSpan(_4f5);
addClass(_4f6,_4ed.styleClassRoot+"-sug-span");
_4f6.key=_4ef[i][0];
_4f6.innerHTML=_4ef[i][1];
_4f6.id="suggestion";
_4f6.inputID=_4ec;
}
if(_4ef.length==1&&_4ef[0][1].length==_4ee.length){
this._selectResult(this.setSelectedDiv(_4f0,0));
_4f0.style.visibility="hidden";
}else{
_4f0.style.visibility=_4ef.length>0?"visible":"hidden";
}
Core.hideShowCovered(_4f0);
}
},hideSuggestions:function(_4f7){
var _4f8=SuggestiveInputRenderer.getSuggestionsDiv(_4f7);
_4f8.style.visibility="hidden";
Core.hideShowCovered(_4f8);
},getSuggestionsDiv:function(_4f9){
if(!_4f9.suggestionsDiv){
_4f9.suggestionsDiv=HTMLUtils.addDiv(document.body);
addClass(_4f9.suggestionsDiv,_4f9.styleClassRoot+"-sug");
}
return _4f9.suggestionsDiv;
},selectResult:function(){
SuggestiveInputRenderer._selectResult(this);
},_selectResult:function(_4fa){
var _4fb=_4fa.getElementsByTagName("span");
if(_4fb){
for(var i=0;i<_4fb.length;i++){
if(_4fb[i].id=="suggestion"){
var _4fd=document.getElementById(_4fb[i].inputID);
var _4fe=document.getElementById(_4fb[i].inputID+"-hidden");
_4fd.value=_4fb[i].innerText?_4fb[i].innerText:_4fb[i].textContent;
addClass(_4fd,_4fd.styleClassRoot+"-input-selected");
_4fe.value=_4fb[i].key;
_4fe.inputValue=_4fd.value;
_4fd.focus();
SuggestiveInputRenderer.hideSuggestions(_4fd);
return;
}
}
}
},unselect:function(_4ff){
var _500=document.getElementById(_4ff.id+"-hidden");
if(_4ff.value==_500.inputValue){
return false;
}
removeClass(_4ff,_4ff.styleClassRoot+"-input-selected");
_500.value="";
_500.inputValue="";
return true;
},getSelectedDivIndex:function(pDiv){
var divs=pDiv.getElementsByTagName("div");
if(divs){
for(var i=0;i<divs.length;i++){
if(divs[i].selected){
return i;
}
}
}
return -1;
},setSelectedDiv:function(pDiv,_505){
var _506=this.getSelectedDivIndex(pDiv);
var _507;
var divs=pDiv.getElementsByTagName("div");
if(divs&&divs.length>0){
if(_505>=divs.length){
_505=0;
}else{
if(_505<0){
_505=divs.length-1;
}
}
if(_506!=-1){
divs[_506].selected=false;
this._unhighlightResult(divs[_506]);
}
this._highlightResult(divs[_505]);
divs[_505].selected=true;
_507=divs[_505];
}
return _507;
},highlightResult:function(){
SuggestiveInputRenderer._highlightResult(this);
},_highlightResult:function(pDiv){
var _50a=document.getElementById(pDiv.inputID);
addClass(pDiv,_50a.styleClassRoot+"-sug-div-over");
},unhighlightResult:function(){
SuggestiveInputRenderer._unhighlightResult(this);
},_unhighlightResult:function(pDiv){
if(!pDiv.selected){
var _50c=document.getElementById(pDiv.inputID);
removeClass(pDiv,_50c.styleClassRoot+"-sug-div-over");
}
},doQuery:function(_50d){
var _50e=document.getElementById(_50d);
var _50f=_50e.value;
var url=_50e.queryURL;
url=addParameter(url,"q",_50f);
var _511=new HTTPClient();
_511.init(url);
_511.asyncGET(new SuggestiveInputHandler(_50d,_50f));
},loadSuggestions:function(_512,_513,_514){
var _515=_514.getElementsByTagName("suggestion");
var _516=[];
for(var i=0;i<_515.length;i++){
var tmp=[];
var _519=_515[i];
var _51a=_519.getElementsByTagName("value")[0];
var _51b=_519.getElementsByTagName("label")[0];
tmp[0]=_51a.text||_51a.textContent;
tmp[1]=_51b.text||_51b.textContent;
_516[i]=tmp;
}
SuggestiveInputRenderer.CACHES[_512][_513.toUpperCase()]=_516;
this.showSuggestions(_512);
}};
function SuggestiveInputHandler(_51c,_51d){
this.inputID=_51c;
this.queryString=_51d;
}
SuggestiveInputHandler.prototype.onInit=function(){
};
SuggestiveInputHandler.prototype.onError=function(){
};
SuggestiveInputHandler.prototype.onProgress=function(){
};
SuggestiveInputHandler.prototype.onLoad=function(_51e){
SuggestiveInputRenderer.loadSuggestions(this.inputID,this.queryString,_51e);
};
function NullHandler(){
}
NullHandler.prototype.onInit=function(){
};
NullHandler.prototype.onError=function(_51f,_520){
};
NullHandler.prototype.onProgress=function(_521,_522){
};
NullHandler.prototype.onLoad=function(_523){
};
var AjaxActionRenderer={sendRequest:function(_524,_525,_526,_527,_528,_529){
var _52a=new HTTPClient();
var url=_525;
for(i=0,n=_526.length;i<n;i++){
url+="&"+_526[i][0];
url+="="+_526[i][1];
}
for(i=0,n=_527.length;i<n;i++){
var _52c=document.getElementById(_527[i][1]);
url=addParameter(url,_527[i][0],_52c.value);
}
for(i=0,n=_528.length;i<n;i++){
url+="&"+_528[i][0];
url+="="+eval(_528[i][1]);
}
if(_529!=null){
url+="&aaSrcComp";
url+="="+_529;
}
_52a.init(url);
if(_524.length==0){
_524="NullHandler";
}
_52a.asyncGET(eval("new "+_524+"()"));
}};
var MessagesRenderer={moveMessages:function(_52d,_52e){
var _52f=document.getElementById(_52d);
var _530=findElementsEndingWithId(null,_52e,null,true)[0];
if(_530!=null){
_52f.appendChild(_530);
StyleUtils.removeClass(_530,"messagesWillMove");
}
}};
var StarRenderer={manageStarClicked:function(pEvt){
pEvt=(pEvt)?pEvt:window.event;
var _532=getEventElement(pEvt);
var _533=_532.parentNode;
var _534=_533.parentNode;
var _535=window.document.getElementById(_534.id+"-cr");
var _536=window.document.getElementById(_534.id+"-iw");
var iw=parseInt(_536.value);
var _538=StarRenderer.getLIIndexInUL(_533);
var _539=window.document.getElementById(_534.id+"-hf");
if(parseInt(_539.value)==_538){
_538=0;
}
_539.value=_538;
_535.style.width=_538*iw+"px";
},getLIIndexInUL:function(_53a){
var _53b=_53a.parentNode;
var _53c=_53b.childNodes;
var j=0;
for(var i=0;i<_53c.length;i++){
if(/^li$/i.test(_53c[i].tagName)){
if(_53c[i]==_53a){
return j;
}
j++;
}
}
return -1;
}};
var WindowRenderer={openWindow:function(sURL,_540,_541,_542,_543,_544){
var wind=openWindow(sURL,_540,_541,_542);
if(_544!=""&&wind==null){
eval(_544+"('"+_543+"')");
}
return wind;
}};
var __FORM__=1;
var FORM_DATA_SNAPSHOT=new Array();
function FormDataSnapshot(_546){
this.form=_546;
this.data=new Array();
}
function ElementDataSnapshot(_547,_548){
this.element=_547;
this.data=_548;
}
function fillFormDataSnapshot(_549){
for(var i=0;i<_549.form.elements.length;i++){
var _54b=_549.form.elements[i];
var _54c=_54b.type;
var _54d=null;
var _54e=false;
var _54f=false;
if(_54b.id.indexOf("not_relevant")!=-1){
_54e=true;
}else{
if(_54b.id.indexOf("relevant")!=-1){
_54f=true;
}
}
if(!_54e){
if(_54c=="checkbox"||_54c=="radio"){
_54d=new ElementDataSnapshot(_54b,_54b.checked);
}else{
if(_54c=="select-one"){
_54d=new ElementDataSnapshot(_54b,_54b.selectedIndex);
}else{
if(_54c=="select-multiple"){
var _550=new Array();
for(var j=0;j<_54b.length;j++){
_550[_550.length]=_54b.options[j].selected;
}
_54d=new ElementDataSnapshot(_54b,_550);
}else{
if(_54c=="text"||_54c=="textarea"){
_54d=new ElementDataSnapshot(_54b,_54b.value);
}else{
if(_54c=="hidden"&&_54f){
_54d=new ElementDataSnapshot(_54b,_54b.value);
}
}
}
}
}
}
if(_54d!=null){
_549.data[_549.data.length]=_54d;
}
}
}
function findFormDataSnapshot(_552){
var _553=null;
for(var i=0;i<FORM_DATA_SNAPSHOT.length;i++){
if(FORM_DATA_SNAPSHOT[i].form==_552){
_553=FORM_DATA_SNAPSHOT[i];
break;
}
}
return _553;
}
function takeFormDataSnapshotOnload(){
takeFormDataSnapshot(window.document.jsfForm());
}
function takeFormDataSnapshot(_555){
if(_555["formChanged"].value!="1"){
var _556=findFormDataSnapshot(_555);
if(_556==null){
_556=new FormDataSnapshot(_555);
FORM_DATA_SNAPSHOT[FORM_DATA_SNAPSHOT.length]=_556;
}
fillFormDataSnapshot(_556);
}
}
function isIgnoredElement(_557,_558){
var _559=false;
if(_558&&typeof (_558.length)=="number"){
for(var i=0;i<_558.length;i++){
if(_557==_558[i]){
_559=true;
break;
}
}
}else{
if(_557==_558){
_559=true;
}
}
return _559;
}
function checkFormDataChangesOnsubmit(_55b){
if(isFormDataChanged(_55b)){
_55b["formChanged"].value="1";
}
}
function isFormDataChanged(_55c,_55d){
if(_55c["formChanged"].value=="1"){
return true;
}
var _55e=false;
var _55f=findFormDataSnapshot(_55c);
if(_55f!=null){
for(var i=0;i<_55f.data.length;i++){
var _561=_55f.data[i].element;
var _562=_561.type;
var _563=_55f.data[i].data;
if(!isIgnoredElement(_561,_55d)){
if(_562=="checkbox"||_562=="radio"){
if(_563!=_561.checked){
_55e=true;
break;
}
}else{
if(_562=="select-one"){
if(_563!=_561.selectedIndex){
_55e=true;
break;
}
}else{
if(_562=="select-multiple"){
for(var j=0;j<_561.length;j++){
if(_563[j]!=_561.options[j].selected){
_55e=true;
break;
}
}
}else{
if(_562=="hidden"||_562=="text"||_562=="textarea"){
if(_563!=_561.value){
_55e=true;
break;
}
}
}
}
}
}
}
}
if(_55e){
_55c["formChanged"].value="1";
}
return _55e;
}
function formCheckAll(_565){
var _566=_565.checked;
var _567=findParentOfType(_565,"TABLE");
if(_567==null){
return _566;
}
var _568=ElementUtils.getChildrenElementsByTagName(ElementUtils.getChildElementByTagName(_567,"TBODY"),"INPUT");
for(var i=0;i<_568.length;i++){
var chk=_568[i];
if(chk.type=="checkbox"&&!chk.disabled){
chk.checked=_566;
}
}
return _566;
}
function formSyncCheckAll(_56b){
formSyncCheckAll2(_56b,false);
}
function formSyncCheckAll2(_56c,_56d){
if(typeof _56c=="string"){
_56c=document.getElementById(_56c);
if(_56c==null){
return;
}
}
var _56e=getSelectedRowCount(_56c);
var _56f=(_56e.nbSelectedRows==_56e.totalNbRows);
if((_56d&&!_56f)||!_56d){
var _570=findParentOfType(_56c,"TABLE");
if(_570==null){
return _56e.nbSelectedRows>0;
}
var _571=ElementUtils.getChildrenElementsByTagName(ElementUtils.getChildElementByTagName(_570,"THEAD"),"INPUT");
for(var j=0;j<_571.length;i++){
var chk=_571[j];
if(chk.type=="checkbox"&&!chk.disabled){
chk.checked=_56f;
break;
}
}
}
return _56e.nbSelectedRows>0;
}
function SelectedRowResult(_574,_575){
this.nbSelectedRows=_574;
this.totalNbRows=_575;
}
function getSelectedRowCount(_576){
var _577=0;
var _578=0;
var _579=findParentOfType(_576,"TABLE");
if(_579!=null){
var _57a=ElementUtils.getChildrenElementsByTagName(ElementUtils.getChildElementByTagName(_579,"TBODY"),"INPUT");
for(var k=0;k<_57a.length;k++){
var chk=_57a[k];
if(chk.type=="checkbox"&&!chk.disabled){
if(chk.checked){
_577++;
}
_578++;
}
}
}
return new SelectedRowResult(_577,_578);
}
Calendar=function(_57d,_57e,_57f,_580,_581,_582,_583,_584){
this.calendarID=_584;
this.activeDiv=null;
this.currentDateEl=null;
this.getDateStatus=null;
this.timeout=null;
this.onSelected=_57f||null;
this.onClose=_580||null;
this.onClear=_581||null;
this.onDone=_582||null;
this.onCancel=_583||null;
this.dragging=false;
this.hidden=false;
this.minYear=1970;
this.maxYear=2050;
this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];
this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];
this.isPopup=true;
this.weekNumbers=true;
this.firstDayOfWeek=_57d;
this.showsOtherMonths=false;
this.dateStr=_57e;
this.ar_days=null;
this.showsCalendar=true;
this.showsTime=false;
this.showsActionBar=this.showsTime;
this.time24=true;
this.yearStep=2;
this.table=null;
this.element=null;
this.tbody=null;
this.firstdayname=null;
this.monthsCombo=null;
this.yearsCombo=null;
this.hilitedMonth=null;
this.activeMonth=null;
this.hilitedYear=null;
this.activeYear=null;
this.dateClicked=false;
this.t12=null;
this.hourInput=null;
this.ampmInput=null;
this.minInput=null;
if(typeof Calendar._SDN=="undefined"){
if(typeof Calendar._SDN_len=="undefined"){
Calendar._SDN_len=3;
}
var ar=new Array();
for(var i=8;i>0;){
ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);
}
Calendar._SDN=ar;
if(typeof Calendar._SMN_len=="undefined"){
Calendar._SMN_len=3;
}
ar=new Array();
for(var i=12;i>0;){
ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);
}
Calendar._SMN=ar;
}
};
Calendar._C=null;
Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));
Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));
Calendar.is_opera=/opera/i.test(navigator.userAgent);
Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);
Calendar.getAbsolutePos=function(el){
var SL=0,ST=0;
var _58a=/^div$/i.test(el.tagName);
if(_58a&&el.scrollLeft){
SL=el.scrollLeft;
}
if(_58a&&el.scrollTop){
ST=el.scrollTop;
}
var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};
if(el.offsetParent){
var tmp=this.getAbsolutePos(el.offsetParent);
r.x+=tmp.x;
r.y+=tmp.y;
}
return r;
};
Calendar.isRelated=function(el,evt){
var _58f=evt.relatedTarget;
if(!_58f){
var type=evt.type;
if(type=="mouseover"){
_58f=evt.fromElement;
}else{
if(type=="mouseout"){
_58f=evt.toElement;
}
}
}
while(_58f){
if(_58f==el){
return true;
}
_58f=_58f.parentNode;
}
return false;
};
Calendar.removeClass=function(el,_592){
if(!(el&&el.className)){
return;
}
var cls=el.className.split(" ");
var ar=new Array();
for(var i=cls.length;i>0;){
if(cls[--i]!=_592){
ar[ar.length]=cls[i];
}
}
el.className=ar.join(" ");
};
Calendar.addClass=function(el,_597){
Calendar.removeClass(el,_597);
el.className+=" "+_597;
};
Calendar.getElement=function(ev){
var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;
while(f.nodeType!=1||/^div$/i.test(f.tagName)){
f=f.parentNode;
}
return f;
};
Calendar.getTargetElement=function(ev){
var f=Calendar.is_ie?window.event.srcElement:ev.target;
while(f.nodeType!=1){
f=f.parentNode;
}
return f;
};
Calendar.stopEvent=function(ev){
ev||(ev=window.event);
if(Calendar.is_ie){
ev.cancelBubble=true;
ev.returnValue=false;
}else{
ev.preventDefault();
ev.stopPropagation();
}
return false;
};
Calendar.addEvent=function(el,_59e,func){
if(el.attachEvent){
el.attachEvent("on"+_59e,func);
}else{
if(el.addEventListener){
el.addEventListener(_59e,func,true);
}else{
el["on"+_59e]=func;
}
}
};
Calendar.removeEvent=function(el,_5a1,func){
if(el.detachEvent){
el.detachEvent("on"+_5a1,func);
}else{
if(el.removeEventListener){
el.removeEventListener(_5a1,func,true);
}else{
el["on"+_5a1]=null;
}
}
};
Calendar.createElement=function(type,_5a4){
var el=null;
el=document.createElement(type);
if(typeof _5a4!="undefined"){
_5a4.appendChild(el);
}
return el;
};
Calendar._add_evs=function(el){
with(Calendar){
addEvent(el,"mouseover",dayMouseOver);
addEvent(el,"mousedown",dayMouseDown);
addEvent(el,"mouseout",dayMouseOut);
if(is_ie){
addEvent(el,"dblclick",dayMouseDblClick);
el.setAttribute("unselectable",true);
}
}
};
Calendar.findMonth=function(el){
if(typeof el.month!="undefined"){
return el;
}else{
if(typeof el.parentNode.month!="undefined"){
return el.parentNode;
}
}
return null;
};
Calendar.findYear=function(el){
if(typeof el.year!="undefined"){
return el;
}else{
if(typeof el.parentNode.year!="undefined"){
return el.parentNode;
}
}
return null;
};
Calendar.showMonthsCombo=function(){
var cal=Calendar._C;
if(!cal){
return false;
}
var cal=cal;
var cd=cal.activeDiv;
var mc=cal.monthsCombo;
if(cal.hilitedMonth){
Calendar.removeClass(cal.hilitedMonth,"hilite");
}
if(cal.activeMonth){
Calendar.removeClass(cal.activeMonth,"active");
}
var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
Calendar.addClass(mon,"active");
cal.activeMonth=mon;
var opts=cd.navtype<0?"Bl":"Br";
showAtElement2(mc,cd,opts,cal.element);
};
Calendar.showYearsCombo=function(fwd,_5af){
var cal=Calendar._C;
if(!cal){
return false;
}
var cal=cal;
var cd=cal.activeDiv;
var yc=cal.yearsCombo;
if(cal.hilitedYear){
Calendar.removeClass(cal.hilitedYear,"hilite");
}
if(cal.activeYear){
Calendar.removeClass(cal.activeYear,"active");
}
cal.activeYear=null;
var Y=_5af==20?(fwd?cal.date.getFullYear()-5:cal.date.getFullYear()+5):cal.date.getFullYear()+(fwd?1:-1);
if(fwd&&Y<cal.minYear){
Y=cal.minYear;
}else{
if(!fwd&&Y>cal.maxYear){
Y=cal.maxYear;
}
}
var yr=yc.firstChild;
var show=false;
for(var i=12;i>0;--i){
if(Y>=cal.minYear&&Y<=cal.maxYear){
yr.innerHTML=Y;
yr.year=Y;
yr.style.display="block";
show=true;
}else{
yr.style.display="none";
}
yr=yr.nextSibling;
Y+=fwd?cal.yearStep:-cal.yearStep;
}
if(show){
var opts=cd.navtype<0?"Bl":"Br";
showAtElement2(yc,cd,opts,cal.element);
}
};
Calendar.tableMouseUp=function(ev){
var cal=Calendar._C;
if(!cal){
return false;
}
if(cal.timeout){
clearTimeout(cal.timeout);
}
var el=cal.activeDiv;
if(!el){
return false;
}
var _5bb=Calendar.getTargetElement(ev);
ev||(ev=window.event);
Calendar.removeClass(el,"active");
if(_5bb==el||_5bb.parentNode==el){
Calendar.cellClick(el,ev);
}
var mon=Calendar.findMonth(_5bb);
var date=null;
if(mon){
date=new Date(cal.date);
if(mon.month!=date.getMonth()){
date.setMonth(mon.month);
cal.setDate(date);
cal.dateClicked=false;
cal.callHandler();
}
}else{
var year=Calendar.findYear(_5bb);
if(year){
date=new Date(cal.date);
if(year.year!=date.getFullYear()){
date.setFullYear(year.year);
cal.setDate(date);
cal.dateClicked=false;
cal.callHandler();
}
}
}
with(Calendar){
removeEvent(document,"mouseup",tableMouseUp);
removeEvent(document,"mouseover",tableMouseOver);
removeEvent(document,"mousemove",tableMouseOver);
cal._hideCombos();
_C=null;
return stopEvent(ev);
}
};
Calendar.tableMouseOver=function(ev){
var cal=Calendar._C;
if(!cal){
return;
}
var el=cal.activeDiv;
var _5c2=Calendar.getTargetElement(ev);
if(_5c2==el||_5c2.parentNode==el){
Calendar.addClass(el,"hilite active");
Calendar.addClass(el.parentNode,"rowhilite");
}else{
if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2))){
Calendar.removeClass(el,"active");
}
Calendar.removeClass(el,"hilite");
Calendar.removeClass(el.parentNode,"rowhilite");
}
ev||(ev=window.event);
if(el.navtype==50&&_5c2!=el){
var pos=Calendar.getAbsolutePos(el);
var w=el.offsetWidth;
var x=ev.clientX;
var dx;
var _5c7=true;
if(x>pos.x+w){
dx=x-pos.x-w;
_5c7=false;
}else{
dx=pos.x-x;
}
if(dx<0){
dx=0;
}
var _5c8=el._range;
var _5c9=el._current;
var _5ca=Math.floor(dx/10)%_5c8.length;
for(var i=_5c8.length;--i>=0;){
if(_5c8[i]==_5c9){
break;
}
}
while(_5ca-->0){
if(_5c7){
if(--i<0){
i=_5c8.length-1;
}
}else{
if(++i>=_5c8.length){
i=0;
}
}
}
var _5cc=_5c8[i];
el.innerHTML=_5cc;
cal.onUpdateTime();
}
var mon=Calendar.findMonth(_5c2);
if(mon){
if(mon.month!=cal.date.getMonth()){
if(cal.hilitedMonth){
Calendar.removeClass(cal.hilitedMonth,"hilite");
}
Calendar.addClass(mon,"hilite");
cal.hilitedMonth=mon;
}else{
if(cal.hilitedMonth){
Calendar.removeClass(cal.hilitedMonth,"hilite");
}
}
}else{
if(cal.hilitedMonth){
Calendar.removeClass(cal.hilitedMonth,"hilite");
}
var year=Calendar.findYear(_5c2);
if(year){
if(year.year!=cal.date.getFullYear()){
if(cal.hilitedYear){
Calendar.removeClass(cal.hilitedYear,"hilite");
}
Calendar.addClass(year,"hilite");
cal.hilitedYear=year;
}else{
if(cal.hilitedYear){
Calendar.removeClass(cal.hilitedYear,"hilite");
}
}
}
}
return Calendar.stopEvent(ev);
};
Calendar.tableMouseDown=function(ev){
if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){
return Calendar.stopEvent(ev);
}
};
Calendar.calDragIt=function(ev){
var cal=Calendar._C;
if(!(cal&&cal.dragging)){
return false;
}
var posX;
var posY;
if(Calendar.is_ie){
posY=window.event.clientY+document.body.scrollTop;
posX=window.event.clientX+document.body.scrollLeft;
}else{
posX=ev.pageX;
posY=ev.pageY;
}
cal.hideShowCovered();
var st=cal.element.style;
st.left=(posX-cal.xOffs)+"px";
st.top=(posY-cal.yOffs)+"px";
return Calendar.stopEvent(ev);
};
Calendar.calDragEnd=function(ev){
var cal=Calendar._C;
if(!cal){
return false;
}
cal.dragging=false;
with(Calendar){
removeEvent(document,"mousemove",calDragIt);
removeEvent(document,"mouseup",calDragEnd);
tableMouseUp(ev);
}
cal.hideShowCovered();
};
Calendar.dayMouseDown=function(ev){
var el=Calendar.getElement(ev);
if(el.disabled){
return false;
}
var cal=el.calendar;
cal.activeDiv=el;
Calendar._C=cal;
if(el.navtype!=300){
with(Calendar){
if(el.navtype==50){
el._current=el.innerHTML;
addEvent(document,"mousemove",tableMouseOver);
}else{
addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);
}
addClass(el,"hilite active");
addEvent(document,"mouseup",tableMouseUp);
}
}else{
if(cal.isPopup){
cal._dragStart(ev);
}
}
if(el.navtype==-1||el.navtype==1||el.navtype==10){
if(cal.timeout){
clearTimeout(cal.timeout);
}
cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);
}else{
if(el.navtype==-2||el.navtype==2||el.navtype==20){
if(cal.timeout){
clearTimeout(cal.timeout);
}
cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true, "+el.navtype+")":"Calendar.showYearsCombo(false, "+el.navtype+")",250);
}else{
cal.timeout=null;
}
}
return Calendar.stopEvent(ev);
};
Calendar.dayMouseDblClick=function(ev){
Calendar.cellClick(Calendar.getElement(ev),ev||window.event);
if(Calendar.is_ie){
document.selection.empty();
}
};
Calendar.dayMouseOver=function(ev){
var el=Calendar.getElement(ev);
if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){
return false;
}
if(el.ttip){
if(el.ttip.substr(0,1)=="_"){
el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);
}
el.calendar.tooltips.innerHTML=el.ttip;
}
if(el.navtype!=300){
Calendar.addClass(el,"hilite");
if(el.caldate){
Calendar.addClass(el.parentNode,"rowhilite");
}
}
return Calendar.stopEvent(ev);
};
Calendar.dayMouseOut=function(ev){
with(Calendar){
var el=getElement(ev);
if(isRelated(el,ev)||_C||el.disabled){
return false;
}
removeClass(el,"hilite");
if(el.caldate){
removeClass(el.parentNode,"rowhilite");
}
el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];
return stopEvent(ev);
}
};
Calendar.cellClick=function(el,ev){
var cal=el.calendar;
var _5e2=false;
var _5e3=false;
var date=null;
if(typeof el.navtype=="undefined"){
Calendar.removeClass(cal.currentDateEl,"selected");
Calendar.addClass(el,"selected");
_5e2=(cal.currentDateEl==el);
if(!_5e2){
cal.currentDateEl=el;
}
var _5e5=new Date(el.caldate);
var _5e6=el.otherMonth;
copyTime(_5e5,cal.date);
cal.setDate(_5e5);
_5e3=true;
cal.dateClicked=!_5e6;
}else{
if(el.navtype==200){
Calendar.removeClass(el,"hilite");
cal.callCloseHandler();
return;
}
date=(el.navtype==0)?new Date():new Date(cal.date);
cal.dateClicked=false;
var year=date.getFullYear();
var mon=date.getMonth();
function setMonth(m){
var day=date.getDate();
var max=date.getMonthDays(m);
if(day>max){
date.setDate(max);
}
date.setMonth(m);
}
switch(el.navtype){
case 400:
Calendar.removeClass(el,"hilite");
var text=Calendar._TT["ABOUT"];
if(typeof text!="undefined"){
text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";
}else{
text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mishoo@infoiasi.ro> to get it into the distribution  ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";
}
alert(text);
return;
case -2:
if(year>cal.minYear){
date.setFullYear(year-1);
}
break;
case -1:
if(mon>0){
setMonth(mon-1);
}else{
if(year-->cal.minYear){
date.setFullYear(year);
setMonth(11);
}
}
break;
case 1:
if(mon<11){
setMonth(mon+1);
}else{
if(year<cal.maxYear){
date.setFullYear(year+1);
setMonth(0);
}
}
break;
case 2:
if(year<cal.maxYear){
date.setFullYear(year+1);
}
break;
case 100:
cal.setFirstDayOfWeek(el.fdow);
return;
case 50:
var _5ed=el._range;
var _5ee=el.innerHTML;
for(var i=_5ed.length;--i>=0;){
if(_5ed[i]==_5ee){
break;
}
}
if(ev&&ev.shiftKey){
if(--i<0){
i=_5ed.length-1;
}
}else{
if(++i>=_5ed.length){
i=0;
}
}
var _5f0=_5ed[i];
el.innerHTML=_5f0;
cal.onUpdateTime();
return;
case 0:
if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){
return false;
}
break;
}
if(!date.equalsTo(cal.date)){
cal.setDate(date);
_5e3=true;
}
}
if(_5e3){
ev&&cal.callHandler();
}
if(_5e2){
Calendar.removeClass(el,"hilite");
ev&&cal.callCloseHandler();
}
};
Calendar.onUpdateTime=function(pEvt){
var h=parseInt(hourInput.value,10);
var h=parseInt(hourInput.value,10);
if(t12){
if(/pm/i.test(ampmInput.value)&&h<12){
h+=12;
}else{
if(/am/i.test(ampmInput.value)&&h==12){
h=0;
}
}
}
var d=calendar.date.getDate();
var m=calendar.date.getMonth();
var y=calendar.date.getFullYear();
calendar.date.setHours(h);
calendar.date.setMinutes(parseInt(minInput.value,10));
calendar.date.setFullYear(y);
calendar.date.setMonth(m);
calendar.date.setDate(d);
this.dateClicked=false;
calendar.callHandler();
};
Calendar.prototype.create=function(_par){
var _5f7=null;
if(!_par){
_5f7=document.getElementsByTagName("body")[0];
this.isPopup=true;
}else{
_5f7=_par;
this.isPopup=false;
}
this.date=this.dateStr?new Date(this.dateStr):new Date();
var _5f8=Calendar.createElement("table");
_5f8.id=this.calendarID+"-table";
this.table=_5f8;
_5f8.cellSpacing=0;
_5f8.cellPadding=0;
_5f8.calendar=this;
Calendar.addEvent(_5f8,"mousedown",Calendar.tableMouseDown);
var div=Calendar.createElement("div");
div.id=this.calendarID+"-mainDIV";
this.element=div;
div.className="calendar";
if(this.isPopup){
div.style.position="absolute";
div.style.display="none";
}
div.appendChild(_5f8);
var _5fa=Calendar.createElement("thead",_5f8);
var cell=null;
var row=null;
var cal=this;
var hh=function(text,cs,_601,_602){
cell=Calendar.createElement("td",row);
cell.id=_602;
cell.colSpan=cs;
cell.className="button";
if(_601!=0&&Math.abs(_601)<=2){
cell.className+=" nav";
}
Calendar._add_evs(cell);
cell.calendar=cal;
cell.navtype=_601;
cell.innerHTML="<div unselectable='on'>"+text+"</div>";
return cell;
};
row=Calendar.createElement("tr",_5fa);
var _603=6;
(this.isPopup)&&--_603;
(this.weekNumbers)&&++_603;
hh("?",1,400,this.calendarID+"-help").ttip=Calendar._TT["INFO"];
this.title=hh("",_603,300,this.calendarID+"-title");
this.title.className="title";
this.monthSpan=Calendar.createElement("span",this.title,this.calendarID+"-title-month");
this.monthSpan.className="title_month";
this.monthSpan.calendar=cal;
this.monthSpan.navtype=10;
Calendar._add_evs(this.monthSpan);
this.yearSpan=Calendar.createElement("span",this.title,this.calendarID+"-title-year");
this.yearSpan.className="title_year";
this.yearSpan.calendar=cal;
this.yearSpan.navtype=20;
Calendar._add_evs(this.yearSpan);
if(this.isPopup){
this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];
this.title.style.cursor="move";
hh("&#x00d7;",1,200,this.calendarID+"-close").ttip=Calendar._TT["CLOSE"];
}
if(this.showsCalendar){
row=Calendar.createElement("tr",_5fa);
row.id=this.calendarID+"-head-row";
row.className="headrow";
this._nav_py=hh("&#x00ab;",1,-2,this.calendarID+"-prev-year");
this._nav_py.ttip=Calendar._TT["PREV_YEAR"];
this._nav_pm=hh("&#x2039;",1,-1,this.calendarID+"-prev-month");
this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];
this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0,this.calendarID+"-today");
this._nav_now.ttip=Calendar._TT["GO_TODAY"];
this._nav_nm=hh("&#x203a;",1,1,this.calendarID+"-next-month");
this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];
this._nav_ny=hh("&#x00bb;",1,2,this.calendarID+"-next-year");
this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];
row=Calendar.createElement("tr",_5fa);
row.className="daynames";
if(this.weekNumbers){
cell=Calendar.createElement("td",row);
cell.id=this.calendarID+"-week-num-header";
cell.className="name wn";
cell.innerHTML=Calendar._TT["WK"];
}
for(var i=7;i>0;--i){
cell=Calendar.createElement("td",row);
cell.id=this.calendarID+"-day-names-"+i;
if(!i){
cell.navtype=100;
cell.calendar=this;
Calendar._add_evs(cell);
}
}
this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;
this._displayWeekdays();
}
var _605=Calendar.createElement("tbody",_5f8);
this.tbody=_605;
if(this.showsCalendar){
for(i=6;i>0;--i){
row=Calendar.createElement("tr",_605);
if(this.weekNumbers){
cell=Calendar.createElement("td",row);
cell.id=this.calendarID+"-week-num-"+i;
}
for(var j=7;j>0;--j){
cell=Calendar.createElement("td",row);
cell.id=this.calendarID+"-day-"+i+"-"+j;
cell.calendar=this;
Calendar._add_evs(cell);
}
}
}
if(this.showsTime){
row=Calendar.createElement("tr",_605);
row.id=this.calendarID+"-time-tr";
row.className="time";
cell=Calendar.createElement("td",row);
cell.id=this.calendarID+"-time-td";
cell.className="time";
cell.colSpan=this.weekNumbers?8:7;
var _607=Calendar.createElement("span",cell);
_607=this.calendarID+"-time-label";
_607.className="time";
_607.innerHTML=Calendar._TT["TIME"]||"&nbsp;";
(function(){
var _608="calId";
var hrs=cal.date.getHours();
var mins=cal.date.getMinutes();
var t12=!cal.time24;
var _60c=dateHourToNormalizedHour(t12,hrs);
var _60d=Calendar.createElement("INPUT",cell);
_60d.value=_60c.hours;
_60d.className="inputTime-input";
_60d.rs_formrelevant=true;
_60d.name=_608+"-h";
_60d.id=_608+"-h";
_60d.maxLength=2;
if(Calendar.is_ie){
_60d.onkeypress=onkeypressTimeInput;
_60d.onkeydown=onkeydownTimeInput;
_60d.onkeyup=function(){
validateHourKeyUp(null,!t12);
cal.onUpdateTime();
};
_60d.onfocus=prepareTimeInput;
}else{
Calendar.addEvent(_60d,"keypress",onkeypressTimeInput);
Calendar.addEvent(_60d,"keydown",onkeypressTimeInput);
Calendar.addEvent(_60d,"keyup",Calendar.changeTimeMouseDown);
Calendar.addEvent(_60d,"focus",prepareTimeInput);
}
var span=Calendar.createElement("span",cell);
span.innerHTML=":";
span.className="colon";
minInput=Calendar.createElement("INPUT",cell);
minInput.value=mins;
minInput.className="inputTime-input";
minInput.rs_formrelevant=true;
minInput.name=_608+"-m";
minInput.id=_608+"-m";
minInput.maxLength=2;
if(Calendar.is_ie){
minInput.onblur=adjustMinute;
minInput.onkeypress=onkeypressTimeInput;
minInput.onkeydown=onkeydownTimeInput;
minInput.onkeyup=function(){
validateMinuteKeyUp(null,cal.minIncr,cal.strictMinIncr);
cal.onUpdateTime();
};
minInput.onfocus=prepareTimeInput;
}else{
Calendar.addEvent(minInput,"blur",adjustMinute);
Calendar.addEvent(minInput,"keypress",onkeypressTimeInput);
Calendar.addEvent(minInput,"keydown",onkeypressTimeInput);
Calendar.addEvent(minInput,"keyup",Calendar.changeTimeMouseDown);
Calendar.addEvent(minInput,"focus",prepareTimeInput);
}
if(t12){
var _60f=Calendar.createElement("INPUT",cell);
_60f.value=_60c.isPm?"pm":"am";
_60f.className="inputTime-input";
_60f.rs_formrelevant=true;
_60f.name=_608+"-a";
_60f.id=_608+"-a";
_60f.maxLength=2;
if(Calendar.is_ie){
_60f.onkeypress=onkeypressTimeInputAmPm;
_60f.onkeyup=function(){
cal.onUpdateTime();
};
_60f.onfocus=prepareTimeInput;
}else{
Calendar.addEvent(_60f,"keypress",onkeypressTimeInputAmPm);
Calendar.addEvent(_60f,"keyup",Calendar.onUpdateTime);
Calendar.addEvent(_60f,"focus",prepareTimeInput);
}
}
var _610=Calendar.createElement("SPAN",cell);
_610.className="inputTime-spinner";
_610.id=_608+"-s";
if(Calendar.is_ie){
_610.onmouseout=_610.onmouseup=function(){
changeTimeMouseUp();
cal.onUpdateTime();
};
_610.onmousedown=function(){
changeTimeMouseDown(null,_608,"inputTime-spinner",cal.minIncr,!t12);
};
}else{
Calendar.addEvent(_610,"mouseout",Calendar.changeTimeMouseUp);
Calendar.addEvent(_610,"mouseup",Calendar.changeTimeMouseUp);
Calendar.addEvent(_610,"mousedown",Calendar.changeTimeMouseDown);
}
_610.ondblclick=_610.onmousedown;
cal.onSetTime=function(){
var hrs=this.date.getHours();
var _612=dateHourToNormalizedHour(t12,hrs);
hrs=_612.hours;
var mins=this.date.getMinutes();
_60d.value=hrs;
minInput.value=(mins<10)?("0"+mins):mins;
if(t12){
_60f.value=_612.isPm?"pm":"am";
}
};
cal.onUpdateTime=function(){
var date=this.date;
var h=parseInt(_60d.value,10);
if(t12){
if(/pm/i.test(_60f.value)&&h<12){
h+=12;
}else{
if(/am/i.test(_60f.value)&&h==12){
h=0;
}
}
}
var d=date.getDate();
var m=date.getMonth();
var y=date.getFullYear();
date.setHours(h);
date.setMinutes(parseInt(minInput.value,10));
date.setFullYear(y);
date.setMonth(m);
date.setDate(d);
this.dateClicked=false;
this.callHandler();
};
})();
}else{
this.onSetTime=this.onUpdateTime=function(){
};
}
if(this.showsActionBar){
row=Calendar.createElement("tr",_605);
row.className="action-bar";
cell=Calendar.createElement("td",row);
cell.className="action-bar";
cell.colSpan=this.weekNumbers?8:7;
function addAction(_619,name,text,_61c,_61d,_61e,_61f){
var _620=Calendar.createElement("a",_619);
_620.id=_61f;
_620.href="#";
_620.className="action";
Calendar.addClass(_620,_61d);
Calendar.addEvent(_620,"click",_61c);
var node=_620;
for(i=0;i<_61e;i++){
var span=Calendar.createElement("span",node);
span.className=_61d+(i+2);
node=span;
}
node.appendChild(document.createTextNode(text));
return _620;
}
addAction(cell,"clear",Calendar._TT["CLEAR"],function(){
cal.callClearHandler();
},"nav-btn-dark-gray",4,this.calendarID+"-clear");
addAction(cell,"done",Calendar._TT["DONE"],function(){
cal.callDoneHandler();
},"nav-btn-dark-gray",4,this.calendarID+"-done");
addAction(cell,"cancel",Calendar._TT["CANCEL"],function(){
cal.callCancelHandler();
},"nav-btn-dark-gray",4,this.calendarID+"-cancel");
}
var _623=Calendar.createElement("tfoot",_5f8);
row=Calendar.createElement("tr",_623);
row.className="footrow";
cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);
cell.className="ttip";
if(this.isPopup){
cell.ttip=Calendar._TT["DRAG_TO_MOVE"];
cell.style.cursor="move";
}
this.tooltips=cell;
div=Calendar.createElement("div",this.element);
div.id=this.calendarID+"-month-combo";
this.monthsCombo=div;
div.className="combo";
for(i=0;i<Calendar._MN.length;++i){
var mn=Calendar.createElement("div");
mn.className=Calendar.is_ie?"label-IEfix":"label";
mn.month=i;
mn.innerHTML=Calendar._SMN[i];
div.appendChild(mn);
}
div=Calendar.createElement("div",this.element);
div.id=this.calendarID+"-year-combo";
this.yearsCombo=div;
div.className="combo";
for(i=12;i>0;--i){
var yr=Calendar.createElement("div");
yr.className=Calendar.is_ie?"label-IEfix":"label";
div.appendChild(yr);
}
this._init(this.firstDayOfWeek,this.date);
_5f7.appendChild(this.element);
};
Calendar.changeTimeMouseUp=function(pEv){
changeTimeMouseUp(pEv);
Calendar.onUpdateTime(pEv);
};
Calendar.changeTimeMouseDown=function(pEvt){
var cal=this;
if(Calendar.is_ie){
changeTimeMouseDown(null,pEvt.target.id,"inputTime-spinner",cal.minIncr,cal.time24);
}else{
changeTimeMouseDown(pEvt,pEvt.target.id.replace("-s",""),"inputTime-spinner",1,cal.time24);
}
};
Calendar.validateHourKeyUp=function(pEvt){
validateHourKeyUp(pEvt,cal.time24);
};
Calendar._keyEvent=function(ev){
if(!window.calendar){
return false;
}
(Calendar.is_ie)&&(ev=window.event);
if(Calendar.is_ie){
if(ev.srcElement&&ev.srcElement.tagName=="INPUT"){
return true;
}
}else{
if(ev.target&&ev.target.tagName=="INPUT"){
return true;
}
}
var cal=window.calendar;
var act=(Calendar.is_ie||ev.type=="keypress");
if(ev.ctrlKey){
switch(ev.keyCode){
case 37:
act&&Calendar.cellClick(cal._nav_pm);
break;
case 38:
act&&Calendar.cellClick(cal._nav_py);
break;
case 39:
act&&Calendar.cellClick(cal._nav_nm);
break;
case 40:
act&&Calendar.cellClick(cal._nav_ny);
break;
default:
return false;
}
}else{
switch(ev.keyCode){
case 9:
var _62d=window.document.getElementById(cal.calendarID+"-h");
_62d&&_62d.select();
break;
case 32:
Calendar.cellClick(cal._nav_now);
break;
case 27:
act&&cal.callCloseHandler();
break;
case 37:
case 38:
case 39:
case 40:
if(act){
var K=ev.keyCode;
var prev,x,y,ne,el,step;
prev=K==37||K==38;
step=(K==37||K==39)?1:7;
function setVars(){
el=cal.currentDateEl;
var p=el.pos;
x=p&15;
y=p>>4;
ne=cal.ar_days[y][x];
}
setVars();
function prevMonth(){
var date=new Date(cal.date);
date.setDate(date.getDate()-step);
cal.setDate(date);
}
function nextMonth(){
var date=new Date(cal.date);
date.setDate(date.getDate()+step);
cal.setDate(date);
}
while(1){
switch(K){
case 37:
if(--x>=0){
ne=cal.ar_days[y][x];
}else{
x=6;
K=38;
continue;
}
break;
case 38:
if(--y>=0){
ne=cal.ar_days[y][x];
}else{
prevMonth();
setVars();
}
break;
case 39:
if(++x<7){
ne=cal.ar_days[y][x];
}else{
x=0;
K=40;
continue;
}
break;
case 40:
if(++y<cal.ar_days.length){
ne=cal.ar_days[y][x];
}else{
nextMonth();
setVars();
}
break;
}
break;
}
if(ne){
if(!ne.disabled){
Calendar.cellClick(ne);
}else{
if(prev){
prevMonth();
}else{
nextMonth();
}
}
}
}
break;
case 13:
if(act){
Calendar.cellClick(cal.currentDateEl,ev);
}
break;
default:
return false;
}
}
return Calendar.stopEvent(ev);
};
Calendar.prototype._init=function(_638,date){
var _63a=new Date();
this.table.style.visibility="hidden";
var year=date.getFullYear();
if(year<this.minYear){
year=this.minYear;
date.setFullYear(year);
}else{
if(year>this.maxYear){
year=this.maxYear;
date.setFullYear(year);
}
}
this.firstDayOfWeek=_638;
this.date=new Date(date);
var _63c=date.getMonth();
var _63d=navigator.appName;
if(_63d=="Netscape"){
this.title.innerHTML=Calendar._MN[_63c]+", "+year;
}
var mday=date.getDate();
var _63f=date.getMonthDays();
date.setDate(1);
var day1=(date.getDay()-this.firstDayOfWeek)%7;
if(day1<0){
day1+=7;
}
date.setDate(-day1);
date.setDate(date.getDate()+1);
if(this.showsCalendar){
var row=this.tbody.firstChild;
var MN=Calendar._SMN[_63c];
var _643=[];
var _644=Calendar._TT["WEEKEND"];
for(var i=0;i<6;++i,row=row.nextSibling){
var cell=row.firstChild;
if(this.weekNumbers){
cell.className="day wn";
cell.innerHTML=date.getWeekNumber();
cell=cell.nextSibling;
}
row.className="daysrow";
var _647=false;
var dpos=_643[i]=[];
for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(date.getDate()+1)){
var iday=date.getDate();
var wday=date.getDay();
cell.className="day";
cell.pos=i<<4|j;
dpos[j]=cell;
var _64c=(date.getMonth()==_63c);
if(!_64c){
if(this.showsOtherMonths){
cell.className+=" othermonth";
cell.otherMonth=true;
}else{
cell.className="emptycell";
cell.innerHTML="&nbsp;";
cell.disabled=true;
continue;
}
}else{
cell.otherMonth=false;
_647=true;
}
cell.disabled=false;
cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;
if(typeof this.getDateStatus=="function"){
var _64d=this.getDateStatus(date,year,_63c,iday);
if(_64d===true){
cell.className+=" disabled";
cell.disabled=true;
}else{
if(/disabled/i.test(_64d)){
cell.disabled=true;
}
cell.className+=" "+_64d;
}
}
if(!cell.disabled){
cell.caldate=new Date(date);
cell.ttip="_";
if(_64c&&iday==mday){
cell.className+=" selected";
this.currentDateEl=cell;
}
if(date.getFullYear()==_63a.getFullYear()&&date.getMonth()==_63a.getMonth()&&iday==_63a.getDate()){
cell.className+=" today";
cell.ttip+=Calendar._TT["PART_TODAY"];
}
if(_644.indexOf(wday.toString())!=-1){
cell.className+=cell.otherMonth?" oweekend":" weekend";
}
}
}
if(!(_647||this.showsOtherMonths)){
row.className="emptyrow";
}
}
this.ar_days=_643;
this.monthSpan.innerText=Calendar._MN[_63c]+",";
this.yearSpan.innerText=year;
}
this.onSetTime();
this.table.style.visibility="visible";
};
Calendar.prototype.setDate=function(date){
if(!date.equalsTo(this.date)){
this._init(this.firstDayOfWeek,date);
}
};
Calendar.prototype.refresh=function(){
this._init(this.firstDayOfWeek,this.date);
};
Calendar.prototype.setFirstDayOfWeek=function(_64f){
this._init(_64f,this.date);
this._displayWeekdays();
};
Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(_650){
this.getDateStatus=_650;
};
Calendar.prototype.setRange=function(a,z){
this.minYear=a;
this.maxYear=z;
};
Calendar.prototype.callHandler=function(){
if(this.onSelected){
this.onSelected(this,this.date.print(this.dateFormat));
}
};
Calendar.prototype.callCloseHandler=function(){
if(this.onClose){
this.onClose(this);
}
this.hideShowCovered();
};
Calendar.prototype.callClearHandler=function(){
if(this.onClear){
this.onClear(this);
}
this.hideShowCovered();
};
Calendar.prototype.callDoneHandler=function(){
if(this.onDone){
this.onDone(this);
}
this.hideShowCovered();
};
Calendar.prototype.callCancelHandler=function(){
if(this.onCancel){
this.onCancel(this);
}
this.hideShowCovered();
};
Calendar.prototype.destroy=function(){
var el=this.element.parentNode;
el.removeChild(this.element);
Calendar._C=null;
window.calendar=null;
};
Calendar.prototype.reparent=function(_654){
var el=this.element;
el.parentNode.removeChild(el);
_654.appendChild(el);
};
Calendar._checkCalendar=function(ev){
if(!window.calendar){
return false;
}
var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);
for(;el!=null&&el!=calendar.element;el=el.parentNode){
}
if(el==null){
window.calendar.callCloseHandler();
return Calendar.stopEvent(ev);
}
};
Calendar.prototype.show=function(){
var rows=this.table.getElementsByTagName("tr");
for(var i=rows.length;i>0;){
var row=rows[--i];
Calendar.removeClass(row,"rowhilite");
var _65b=row.getElementsByTagName("td");
for(var j=_65b.length;j>0;){
var cell=_65b[--j];
Calendar.removeClass(cell,"hilite");
Calendar.removeClass(cell,"active");
}
}
this.element.style.display="block";
this.hidden=false;
if(this.isPopup){
window.calendar=this;
Calendar.addEvent(document,"keydown",Calendar._keyEvent);
Calendar.addEvent(document,"keypress",Calendar._keyEvent);
Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);
}
this.hideShowCovered();
};
Calendar.prototype.hide=function(){
if(this.isPopup){
Calendar.removeEvent(document,"keydown",Calendar._keyEvent);
Calendar.removeEvent(document,"keypress",Calendar._keyEvent);
Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);
}
this.element.style.display="none";
this.hidden=true;
this.hideShowCovered();
};
Calendar.prototype.showAt=function(x,y){
var s=this.element.style;
s.left=x+"px";
s.top=y+"px";
this.show();
};
Calendar.prototype.showAtElement=function(el,opts){
var self=this;
var p=Calendar.getAbsolutePos(el);
if(!opts||typeof opts!="string"){
this.showAt(p.x,p.y+el.offsetHeight);
return true;
}
this.element.style.display="block";
Calendar.continuation_for_the_khtml_browser=function(){
var w=self.element.offsetWidth;
var h=self.element.offsetHeight;
self.element.style.display="none";
var _667=opts.substr(0,1);
var _668="l";
if(opts.length>1){
_668=opts.substr(1,1);
}
switch(_667){
case "T":
p.y-=h;
break;
case "B":
p.y+=el.offsetHeight;
break;
case "C":
p.y+=(el.offsetHeight-h)/2;
break;
case "t":
p.y+=el.offsetHeight-h;
break;
case "b":
break;
}
switch(_668){
case "L":
p.x-=w;
break;
case "R":
p.x+=el.offsetWidth;
break;
case "C":
p.x+=(el.offsetWidth-w)/2;
break;
case "r":
p.x+=el.offsetWidth-w;
break;
case "l":
break;
}
p.width=w;
p.height=h+40;
self.monthsCombo.style.display="none";
fixPosition(p);
self.showAt(p.x,p.y);
};
if(Calendar.is_khtml){
setTimeout("Calendar.continuation_for_the_khtml_browser()",10);
}else{
Calendar.continuation_for_the_khtml_browser();
}
};
Calendar.prototype.setDateFormat=function(str){
this.dateFormat=str;
};
Calendar.prototype.setTtDateFormat=function(str){
this.ttDateFormat=str;
};
Calendar.prototype.parseDate=function(str,fmt){
if(!fmt){
fmt=this.dateFormat;
}
var _66d=new Object();
this.setDate(parseDate(str,fmt,_66d));
return _66d.nbf>0;
};
function parseDate(str,fmt,_670){
var y=0;
var m=-1;
var d=0;
var a=str.split(/\W+/);
var b=fmt.match(/%./g);
var i=0,j=0;
var hr=0;
var min=0;
var nbf=0;
for(i=0;i<a.length;++i){
if(!a[i]){
continue;
}
nbf++;
switch(b[i]){
case "%d":
case "%e":
d=parseInt(a[i],10);
break;
case "%m":
m=parseInt(a[i],10)-1;
break;
case "%Y":
case "%y":
y=parseInt(a[i],10);
(y<100)&&(y+=(y>29)?1900:2000);
break;
case "%b":
case "%B":
for(j=0;j<12;++j){
if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){
m=j;
break;
}
}
break;
case "%H":
case "%I":
case "%k":
case "%l":
hr=parseInt(a[i],10);
break;
case "%P":
case "%p":
if(/pm/i.test(a[i])&&hr<12){
hr+=12;
}
break;
case "%M":
min=parseInt(a[i],10);
break;
}
}
if(y!=0&&m!=-1&&d!=0){
_670.nbf=nbf;
return new Date(y,m,d,hr,min,0);
}
y=0;
m=-1;
d=0;
for(i=0;i<a.length;++i){
if(a[i].search(/[a-zA-Z]+/)!=-1){
var t=-1;
for(j=0;j<12;++j){
if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){
t=j;
break;
}
}
if(t!=-1){
if(m!=-1){
nbf++;
d=m+1;
}
nbf++;
m=t;
}
}else{
if(parseInt(a[i],10)<=12&&m==-1){
nbf++;
m=a[i]-1;
}else{
if(parseInt(a[i],10)>31&&y==0){
nbf++;
y=parseInt(a[i],10);
(y<100)&&(y+=(y>29)?1900:2000);
}else{
if(d==0&&a[i]!=0){
nbf++;
d=a[i];
}
}
}
}
}
if(y==0||m==-1||d==0){
var _67c=new Date();
if(y==0){
y=_67c.getFullYear();
}
if(m==-1){
m=_67c.getMonth();
}
if(d==0){
d=_67c.getDate();
}
}
_670.nbf=nbf;
return new Date(y,m,d,hr,min,0);
}
Calendar.prototype.hideShowCovered=function(){
var self=this;
Calendar.continuation_for_the_khtml_browser=function(){
function getVisib(obj){
var _67f=obj.style.visibility;
if(!_67f){
if(document.defaultView&&typeof (document.defaultView.getComputedStyle)=="function"){
if(!Calendar.is_khtml){
_67f=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");
}else{
_67f="";
}
}else{
if(obj.currentStyle){
_67f=obj.currentStyle.visibility;
}else{
_67f="";
}
}
}
return _67f;
}
var tags=new Array("applet","iframe","select");
var el=self.element;
var p=Calendar.getAbsolutePos(el);
var EX1=p.x;
var EX2=el.offsetWidth+EX1;
var EY1=p.y;
var EY2=el.offsetHeight+EY1;
for(var k=tags.length;k>0;){
var ar=document.getElementsByTagName(tags[--k]);
var cc=null;
for(var i=ar.length;i>0;){
cc=ar[--i];
p=Calendar.getAbsolutePos(cc);
var CX1=p.x;
var CX2=cc.offsetWidth+CX1;
var CY1=p.y;
var CY2=cc.offsetHeight+CY1;
if(self.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){
if(!cc.__msh_save_visibility){
cc.__msh_save_visibility=getVisib(cc);
}
cc.style.visibility=cc.__msh_save_visibility;
}else{
if(!cc.__msh_save_visibility){
cc.__msh_save_visibility=getVisib(cc);
}
cc.style.visibility="hidden";
}
}
}
};
if(Calendar.is_khtml){
setTimeout("Calendar.continuation_for_the_khtml_browser()",10);
}else{
Calendar.continuation_for_the_khtml_browser();
}
};
Calendar.prototype._displayWeekdays=function(){
var fdow=this.firstDayOfWeek;
var cell=this.firstdayname;
var _691=Calendar._TT["WEEKEND"];
for(var i=0;i<7;++i){
cell.className="day name";
var _693=(i+fdow)%7;
if(i){
cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[_693]);
cell.navtype=100;
cell.calendar=this;
cell.fdow=_693;
Calendar._add_evs(cell);
}
if(_691.indexOf(_693.toString())!=-1){
Calendar.addClass(cell,"weekend");
}
cell.innerHTML=Calendar._SDN[(i+fdow)%7];
cell=cell.nextSibling;
}
};
Calendar.prototype._hideCombos=function(){
this.monthsCombo.style.display="none";
this.yearsCombo.style.display="none";
};
Calendar.prototype._dragStart=function(ev){
if(this.dragging){
return;
}
this.dragging=true;
var posX;
var posY;
if(Calendar.is_ie){
posY=window.event.clientY+document.body.scrollTop;
posX=window.event.clientX+document.body.scrollLeft;
}else{
posY=ev.clientY+window.scrollY;
posX=ev.clientX+window.scrollX;
}
var st=this.element.style;
this.xOffs=posX-parseInt(st.left);
this.yOffs=posY-parseInt(st.top);
with(Calendar){
addEvent(document,"mousemove",calDragIt);
addEvent(document,"mouseup",calDragEnd);
}
};
Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
Date.SECOND=1000;
Date.MINUTE=60*Date.SECOND;
Date.HOUR=60*Date.MINUTE;
Date.DAY=24*Date.HOUR;
Date.WEEK=7*Date.DAY;
Date.prototype.getMonthDays=function(_698){
var year=this.getFullYear();
if(typeof _698=="undefined"){
_698=this.getMonth();
}
if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&_698==1){
return 29;
}else{
return Date._MD[_698];
}
};
Date.prototype.getDayOfYear=function(){
var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var then=new Date(this.getFullYear(),0,0,0,0,0);
var time=now-then;
return Math.floor(time/Date.DAY);
};
Date.prototype.getWeekNumber=function(){
var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var DoW=d.getDay();
d.setDate(d.getDate()-(DoW+6)%7+3);
var ms=d.valueOf();
d.setMonth(0);
d.setDate(4);
return Math.round((ms-d.valueOf())/(7*86400000))+1;
};
Date.prototype.equalsTo=function(date){
return ((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));
};
Date.prototype.print=function(str){
var m=this.getMonth();
var d=this.getDate();
var y=this.getFullYear();
var wn=this.getWeekNumber();
var w=this.getDay();
var s={};
var hr=this.getHours();
var pm=(hr>=12);
var ir=(pm)?(hr-12):hr;
var dy=this.getDayOfYear();
if(ir==0){
ir=12;
}
var min=this.getMinutes();
var sec=this.getSeconds();
s["%a"]=Calendar._SDN[w];
s["%A"]=Calendar._DN[w];
s["%b"]=Calendar._SMN[m];
s["%B"]=Calendar._MN[m];
s["%C"]=1+Math.floor(y/100);
s["%d"]=(d<10)?("0"+d):d;
s["%e"]=d;
s["%H"]=(hr<10)?("0"+hr):hr;
s["%I"]=(ir<10)?("0"+ir):ir;
s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;
s["%k"]=hr;
s["%l"]=ir;
s["%m"]=(m<9)?("0"+(1+m)):(1+m);
s["%M"]=(min<10)?("0"+min):min;
s["%n"]="\n";
s["%o"]=1+m;
s["%p"]=pm?"PM":"AM";
s["%P"]=pm?"pm":"am";
s["%s"]=Math.floor(this.getTime()/1000);
s["%S"]=(sec<10)?("0"+sec):sec;
s["%t"]="\t";
s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;
s["%u"]=w+1;
s["%w"]=w;
s["%y"]=(""+y).substr(2,2);
s["%Y"]=y;
s["%%"]="%";
var re=/%./g;
if(!Calendar.is_ie5&&!Calendar.is_khtml){
return str.replace(re,function(par){
return s[par]||par;
});
}
var a=str.match(re);
for(var i=0;i<a.length;i++){
var tmp=s[a[i]];
if(tmp){
re=new RegExp(a[i],"g");
str=str.replace(re,tmp);
}
}
return str;
};
Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;
Date.prototype.setFullYear=function(y){
var d=new Date(this);
d.__msh_oldSetFullYear(y);
if(d.getMonth()!=this.getMonth()){
this.setDate(28);
}
this.__msh_oldSetFullYear(y);
};
function showAtElement2(_6b5,_6b6,_6b7,_6b8){
var p=Calendar.getAbsolutePos(_6b6);
if(!_6b7||typeof _6b7!="string"){
_6b5.showAt(p.x,p.y+_6b6.offsetHeight);
return true;
}
showAtElement2_=function(){
_6b5.style.display="block";
var w=_6b5.offsetWidth;
var h=_6b5.offsetHeight;
var _6bc=_6b7.substr(0,1);
var _6bd="l";
if(_6b7.length>1){
_6bd=_6b7.substr(1,1);
}
switch(_6bc){
case "T":
p.y-=h;
break;
case "B":
p.y+=_6b6.offsetHeight;
break;
case "C":
p.y+=(_6b6.offsetHeight-h)/2;
break;
case "t":
p.y+=_6b6.offsetHeight-h;
break;
case "b":
break;
}
switch(_6bd){
case "L":
p.x-=w;
break;
case "R":
p.x+=_6b6.offsetWidth;
break;
case "C":
p.x+=(_6b6.offsetWidth-w)/2;
break;
case "r":
p.x+=_6b6.offsetWidth-w;
break;
case "l":
break;
}
p.width=w;
p.height=h;
fixPosition(p);
if(_6b8!=null){
var _6be=Calendar.getAbsolutePos(_6b8);
p.x-=_6be.x;
p.y-=_6be.y;
}
_6b5.style.left=p.x+"px";
_6b5.style.top=p.y+"px";
};
if(Calendar.is_khtml){
setTimeout("showAtElement2_()",10);
}else{
showAtElement2_();
}
}
function getScrollXY(){
var x=0,y=0;
if(typeof (window.pageYOffset)=="number"){
y=window.pageYOffset;
x=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
y=document.body.scrollTop;
x=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
y=document.documentElement.scrollTop;
x=document.documentElement.scrollLeft;
}
}
}
return {x:x,y:y};
}
function fixPosition(box){
if(box.x<0){
box.x=0;
}
if(box.y<0){
box.y=0;
}
var cp=document.createElement("div");
var s=cp.style;
s.position="absolute";
s.right=s.bottom=s.width=s.height="0px";
document.body.appendChild(cp);
var br=Calendar.getAbsolutePos(cp);
document.body.removeChild(cp);
var sp=getScrollXY();
br.x+=sp.x;
br.y+=sp.y;
var tmp=box.x+box.width-br.x;
if(tmp>0){
box.x-=tmp;
}
tmp=box.y+box.height-br.y;
if(tmp>0){
box.y-=tmp;
}
}
function copyTime(_6c7,_6c8){
_6c7.setHours(_6c8.getHours());
_6c7.setMinutes(_6c8.getMinutes());
}
function dateHourToNormalizedHour(_6c9,_6ca){
var pm=false;
if(_6c9){
var pm=(_6ca>=12);
if(_6ca>12){
_6ca-=12;
}
if(_6ca==0){
_6ca=12;
}
}
return new NormalizedHour(_6ca,pm);
}
function normalizedHourToDateHour(_6cc,_6cd,_6ce){
if(_6cc){
if(_6ce){
_6cd+=12;
if(_6cd==24){
_6cd=12;
}
}else{
if(_6cd==12){
_6cd=0;
}
}
}
return _6cd;
}
function NormalizedHour(_6cf,_6d0){
this.isPm=_6d0;
this.hours=_6cf;
}
window.calendar=null;
var HTTP_INIT=1;
var HTTP_CONNECTED=2;
var HTTP_IN_PROGRESS=3;
var HTTP_COMPLETE=4;
var HTTP_OK=200;
var HTTP_FORBIDDEN=403;
var HTTP_NOT_FOUND=404;
function HTTPClient(){
this.url=null;
this.xmlhttp=null;
this.callinprogress=false;
this.userhandler=null;
}
HTTPClient.prototype.init=function(url){
this.url=url;
if(window.XMLHttpRequest){
this.xmlhttp=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}else{
throw "XMLHttpRequest not supported by "+navigator.userAgent+".";
}
}
};
HTTPClient.prototype.asyncGET=function(_6d2){
if(this.callinprogress){
throw "Call in progress";
}
this.userhandler=_6d2;
this.xmlhttp.open("GET",this.url,true);
var self=this;
this.xmlhttp.onreadystatechange=function(){
self.stateChangeCallback(self);
};
this.xmlhttp.send(null);
};
HTTPClient.prototype.stateChangeCallback=function(_6d4){
switch(_6d4.xmlhttp.readyState){
case HTTP_INIT:
try{
_6d4.userhandler.onInit();
}
catch(e){
}
break;
case HTTP_CONNECTED:
try{
if(_6d4.xmlhttp.status!=HTTP_OK){
_6d4.userhandler.onError(_6d4.xmlhttp.status,_6d4.xmlhttp.statusText);
_6d4.xmlhttp.abort();
_6d4.callinprogress=false;
}
}
catch(e){
}
break;
case HTTP_IN_PROGRESS:
try{
var _6d5;
try{
_6d5=_6d4.xmlhttp.getResponseHeader("Content-Length");
}
catch(e){
_6d5=NaN;
}
_6d4.userhandler.onProgress(_6d4.xmlhttp.responseText,_6d5);
}
catch(e){
}
break;
case HTTP_COMPLETE:
try{
if(_6d4.xmlhttp.status==HTTP_OK){
_6d4.userhandler.onLoad(_6d4.xmlhttp.responseXML);
}else{
_6d4.userhandler.onError(_6d4.xmlhttp.status,_6d4.xmlhttp.statusText);
}
}
catch(e){
}
finally{
_6d4.callinprogress=false;
}
break;
}
};
function EchoHandler(){
}
EchoHandler.prototype.onInit=function(){
this.echo("About to send request<br>");
};
EchoHandler.prototype.onError=function(_6d6,_6d7){
this.echo("Error: "+_6d6+": "+_6d7+"<br>");
};
EchoHandler.prototype.onProgress=function(_6d8,_6d9){
this.echo("Downloaded "+_6d8.length+" of "+_6d9+"<br>");
};
EchoHandler.prototype.onLoad=function(_6da){
this.echo("<pre>"+_6da+"</pre>");
};
EchoHandler.prototype.echo=function(_6db){
document.status=_6db;
};
addEvent(window,"load",convertTrees);
function setDefault(name,val){
if(typeof (window[name])=="undefined"||window[name]==null){
window[name]=val;
}
}
function expandTree(_6de){
var ul=document.getElementById(_6de);
if(ul==null){
return false;
}
expandCollapseList(ul,nodeOpenClass,null,true);
}
function collapseTree(_6e0){
var ul=document.getElementById(_6e0);
if(ul==null){
return false;
}
expandCollapseList(ul,nodeClosedClass,null,true);
}
function expandToItem(_6e2,_6e3){
var ul=document.getElementById(_6e2);
if(ul==null){
return false;
}
var ret=expandCollapseList(ul,nodeOpenClass,_6e3,true);
if(ret){
var o=document.getElementById(_6e3);
if(o.scrollIntoView){
o.scrollIntoView(false);
}
}
}
function expandCollapseList(ul,_6e8,_6e9,_6ea){
if(!ul.childNodes||ul.childNodes.length==0){
return false;
}
for(var _6eb=0;_6eb<ul.childNodes.length;_6eb++){
var item=ul.childNodes[_6eb];
if(_6e9!=null&&item.id==_6e9){
return true;
}
if(item.nodeName=="LI"){
var _6ed=false;
for(var _6ee=0;_6ee<item.childNodes.length;_6ee++){
var _6ef=item.childNodes[_6ee];
if(_6ef.nodeName=="UL"){
_6ed=true;
var ret=expandCollapseList(_6ef,_6e8,_6e9,_6ea);
if(_6e9!=null&&ret){
item.className=_6e8;
return _6ea;
}
}
}
if(_6ed&&_6e9==null){
item.className=_6e8;
}
}
}
}
function convertTrees(){
setDefault("treeClass","tree-root");
setDefault("nodeClosedClass","tree-node-more");
setDefault("nodeOpenClass","tree-node-less");
setDefault("nodeLeafClass","tree-node-leaf");
setDefault("nodeSignClass","tree-sign");
setDefault("nodeIconClass","tree-icon");
setDefault("nodeMoreClass","tree-more");
setDefault("nodeLabelClass","tree-label");
setDefault("nodeLabelSelectedClass","tree-label-selected");
if(!document.createElement){
return;
}
uls=document.getElementsByTagName("ul");
for(var uli=0;uli<uls.length;uli++){
var ul=uls[uli];
if(ul.className==treeClass){
convertTree(ul);
}
}
}
function convertTree(root){
var _6f4=document.jsfForm()[root.id+"-s"];
if(_6f4!=null&&_6f4.value!=""){
var _6f5=_6f4.value;
var _6f6=root.id+"-"+_6f5;
var _6f7=findItemLabel(root.id,_6f6);
addClass(_6f7,nodeLabelSelectedClass);
if(_6f7.scrollIntoView){
_6f7.scrollIntoView(false);
}
}
}
function processList(root,ul){
if(!ul.childNodes||ul.childNodes.length==0){
return;
}
for(var i=0;i<ul.childNodes.length;i++){
var item=ul.childNodes[i];
if(item.nodeName=="LI"){
processItem(root,item);
}
}
}
function processItem(root,item){
var _6fe=false;
for(var _6ff=0;_6ff<item.childNodes.length;_6ff++){
var _700=item.childNodes[_6ff];
if(_700.nodeName=="UL"){
_6fe=true;
processList(root,_700);
}
}
var s=document.createElement("SPAN");
s.className=nodeSignClass;
if(_6fe||hasClass(item,nodeMoreClass)){
item.className=_6fe?nodeOpenClass:nodeClosedClass;
item.getItems=!_6fe;
s.onclick=onExpandCollapseClickSelf;
}else{
item.className=nodeLeafClass;
s.onclick=onClickReturnFalse;
}
s.appendChild(document.createTextNode("\xa0"));
item.insertBefore(s,item.firstChild);
var s2=document.createElement("SPAN");
s2.className=nodeIconClass;
s2.onclick=onClickReturnFalse;
s2.appendChild(document.createTextNode("\xa0"));
item.insertBefore(s2,s.nextSibling);
var s3=document.createElement("SPAN");
s3.className=nodeLabelClass;
if(isSelectedItem(root.id,item.id)){
addClass(s3,nodeLabelSelectedClass);
}
s3.onclick=onS3ClickSelf;
s3.onmouseover=onS3MouseOverSelf;
s3.onmouseout=onS3MouseOutSelf;
var _704=s2.nextSibling;
item.removeChild(_704);
s3.appendChild(_704);
item.insertBefore(s3,s2.nextSibling);
}
function onExpandCollapseClick(_705){
var item=_705.parentNode;
var _707=item.className==nodeOpenClass;
item.className=_707?nodeClosedClass:nodeOpenClass;
var _708=findRootId(_705);
addItemState(_708,item.id,_707);
var _709=false;
for(var i=0;i<item.childNodes.length&&!_709;i++){
if(item.childNodes[i].nodeName=="UL"){
_709=true;
}
}
if(!_709){
item.getItems=false;
getItems(_708,item.id);
}
return false;
}
function onExpandCollapseClickSelf(){
onExpandCollapseClick(this);
}
function onClickReturnFalse(){
return false;
}
function onS3ClickSelf(){
return onS3Click(this);
}
function onS3Click(_70b){
var _70c=findRootId(_70b);
selectItem(_70c,_70b.parentNode.id);
return false;
}
function onS3MouseOverSelf(){
return onS3MouseOver(this);
}
function onS3MouseOver(_70d){
addClass(_70d,"mouseover");
return false;
}
function onS3MouseOutSelf(){
return onS3MouseOut(this);
}
function onS3MouseOut(_70e){
removeClass(_70e,"mouseover");
return false;
}
function findRootId(_70f){
var _710=_70f.parentNode;
while(_710!=null&&(_710.parentNode.nodeName=="UL"||_710.parentNode.nodeName=="LI")){
_710=_710.parentNode;
}
return _710.id;
}
function addItemState(_711,_712,_713){
var _714=document.jsfForm()[_711+"-x"];
if(_714!=null){
var _715=_714.value;
var _716=_712.substr(_711.length+1);
_715=removeItemState(_715,_716);
_715+=(_715.length>0?" ":"")+(_713?"-":"+")+_716;
_714.value=_715;
}
}
function removeItemState(_717,_718){
var _719=" -"+_718+" ";
_717=" "+_717+" ";
var _71a=_717.indexOf(_719);
if(_71a!=-1){
_717=_717.substr(0,_71a+1)+_717.substr(_71a+_719.length);
}
_719=" +"+_718+" ";
_71a=_717.indexOf(_719);
if(_71a!=-1){
_717=_717.substr(0,_71a+1)+_717.substr(_71a+_719.length);
}
return _717.substr(1,_717.length-2);
}
function selectItem(_71b,_71c){
var _71d=getSelectedItem(_71b);
if(_71d!=null){
var _71e=findItemLabel(_71b,_71d);
removeClass(_71e,nodeLabelSelectedClass);
}
setSelectedItem(_71b,_71c);
var _71f=findItemLabel(_71b,_71c);
addClass(_71f,nodeLabelSelectedClass);
}
function isSelectedItem(_720,_721){
var _722=document.jsfForm()[_720+"-s"];
if(_722!=null){
var _723=_722.value;
return _721==_720+"-"+_723;
}
return false;
}
function getSelectedItem(_724){
var _725=document.jsfForm()[_724+"-s"];
if(_725!=null){
var _726=_725.value;
if(_726.length>0){
return _724+"-"+_726;
}
}
return null;
}
function setSelectedItem(_727,_728){
var _729=document.jsfForm()[_727+"-s"];
if(_729!=null){
var _72a=_728.substr(_727.length+1);
_729.value=_72a;
}
}
function findItemLabel(_72b,_72c){
var li=document.getElementById(_72c);
if(li!=null){
var _72e=li.firstChild;
for(var _72f=0;_72e!=null;_72e=_72e.nextSibling){
if(_72e.tagName=="SPAN"){
if(++_72f==3){
return _72e;
}
}
}
}
return null;
}
function isChildItem(_730,_731){
if(_731==null||_731.length<=_730.length){
return false;
}
return _730==_731.substr(0,_730.length)&&_731.charAt(_730.length)=="-";
}
function getItems(_732,_733){
var _734=document.jsfForm()[_732+"-r"];
var url=_734.value;
url=addParameter(url,"treeId",_732);
url=addParameter(url,"nodeId",_733.substr(_732.length+1));
url=addParameter(url,"formId",window.document.jsfForm().id);
var _736=new TreeHandler(_732,_733);
var _737=new HTTPClient();
_737.init(url);
_737.asyncGET(_736);
}
function TreeHandler(_738,_739){
this.treeId=_738;
this.itemId=_739;
this.fallback=new EchoHandler();
}
TreeHandler.prototype.onInit=function(){
this.fallback.onInit();
};
TreeHandler.prototype.onError=function(_73a,_73b){
this.fallback.onError(_73a,_73b);
};
TreeHandler.prototype.onProgress=function(_73c,_73d){
this.fallback.onProgress(_73c,_73d);
};
TreeHandler.prototype.onLoad=function(_73e){
loadItems(this.treeId,this.itemId,_73e);
};
function loadItems(_73f,_740,xml){
var _742=xml.documentElement.childNodes;
for(var i=0;i<_742.length;i++){
var item=_742.item(i);
if(item.nodeType!=ElementUtils.ELEMENT_NODE){
continue;
}
var _740=item.getAttribute("id");
var li=document.getElementById(_740);
if(li!=null){
window.status="Loading item "+_740+"...";
var _746=new Array();
var _747=new Array();
var _748=li.getElementsByTagName("INPUT");
for(var i=0;i<_748.length;i++){
if(typeof (_748[i].value)!="undefined"){
_746[_748[i].id]=_748[i].value;
}
if(typeof (_748[i].checked)!="undefined"){
_747[_748[i].id]=_748[i].checked;
}
}
loadItem(_73f,_740,item,li);
var root=document.getElementById(_73f);
processItem(root,li);
var _74a=li.getElementsByTagName("INPUT");
for(var i=0;i<_74a.length;i++){
var _74b=_746[_74a[i].id];
if(_74b!=null&&typeof (_74a[i].value)!="undefined"){
_74a[i].value=_74b;
}
var _74c=_747[_74a[i].id];
if(_74c!=null&&typeof (_74a[i].checked)!="undefined"){
_74a[i].checked=_74c;
}
}
}else{
window.status="Invalid response: item "+_740+" not found.";
}
}
}
function loadItem(_74d,_74e,_74f,_750){
while(_750.firstChild!=null){
removeEvent(_750.firstChild,"click",_750.firstChild.onclick);
removeEvent(_750.firstChild,"mouseover",_750.firstChild.onmouseover);
removeEvent(_750.firstChild,"mouseout",_750.firstChild.onmouseout);
_750.removeChild(_750.firstChild);
}
var _751=null;
var _752=_74f.firstChild;
for(;_752!=null;_752=_752.nextSibling){
if(_752.nodeType==DOM_ELEMENT_NODE&&_752.tagName=="ul"){
_751=_752;
}else{
var _753=ElementUtils.cloneItem(_752);
if(_753!=null){
_750.innerHTML+=_753.outerHTML;
}
}
}
if(_751!=null){
var ul=cloneItem(_751);
_750.innerHTML+=ul.outerHTML;
}
var _755=_750.getElementsByTagName("INPUT");
for(var i=0;i<_755.length;i++){
_755[i].name=_755[i].id;
}
}
EditorUtils=function(){
};
EditorUtils.createEditor=function(_757,_758){
var _759=this._setupEditor(_757,_758);
_759.Create();
};
EditorUtils.replaceTextarea=function(_75a,_75b){
var _75c=this._setupEditor(_75a,_75b);
_75c.ReplaceTextarea();
};
EditorUtils._setupEditor=function(_75d,_75e){
var _75f=new FCKeditor(_75d);
var _760=typeof contextPath_=="string";
var _761;
if(useVerStatFiles_){
_761=_760?contextPath_+"/"+buildVersion_+"/akira/pub/":"../";
}else{
_761=_760?contextPath_+"/akira/pub/":"../";
}
_75f.BasePath=_761+"fckeditor/";
var skin=(_75e&&_75e.skin)||"silver";
var _763;
if(_761.charAt(0)=="/"){
_763=_761+"fckeditor/editor/skins/"+skin+"/";
}else{
_763="skins/"+skin+"/";
}
_75f.Config["SkinPath"]=_763;
_75f.Width=(_75e&&_75e.width)||800;
_75f.Height=(_75e&&_75e.height)||500;
_75f.ToolbarSet=(_75e&&_75e.toolbarset)||"Basic";
_75f.Config["AutoDetectLanguage"]=false;
_75f.Config["DefaultLanguage"]=(_75e&&_75e.locale)||"en";
_75f.Config["SpellCheckerSkin"]=(_75e&&_75e.SpellCheckerSkin)||"liquid";
_75f.Config["LinkDlgHideTarget"]=(_75e&&_75e.LinkDlgHideTarget)||"false";
if(_75e.SpellCheckerURL){
_75f.Config["SpellCheckerURL"]=_75e.SpellCheckerURL;
}else{
var _764=_760?contextPath_+"/akira/pub/":"../";
_75f.Config["SpellCheckerURL"]=_764+"spellCheck.jsf";
}
_75f.Config["debug"]=_75e.debug;
_75f.Config["modeFullPage"]=_75e.modeFullPage;
_75f.Config["formatOutput"]=_75e.formatOutput;
_75f.Config["formatSource"]=_75e.formatSource;
_75f.Config["hiddenButton"]=_75e.hiddenButton;
return _75f;
};
EditorUtils.setHTMLText=function(_765,_766){
var _767=FCKeditorAPI.GetInstance(_765);
_767.SetHTML(_766,true);
};
EditorUtils.getHTMLText=function(_768){
var _769=FCKeditorAPI.GetInstance(_768);
return _769.GetXHTML(false);
};
EditorUtils.insertHtmlText=function(_76a,_76b){
var _76c=FCKeditorAPI.GetInstance(_76a);
return _76c.InsertHtml(_76b);
};
EditorUtils.addListener=function(_76d,_76e,_76f){
if(this.loaded){
try{
var _770=FCKeditorAPI.GetInstance(_76d);
_770.Events.AttachEvent(_76e,_76f);
}
catch(ex){
setTimeout(function(){
EditorUtils.addListener(_76d,_76e,_76f);
},10);
}
}else{
this.events[this.events.length]={editorId:_76d,eventName:_76e,listener:_76f};
}
};
EditorUtils.loaded=false;
EditorUtils.events=[];
function FCKeditor_OnComplete(){
EditorUtils.loaded=true;
for(var i=0,n=EditorUtils.events.length;i<n;i++){
var _773=EditorUtils.events[i];
var _774=FCKeditorAPI.GetInstance(_773.editorId);
_774.Events.AttachEvent(_773.eventName,_773.listener);
}
EditorUtils.events=[];
}
var _helpContexts=new Array();
var _helps=new Array();
var _defaultHelpContext=null;
var _activeHelpContext=null;
function HelpContext(pId,_776,_777,_778){
this.id=pId;
this.active=_776;
this.helpPageURL=_777;
if(_778!=null&&_778!=""&&_778!="null"){
this.forHelpId=_778;
}
}
function addNewHelpContext(pId,_77a,_77b,_77c){
var _77d=new HelpContext(pId,_77a,_77b,_77c);
_helpContexts[pId]=_77d;
if(_77a){
_activeHelpContext=_77d;
}
if(_defaultHelpContext==null){
_defaultHelpContext=_77d;
}
}
function activateHelpContext(pId){
var _77f;
if(pId==null){
_77f=_defaultHelpContext;
}else{
_77f=_helpContexts[pId];
}
if(_77f!=null&&_77f!=_activeHelpContext){
_77f.active=true;
_activeHelpContext=_77f;
if(_77f.forHelpId==null){
_77f.forHelpId=_helps[0];
}
refreshHelpContent(_77f.forHelpId,_77f.helpPageURL);
}
}
function refreshHelpContent(_780,_781){
var _782=findElementsEndingWithId(null,_780+"_iframe",null,true)[0];
if(_782!=null){
var _783=null;
if(_782.childNodes>0){
_783=_782.childNodes[0];
}
if(_783==null){
try{
_783=document.createElement("IFRAME");
_783.id=_780+"_frame";
_783.title=AccessibilityRes.helpIFrameTitle;
_783.name=AccessibilityRes.helpIFrameName;
_783.frameborder="no";
_782.appendChild(_783);
}
catch(exception){
iframeHTML="<iframe id=\""+_780+"_frame\" title=\""+AccessibilityRes.helpIFrameTitle+"\" name=\""+AccessibilityRes.helpIFrameName+"\" style=\"";
iframeHTML+="frameborder=\"no\"";
iframeHTML+="\"></iframe>";
_782.innerHTML+=iframeHTML;
_783=new Object();
_783.document=new Object();
_783.document.location=new Object();
_783.document.location.iframe=document.getElementById(_780+"_frame");
_783.document.location.replace=function(_784){
this.iframe.src=_784;
};
}
}
if(navigator.userAgent.indexOf("Gecko")!=-1&&!_783.contentDocument){
var func="sendUIMessage2('"+_781+"')";
setTimeout(func,10);
return false;
}
var _786=getIFrameDoc(_783);
if(_786==null){
return true;
}
_783.src=_781;
}
}
function addNewHelpComponent(_787){
_helps.push(_787);
}
Calendar.setup=function(_788){
function param_default(_789,def){
if(typeof _788[_789]=="undefined"){
_788[_789]=def;
}
}
param_default("inputField",null);
param_default("displayArea",null);
param_default("button",null);
param_default("clearField",null);
param_default("eventName","click");
param_default("ifFormat","%Y/%m/%d");
param_default("daFormat","%Y/%m/%d");
param_default("singleClick",true);
param_default("disableFunc",null);
param_default("dateStatusFunc",_788["disableFunc"]);
param_default("firstDay",0);
param_default("align","Br");
param_default("range",[1900,2999]);
param_default("weekNumbers",true);
param_default("flat",null);
param_default("flatCallback",null);
param_default("onSelect",null);
param_default("onClose",null);
param_default("onClear",null);
param_default("onDone",null);
param_default("onCancel",null);
param_default("onUpdate",null);
param_default("date",null);
param_default("cancelDate",_788["date"]);
param_default("showsCalendar",true);
param_default("showsTime",false);
param_default("showsActionBar",_788["showsTime"]);
param_default("minIncr",1);
param_default("strictMinIncr",true);
param_default("timeFormat","24");
param_default("electric",true);
param_default("step",2);
param_default("position",null);
param_default("cache",false);
param_default("showOthers",false);
var tmp=["inputField","displayArea","button","clearField"];
for(var i in tmp){
if(typeof _788[tmp[i]]=="string"){
_788[tmp[i]]=document.getElementById(_788[tmp[i]]);
}
}
if(!(_788.flat||_788.inputField||_788.displayArea||_788.button)){
alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
return false;
}
if(_788.displayArea){
var _78d=_788.inputField||_788.displayArea;
var _78e=_788.inputField?_788.ifFormat:_788.daFormat;
var _78f=_78d.value||_78d.innerHTML;
if(_78f=="emptied"){
_78f="";
}
var _790={};
var date=parseDate(_78f,_78e,_790);
if(_790.nbf){
_788.displayArea.innerHTML=date.print(_788.daFormat);
}else{
var _792=_788.clearField?_788.clearField.value||_788.clearField.innerHTML:"";
_788.displayArea.innerHTML=_792;
}
}
function onSelect(cal){
var p=cal.params;
var _795=(cal.dateClicked||p.electric);
if(_795&&p.flat){
if(typeof p.flatCallback=="function"){
p.flatCallback(cal);
}else{
alert("No flatCallback given -- doing nothing.");
}
return false;
}
if(_795&&p.inputField){
p.inputField.value=cal.date.print(p.ifFormat);
if(typeof p.inputField.onchange=="function"){
p.inputField.onchange();
}
}
if(_795&&p.displayArea){
p.displayArea.innerHTML=cal.date.print(p.daFormat);
}
if(_795&&p.singleClick&&cal.dateClicked&&!cal.showsActionBar){
cal.callCloseHandler();
}
if(_795&&typeof p.onUpdate=="function"){
p.onUpdate(cal);
}
}
function onClear(cal){
var p=cal.params;
if(p.flat){
if(typeof p.flatCallback=="function"){
p.flatCallback(cal);
}else{
alert("No flatCallback given -- doing nothing.");
}
return false;
}
if(p.inputField){
p.inputField.value="emptied";
if(typeof p.inputField.onchange=="function"){
p.inputField.onchange();
}
}
if(p.displayArea){
p.displayArea.innerHTML=cal.clearText;
}
if(typeof p.onUpdate=="function"){
p.onUpdate(cal);
}
cal.hide();
}
function onDone(cal){
cal.hide();
}
function onCancel(cal){
if(cal.cancelDate){
cal.setDate(cal.cancelDate);
cal.callHandler();
}else{
cal.callClearHandler();
}
cal.hide();
}
if(_788.flat!=null){
if(typeof _788.flat=="string"){
_788.flat=document.getElementById(_788.flat);
}
if(!_788.flat){
alert("Calendar.setup:\n  Flat specified but can't find parent.");
return false;
}
var cal=new Calendar(_788.firstDay,_788.date,_788.onSelect||onSelect,_788.onClose||onDone,_788.onClear||onClear,_788.onDone||onDone,_788.onCancel||onCancel,_788.inputField.id.replace(".inputrelevant",""));
cal.showsCalendar=_788.showsCalendar;
cal.showsTime=_788.showsTime;
cal.showsActionBar=_788.showsActionBar;
cal.minIncr=_788.minIncr;
cal.strictMinIncr=_788.strictMinIncr;
cal.time24=(_788.timeFormat=="24");
cal.params=_788;
cal.weekNumbers=_788.weekNumbers;
cal.setRange(_788.range[0],_788.range[1]);
cal.setDateStatusHandler(_788.dateStatusFunc);
cal.create(_788.flat);
cal.show();
return false;
}
var _79b=_788.button||_788.displayArea||_788.inputField;
_79b["on"+_788.eventName]=function(){
if(typeof (_79b.disabled)=="undefined"||_79b.disabled==false){
var _79c=_788.inputField||_788.displayArea;
var _79d=_788.inputField?_788.ifFormat:_788.daFormat;
var _79e=false;
var cal=window.calendar;
if(!(cal&&_788.cache)){
window.calendar=cal=new Calendar(_788.firstDay,_788.date,_788.onSelect||onSelect,_788.onClose||onDone,_788.onClear||onClear,_788.onDone||onDone,_788.onCancel||onCancel,_788.inputField.id.replace(".inputrelevant",""));
cal.showsCalendar=_788.showsCalendar;
cal.showsTime=_788.showsTime;
cal.showsActionBar=_788.showsActionBar;
cal.minIncr=_788.minIncr;
cal.strictMinIncr=_788.strictMinIncr;
cal.time24=(_788.timeFormat=="24");
cal.weekNumbers=_788.weekNumbers;
_79e=true;
}else{
if(_788.date){
cal.setDate(_788.date);
}
cal.hide();
}
cal.showsOtherMonths=_788.showOthers;
cal.yearStep=_788.step;
cal.setRange(_788.range[0],_788.range[1]);
cal.params=_788;
cal.setDateStatusHandler(_788.dateStatusFunc);
cal.setDateFormat(_79d);
if(_79e){
cal.create();
}
var _7a0=_79c.value||_79c.innerHTML;
if(_7a0=="emptied"){
_7a0="";
}
var _7a1=cal.parseDate(_7a0);
cal.cancelDate=_788.cancelDate;
if(!_788.cancelDate&&_7a1){
cal.cancelDate=new Date(cal.date.getTime());
}
cal.clearText=_788.clearField?_788.clearField.value||_788.clearField.innerHTML:"";
cal.refresh();
if(!_788.position){
cal.showAtElement(_788.button||_788.displayArea||_788.inputField,_788.align);
}else{
cal.showAt(_788.position[0],_788.position[1]);
}
}
if(typeof event!="undefined"){
event.returnValue=false;
}
return false;
};
};
function createAccessibleAlert(_7a2,_7a3,_7a4,_7a5,_7a6,_7a7,_7a8,_7a9){
var _7aa=createAlert(_7a2,_7a3,_7a4,_7a5,_7a6,_7a7,_7a8,_7a9);
if(_7aa!=null){
if(_7aa.embeddedDialog!=null){
var _7ab=findElementsEndingWithId(document,_7aa.embeddedDialog.dialogId+"-fr",null,true)[0];
if(_7ab!=null){
_7aa.embeddedDialog.htmlContent=_7ab.innerHTML;
_7ab.innerHTML="";
}
}else{
var _7ab=findElementsEndingWithId(document,_7a2+".message",null,true)[0];
if(_7ab!=null){
_7aa.htmlContent=_7ab.innerHTML;
_7ab.innerHTML="";
}
}
}
return _7aa;
}

