
if(!window.DHTMLSuite)var DHTMLSuite=new Object();if(!String.trim)String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,'');};var DHTMLSuite_funcs=new Object();if(!window.DHTML_SUITE_THEME)var DHTML_SUITE_THEME='blue';if(!window.DHTML_SUITE_THEME_FOLDER)var DHTML_SUITE_THEME_FOLDER=templateurl+'js/themes/';if(!window.DHTML_SUITE_JS_FOLDER)var DHTML_SUITE_JS_FOLDER='js/separateFiles/';var DHTMLSuite=new Object();var standardObjectsCreated=false;DHTMLSuite.eventEls=new Array();var widgetDep=new Object();widgetDep['formValidator']=['dhtmlSuite-formUtil.js'];widgetDep['paneSplitter']=['dhtmlSuite-paneSplitter.js','dhtmlSuite-paneSplitterModel.js','dhtmlSuite-dynamicContent.js','ajax.js'];widgetDep['menuBar']=['dhtmlSuite-menuBar.js','dhtmlSuite-menuItem.js','dhtmlSuite-menuModel.js'];widgetDep['windowWidget']=['dhtmlSuite-windowWidget.js','dhtmlSuite-resize.js','dhtmlSuite-dragDropSimple.js','ajax.js','dhtmlSuite-dynamicContent.js'];widgetDep['colorWidget']=['dhtmlSuite-colorWidgets.js','dhtmlSuite-colorUtil.js'];widgetDep['colorSlider']=['dhtmlSuite-colorWidgets.js','dhtmlSuite-colorUtil.js','dhtmlSuite-slider.js'];widgetDep['colorPalette']=['dhtmlSuite-colorWidgets.js','dhtmlSuite-colorUtil.js'];widgetDep['calendar']=['dhtmlSuite-calendar.js','dhtmlSuite-dragDropSimple.js'];widgetDep['dragDropTree']=['dhtmlSuite-dragDropTree.js'];widgetDep['slider']=['dhtmlSuite-slider.js'];widgetDep['dragDrop']=['dhtmlSuite-dragDrop.js'];widgetDep['imageEnlarger']=['dhtmlSuite-imageEnlarger.js','dhtmlSuite-dragDropSimple.js'];widgetDep['imageSelection']=['dhtmlSuite-imageSelection.js'];widgetDep['floatingGallery']=['dhtmlSuite-floatingGallery.js','dhtmlSuite-mediaModel.js'];widgetDep['contextMenu']=['dhtmlSuite-contextMenu.js','dhtmlSuite-menuBar.js','dhtmlSuite-menuItem.js','dhtmlSuite-menuModel.js'];widgetDep['dynamicContent']=['dhtmlSuite-dynamicContent.js','ajax.js'];widgetDep['textEdit']=['dhtmlSuite-textEdit.js','dhtmlSuite-textEditModel.js','dhtmlSuite-listModel.js'];widgetDep['listModel']=['dhtmlSuite-listModel.js'];widgetDep['resize']=['dhtmlSuite-resize.js'];widgetDep['dragDropSimple']=['dhtmlSuite-dragDropSimple.js'];widgetDep['dynamicTooltip']=['dhtmlSuite-dynamicTooltip.js','dhtmlSuite-dynamicContent.js','ajax.js'];widgetDep['modalMessage']=['dhtmlSuite-modalMessage.js','dhtmlSuite-dynamicContent.js','ajax.js'];widgetDep['tableWidget']=['dhtmlSuite-tableWidget.js','ajax.js'];widgetDep['progressBar']=['dhtmlSuite-progressBar.js'];widgetDep['tabView']=['dhtmlSuite-tabView.js','dhtmlSuite-dynamicContent.js','ajax.js'];widgetDep['infoPanel']=['dhtmlSuite-infoPanel.js','dhtmlSuite-dynamicContent.js','ajax.js'];widgetDep['form']=['dhtmlSuite-formUtil.js','dhtmlSuite-dynamicContent.js','ajax.js'];widgetDep['autoComplete']=['dhtmlSuite-autoComplete.js','ajax.js'];widgetDep['chainedSelect']=['dhtmlSuite-chainedSelect.js','ajax.js'];widgetDep['helpPanel']=['dhtmlSuite-helpPanel.js','ajax.js'];widgetDep['dropDownContent']=['dhtmlSuite-dropDownContent.js','ajax.js'];var depCache=new Object();DHTMLSuite.include=function(widget){if(!widgetDep[widget]){alert('Cannot find the files for widget '+widget+'. Please verify that the name is correct');return;}
var files=widgetDep[widget];for(var no=0;no<files.length;no++){if(!depCache[files[no]]){document.write('<'+'script');document.write(' language="javascript"');document.write(' type="text/javascript"');document.write(' src="'+DHTML_SUITE_JS_FOLDER+files[no]+'">');document.write('</'+'script'+'>');depCache[files[no]]=true;}}}
DHTMLSuite.discardElement=function(element){element=DHTMLSuite.commonObj.getEl(element);var gBin=document.getElementById('IELeakGBin');if(!gBin){gBin=document.createElement('DIV');gBin.id='IELeakGBin';gBin.style.display='none';document.body.appendChild(gBin);}
gBin.appendChild(element);gBin.innerHTML='';}
DHTMLSuite.createStandardObjects=function(){DHTMLSuite.clientInfoObj=new DHTMLSuite.clientInfo();DHTMLSuite.clientInfoObj.init();if(!DHTMLSuite.configObj){DHTMLSuite.configObj=new DHTMLSuite.config();DHTMLSuite.configObj.init();}
DHTMLSuite.commonObj=new DHTMLSuite.common();DHTMLSuite.variableStorage=new DHTMLSuite.globalVariableStorage();;DHTMLSuite.commonObj.init();DHTMLSuite.domQueryObj=new DHTMLSuite.domQuery();DHTMLSuite.commonObj.addEvent(window,'unload',function(){DHTMLSuite.commonObj.__clearMemoryGarbage();});standardObjectsCreated=true;}
DHTMLSuite.config=function(){var imagePath;var cssPath;var defaultCssPath;var defaultImagePath;}
DHTMLSuite.config.prototype={init:function(){this.imagePath=DHTML_SUITE_THEME_FOLDER+DHTML_SUITE_THEME+'/images/';this.cssPath=DHTML_SUITE_THEME_FOLDER+DHTML_SUITE_THEME+'/css/';this.defaultCssPath=this.cssPath;this.defaultImagePath=this.imagePath;},setCssPath:function(newCssPath){this.cssPath=newCssPath;},resetCssPath:function(){this.cssPath=this.defaultCssPath;},resetImagePath:function(){this.imagePath=this.defaultImagePath;},setImagePath:function(newImagePath){this.imagePath=newImagePath;}}
DHTMLSuite.globalVariableStorage=function(){var menuBar_highlightedItems;this.menuBar_highlightedItems=new Array();var arrayDSObjects;var arrayOfDhtmlSuiteObjects;this.arrayDSObjects=new Array();this.arrayOfDhtmlSuiteObjects=this.arrayDSObjects;var ajaxObjects;this.ajaxObjects=new Array();}
DHTMLSuite.globalVariableStorage.prototype={}
DHTMLSuite.common=function(){var loadedCSSFiles;var cssCacheStatus;var eventEls;var isOkToSelect;this.okToSelect=true;this.cssCacheStatus=true;this.eventEls=new Array();}
DHTMLSuite.common.prototype={init:function(){this.loadedCSSFiles=new Array();},loadCSS:function(cssFile,prefixConfigPath){if(!prefixConfigPath&&prefixConfigPath!==false)prefixConfigPath=true;if(!this.loadedCSSFiles[cssFile]){this.loadedCSSFiles[cssFile]=true;var lt=document.createElement('LINK');if(!this.cssCacheStatus){if(cssFile.indexOf('?')>=0)cssFile=cssFile+'&';else cssFile=cssFile+'?';cssFile=cssFile+'rand='+Math.random();}
if(prefixConfigPath){lt.href=DHTMLSuite.configObj.cssPath+cssFile;}else{lt.href=cssFile;}
lt.rel='stylesheet';lt.media='screen';lt.type='text/css';document.getElementsByTagName('HEAD')[0].appendChild(lt);}},__setTextSelOk:function(okToSelect){this.okToSelect=okToSelect;},__isTextSelOk:function(){return this.okToSelect;},setCssCacheStatus:function(cssCacheStatus){this.cssCacheStatus=cssCacheStatus;},getEl:function(elRef){if(typeof elRef=='string'){if(document.getElementById(elRef))return document.getElementById(elRef);if(document.forms[elRef])return document.forms[elRef];if(document[elRef])return document[elRef];if(window[elRef])return window[elRef];}
return elRef;},isArray:function(el){if(el.constructor.toString().indexOf("Array")!=-1)return true;return false;},getStyle:function(el,property){el=this.getEl(el);if(document.defaultView&&document.defaultView.getComputedStyle){var retVal=null;var comp=document.defaultView.getComputedStyle(el,'');if(comp){retVal=comp[property];}
return el.style[property]||retVal;}
if(document.documentElement.currentStyle&&DHTMLSuite.clientInfoObj.isMSIE){var retVal=null;if(el.currentStyle)value=el.currentStyle[property];return(el.style[property]||retVal);}
return el.style[property];},getLeftPos:function(el){if(document.getBoxObjectFor){if(el.tagName!='INPUT'&&el.tagName!='SELECT'&&el.tagName!='TEXTAREA')return document.getBoxObjectFor(el).x}
var returnValue=el.offsetLeft;while((el=el.offsetParent)!=null){if(el.tagName!='HTML'){returnValue+=el.offsetLeft;if(document.all)returnValue+=el.clientLeft;}}
return returnValue;},getTopPos:function(el){if(document.getBoxObjectFor){if(el.tagName!='INPUT'&&el.tagName!='SELECT'&&el.tagName!='TEXTAREA')return document.getBoxObjectFor(el).y}
var returnValue=el.offsetTop;while((el=el.offsetParent)!=null){if(el.tagName!='HTML'){returnValue+=(el.offsetTop-el.scrollTop);if(document.all)returnValue+=el.clientTop;}}
return returnValue;},getCookie:function(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length)))return null;if(start==-1)return null;var end=document.cookie.indexOf(";",len);if(end==-1)end=document.cookie.length;return unescape(document.cookie.substring(len,end));},setCookie:function(name,value,expires,path,domain,secure){expires=expires*60*60*24*1000;var today=new Date();var expires_date=new Date(today.getTime()+(expires));var cookieString=name+"="+escape(value)+
((expires)?";expires="+expires_date.toGMTString():"")+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
((secure)?";secure":"");document.cookie=cookieString;},deleteCookie:function(name,path,domain)
{if(this.getCookie(name))document.cookie=name+"="+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";},cancelEvent:function(){return false;},addEvent:function(obj,type,fn,suffix){if(!suffix)suffix='';if(obj.attachEvent){if(typeof DHTMLSuite_funcs[type+fn+suffix]!='function'){DHTMLSuite_funcs[type+fn+suffix]=function(){fn.apply(window.event.srcElement);};obj.attachEvent('on'+type,DHTMLSuite_funcs[type+fn+suffix]);}
obj=null;}else{obj.addEventListener(type,fn,false);}
this.__addEventEl(obj);},removeEvent:function(obj,type,fn,suffix){if(obj.detachEvent){obj.detachEvent('on'+type,DHTMLSuite_funcs[type+fn+suffix]);DHTMLSuite_funcs[type+fn+suffix]=null;obj=null;}else{obj.removeEventListener(type,fn,false);}},__clearMemoryGarbage:function(){if(!DHTMLSuite.clientInfoObj.isMSIE)return;for(var no=0;no<DHTMLSuite.eventEls.length;no++){try{var el=DHTMLSuite.eventEls[no];el.onclick=null;el.onmousedown=null;el.onmousemove=null;el.onmouseout=null;el.onmouseover=null;el.onmouseup=null;el.onfocus=null;el.onblur=null;el.onkeydown=null;el.onkeypress=null;el.onkeyup=null;el.onselectstart=null;el.ondragstart=null;el.oncontextmenu=null;el.onscroll=null;el=null;}catch(e){}}
for(var no in DHTMLSuite.variableStorage.arrayDSObjects){DHTMLSuite.variableStorage.arrayDSObjects[no]=null;}
window.onbeforeunload=null;window.onunload=null;DHTMLSuite=null;},__addEventEl:function(el){DHTMLSuite.eventEls[DHTMLSuite.eventEls.length]=el;},getSrcElement:function(e){var el;if(e.target)el=e.target;else if(e.srcElement)el=e.srcElement;if(el.nodeType==3)
el=el.parentNode;return el;},getKeyFromEvent:function(e){var code=this.getKeyCode(e);return String.fromCharCode(code);},getKeyCode:function(e){if(e.keyCode)code=e.keyCode;else if(e.which)code=e.which;return code;},isObjectClicked:function(obj,e){var src=this.getSrcElement(e);var string=src.tagName+'('+src.className+')';if(src==obj)return true;while(src.parentNode&&src.tagName.toLowerCase()!='html'){src=src.parentNode;string=string+','+src.tagName+'('+src.className+')';if(src==obj)return true;}
return false;},getObjectByClassName:function(e,className){var src=this.getSrcElement(e);if(src.className==className)return src;while(src&&src.tagName.toLowerCase()!='html'){src=src.parentNode;if(src.className==className)return src;}
return false;},getObjectByAttribute:function(e,attribute){var src=this.getSrcElement(e);var att=src.getAttribute(attribute);if(!att)att=src[attribute];if(att)return src;while(src&&src.tagName.toLowerCase()!='html'){src=src.parentNode;var att=src.getAttribute('attribute');if(!att)att=src[attribute];if(att)return src;}
return false;},getUniqueId:function(){var no=Math.random()+'';no=no.replace('.','');var no2=Math.random()+'';no2=no2.replace('.','');return no+no2;},getAssociativeArrayFromString:function(propertyString){if(!propertyString)return;var retArray=new Array();var items=propertyString.split(/,/g);for(var no=0;no<items.length;no++){var tokens=items[no].split(/:/);retArray[tokens[0]]=tokens[1];}
return retArray;},correctPng:function(el){el=DHTMLSuite.commonObj.getEl(el);var img=el;var width=img.width;var height=img.height;var html='<span style="display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+img.src+'\',sizingMethod=\'scale\');width:'+width+';height:'+height+'"></span>';img.outerHTML=html;},__evaluateJs:function(obj){obj=this.getEl(obj);var scriptTags=obj.getElementsByTagName('SCRIPT');var string='';var jsCode='';for(var no=0;no<scriptTags.length;no++){if(scriptTags[no].src){var head=document.getElementsByTagName("head")[0];var scriptObj=document.createElement("script");scriptObj.setAttribute("type","text/javascript");scriptObj.setAttribute("src",scriptTags[no].src);}else{if(DHTMLSuite.clientInfoObj.isOpera){jsCode=jsCode+scriptTags[no].text+'\n';}
else
jsCode=jsCode+scriptTags[no].innerHTML;}}
if(jsCode)this.__installScript(jsCode);},__installScript:function(script){try{if(!script)
return;if(window.execScript){window.execScript(script)}else if(window.jQuery&&jQuery.browser.safari){window.setTimeout(script,0);}else{window.setTimeout(script,0);}}catch(e){}},__evaluateCss:function(obj){obj=this.getEl(obj);var cssTags=obj.getElementsByTagName('STYLE');var head=document.getElementsByTagName('HEAD')[0];for(var no=0;no<cssTags.length;no++){head.appendChild(cssTags[no]);}}}
DHTMLSuite.clientInfo=function(){var browser;var isOpera;var isMSIE;var isOldMSIE;var isFirefox;var navigatorVersion;var isOldMSIE;}
DHTMLSuite.clientInfo.prototype={init:function(){this.browser=navigator.userAgent;this.isOpera=(this.browser.toLowerCase().indexOf('opera')>=0)?true:false;this.isFirefox=(this.browser.toLowerCase().indexOf('firefox')>=0)?true:false;this.isMSIE=(this.browser.toLowerCase().indexOf('msie')>=0)?true:false;this.isOldMSIE=(this.browser.toLowerCase().match(/msie\s[0-6]/gi))?true:false;this.isSafari=(this.browser.toLowerCase().indexOf('safari')>=0)?true:false;this.navigatorVersion=navigator.appVersion.replace(/.*?MSIE\s(\d\.\d).*/g,'$1')/1;this.isOldMSIE=(this.isMSIE&&this.navigatorVersion<7)?true:false;},getBrowserWidth:function(){if(self.innerWidth)return self.innerWidth;return document.documentElement.offsetWidth;},getBrowserHeight:function(){if(self.innerHeight)return self.innerHeight;return document.documentElement.offsetHeight;}}
DHTMLSuite.domQuery=function(){document.getElementsByClassName=this.getElementsByClassName;document.getElementsByAttribute=this.getElementsByAttribute;}
DHTMLSuite.domQuery.prototype={}

if(!window.DHTMLSuite)var DHTMLSuite=new Object();DHTMLSuite.dynamicContent=function(){var enableCache;var jsCache;var ajaxObjects;var waitMessage;this.enableCache=true;this.jsCache=new Object();this.ajaxObjects=new Array();this.waitMessage='Loading content-please wait...';this.waitImage='dynamic-content/ajax-loader-darkblue.gif';try{if(!standardObjectsCreated)DHTMLSuite.createStandardObjects();}catch(e){alert('You need to include the dhtmlSuite-common.js file');}
var objectIndex;this.objectIndex=DHTMLSuite.variableStorage.arrayDSObjects.length;DHTMLSuite.variableStorage.arrayDSObjects[this.objectIndex]=this;}
DHTMLSuite.dynamicContent.prototype={loadContent:function(divId,url,functionToCallOnLoaded){var ind=this.objectIndex;if(this.enableCache&&this.jsCache[url]){document.getElementById(divId).innerHTML=this.jsCache[url];DHTMLSuite.commonObj.__evaluateJs(divId);DHTMLSuite.commonObj.__evaluateCss(divId);if(functionToCallOnLoaded)eval(functionToCallOnLoaded);return;}
var ajaxIndex=0;var waitMessageToShow='';if(this.waitImage){waitMessageToShow=waitMessageToShow+'<div style="text-align:center;padding:10px"><img src="'+DHTMLSuite.configObj.imagePath+this.waitImage+'" border="0" alt=""></div>';}
if(this.waitMessage){waitMessageToShow=waitMessageToShow+'<div style="text-align:center">'+this.waitMessage+'</div>';}
if(this.waitMessage!=null&&this.waitImage!=null){try{if(waitMessageToShow.length>0)document.getElementById(divId).innerHTML=waitMessageToShow;}catch(e){}}
waitMessageToShow=false;var ajaxIndex=this.ajaxObjects.length;try{this.ajaxObjects[ajaxIndex]=new sack();}catch(e){alert('Could not create ajax object. Please make sure that ajax.js is included');}
if(url.indexOf('?')>=0){this.ajaxObjects[ajaxIndex].method='GET';var string=url.substring(url.indexOf('?'));url=url.replace(string,'');string=string.replace('?','');var items=string.split(/&/g);for(var no=0;no<items.length;no++){var tokens=items[no].split('=');if(tokens.length==2){this.ajaxObjects[ajaxIndex].setVar(tokens[0],tokens[1]);}}
url=url.replace(string,'');}
this.ajaxObjects[ajaxIndex].requestFile=url;this.ajaxObjects[ajaxIndex].onCompletion=function(){DHTMLSuite.variableStorage.arrayDSObjects[ind].__ajax_showContent(divId,ajaxIndex,url,functionToCallOnLoaded);};this.ajaxObjects[ajaxIndex].onError=function(){DHTMLSuite.variableStorage.arrayDSObjects[ind].__ajax_displayError(divId,ajaxIndex,url,functionToCallOnLoaded);};this.ajaxObjects[ajaxIndex].runAJAX();},setWaitMessage:function(newWaitMessage){this.waitMessage=newWaitMessage;},setWaitImage:function(newWaitImage){this.waitImage=newWaitImage;},setCache:function(enableCache){this.enableCache=enableCache;},__ajax_showContent:function(divId,ajaxIndex,url,functionToCallOnLoaded){document.getElementById(divId).innerHTML='';document.getElementById(divId).innerHTML=this.ajaxObjects[ajaxIndex].response;if(this.enableCache){this.jsCache[url]=document.getElementById(divId).innerHTML+'';}
DHTMLSuite.commonObj.__evaluateJs(divId);DHTMLSuite.commonObj.__evaluateCss(divId);if(functionToCallOnLoaded)eval(functionToCallOnLoaded);this.ajaxObjects[ajaxIndex]=null;return false;},__ajax_displayError:function(divId,ajaxIndex,url,functionToCallOnLoaded){document.getElementById(divId).innerHTML='<h2>Message from DHTMLSuite.dynamicContent</h2><p>The ajax request for '+url+' failed</p>';}}

if(!window.DHTMLSuite)var DHTMLSuite=new Object();var refToTabViewObjects=new Array();DHTMLSuite.tabView=function(){var textPadding;var strictDocType;var DHTMLSuite_tabObj;var activeTabIndex;var initActiveTabIndex;var ajaxObjects;var tabView_countTabs;var tabViewHeight;var tabSetParentId;var tabTitles;var width;var height;var layoutCSS;var outsideObjectRefIndex;var maxNumberOfTabs;var dynamicContentObj;var closeButtons;var refActiveTabContent;var callbackOnTabSwitch;this.initActiveTabIndex=0;this.callbackOnTabSwitch='';this.refActiveTabContent='';this.textPadding=3;this.strictDocType=true;this.ajaxObjects=new Array();this.tabTitles=new Array();this.layoutCSS='tab-view.css';this.maxNumberOfTabs=6;this.dynamicContentObj=false;this.closeButtons=new Array();this.width='100%';this.height='500';try{if(!standardObjectsCreated)DHTMLSuite.createStandardObjects();}catch(e){alert('You need to include the dhtmlSuite-common.js file');}}
DHTMLSuite.tabView.prototype={init:function()
{DHTMLSuite.commonObj.loadCSS(this.layoutCSS);this.outsideObjectRefIndex=refToTabViewObjects.length;refToTabViewObjects[this.outsideObjectRefIndex]=this;try{this.dynamicContentObj=new DHTMLSuite.dynamicContent();}catch(e){alert('You need to include DHTMLSuite-dynamicContent.js');}
this.__initializeAndParseTabs(false,false);},setCallbackOnTabSwitch:function(callbackOnTabSwitch)
{this.callbackOnTabSwitch=callbackOnTabSwitch;},getMaximumNumberOfTabs:function()
{return this.maxNumberOfTabs;},setMaximumTabs:function(maximumNumberOfTabs)
{this.maxNumberOfTabs=maximumNumberOfTabs;},setParentId:function(idOfParentHTMLElement)
{this.tabSetParentId=idOfParentHTMLElement;this.DHTMLSuite_tabObj=document.getElementById(idOfParentHTMLElement);},setWidth:function(newWidth)
{this.width=newWidth;},setHeight:function(newHeight)
{this.height=newHeight;},setIndexActiveTab:function(indexOfNewActiveTab)
{this.initActiveTabIndex=indexOfNewActiveTab;},setTabTitles:function(titleOfTabs)
{this.tabTitles=titleOfTabs;},setCloseButtons:function(closeButtons)
{this.closeButtons=closeButtons;},getReferenceToDivElementByTitle:function(tabTitle)
{var index=this.getTabIndexByTitle(tabTitle);if(index!=-1){var obj=document.getElementById('tabView'+this.tabSetParentId+'_'+index);return obj;}
return false;},getReferenceToDivElementById:function(idOfTab)
{var divs=this.DHTMLSuite_tabObj.getElementsByTagName('DIV');for(var no=0;no<divs.length;no++){var attr=divs[no].getAttribute('originalId');if(!attr)attr=divs[no].originalid;if(attr==idOfTab)return divs[no];}
return false;},createNewTab:function(parentId,tabTitle,tabContent,tabContentUrl,closeButton)
{var index=this.getTabIndexByTitle(tabTitle);if(index!=-1){this.displayATab(tabTitle,index);return false;}
if(this.tabView_countTabs>=this.maxNumberOfTabs)return;var div=document.createElement('DIV');div.className='DHTMLSuite_aTab';this.DHTMLSuite_tabObj.appendChild(div);var tabId=this.__initializeAndParseTabs(true,tabTitle,closeButton);if(tabContent)div.innerHTML=tabContent;if(tabContentUrl){this.dynamicContentObj.loadContent('tabView'+parentId+'_'+tabId,tabContentUrl);}
this.tabTitles[tabId]=tabTitle;return true;},deleteTab:function(tabLabel,tabIndex)
{if(tabLabel){var index=this.getTabIndexByTitle(tabLabel);if(index!=-1){this.deleteTab(false,index);}}else if(tabIndex>=0){if(document.getElementById('tabTab'+this.tabSetParentId+'_'+tabIndex)){var obj=document.getElementById('tabTab'+this.tabSetParentId+'_'+tabIndex);var id=obj.parentNode.parentNode.id;DHTMLSuite.discardElement(obj);var obj2=document.getElementById('tabView'+this.tabSetParentId+'_'+tabIndex);DHTMLSuite.discardElement(obj2);this.__resetTabIds(this.tabSetParentId);this.initActiveTabIndex=-1;var newIndex=0;if(refToTabViewObjects[this.outsideObjectRefIndex].activeTabIndex==tabIndex)refToTabViewObjects[this.outsideObjectRefIndex].activeTabIndex=-1;this.__showTab(this.tabSetParentId,newIndex,this.outsideObjectRefIndex);}}},addContentToTab:function(tabLabel,filePath)
{var index=this.getTabIndexByTitle(tabLabel);if(index!=-1){this.dynamicContentObj.loadContent('tabView'+this.tabSetParentId+'_'+index,filePath);}},displayATab:function(tabLabel,tabIndex)
{if(tabLabel){var index=this.getTabIndexByTitle(tabLabel);if(index!=-1){this.initActiveTabIndex=index;}else return false;}else{this.initActiveTabIndex=tabIndex;}
this.__showTab(this.tabSetParentId,this.initActiveTabIndex,this.outsideObjectRefIndex)},getTabIndex:function()
{var divs=this.DHTMLSuite_tabObj.getElementsByTagName('DIV');var tabIndex=0;for(var no=0;no<divs.length;no++){if(divs[no].id.indexOf('tabTab')>=0){if(divs[no].className!='tabInactive')return tabIndex;tabIndex++;}}
return tabIndex;},__setPadding:function(obj,padding){var span=obj.getElementsByTagName('SPAN')[0];span.style.paddingLeft=padding+'px';span.style.paddingRight=padding+'px';},__showTab:function(parentId,tabIndex,objectIndex)
{var parentId_div=parentId+"_";if(!document.getElementById('tabView'+parentId_div+tabIndex)){return;}
if(refToTabViewObjects[objectIndex].activeTabIndex>=0){if(refToTabViewObjects[objectIndex].activeTabIndex==tabIndex){return;}
var obj=document.getElementById('tabTab'+parentId_div+refToTabViewObjects[objectIndex].activeTabIndex);if(!obj){refToTabViewObjects[objectIndex].activeTabIndex=0;var obj=document.getElementById('tabTab'+parentId_div+refToTabViewObjects[objectIndex].activeTabIndex);}
obj.className='tabInactive';obj.style.backgroundImage='url(\''+DHTMLSuite.configObj.imagePath+'tab-view/tab_left_inactive.gif'+'\')';var imgs=obj.getElementsByTagName('IMG');var img=imgs[imgs.length-1];img.src=DHTMLSuite.configObj.imagePath+'tab-view/tab_right_inactive.gif';document.getElementById('tabView'+parentId_div+refToTabViewObjects[objectIndex].activeTabIndex).style.display='none';}
var thisObj=document.getElementById('tabTab'+parentId_div+tabIndex);thisObj.className='tabActive';thisObj.style.backgroundImage='url(\''+DHTMLSuite.configObj.imagePath+'tab-view/tab_left_active.gif'+'\')';var imgs=thisObj.getElementsByTagName('IMG');var img=imgs[imgs.length-1];img.src=DHTMLSuite.configObj.imagePath+'tab-view/tab_right_active.gif';document.getElementById('tabView'+parentId_div+tabIndex).style.display='block';this.refActiveTabContent=document.getElementById('tabView'+parentId_div+tabIndex);refToTabViewObjects[objectIndex].activeTabIndex=tabIndex;refToTabViewObjects[objectIndex].__handleCallback('tabSwitch');var parentObj=thisObj.parentNode;var aTab=parentObj.getElementsByTagName('DIV')[0];countObjects=0;var startPos=2;var previousObjectActive=false;while(aTab){if(aTab.tagName=='DIV'){if(previousObjectActive){previousObjectActive=false;startPos-=2;}
if(aTab==thisObj){startPos-=2;previousObjectActive=true;refToTabViewObjects[objectIndex].__setPadding(aTab,refToTabViewObjects[objectIndex].textPadding+1);}else{refToTabViewObjects[objectIndex].__setPadding(aTab,refToTabViewObjects[objectIndex].textPadding);}
aTab.style.left=startPos+'px';countObjects++;startPos+=2;}
aTab=aTab.nextSibling;}
return;},__handleCallback:function(action)
{var callbackString='';switch(action)
{case"tabSwitch":callbackString=this.callbackOnTabSwitch;break;}
if(callbackString){callbackString=callbackString+'(this.refActiveTabContent)';eval(callbackString);}},__tabClick:function(inputObj,index)
{var idArray=inputObj.id.split('_');var parentId=inputObj.getAttribute('parentRefId');if(!parentId)parentId=inputObj.parentRefId;this.__showTab(parentId,idArray[idArray.length-1].replace(/[^0-9]/gi,''),index);},__rolloverTab:function()
{if(this.className.indexOf('tabInactive')>=0){this.className='inactiveTabOver';this.style.backgroundImage='url(\''+DHTMLSuite.configObj.imagePath+'tab-view/tab_left_over.gif'+'\')';var imgs=this.getElementsByTagName('IMG');var img=imgs[imgs.length-1];img.src=DHTMLSuite.configObj.imagePath+'tab-view/tab_right_over.gif';}},__rolloutTab:function()
{if(this.className=='inactiveTabOver'){this.className='tabInactive';this.style.backgroundImage='url(\''+DHTMLSuite.configObj.imagePath+'tab-view/tab_left_inactive.gif'+'\')';var imgs=this.getElementsByTagName('IMG');var img=imgs[imgs.length-1];img.src=DHTMLSuite.configObj.imagePath+'tab-view/tab_right_inactive.gif';}},__initializeAndParseTabs:function(additionalTab,nameOfAdditionalTab,additionalCloseButton)
{this.DHTMLSuite_tabObj.className=' DHTMLSuite_tabWidget';window.refToThisTabSet=this;if(!additionalTab||additionalTab=='undefined'){this.DHTMLSuite_tabObj=document.getElementById(this.tabSetParentId);this.width=this.width+'';if(this.width.indexOf('%')<0)this.width=this.width+'px';this.DHTMLSuite_tabObj.style.width=this.width;this.height=this.height+'';if(this.height.length>0){if(this.height.indexOf('%')<0)this.height=this.height+'px';this.DHTMLSuite_tabObj.style.height=this.height;}
var tabDiv=document.createElement('DIV');var firstDiv=this.DHTMLSuite_tabObj.getElementsByTagName('DIV')[0];this.DHTMLSuite_tabObj.insertBefore(tabDiv,firstDiv);tabDiv.className='DHTMLSuite_tabContainer';this.tabView_countTabs=0;var tmpTabTitles=this.tabTitles;}else{var tabDiv=this.DHTMLSuite_tabObj.getElementsByTagName('DIV')[0];var firstDiv=this.DHTMLSuite_tabObj.getElementsByTagName('DIV')[1];this.initActiveTabIndex=this.tabView_countTabs;var tmpTabTitles=Array(nameOfAdditionalTab);}
for(var no=0;no<tmpTabTitles.length;no++){var aTab=document.createElement('DIV');aTab.id='tabTab'+this.tabSetParentId+"_"+(no+this.tabView_countTabs);aTab.onmouseover=this.__rolloverTab;aTab.onmouseout=this.__rolloutTab;aTab.setAttribute('parentRefId',this.tabSetParentId);aTab.parentRefId=this.tabSetParentId;var numIndex=window.refToThisTabSet.outsideObjectRefIndex+'';aTab.onclick=function(){window.refToThisTabSet.__tabClick(this,numIndex);};DHTMLSuite.commonObj.__addEventEl(aTab);aTab.className='tabInactive';aTab.style.backgroundImage='url(\''+DHTMLSuite.configObj.imagePath+'tab-view/tab_left_inactive.gif'+'\')';tabDiv.appendChild(aTab);var span=document.createElement('SPAN');span.innerHTML=tmpTabTitles[no];aTab.appendChild(span);if((!additionalTab&&this.closeButtons[no])||(additionalTab&&additionalCloseButton)){var closeButton=document.createElement('IMG');closeButton.src=DHTMLSuite.configObj.imagePath+'tab-view/tab-view-close.gif';closeButton.style.position='absolute';closeButton.style.top='4px';closeButton.style.right='2px';closeButton.onmouseover=this.__mouseOverEffectCloseButton;closeButton.onmouseout=this.__mouseOutEffectForCloseButton;DHTMLSuite.commonObj.__addEventEl(closeButton);span.innerHTML=span.innerHTML+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';var deleteTxt=span.innerHTML+'';closeButton.onclick=function(){refToTabViewObjects[numIndex].deleteTab(this.parentNode.innerHTML)};span.appendChild(closeButton);}
var img=document.createElement('IMG');img.valign='bottom';img.src=DHTMLSuite.configObj.imagePath+'tab-view/tab_right_inactive.gif';if((DHTMLSuite.clientInfoObj.navigatorVersion&&DHTMLSuite.clientInfoObj.navigatorVersion<6)||(DHTMLSuite.clientInfoObj.isMSIE&&!this.strictDocType)){img.style.styleFloat='none';img.style.position='relative';img.style.top='4px'
span.style.paddingTop='4px';aTab.style.cursor='hand';}
aTab.appendChild(img);}
var tabs=this.DHTMLSuite_tabObj.getElementsByTagName('DIV');var divCounter=0;for(var no=0;no<tabs.length;no++){if(tabs[no].className=='DHTMLSuite_aTab'&&tabs[no].parentNode==this.DHTMLSuite_tabObj){if(this.height.length>0){if(this.height.indexOf('%')==-1){var tmpHeight=(this.height.replace('px','')/1-22);tabs[no].style.height=tmpHeight+'px';}else
tabs[no].style.height=this.height;}
tabs[no].style.display='none';if(tabs[no].id){tabs[no].setAttribute('originalId',tabs[no].id);tabs[no].originalId=tabs[no].id;}
tabs[no].id='tabView'+this.tabSetParentId+"_"+divCounter;divCounter++;}}
if(additionalTab){this.tabView_countTabs++;}else{this.tabView_countTabs=this.tabView_countTabs+this.tabTitles.length;}
this.__showTab(this.tabSetParentId,this.initActiveTabIndex,this.outsideObjectRefIndex);return this.activeTabIndex;},__mouseOutEffectForCloseButton:function()
{this.src=this.src.replace('close-over.gif','close.gif');},__mouseOverEffectCloseButton:function()
{this.src=this.src.replace('close.gif','close-over.gif');},__fillTabWithContentFromAjax:function(ajaxIndex,objId,tabId)
{var obj=document.getElementById('tabView'+objId+'_'+tabId);obj.innerHTML=this.ajaxObjects[ajaxIndex].response;},__resetTabIds:function(parentId)
{var tabTitleCounter=0;var tabContentCounter=0;var divs=this.DHTMLSuite_tabObj.getElementsByTagName('DIV');for(var no=0;no<divs.length;no++){if(divs[no].className=='DHTMLSuite_aTab'&&divs[no].parentNode==this.DHTMLSuite_tabObj){divs[no].id='tabView'+parentId+'_'+tabTitleCounter;tabTitleCounter++;}
if(divs[no].id.indexOf('tabTab')>=0&&divs[no].parentNode.parentNode==this.DHTMLSuite_tabObj){divs[no].id='tabTab'+parentId+'_'+tabContentCounter;tabContentCounter++;}}
this.tabView_countTabs=tabContentCounter;},getTabIndexByTitle:function(tabTitle)
{tabTitle=tabTitle.replace(/(.*?)&nbsp.*$/gi,'$1');var divs=this.DHTMLSuite_tabObj.getElementsByTagName('DIV');for(var no=0;no<divs.length;no++){if(divs[no].id.indexOf('tabTab')>=0){var span=divs[no].getElementsByTagName('SPAN')[0];var spanTitle=span.innerHTML.replace(/(.*?)&nbsp.*$/gi,'$1');if(spanTitle==tabTitle){var tmpId=divs[no].id.split('_');return tmpId[tmpId.length-1].replace(/[^0-9]/g,'')/1;}}}
return-1;},getTabTitle:function(){return(this.tabTitles[this.activeTabIndex]);}}
