var __siteadmin_cmsAdminMode=false;var COL_DELIMITER=String.fromCharCode(18);var ROW_DELIMITER=String.fromCharCode(17);var __siteadmin_cmsVars=null;var __siteadmin_cmsPageLoaded=false;window.onload=__siteadmin_cms_Page_OnLoad;

function toggleterm3(){document.getElementById("listterm3").style.display='block';document.getElementById("listterm4").style.display='none';document.getElementById("myterm3").style.display='none';document.getElementById("myterm4").style.display='block';}function toggleterm4(){document.getElementById("listterm4").style.display='block';document.getElementById("listterm3").style.display='none';document.getElementById("myterm4").style.display='none';document.getElementById("myterm3").style.display='block';}function toggleterm1(){document.getElementById("listterm1").style.display='block';document.getElementById("listterm2").style.display='none';document.getElementById("myterm1").style.display='none';document.getElementById("myterm2").style.display='block';}function toggleterm2(){document.getElementById("listterm2").style.display='block';document.getElementById("listterm1").style.display='none';document.getElementById("myterm2").style.display='none';document.getElementById("myterm1").style.display='block';}

function __siteadmin_cms_Page_OnLoad(){var sLoadHandlers=GetVar('__siteadmin_cms_PageLoad');if(sLoadHandlers!=null)eval(sLoadHandlers);if(__siteadmin_cmsAdminMode){document.body.onscroll=RefreshMessages;RefreshMessages();}__siteadmin_cmsPageLoaded=true;}

function SetInitialFocus(sID){var oCtl=GetByID(sID);if(oCtl!=null&&CanReceiveFocus(oCtl))oCtl.focus();}

function CanReceiveFocus(e){if (e.style.display!='none'&&e.tabIndex>-1&&e.disabled==false&&e.style.visible!='hidden'){var eParent=e.parentElement;while (eParent!=null&&eParent.tagName!='BODY'){if(eParent.style.display=='none'||eParent.disabled||eParent.style.visible=='hidden')return false;eParent=eParent.parentElement;}return true;}else	return false;}

function GetVars(){if(__siteadmin_cmsVars==null){__siteadmin_cmsVars=new Array();var oCtl=GetByID('__siteadmin_cms_Vars');if(oCtl!=null){var aryItems=oCtl.value.split(ROW_DELIMITER);for(var i=0;i< aryItems.length;i++){var aryItem=aryItems[i].split(COL_DELIMITER);if(aryItem.length==2)__siteadmin_cmsVars[aryItem[0]]=aryItem[1];}}}return __siteadmin_cmsVars;}

function GetVar(sKey){return GetVars()[sKey];}

function SetVar(sKey,sVal){if(__siteadmin_cmsVars==null)GetVars();__siteadmin_cmsVars[sKey]=sVal;var oCtl=GetByID('__siteadmin_cms_Vars');if(oCtl==null){oCtl=CreateElement('INPUT');oCtl.type='hidden';oCtl.id='__siteadmin_cms_Vars';AppendChild(GetByTagName("body")[0],oCtl);}var sVals='';var sKey;for(sKey in __siteadmin_cmsVars){sVals+=ROW_DELIMITER+sKey+COL_DELIMITER+__siteadmin_cmsVars[sKey];}oCtl.value = sVals;return true;}

function GetByID(sID,oCtl){if(oCtl==null)oCtl=document;if(oCtl.getElementById)return oCtl.getElementById(sID);else return oCtl.all(sID);}function GetByTagName(sTag,oCtl){if(oCtl==null)oCtl=document;if(oCtl.getElementsByTagName)return oCtl.getElementsByTagName(sTag);else if(oCtl.all.tags)return oCtl.all.tags(sTag);else return null;}

function CreateElement(sTagName){if(document.createElement)return document.createElement(sTagName);else return null;}

function AppendChild(oParent,oChild){if(oParent.appendChild)return oParent.appendChild(oChild);else return null;}

function RemoveChild(oChild){if(oChild.parentNode.removeChild)return oChild.parentNode.removeChild(oChild);else return null;}

function SetCookie(sName,sVal,iHours,sPath,sDomain,bSecure){var dExpires;if(iHours){dExpires=new Date();dExpires.setTime(dExpires.getTime()+(iHours*60*60*1000));}document.cookie=sName+'='+escape(sVal)+((dExpires)?';expires='+dExpires.toGMTString():'')+((sPath)?';path='+sPath:'')+((sDomain)?';domain='+sDomain:'')+((bSecure)?';secure':'');if(document.cookie.length>0)return true;}function GetCookie(sName){var sCookie=' '+document.cookie;var sSearch=' '+sName+'=';var sStr=null;var iOffset=0;var iEnd=0;if(sCookie.length>0){iOffset=sCookie.indexOf(sSearch);if(iOffset!=-1){iOffset+=sSearch.length;iEnd=sCookie.indexOf(';',iOffset);if(iEnd==-1)iEnd=sCookie.length;sStr=unescape(sCookie.substring(iOffset,iEnd));}}return sStr;}function DeleteCookie(sName,sPath,sDomain){if(GetCookie(sName)){SetCookie(sName,'',-1,sPath,sDomain);return true;}return false;}

function SectionMaxMin(oBtn,sContentID){var oContent=GetByID(sContentID);if(oContent!=null){var sMaxIcon=oBtn.getAttribute('max_icon');var sMinIcon=oBtn.getAttribute('min_icon');if(oContent.style.display=='none'){oBtn.src=sMinIcon;oContent.style.display='';SetVar(oBtn.id+':exp','true');}else{oBtn.src=sMaxIcon;oContent.style.display='none';SetVar(oBtn.id+':exp','false');}}}