var I=document.images;
function W(s){document.write(s)}
function WL(s){document.writeln(s)}
function TabPanel( parentElement, flagNextPrev, flagTab, UrlPrefix)
{this.UrlPrefix= UrlPrefix;this.variableTabLength= false;this.tabIcons=[];this.height="";this.width=""; 
this.initialized= false;this.holdRedraw= false; 
this.autoshow= false; 
this.initialPanelId= null; 
this.notebookLayout= false; 
this.selectedTab= 1;this.selectedTabID= 0;this.containerDiv= parentElement;this.getDOMobj= function(){ return this.containerDiv;}
var done= false;this.customButtonPanel= false; 
this.customButtonPanelDiv= null;this.alignCustomContent="left";this.flagNextPrev= flagNextPrev; 
this.flagTabButtons= flagTab; 
this.Panes=[];this.Panes[0]="myTab";this.ButtonArray=[];this.ButtonArray[0]="myButton";this.OriginPanes=[];this.disableCancelButtonArray= null;this.disableFinishButtonArray= null;this.enableFinishButtonArray= null;this.onFinish= null;this.onCancel= null;this.styleClass="tabbedPanel"; 
this.enableFinish= false; 
this.tabSize= null;this.tabHeight= -1;this.tabHeightXtra= 0;this.tabWidth= 1;this.startIndex= 1;this.maxTabWidth= -1;this.tabIndex= null;this.jsfFinishButton= null;this.jsfCancelButton= null;this.slantActiveLeft= 2;this.slantActiveRight= 2;this.slantInactiveLeft=2;this.slantInactiveRight= 2;this.loaded= false;this.scrollable= false;this.scrollableV= false;this.scrollableH= false;this.handlers=[]; 
var isodctpIE5= false;var browser= detectBrowser();if(browser.substring(browser.indexOf("MSIE")+5)<6){isodctpIE5= true;}
var isW3C_IE=(isIE()&& document.compatMode&& document.compatMode.indexOf("CSS1")>= 0)? true: false;this.type="TabPanel";this.pageId="tabpanel1";this.findDir= function(obj){if(obj== null) return null; 
var S1="ltr", S2="rtl", S3="", curr= obj, curr_dir= null, thedir= S1, notfound= true;do{if(curr.dir!= null) curr_dir= curr.dir;if(curr_dir!= null&& curr_dir!= S3){if(curr_dir.toLowerCase()== S1){thedir= S1;notfound= false;} else if(curr_dir.toLowerCase()== S2){thedir= S2;notfound= false;}
}
curr= curr.parentNode;}while(notfound&&(curr!= null))
return thedir; 
}
this.isRTL=(this.findDir(this.containerDiv)=="rtl");this.getDefaultSystemIcon= function(UrlPrefix)
{this.tabIcons["previous"]= UrlPrefix+"jsl/tab/icons/previous_v3_0_11.gif"; 
this.tabIcons["disprevious"]= UrlPrefix+"jsl/tab/icons/previous_disabled_v3_0_11.gif"; 
this.tabIcons["next"]= UrlPrefix+"jsl/tab/icons/next_v3_0_11.gif"; 
this.tabIcons["disnext"]= UrlPrefix+"jsl/tab/icons/next_disabled_v3_0_11.gif"; 
this.tabIcons["active"]= UrlPrefix+"jsl/tab/icons/rightarrow_v3_0_11.gif"; 
this.tabIcons["complete"]= UrlPrefix+"jsl/tab/icons/tick_v3_0_11.gif"; 
}
this.getDefaultSystemIcon(UrlPrefix);this.getType= function(){return this.type;}
this.getId= function(){return this.pageId;}
this.setNipAndTuckStyle= function(al, ar, ial, iar)
{this.slantActiveLeft=(al&&al>0)?al:0;this.slantActiveRight=(ar&&ar>0)?ar:0;this.slantInactiveLeft=(ial&&ial>0)?ial:0;this.slantInactiveRight=(iar&&iar>0)?iar:0;}
this.setTabIndex= function(tabIndex)
{this.tabIndex= tabIndex;}
this.setHeight= function(height)
{this.height= height+"";}
this.setWidth= function(width)
{this.width= width+"";}
this.setVariableTabLength= function(variableTabLength)
{this.variableTabLength= variableTabLength;}
this.getClientId= function(serverId)
{return this.containerDiv.id+":"+serverId;}
this.addHandler= function(action, funcName)
{this.handlers[this.handlers.length]= new Array(action, funcName);}
this.addFinishCancelButton= function(enableArray)
{if(enableArray!=null&&enableArray.length>0){this.enableCancel= true;this.enableFinish= true;this.enableFinishButtonArray= enableArray;}
}
this.disableCancelButton= function(disableArray)
{if(disableArray!= null&& disableArray.length> 0) this.disableCancelButtonArray= disableArray;}
this.disableFinishButton= function(disableArray)
{if(disableArray!= null&& disableArray.length> 0) this.disableFinishButtonArray= disableArray;}
this.setFinishButtonId= function(finishId)
{this.jsfFinishButton= document.getElementById(finishId);}
this.setCancelButtonId= function(cancelId)
{this.jsfCancelButton= document.getElementById(cancelId);}
this.setBackButtonId= function(backId)
{this.jsfBackButton= document.getElementById(backId);}
this.setNextButtonId= function(nextId)
{this.jsfNextButton= document.getElementById(nextId);}
this.setCustomButtonPanel= function(buttonPanelID, contentLayout)
{this.customButtonPanel= true;this.customButtonPanelDiv= document.getElementById(buttonPanelID);this.alignCustomContent= contentLayout;}
this.setStyleClass= function(prefix)
{this.styleClass= prefix;this.containerDiv.className= this.styleClass+"-classForTabSysIcons";var icons= new iconLibrary(this.containerDiv,"list-style-image");for(var key in icons){if(icons[key].indexOf("http")>-1)
this.tabIcons[key]= icons[key];else
this.tabIcons[key]= this.UrlPrefix+ icons[key];}
}
 
 
this.setLayout= function(layout)
{this.notebookLayout=(layout.toLowerCase()=="notebook");}
this.setTabIcon= function(panelId, newIcon, iPaneArray)
{var i, PaneArray=(iPaneArray!=null)?iPaneArray:this.Panes;for(i=1; i< PaneArray.length; i++){if(PaneArray[i].divObj.DIVID== panelId){PaneArray[i].tabIcon= newIcon;break;}
if( PaneArray[i].Panes.length> 1) this.setTabIcon(panelId, newIcon, PaneArray[i].Panes);}
}
 
 
this.displayPanel= function(iPanelId, iPaneArray)
{var i, PaneArray=(iPaneArray!=null)?iPaneArray:this.Panes;var panelId=(iPaneArray==null)?this.getClientId(iPanelId):iPanelId; 
for(i=1; i< PaneArray.length; i++){if(PaneArray[i].divObj.DIVID== panelId){if(PaneArray[i].enabled) this.paneSelected(panelId, true);break;}
if( PaneArray[i].Panes.length> 1) this.displayPanel(panelId,PaneArray[i].Panes);}
}
 
this.enableTab= function(panelId, iPaneArray) 
{var i, PaneArray=(iPaneArray==null)?this.Panes:iPaneArray;for(i=1; i< PaneArray.length; i++){if(PaneArray[i].divObj.DIVID== panelId){PaneArray[i].enabled= true;break;}
if(PaneArray[i].Panes.length> 1) this.enableTab(panelId, PaneArray[i].Panes);}
}
this.disableTab= function(panelId, iPaneArray)
{var i, PaneArray=(iPaneArray==null)?this.Panes:iPaneArray;for(i=1; i< PaneArray.length; i++){if(PaneArray[i].divObj.DIVID== panelId){PaneArray[i].enabled= false;break;}
if(PaneArray[i].Panes.length> 1) this.disableTab(panelId, PaneArray[i].Panes);}
}
this.hideTab= function(hideID)
{this.internalHideTab(hideID);}
this.showTab= function(showID)
{this.internalShowTab(showID);}
this.restoreUIState= function(stateString)
{if(stateString&&stateString!=""&&document.getElementById(stateString)==null) return;this.selectedTabID= stateString;if(stateString!= null&&stateString!="") this.showPane(stateString, true);}
this.generateUIStateString= function()
{return this.selectedTabID;}
this.addCaseFromDIV= function(ID, name, DIVID, NXTID, PRVID, OnEnter, OnExit, tabIcon, parentPane, disableTab, accesskey){var ID= ID; 
var name= name; 
var DIVID= DIVID; 
var NXTID= NXTID; 
var PRVID= PRVID; 
var icon= tabIcon;var parentPane= parentPane;var disableTab= disableTab;var divObj= null;try{divObj= document.getElementById(DIVID);} catch(e){divObj= null;}
this.processDivObject(ID, name, divObj, NXTID, PRVID, OnEnter, OnExit, icon, parentPane, disableTab, accesskey);}
this.show= function()
{this.updateControl();}
this.OnFinishButtonClick= function(evt)
{var finishButton=(isIE())?window.event.srcElement:evt.target;var tabobj= finishButton.tabobj;var originalonclick= null;if(tabobj== null){tabobj= finishButton.parentNode.tabobj;originalonclick= finishButton.parentNode.onclickoriginal;}
var i,e,handler,tabpanelForm= findForm(finishButton);for(i=0; i<tabobj.handlers.length;i++){if(tabobj.handlers[i][0].toUpperCase()=="ONFINISH"){handler= tabobj.handlers[i][1];e= new ODCEvent("onFinish");e.tabpanelForm=tabpanelForm;if(eval(handler+".call(this,this, e);")== false) return false;break;}
}
if(originalonclick) originalonclick(); 
}
this.OnCancelButtonClick= function(evt)
{var cancelButton=(isIE())?window.event.srcElement:evt.target;var tabobj= cancelButton.tabobj;var originalonclick= null;if(tabobj== null){tabobj= cancelButton.parentNode.tabobj;originalonclick= cancelButton.parentNode.onclickoriginal;}
var i,e,handler,tabpanelForm= findForm(cancelButton);for(i=0; i<tabobj.handlers.length;i++){if(tabobj.handlers[i][0].toUpperCase()=="ONCANCEL"){handler= tabobj.handlers[i][1];e= new ODCEvent("onCancel");e.tabpanelForm=tabpanelForm;if(eval(handler+".call(this,this, e);")== false) return false;break;}
}
if(originalonclick) originalonclick(); 
return true;}
this.onPreviousTab= function()
{if(this.startIndex==1){try{document.getElementById(this.containerDiv.id+this.styleClass+"tabnexticon").focus();} catch(e){}
return;}
this.startIndex--;var tabTable= document.getElementById(this.containerDiv.id+this.styleClass+"tabtable");this.showHideTab(tabTable);try{document.getElementById(this.containerDiv.id+this.styleClass+"tabprevicon").focus();} catch(e){}
}
this.onNextTab= function()
{if(this.startIndex+this.tabSize> this.Panes.length-1){try{document.getElementById(this.containerDiv.id+this.styleClass+"tabprevicon").focus();} catch(e){}
return;}
this.startIndex++;var tabTable= document.getElementById(this.containerDiv.id+this.styleClass+"tabtable");this.showHideTab(tabTable);try{document.getElementById(this.containerDiv.id+this.styleClass+"tabnexticon").focus();} catch(e){}
}
this.onTabSelected= function(evt){evt=(evt)? evt:((event)? event: null);if(evt&& evt.type=="click"||(evt.type=="keydown"&&(evt.keyCode==32|| evt.keyCode==13))){var src=(evt.target)? evt.target:((evt.srcElement)? evt.srcElement: null);if(src){while(!src.name){ src= src.parentNode;}
var reqTab= src.name;var ctrlName= src.controlName;var reqType= src.type;var obj= eval(ctrlName);var i, target= evt.currentTarget|| evt.srcElement; 
for(i=1; i< obj.Panes.length; i++)
{if( obj.Panes[i].divObj.DIVID== reqTab)
{if(!obj.Panes[i].enabled&& target.tagName!="INPUT") 
{return;} 
}
if( obj.Panes[i].OriginPanes.length> 0)
{for(var k=0; k< obj.Panes[i].OriginPanes.length; k++)
{ 
if( obj.Panes[i].OriginPanes[k].divObj.DIVID== reqTab)
{if(!obj.Panes[i].OriginPanes[k].enabled&& target.tagName!="INPUT") 
{return;} 
} 
}
} 
}
if(obj!=null) obj.paneSelected(reqTab, reqType);try{var objfocus= document.getElementById(src.id);if(objfocus&& objfocus.nodeType== 1){if(objfocus.nodeName=="LABEL"){objfocus= objfocus.parentNode;}else if(objfocus.nodeName=="TD"){objfocus= objfocus.firstChild;}
objfocus.focus();}
}catch(e)
{}
}
return false;}
return;}
this.redraw= function() 
{var saveObj=[];this.redrawIterator(this.OriginPanes, saveObj);while(this.containerDiv.hasChildNodes())
this.containerDiv.removeChild(this.containerDiv.lastChild);for(var i=0; i<saveObj.length; i++) this.containerDiv.appendChild(saveObj[i]);this.updateControl(true);}
this.redrawIterator= function(panes, r){var i,obj;for(i=0; i<panes.length; i++){if(panes[i].divObj!=null) r.push(panes[i].divObj);if(panes[i].OriginPanes.length>1) this.redrawIterator(panes[i].OriginPanes, r);}
return r;}
this.updateControl= function(ifredraw)
{if(this.OriginPanes.length<= this.tabSize) this.tabSize= -1; 
if((ifredraw==null)||!ifredraw){var i, newinitalId= null;for(i=0; i<this.handlers.length;i++)
{if(this.handlers[i][0].toUpperCase()=="ONINITIALPANELSHOW"){var handler= this.handlers[i][1];var e= new ODCEvent("onInitialPanelShow");e.initialPanelId= this.initialPanelId;try{newinitalId= eval(handler+".call(this,this, e);");if(newinitalId== false) this.initialPanelId= null;}catch(ex){return;}
}
}
if(newinitalId&&!isBoolean(newinitalId)) this.initialPanelId= this.getClientId(newinitalId);if(this.initialPanelId){for(i=1; i<this.Panes.length; i++){if(this.Panes[i].divObj.DIVID== this.initialPanelId){this.selectedTabID= this.initialPanelId;this.selectedTab= i;if(this.selectedTab-this.tabSize+1>0)
this.startIndex= this.selectedTab-this.tabSize+1;else
this.startIndex= 1;break;}
}
}
this.initialized=true; 
}
var digits="0123456789";var outDivTable= document.createElement("table");outDivTable.className= this.styleClass;outDivTable.border="0";outDivTable.cellSpacing="0";outDivTable.cellPadding="0";if(this.width!=""){outDivTable.width= this.width;outDivTable.style.width=(digits.indexOf(this.width.charAt(this.width.length-1))>=0)? this.width+"px": this.width; 
}
if(this.height!=""){var notPct=(digits.indexOf(this.height.charAt(this.height.length-1))>=0);if(!isW3C_IE||!notPct){outDivTable.height= this.height;outDivTable.style.height= notPct? this.height+"px": this.height;}
}
var tr1= outDivTable.insertRow(0);var td1= tr1.insertCell(0);if(this.notebookLayout) td1.setAttribute("rowSpan","3");var tr2= outDivTable.insertRow(1);var td2= tr2.insertCell(0);td2.width="100%";td2.height="100%";td2.vAlign="top";td2.className= this.styleClass+"-Body";var tr3= outDivTable.insertRow(2);var td3= tr3.insertCell(0);if(this.notebookLayout) td3.setAttribute("colSpan","1");if(this.flagNextPrev||this.enableFinish||this.customButtonPanel){td3.width="100%";td3.vAlign="bottom";td3.className= this.styleClass+"-Footer";} else{tr3.style.display="none";}
this.containerDiv.appendChild(outDivTable);var tabwidth= buttonwidth=0;var maxWidth= 0;if((this.flagNextPrev||this.enableFinish||this.customButtonPanel)){this.createButton(td3);if(!isNaN(this.width))
maxWidth= Math.max(this.width, td3.offsetWidth)
}
this.createBody(td1, td2, td3); 
if(!this.flagTabButtons){tr1.style.display="none";} else{tr1.style.display="";td1.vAlign="top";td1.className= this.styleClass+"-Header";if(this.isRTL&& this.notebookLayout){td1.className= this.styleClass+"-HeaderRTL";}
var tempTable= document.createElement("table");if(this.notebookLayout){var tabdiv= document.createElement("div");td1.appendChild(tabdiv);tabdiv.className= this.styleClass+"-tabDiv";tabdiv.style.height=(digits.indexOf(this.height.charAt(this.height.length-1))>=0)? this.height+"px": this.height;tabdiv.appendChild(tempTable);} else{td1.appendChild(tempTable);}
this.createTab(tempTable);this.showHideTab(tempTable);if(!isNaN(this.width)&&!this.notebookLayout&& td1.firstChild)
maxWidth= Math.max(this.width, td1.firstChild.offsetWidth);} 
 
if((!isNaN(this.width)&&maxWidth>this.width)&&(this.width!="")){this.width= maxWidth+"";this.adjustbody();}
if(this.notebookLayout){if(this.maxTabWidth>0&&(this.tabHeight * this.Panes.length)> this.height){if(isIE()) 
tabdiv.style.width=(this.maxTabWidth+ 23)+"px";else
tabdiv.style.width=(this.maxTabWidth+ 17)+"px";} else{tabdiv.style.width=(this.maxTabWidth+ 2)+"px";}
}
if(isIE()){var tabcontrol= this;window.attachEvent('onload',function(){tabcontrol.redraw();});}
}
this.adjustbody= function()
{for(var i=1; i< this.Panes.length; i++){this.Panes[i].divObj.style.width=(this.width-10)+"px";}
}
this.paneSelected= function(show, type, iPaneArray) 
{var previousSelectPanel= this.selectedTabID, divObj= null;var PaneArray=(iPaneArray==null)?this.Panes:iPaneArray;var e, i, k, handler, nextId= null;if(show== previousSelectPanel) return;for(k=1; k< PaneArray.length; k++){if(PaneArray[k].divObj.DIVID== previousSelectPanel){divObj= PaneArray[k].divObj;if(divObj.handlers["onExit"]!=null){e= new ODCEvent("onExit");e.tobeExitPanel=previousSelectPanel;e.defaultTobeEnterPanel= show;try{nextId= eval(divObj.handlers["onExit"]+".call(this,this, e);");if(nextId&&!isBoolean(nextId)) nextId= this.getClientId(nextId);if(nextId== false)
return; 
}catch(ex){return;}
}
}
}
for(i=0; i<this.handlers.length;i++){if(this.handlers[i][0].toUpperCase()=="ONPANELEXIT"){handler= this.handlers[i][1];e= new ODCEvent("onPanelExit");e.tobeExitPanel=previousSelectPanel;e.defaultTobeEnterPanel= show;try{if(eval(handler+".call(this,this, e);")== false)
return; 
}catch(ex){return;}
break;}
}
if(isBoolean(nextId)||nextId==null||type!="submit") nextId= show;var bNextTabExit= false;for(k=1; k< PaneArray.length; k++){if( PaneArray[k].divObj.DIVID== nextId){divObj= PaneArray[k].divObj;bNextTabExit= true;if(divObj.handlers["onEnter"]!=null){e= new ODCEvent("onEnter");e.tobeEnterPanel= nextId;try{if(eval(divObj.handlers["onEnter"]+".call(this,this, e);")== false)
return; 
}catch(ex){return;}
}
}
if(PaneArray[k].Panes.length> 1)
this.paneSelected(show, type, PaneArray[k].Panes);}
for(i=0; i<this.handlers.length;i++){if(this.handlers[i][0].toUpperCase()=="ONPANELENTER"){handler= this.handlers[i][1];e= new ODCEvent("onPanelEnter");e.tobeEnterPanel= nextId;try{if(eval(handler+".call(this,this, e);")== false)
return; 
}catch(ex){return;}
break;}
}
if(!bNextTabExit) return; 
if(show!=nextId)
this.showPane(nextId, true);else
this.showPane(nextId, false);}
this.showPane= function(showID, jump)
{var i, k, redrawPaneContents= false, navDirection="next";for(i=1; i< this.Panes.length; i++){if(this.Panes[i].divObj.DIVID== showID){this.Panes[i].divObj.style.display="";currentDiv= this.Panes[i].divObj;this.selectedTab= i;redrawPaneContents= true;} else{this.Panes[i].divObj.style.display="none";}
if(this.Panes[i].Panes.length> 1){for(k=1; k<this.Panes[i].Panes.length; k++){if(this.Panes[i].Panes[k].divObj.DIVID== showID){this.Panes[i].Panes[k].divObj.style.display="";this.Panes[i].Panes[k].buttonDiv.style.display="";currentDiv= this.Panes[i].Panes[k].divObj;this.selectedTab= i;redrawPaneContents= true; 
}
else{this.Panes[i].Panes[k].divObj.style.display="none";this.Panes[i].Panes[k].buttonDiv.style.display="none";} 
}
}
}
if(jump)
this.startIndex= this.selectedTab-this.tabSize+1;else if(this.selectedTab>(this.startIndex+this.tabSize-1)){this.startIndex++;if(this.tabSize>0){while(this.selectedTab>(this.startIndex+this.tabSize-1)){ this.startIndex++;}
}
} else if(this.selectedTab<this.startIndex){this.startIndex=((this.selectedTab-this.tabSize+1)>=1)?(this.selectedTab-this.tabSize+1):1;}
if(this.startIndex<=0) this.startIndex= 1;var tabTable= document.getElementById(this.containerDiv.id+this.styleClass+"tabtable");this.selectedTabID= showID;this.showHideTab(tabTable);this.setButtonIds();if(redrawPaneContents){try{if(typeof(hX_5)!="undefined"&& hX_5!=null){hX_5.redraw();}
if(!isIE())
{odcGraphTimeObj= window.setTimeout(odcGraphRedraw, 1);}
}catch(e){}
}
}
this.showHideTab= function(tabTable, paneArray)
{if(!this.flagTabButtons) return;var panesArray=(paneArray!=null)?paneArray:this.Panes;var i, k, start, end, tempCell, td, tr= tabTable.rows[0];if(this.tabSize>0){start= this.startIndex;end=(this.startIndex+this.tabSize<panesArray.length)?this.startIndex+this.tabSize:panesArray.length;} else{start= 1;end= panesArray.length;}
var activestyle= this.styleClass+"-TabActive", inactivestyle= this.styleClass+"-TabInactive", linkactivestyle= this.styleClass+"-HyperActive", linkinactivestyle= this.styleClass+"-HyperInactive";for(i=1; i<panesArray.length; i++)
{if(this.notebookLayout){tempCell= tr.cells[0].firstChild.rows[0].cells[0];td= tr.cells[0];if(i== panesArray.length - 1)
inactivestyle= this.styleClass+"-LastTabInactive";} else{tempCell= tr.cells[i-1].firstChild.rows[0].cells[0];td= tr.cells[i-1];} 
if(td&&tempCell){if(i>=start&&i<=end-1){td.style.display="";if(panesArray[i].divObj.DIVID==this.selectedTabID){if(tempCell.className!=this.styleClass+"-TabActive")
this.styleTabHTML(panesArray[i].divObj, td, false, activestyle, linkactivestyle, this.slantActiveLeft, this.slantActiveRight, true, i,panesArray[i].tabIcon, panesArray[i].depth,panesArray[i].accessKey,this.tabIndex);if(panesArray[i].OriginPanes.length> 0){this.holdRedraw= true; 
for(k=0; k<panesArray[i].OriginPanes.length; k++){if(k==(panesArray[i].OriginPanes.length - 1))
this.holdRedraw= false;if(!this.autoshow){ 
this.internalShowTab(panesArray[i].OriginPanes[k].divObj.DIVID);this.autoshow= false;}
}
}
}else{if(tempCell.className!=this.styleClass+"-TabInactive")
this.styleTabHTML(panesArray[i].divObj, td, false, inactivestyle, linkinactivestyle, this.slantInactiveLeft, this.slantInactiveRight, true, i,panesArray[i].tabIcon, panesArray[i].depth,panesArray[i].accessKey,this.tabIndex);if(panesArray[i].Panes.length> 1){var siblingSelected= false;for(k=1; k<panesArray[i].Panes.length; k++){if(this.selectedTabID== panesArray[i].Panes[k].divObj.DIVID)
siblingSelected= true;}
this.holdRedraw= true; 
while(panesArray[i].Panes.length> 1&&!siblingSelected){if(panesArray[i].Panes.length== 2)
this.holdRedraw= false;this.internalHideTab(panesArray[i].Panes[1].divObj.DIVID);}
} 
}
}else{td.style.display="none";}
}
if(this.notebookLayout) tr= tabTable.rows[i]
if(panesArray[i].Panes.length> 1) this.showHideTab(panesArray[i].subTabTable, panesArray[i].Panes); 
}
var previcon= document.getElementById(this.containerDiv.id+this.styleClass+"previcon");if(previcon){previcon.border= 0;if(this.startIndex== 1){previcon.setAttribute("src", this.tabIcons["disprevious"]);if(previcon.parentNode.type){td= previcon.parentNode.parentNode;td.removeChild(td.firstChild);td.appendChild(previcon);}
}else{previcon.setAttribute("src", this.tabIcons["previous"]);var a1= document.createElement("a");a1.type="hlink";a1.id= this.containerDiv.id+this.styleClass+"tabprevicon";var tableid= this.containerDiv.id+this.styleClass+"tabtable";var code="window.document.getElementById('"+ tableid+"').tabControl.onPreviousTab()";a1.setAttribute("href","javascript:"+ code);if(this.tabIndex!= null) a1.tabIndex= this.tabIndex;a1.appendChild(previcon);tr.cells[i-1].appendChild(a1);}
}
var nexticon= document.getElementById(this.containerDiv.id+this.styleClass+"nexticon");if(nexticon){nexticon.border= 0;if(this.startIndex+this.tabSize> this.Panes.length-1){nexticon.setAttribute("src", this.tabIcons["disnext"]);if(nexticon.parentNode.type){td= nexticon.parentNode.parentNode;td.removeChild(td.firstChild);td.appendChild(nexticon);}
}else{nexticon.setAttribute("src", this.tabIcons["next"]);var a2= document.createElement("a");a2.type="hlink";a2.id= this.containerDiv.id+this.styleClass+"tabnexticon";var tableid= this.containerDiv.id+this.styleClass+"tabtable";var code="window.document.getElementById('"+ tableid+"').tabControl.onNextTab()";a2.setAttribute("href","javascript:"+ code);if(this.tabIndex!= null) a2.tabIndex= this.tabIndex;a2.appendChild(nexticon);tr.cells[i].appendChild(a2);}
}
}
this.internalHideTab= function(hideID, iPaneArray)
{var i, foundId= -1, root=false, paneArray= this.Panes;if(iPaneArray== null)
root= true;else
paneArray= iPaneArray;if(hideID==null||hideID=='undefined') return;for(i=1; i<paneArray.length; i++){if(hideID==paneArray[i].divObj.DIVID){if(root){if(hideID== this.selectedTabID)
this.selectedTab=(i==1)?1:i-1;else if(this.selectedTab>i)
this.selectedTab--;if(this.startIndex>i)
this.startIndex--;}
foundId= i;break;}
if(paneArray[i].Panes.length> 1)
this.internalHideTab(hideID, paneArray[i].Panes);}
if(foundId!=-1){if(paneArray[foundId].divObj.style.display!="none") paneArray[foundId].divObj.style.display="none";paneArray.splice(foundId,1);if(!this.holdRedraw&& this.initialized) this.redraw();}
}
this.internalShowTab= function(showID, iPaneArray, iOriginPaneArray)
{var i, j, divid, found=false, root=false, paneArray=this.Panes, originPaneArray=this.OriginPanes;if(iPaneArray== null)
root= true;else 
paneArray= iPaneArray;if(iOriginPaneArray!= null) originPaneArray= iOriginPaneArray;if(showID==null||showID=='undefined') return;var finalArr=[];finalArr[0]="myTab";for(i=0; i<originPaneArray.length; i++){divid= originPaneArray[i].divObj.DIVID;if(showID== divid){finalArr.push(originPaneArray[i]);if(root){if(this.selectedTab>=finalArr.length-1) this.selectedTab++;if(this.startIndex>=finalArr.length-1) this.startIndex++; 
}
if(originPaneArray[i].divObj.style.display!="block") originPaneArray[i].divObj.style.display="block";found= true;}else{for(j=1; j<paneArray.length; j++){if(divid== paneArray[j].divObj.DIVID){finalArr[finalArr.length]= paneArray[j];break;}
}
}
if(originPaneArray[i].OriginPanes.length> 0) 
this.internalShowTab(showID, paneArray[i+1].Panes, originPaneArray[i].OriginPanes);}
if(found){this.autoshow= true;while(paneArray.length>0) paneArray.pop();for(i=0; i<finalArr.length; i++) 
paneArray[i]= finalArr[i];if(!this.holdRedraw&& this.initialized) this.redraw();}
}
this.setButtonIds= function(subpanel){if(subpanel== null){if(this.previousButton== null) return;var tab= this.getPrevTab(this.selectedTab, this.selectedTab, this.Panes);if(tab==null){this.previousButton.disabled= true;} else{this.previousButton.disabled= false;this.previousButton.name= tab;}
var tab= this.getNextTab(this.selectedTab, this.selectedTab, this.Panes);if(tab==null){this.nextButton.disabled= true;} else{this.nextButton.disabled= false;this.nextButton.name= tab;}
} else{if(subpanel.PRVID=="undefined"){this.previousButton.disabled= true;} else{this.previousButton.disabled= false;this.previousButton.name= subpanel.PRVID;}
if(subpanel.NXTID=="undefined"){this.nextButton.disabled= true;} else{this.nextButton.disabled= false;this.nextButton.name= subpanel.NXTID;}
}
if(this.enableFinish&&!subpanel){var i,x,length;if(null!= this.enableFinishButtonArray){for(i=0; i< this.enableFinishButtonArray.length; i++){if(this.Panes[this.selectedTab].divObj.DIVID== this.enableFinishButtonArray[i]){this.cancelButton.disabled= false;if(this.disableCancelButtonArray!= null){length= this.disableCancelButtonArray.length;for(x= 0; x< length; x++){if(this.disableCancelButtonArray[x]== this.enableFinishButtonArray[i]){this.cancelButton.disabled= true;break;} 
}
}
this.finishButton.disabled= false;if(this.disableFinishButtonArray!= null){length= this.disableFinishButtonArray.length;for(x= 0; x< length; x++){if(this.disableFinishButtonArray[x]== this.enableFinishButtonArray[i]){this.finishButton.disabled= true;break;} 
}
}
break;}else{this.cancelButton.disabled= true;this.finishButton.disabled= true;}
}
}
}
}
this.getPrevTab= function(mainTab, theTab, panes)
{var r= null;if(theTab==1){r= null;} else{if(panes[theTab-1].enabled)
r= panes[theTab-1].divObj.DIVID;else
r= this.getPrevTab(theTab-1, theTab-1, panes);}
return r;}
this.getNextTab= function(mainTab, theTab, panes) 
{var r= null;if(theTab==panes.length-1){r= null;} else{if(panes[theTab+1].enabled)
r= panes[theTab+1].divObj.DIVID;else
r= this.getNextTab(theTab+1, theTab+1, panes);}
return r;}
this.createButton= function(td3, subpanel)
{var tabTable= document.createElement("table");tabTable.border= 0;tabTable.cellpadding= 0;tabTable.className= this.styleClass+"-FooterTable";var tabRow= tabTable.insertRow(0);var backButton= null, nextButton= null, finishButton= null, cancelButton= null; 
if(this.jsfBackButton!=null&& this.jsfNextButton!=null&&!subpanel){backButton= this.jsfBackButton;nextButton= this.jsfNextButton;var backVal= backButton.value;if(backVal==null||backVal=="") backVal= NlsFormatMsg(label_tab_previous,null);if(backVal.indexOf("&lt;")!=-1) backVal= backVal.replace("&lt;","<");var nextVal= nextButton.value;if(nextVal==null||nextVal=="") nextVal= NlsFormatMsg(label_tab_next,null);if(nextVal.indexOf("&gt;")!=-1) nextVal= nextVal.replace("&gt;",">");backButton.value= backVal;nextButton.value= nextVal;if(this.flagNextPrev){nextButton.style.display="inline";backButton.style.display="inline";}
} else{ 
backButton= document.createElement("INPUT");backButton.id= this.containerDiv.id+this.cssPrefix+"tabprevbutton"+(subpanel!=null?subpanel.DIVID:"");backButton.type='submit';backButton.value= NlsFormatMsg(label_tab_previous,null);nextButton= document.createElement("INPUT");nextButton.id= this.containerDiv.id+this.cssPrefix+"tabnextbutton"+(subpanel!=null?subpanel.DIVID:"");nextButton.type='submit';nextButton.value= NlsFormatMsg(label_tab_next,null);}
var tabCell= tabRow.insertCell(0);backButton.controlName= this.Name;backButton.onclick= this.onTabSelected;this.previousButton= backButton;tabCell.appendChild(backButton);tabCell= tabRow.insertCell(1);nextButton.controlName= this.Name;nextButton.onclick= this.onTabSelected;this.nextButton= nextButton;tabCell.appendChild(nextButton);tabCell= tabRow.insertCell(2);var cancelButton= finishButton= null;if(this.enableFinish&&!subpanel){if(this.jsfCancelButton!=null&& this.jsfFinishButton!=null){cancelButton= this.jsfCancelButton;finishButton= this.jsfFinishButton;if(cancelButton.value==null||cancelButton.value=="") cancelButton.value= NlsFormatMsg(label_tab_cancel,null);if(finishButton.value==null||finishButton.value=="") finishButton.value= NlsFormatMsg(label_tab_finish,null);cancelButton.style.display="inline";if(cancelButton.firstChild) cancelButton.firstChild.style.display="inline";finishButton.style.display="inline";if(finishButton.firstChild) finishButton.firstChild.style.display="inline";}else{cancelButton= document.createElement("INPUT");cancelButton.id= this.containerDiv.id+this.cssPrefix+"tabcancelbutton";cancelButton.type='submit';cancelButton.value= NlsFormatMsg(label_tab_cancel,null);finishButton= document.createElement("INPUT");finishButton.id= this.containerDiv.id+this.cssPrefix+"tabfinishbutton";finishButton.type='submit';finishButton.value= NlsFormatMsg(label_tab_finish,null);}
cancelButton.controlName= this.Name;cancelButton.onCancel= this.onCancel;cancelButton.tabobj= this;if(cancelButton.onclick&&!cancelButton.onclickoriginal) cancelButton.onclickoriginal= cancelButton.onclick;cancelButton.onclick= this.OnCancelButtonClick;this.cancelButton= cancelButton;finishButton.controlName= this.Name;finishButton.onFinish= this.onFinish;finishButton.tabobj= this;if(finishButton.onclick&&!finishButton.onclickoriginal) finishButton.onclickoriginal= finishButton.onclick;finishButton.onclick= this.OnFinishButtonClick;this.finishButton= finishButton;tabCell.appendChild(finishButton);tabCell= tabRow.insertCell(3);tabCell.appendChild(cancelButton);}
this.setButtonIds(subpanel);var tabDiv= document.createElement("div");if(this.customButtonPanel&&!subpanel){var panelTable= document.createElement("table");var buttonrow= panelTable.insertRow(0);var originalcell= buttonrow.insertCell(0);originalcell.appendChild(tabTable);if(this.alignCustomContent=="top"){var customrow= panelTable.insertRow(0);var customcell= customrow.insertCell(0);} else if(this.alignCustomContent=="bottom"){var customrow= panelTable.insertRow(-1);var customcell= customrow.insertCell(0); 
} else if(this.alignCustomContent=="right"){var customcell= buttonrow.insertCell(-1); 
} else{var customcell= buttonrow.insertCell(0);}
customcell.appendChild(this.customButtonPanelDiv);this.customButtonPanelDiv.style.visibility="visible";tabDiv.appendChild(panelTable);} else{tabDiv.appendChild(tabTable);}
tabDiv.className= subpanel?this.styleClass+"-subButtonPanelDiv":this.styleClass+"-FooterDiv";td3.appendChild(tabDiv);if(subpanel){this.previousButton= null;this.nextButton= null;}
if(typeof(hX_5)!="undefined"&& hX_5!=null) hX_5.redraw();}
this.createBody= function(td1,td2,td3, iPaneArray)
{var PaneArray=(iPaneArray==null)?this.Panes:iPaneArray;var i;for(i=1; i< PaneArray.length; i++){if(!PaneArray[i].isChild)
td2.appendChild(PaneArray[i].divObj);if(PaneArray[i].divObj.DIVID== this.selectedTabID)
PaneArray[i].divObj.style.display="";else
PaneArray[i].divObj.style.display="none";if(PaneArray[i].Panes.length> 1)
this.createBody(td1,td2,td3,PaneArray[i].Panes);if( PaneArray[i].depth> 0){ 
PaneArray[i].buttonDiv= document.createElement("div");PaneArray[i].buttonTable= document.createElement("table");PaneArray[i].buttonDiv.appendChild(PaneArray[i].buttonTable);td2.appendChild(PaneArray[i].buttonDiv);PaneArray[i].buttonDiv.style.width="100%";PaneArray[i].buttonDiv.style.height="100%";PaneArray[i].buttonDiv.style.display="none";PaneArray[i].buttonTable.style.height="100%";PaneArray[i].buttonTable.style.width="100%";PaneArray[i].buttonTable.style.borderWidth="0px";PaneArray[i].buttonTable.style.padding="0px";PaneArray[i].buttonTable.cellSpacing= 0;PaneArray[i].buttonDiv.className= this.styleClass+"-subButtonPanelDiv";var trpane= PaneArray[i].buttonTable.insertRow(0);var tdpane= trpane.insertCell(0);tdpane.appendChild(PaneArray[i].divObj);tdpane.style.height="100%";tdpane.style.width="100%";tdpane.style.padding="0px";tdpane.vAlign="top"; 
var trbuttons= PaneArray[i].buttonTable.insertRow(1);var tdbuttons= trbuttons.insertCell(0);if(this.notebookLayout) tdbuttons.setAttribute("colSpan","1");if(this.flagNextPrev||this.enableFinish||this.customButtonPanel){tdbuttons.width="100%";tdbuttons.vAlign="top";tdbuttons.className= this.styleClass+"-subButtonPanelDiv";} else{tdbuttons.style.display="none";}
if(this.flagNextPrev||this.enableFinish||this.customButtonPanel){this.createButton(tdbuttons, PaneArray[i].divObj);if(!isNaN(this.width)) maxWidth= Math.max(this.width, tdbuttons.offsetWidth)
}
}
}
if(this.scrollableV|| this.scrollableH){var availableWidth= this.width, availableHeight= this.height;if(this.notebookLayout){availableHeight= availableHeight;if(this.flagNextPrev||this.enableFinish||this.customButtonPanel)
availableHeight= availableHeight - td3.offsetHeight+(isIE()?20:0);if(this.flagNextPrev&& PaneArray[1].depth> 0)
availableHeight= availableHeight - td3.offsetHeight;} else{if(this.flagTabButtons)
availableHeight= availableHeight - td1.offsetHeight;if(this.flagNextPrev||this.enableFinish||this.customButtonPanel)
availableHeight= availableHeight - td3.offsetHeight;}
var offsetV= document.getElementById(this.selectedTabID).offsetTop;var offsetH= document.getElementById(this.selectedTabID).offsetLeft;if(!this.isRTL) availableWidth -=(2*offsetH);availableHeight -=(2*offsetV);availableWidth= Math.max(1,availableWidth);availableHeight= Math.max(1,availableHeight);if(!this.done){for(i=1; i< PaneArray.length; i++){if(this.scrollableH&&(this.width!=""))
PaneArray[i].divObj.style.width= availableWidth+"px";if(this.scrollableV&&(this.height!=""))
PaneArray[i].divObj.style.height= availableHeight+"px";} 
}
}
}
this.processDivObject= function(ID, name, divObj, NXTID, PRVID, OnEnter, OnExit, tabIcon, parentPane, disableTab, accesskey) 
{var tabNo= this.Panes.length;var pane= new Pane();var i;divObj.style.visibility="visible";divObj.ID= ID; 
divObj.name= name; 
divObj.DIVID= divObj.getAttribute("id"); 
if(NXTID== null){divObj.NXTID="undefined";} else{divObj.NXTID= NXTID; 
}
if(PRVID== null){divObj.PRVID="undefined";} else{divObj.PRVID= PRVID; 
}
divObj.handlers=[];if(OnEnter!=null&& OnEnter!='undefined') divObj.handlers["onEnter"]= OnEnter;if(OnExit!=null&&OnExit!='undefined') divObj.handlers["onExit"]= OnExit;var sWidth= this.width+"";var sHeight= this.height+"";if(sHeight.indexOf("%")>= 0){divObj.style.height="100%";} else{if(this.height!=""){ 
divObj.style.height="10px";divObj.style.overflow="auto";}
else{divObj.style.overflow="visible";}
this.scrollableV= true;}
if(sWidth.indexOf("%")>= 0){divObj.style.width="100%";} else{if(this.width!=""){divObj.style.width="10px";divObj.style.overflowX="auto";} else{divObj.style.overflowX="visible";}
this.scrollableH= true;}
pane.divObj= divObj;pane.Name= name;pane.tabIcon= tabIcon;pane.enabled= disableTab?false:true;pane.Panes=[];pane.Panes[0]="myTab";pane.OriginPanes=[];pane.isChild= false;pane.accessKey= accesskey;if(parentPane){var panelId= this.getClientId(parentPane);pane.isChild= true;for(i=1; i< this.Panes.length; i++){if( this.Panes[i].divObj.DIVID== panelId){pane.depth= this.Panes[i].depth+ 1;var subtabnum= this.Panes[i].Panes.length;this.Panes[i].Panes[subtabnum]= pane;this.Panes[i].OriginPanes[this.Panes[i].OriginPanes.length]= pane;}
}
} else{pane.depth= 0;this.Panes[tabNo]= pane;this.OriginPanes[this.OriginPanes.length]= pane;}
if(this.selectedTabID== 0) this.selectedTabID= pane.divObj.DIVID;}
this.createTab= function(tabTable, paneArray, tabid)
{tabTable.tabControl= this;tabTable.className= this.styleClass+"-tabTable"; 
tabTable.border= tabTable.cellSpacing= tabTable.cellPadding="0";var panesArray;if(paneArray){panesArray= paneArray;tabTable.id= this.containerDiv.id+this.styleClass+"subtabtable"+tabid;} else{tabTable.id= this.containerDiv.id+this.styleClass+"tabtable";panesArray= this.Panes;}
if(this.notebookLayout) tabTable.align="Right";var i, tabRow= tabTable.insertRow(0);for(i=1; i< panesArray.length; i++){if(panesArray[i].divObj!=null){if(this.notebookLayout)
var tabsetCell= tabRow.insertCell(0);else
var tabsetCell= tabRow.insertCell(i-1); 
var select=(this.selectedTab==i)?true:false;var tabclass= this.styleClass+"-TabActive";var linkactivestyle= this.styleClass+"-HyperActive"; 
this.emitTabHTML(tabsetCell,panesArray[i].divObj,i);firstTab=(i==1)?true:false;var width= this.styleTabHTML(panesArray[i].divObj, tabsetCell, firstTab, tabclass, linkactivestyle,this.slantActiveLeft, this.slantActiveRight, true,i, panesArray[i].tabIcon, panesArray[i].depth, panesArray[i].accessKey, null);this.maxTabWidth= Math.max(this.maxTabWidth, width);if(panesArray[i].Panes.length> 1){var tempTable2= document.createElement("table");tabsetCell.appendChild(tempTable2);this.createTab(tempTable2, panesArray[i].Panes, panesArray[i].divObj.DIVID);panesArray[i].subTabTable= tempTable2;} 
if(this.notebookLayout) tabRow= tabTable.insertRow(i);}
}
if(this.tabSize>0){var tabsetCell= tabRow.insertCell(i-1);var imgprevious= document.createElement("img");imgprevious.style.marginLeft="6px";imgprevious.id= this.containerDiv.id+this.styleClass+"previcon";imgprevious.setAttribute("src", this.tabIcons["disprevious"]);tabsetCell.appendChild(imgprevious);tabsetCell= tabRow.insertCell(i);var imgnext= document.createElement("img");imgnext.id= this.containerDiv.id+this.styleClass+"nexticon";imgnext.setAttribute("src", this.tabIcons["disnext"]);tabsetCell.appendChild(imgnext);}
if(this.variableTabLength=="false"){for(var j=1; j<panesArray.length;j++){if(this.maxTabWidth>0){if(this.notebookLayout){tabTable.rows[j-1].cells[0].firstChild.width= this.maxTabWidth;}
else{tabRow.cells[j-1].firstChild.width= this.maxTabWidth;}
}
}
}
}
this.styleTabHTML= function(tabobj, td, bFirst, tabclass,linkclass, nipLeft, nipRight, bottomline, index, icon, depth, accesskey, tabindex)
{if(td.style.display=="none") return -1;var table= this.getFirstChild(td);var tr= table.rows[0];var tdZ= tr.cells[0], tdL= tr.cells[1], tdM= tr.cells[2], tdR= tr.cells[3];tdM.style.borderLeftWidth= tdM.style.borderRightWidth="";tdM.className= tabclass;tdM.name= tabobj.DIVID;tdM.id= this.containerDiv.id+this.styleClass+"tabTdM_"+index;tdM.controlName= this.Name;var tablabel= document.createElement("label");tablabel.id= this.containerDiv.id+this.styleClass+"tablabel_"+index;tablabel.className= this.styleClass+"-TabLabel";if(icon!= null){var tablabel_img= document.createElement("img");tablabel_img.src= icon;tablabel_img.style.border="0px";tablabel.appendChild(tablabel_img);}
var tablabel_text= document.createTextNode(tabobj.name);tablabel.appendChild(tablabel_text);var indentWidth=(10*depth);tablabel.style.paddingLeft= indentWidth+"px"; 
while(tdM.hasChildNodes())
tdM.removeChild(tdM.lastChild);var a= document.createElement("a");a.id= this.containerDiv.id+this.styleClass+"hyperlink_"+index;if(accesskey!= null) a.accessKey= accesskey;if(tabindex!= null) a.tabIndex= tabindex;a.className= linkclass;a.setAttribute("href","javascript:;");a.appendChild(tablabel);tdM.appendChild(a);var borderT= getBorderSize(tdM,"top", 1);var borderB= getBorderSize(tdM,"bottom", 1);var borderL= getBorderSize(tdM,"left", 1);var borderR= getBorderSize(tdM,"right", 1);var backColor= getEffectiveStyle(tdM,"background-color");var borderTopStyle= getEffectiveStyle(tdM,"border-top-style");var borderTopColor= getEffectiveStyle(tdM,"border-top-color");var borderRightColor= getEffectiveStyle(tdM,"border-right-color");var borderLeftColor= getEffectiveStyle(tdM,"border-left-color");var borderBottomColor= getEffectiveStyle(tdM,"border-bottom-color");tdM.style.borderLeftWidth= tdM.style.borderRightWidth="0px";if(bFirst){this.tabHeight=(tdM.offsetHeight>0)?tdM.offsetHeight:1;if(isW3C_IE&& tdM.offsetHeight>0){var realOffset= tdM.offsetHeight;tdM.style.height= realOffset+"px";this.tabHeightXtra= tdM.offsetHeight - realOffset;tdM.style.height=(realOffset-this.tabHeightXtra)+"px"; 
this.tabHeight -= this.tabHeightXtra;}
}
if(tdL.height!= this.tabHeight){tdL.height= this.tabHeight;tdM.height= this.tabHeight;tdR.height= this.tabHeight;} 
var cssVOffset= 0, cssHOffset= 0;if(!isIE()){cssVOffset= borderT+((borderT> 1)? 1: 0);cssHOffset= 2; 
} else if(isW3C_IE){cssVOffset=(this.tabHeightXtra==0)?0:(-(this.tabHeightXtra-borderT));}
var k, color, sdiv, div, nipl, nipr, xtra;div= this.getFirstChild(tdL);if(!div) div= this.createDiv(tdL,0);if(tdL.className!= tdM.className) tdL.className= tdM.className;if(tdL.style.textAlign!="left") tdL.style.textAlign="left";sdiv= this.getFirstChild(div);if(nipLeft== 0){if(tdL.width!="1"){tdL.setAttribute("width","1");tdL.style.borderLeftWidth="";tdL.style.borderTopWidth="";tdL.style.borderBottomWidth="";tdL.style.backgroundColor="";}
} else{nipl= nipLeft+ borderL;xtra=(borderT> 1)? 1: 0;if(this.notebookLayout&&(nipRight> 0))
nipl=(nipl>(this.tabHeight/ 2 - borderB+ xtra))?(this.tabHeight/ 2 - borderB+ xtra - cssVOffset): nipl;else
nipl=(nipl> this.tabHeight - borderB+ xtra)? this.tabHeight - borderB+ xtra - cssVOffset: nipl;if(tdL.width!= nipl+""){tdL.setAttribute("width", nipl+"");tdL.style.borderLeftWidth="0px";tdL.style.borderTopWidth="0px";tdL.style.borderBottomWidth="0px";tdL.style.backgroundColor="transparent";}
for(k= 1; k<= nipl; k++){if(!sdiv) sdiv= this.createDiv(div,1);if(this.notebookLayout)
color=(k<= 1)? borderLeftColor: backColor;else
color=(k<= borderL)? borderLeftColor: backColor;if(this.notebookLayout&&(nipRight> 0)){sdivHeight=((this.tabHeight - borderB+ xtra - cssVOffset) / 2)-(nipl-k+1);vpos=(nipl-k+1-xtra);} 
else{sdivHeight= this.tabHeight - borderB -(nipl-k+1)+ xtra - cssVOffset;vpos=(nipl-k+1-xtra);}
if(!this.isRTL)
this.vertLine(sdiv, color, k-1, vpos, sdivHeight, borderT+xtra, borderTopStyle, borderTopColor);else{if(isIE())
this.vertLine(sdiv, color, nipl-k-1, vpos, sdivHeight, borderT+xtra, borderTopStyle, borderTopColor);else
this.vertLine(sdiv, color, nipl-k-5, vpos, sdivHeight, borderT+xtra, borderTopStyle, borderTopColor);}
sdiv= sdiv.nextSibling;}
}
while(sdiv){sdiv.style.display="none";sdiv= sdiv.nextSibling;}
if(this.notebookLayout&&(nipRight> 0)){div= this.getFirstChild(tdL);nipr= nipRight+ borderL;xtra=(borderT> 1)? 1: 0;if(this.notebookLayout&&(nipLeft> 0))
nipr=(nipr>(this.tabHeight/ 2 - borderB+ xtra))?(this.tabHeight/ 2 - borderB+ xtra - cssVOffset): nipr;else
nipr=(nipr> this.tabHeight - borderB+ xtra)? this.tabHeight - borderB+ xtra - cssVOffset: nipr;if(nipLeft== 0){if(tdL.width!= nipr+""){tdL.setAttribute("width", nipr+"");tdL.style.borderLeftWidth="0px";tdL.style.borderTopWidth="0px";tdL.style.borderBottomWidth="0px";tdL.style.backgroundColor="transparent";}
}
for(k= 1; k<= nipr; k++){if(!sdiv) sdiv= this.createDiv(div,1);if(this.notebookLayout)
color=(k<= 1)? borderLeftColor: backColor;else
color=(k<= borderL)? borderLeftColor: backColor;if(nipLeft> 0){ 
sdivHeight=((this.tabHeight - borderB+ xtra - cssVOffset) / 2)-(nipr-k);vpos= this.tabHeight / 2;}
else{sdivHeight= this.tabHeight - borderB -(nipr-k+1)+ xtra - cssVOffset;vpos= 0;}
if(!this.isRTL)
this.vertLine(sdiv, color, k-1, vpos, sdivHeight, null, null, null);else{if(isIE())
this.vertLine(sdiv, color, nipr-k-1,(nipr-k+1-xtra), sdivHeight, null, null, null);else
this.vertLine(sdiv, color, nipr-k-5,(nipr-k+1-xtra), sdivHeight, null, null, null);}
sdiv.style.borderBottomStyle= borderTopStyle;sdiv.style.borderBottomColor= borderTopColor;sdiv.style.borderBottomWidth= borderT;sdiv= sdiv.nextSibling;}
} else{div= this.getFirstChild(tdR);if(!div) div= this.createDiv(tdR,0);if(tdR.className!= tdM.className) tdR.className= tdM.className;if(tdR.style.textAlign!="left") tdR.style.textAlign="left";sdiv= this.getFirstChild(div);if(nipRight== 0){if(tdR.width!="1"){tdR.setAttribute("width","1");tdR.style.borderRightWidth="";tdR.style.borderTopWidth="";tdR.style.backgroundColor="";}
} else{ 
nipr= nipRight+ borderR;xtra=(borderT> 1)? 1: 0;nipr=(nipr> this.tabHeight - borderB+ xtra)?(this.tabHeight - borderB+ xtra - cssVOffset): nipr; 
if(tdR.width!= nipr+""){tdR.setAttribute("width", nipr+"");tdR.style.borderRightWidth="0px";tdR.style.borderTopWidth="0px";tdR.style.backgroundColor="transparent";}
for(k= 1; k<= nipr; k++){if(!sdiv) sdiv= this.createDiv(div,1);color=(k> nipr-borderR)? borderRightColor: backColor;if(!this.isRTL)
this.vertLine(sdiv, color, k-1, k-xtra, this.tabHeight - borderB - k+ xtra - cssVOffset, borderT+xtra, borderTopStyle, borderTopColor);else{if(isIE())
this.vertLine(sdiv, color, nipr-k, k-xtra, this.tabHeight - borderB - k+ xtra - cssVOffset, borderT+xtra, borderTopStyle, borderTopColor);else
this.vertLine(sdiv, color, nipr-k-4, k-xtra, this.tabHeight - borderB - k+ xtra - cssVOffset, borderT+xtra, borderTopStyle, borderTopColor);}
sdiv= sdiv.nextSibling;}
}
}
if((nipr!= nipl)&&(nipr!= 0|| nipl!= 0)&& this.notebookLayout)
{sdivHeight=((this.tabHeight - borderB+ xtra - cssVOffset) / 2);if(nipl< nipr)
{tdL.setAttribute("width", nipr+"");for(k= nipl+1; k<= nipr; k++){if(!sdiv) sdiv= this.createDiv(div,1);if(this.notebookLayout)
color=(k<= 1)? borderLeftColor: backColor;else
color=(k<= borderL)? borderLeftColor: backColor;if(!this.isRTL)
this.vertLine(sdiv, color, k-1, 0, sdivHeight, borderT+xtra, borderTopStyle, borderTopColor);else{if(isIE())
this.vertLine(sdiv, color, nipl-k-1,(nipl-k+1-xtra), sdivHeight, borderT+xtra, borderTopStyle, borderTopColor);else
this.vertLine(sdiv, color, nipl-k-5,(nipl-k+1-xtra), sdivHeight, borderT+xtra, borderTopStyle, borderTopColor);}
sdiv= sdiv.nextSibling;}
}
else{for(k= nipr+1; k<= nipl; k++){if(!sdiv) sdiv= this.createDiv(div,1);if(this.notebookLayout)
color=(k<= 1)? borderLeftColor: backColor;else
color=(k<= borderL)? borderLeftColor: backColor;if(!this.isRTL)
this.vertLine(sdiv, color, k-1, sdivHeight, sdivHeight+1, null, null, null);else{if(isIE())
this.vertLine(sdiv, color, nipr-k-1,(nipr-k+1-xtra), sdivHeight, borderT+xtra, borderTopStyle, borderTopColor);else
this.vertLine(sdiv, color, nipr-k-5,(nipr-k+1-xtra), sdivHeight, borderT+xtra, borderTopStyle, borderTopColor);}
sdiv.style.borderBottomStyle= borderTopStyle;sdiv.style.borderBottomColor= borderTopColor;sdiv.style.borderBottomWidth= borderT;sdiv= sdiv.nextSibling;}
}
} 
while(sdiv){sdiv.style.display="none";sdiv= sdiv.nextSibling;}
if(!this.notebookLayout){div= this.getFirstChild(tdZ);if(!div) div= this.createDiv(tdZ,1);sdiv= this.getFirstChild(div);if(!sdiv) sdiv= this.createDiv(div,1);if(div.style.display!="none") div.style.display="none"; 
if(bottomline){ 
if(borderBottomColor== backColor&& borderB== 0){var wn=(tr.offsetWidth) -(borderR+borderL);var w= wn+"px";var h=(getBorderSize(td,"bottom", 1))+"px";if(div.style.display!="block") div.style.display="block";if(div.style.overflow!="visible") div.style.overflow="visible";if(div.style.zIndex!="100000") div.style.zIndex="100000";if(sdiv.style.display!="block") sdiv.style.display="block";if(sdiv.style.overflow!="hidden") sdiv.style.overflow="hidden";if((sdiv.style.left!= borderL+"px")&&(!this.isRTL)) sdiv.style.left= borderL+"px";if(sdiv.style.top!= this.tabHeight+"px") sdiv.style.top= this.tabHeight+"px";if(sdiv.style.width!= w&&wn>0) sdiv.style.width= w;if(sdiv.style.height!= h) sdiv.style.height= h;sdiv.style.backgroundColor= backColor;}
}
}
if(depth> 0){return(tdM.offsetWidth+ tdL.offsetWidth+ tdR.offsetWidth+(borderL+borderR)+ cssHOffset);}
else{return(tr.offsetWidth+(borderL+borderR)+ cssHOffset);}
}
this.createDiv= function(p, t){var d= document.createElement("div");if(t==0){d.style.position="relative";d.style.top="0px";d.style.left="0px";} else{d.style.position="absolute";d.style.overflow="hidden";}
d.style.backgroundColor="transparent";d.style.fontSize="0px";d.style.width="1px"; d.style.height="1px";d.style.borderWidth="0px";d.style.padding="0px";d.style.margin="0px";p.appendChild(d);return d;}
this.vertLine= function(sdiv, color, hOffset, vOffset, height, borderT, borderTopStyle, borderTopColor){var h=((height<= 1)? 1: height)+"px";if(color) sdiv.style.backgroundColor= color;if(borderTopStyle) sdiv.style.borderTopStyle= borderTopStyle;if(borderTopColor) sdiv.style.borderTopColor= borderTopColor;if(borderT) sdiv.style.borderTopWidth= borderT+"px";if(sdiv.style.display!="block") sdiv.style.display="block";if(sdiv.style.height!= h) sdiv.style.height= h;if(sdiv.style.width!="1px") sdiv.style.width="1px";if(sdiv.style.top!= vOffset+"px") sdiv.style.top= vOffset+"px";if(sdiv.style.left!= hOffset+"px") sdiv.style.left= hOffset+"px";}
this.emitTabHTML= function(td, tabobj, index){td.valign="top";var table= document.createElement("table");table.border="0";table.cellSpacing="0";table.cellPadding="0";table.onclick= this.onTabSelected;table.onkeydown= this.onTabSelected;table.name= tabobj.DIVID;table.id= this.containerDiv.id+this.stylClass+"hyperlink_"+index;table.controlName= this.Name;if(!isodctpIE5){table.style.cursor="pointer";}
td.appendChild(table);var tr= table.insertRow(0);var td= tr.insertCell(0);td.setAttribute("width","0");td.vAlign="top";td.noWrap="true";td.style.padding="0px";td.style.margin="0px";td.style.borderWidth="0px"; 
td= tr.insertCell(1);td.vAlign="top";td.noWrap="true";td.style.padding="0px";td.style.margin="0px";td.style.borderRightWidth="0px"; 
td= tr.insertCell(2);td.vAlign="top";td.noWrap="true";td.style.margin="0px";td= tr.insertCell(3);td.vAlign="top";td.noWrap="true";td.style.padding="0px";td.style.margin="0px";td.style.borderLeftWidth="0px"; 
return table;}
this.getFirstChild= function(cell){r=(cell)? cell.firstChild: null;while(r&& r.nodeType!= 1) r= r.nextSibling;return r;}
}
function Pane(){var divObj= null;var Name= null;}
