
function getElementByIdEnd(tagName,idEnd){
if(document.getElementsByTagName){
var objlist=document.getElementsByTagName(tagName);
for(var i=0;i<objlist.length;i++){
str=objlist[i].id;
if(str.substr(str.length - idEnd.length).toLowerCase()==idEnd.toLowerCase()){
return objlist[i];}}}else if(document.all){
for(i=0;i<document.all.length;i++){
var str=document.all[i].id;
if(str.substr(str.length - objId.length).toLowerCase()==objId.toLowerCase()){
return document.all[i];}}}else{
return null;}}
var indooCurrentFldId='';
var indooLastFldVal='';
function indooDPickBefore(id){
indooCurrentFldId=id;
indooLastFldVal=new String(__indooGetDat(id));}
function indooDPickAfter(id,org){}
function indoopopcalunload(){}
function indooChkDatPick(fld){
if(indooCurrentFldId!=''){
checkSpan=false;
if(typeof popCalWin.document!='object'){
checkSpan=true;}else{
if(popCalWin.closed==true){
checkSpan=true;}}
if(checkSpan==true){
indooSetSpan()}
indooCurrentFldId='';
indooLastFldVal='';}}
function indooAddfocus(){
if(typeof window.addEventListener!='undefined'){
window.addEventListener('focus',indooChkDatPick,false);}else{
if(typeof window.attachEvent!='undefined'){
window.attachEvent('onfocus',indooChkDatPick,false);}}}
indooAddfocus();
function indooSetSpan(){
dat1S=indooLastFldVal;
dat2S=__indooGetDat(indooCurrentFldId);
dat1=__indooDateNum(dat1S)
dat2=__indooDateNum(dat2S);
el=__indooGetElById(indooCurrentFldId);
if(dat1>-1&&dat2>-1&&el!=null){
if(dat1==dat2){
el.value=dat2S}else{
if(dat1>dat2){
el.value=">="+dat2S+' <='+dat1S}else{
el.value=">="+dat1S+' <='+dat2S}}}}
function __indooGetDat(id){
el=__indooGetElById(id)
if(el!=null){
if(el.value!=null&&el.value!=''&&el.value!='undefined'){
return el.value;}}
return null}
function __indooGetElById(id){
if(document.getElementById){
if(document.getElementById(id)){
return document.getElementById(id);}}
return null;}
function __indooDateNum(str){
if(str!=null){
parts=str.split(__indooDatSep);
if(parts.length==3){
d=-1;m=-1;y=parts[2];
if(__indooIsMonFirst==0){
d=parts[0];
m=parts[1];}else{
d=parts[1];
m=parts[0];}
d=__indooFix2(d);
m=__indooFix2(m)
n=y+m+d
if(isNaN(n)==false&&d.length==2&&m.length==2){
return parseInt(n)}}}
return -1}
function __indooFix2(str){
if(str.length==1){
return'0'+str;}else{
return str;}}
function indooUrlParameter(url,name,newValue){
var regex=new RegExp("[\\?&]"+name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]")+"=([^&#]*)","i");
var results=regex.exec(url);
if(newValue==null){
return results==null?"":results[1]}else{
if(results==null){
return url +(url.lastIndexOf('?')<0?'?':'&')+ name +'='+ newValue;}else{
return url.replace(results[0],results[0].substring(0,1)+ name +'='+ newValue);}}}
function Get_Cookie(check_name){
var a_all_cookies=document.cookie.split(';');
var a_temp_cookie='';
var cookie_name='';
var cookie_value='';
var b_cookie_found=false;
for(i=0;i<a_all_cookies.length;i++)
{
a_temp_cookie=a_all_cookies[i].split('=');
cookie_name=a_temp_cookie[0].replace(/^\s+|\s+$/g,'');
if(cookie_name==check_name)
{
b_cookie_found=true;
if(a_temp_cookie.length>1)
{
cookie_value=unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,''));}
return cookie_value;
break;}
a_temp_cookie=null;
cookie_name='';}
if(!b_cookie_found)
{
return null;}}
function Set_Cookie(name,value,expires,path,domain,secure){
var today=new Date();
today.setTime(today.getTime());
if(expires)
{
expires=expires*1000*60*60*24;}
var expires_date=new Date(today.getTime()+(expires));
document.cookie=name +"="+escape(value)+
((expires)?";expires="+ expires_date.toGMTString():"")+
((path)?";path="+ path:"")+
((domain)?";domain="+ domain:"")+
((secure)?";secure":"");}
function Delete_Cookie(name,path,domain){
if(Get_Cookie(name))document.cookie=name +"="+
((path)?";path="+ path:"")+
((domain)?";domain="+ domain:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";}
var DNN_COL_DELIMITER=String.fromCharCode(16);
var DNN_ROW_DELIMITER=String.fromCharCode(15);
var __dnn_m_bPageLoaded=false;
window.onload=__dnn_Page_OnLoad;
function __dnn_ClientAPIEnabled()
{
return typeof(dnn)!='undefined';}
function __dnn_Page_OnLoad()
{
if(__dnn_ClientAPIEnabled())
{
var sLoadHandlers=dnn.getVar('__dnn_pageload');
if(sLoadHandlers!=null)
eval(sLoadHandlers);
dnn.dom.attachEvent(window,'onscroll',__dnn_bodyscroll);}
__dnn_m_bPageLoaded=true;}
function __dnn_KeyDown(iKeyCode,sFunc,e)
{
if(e==null)
e=window.event;
if(e.keyCode==iKeyCode)
{
eval(unescape(sFunc));
return false;}}
function __dnn_bodyscroll()
{
var oF=document.forms[0];
if(__dnn_ClientAPIEnabled()&&__dnn_m_bPageLoaded)
oF.ScrollTop.value=document.documentElement.scrollTop?document.documentElement.scrollTop:dnn.dom.getByTagName("body")[0].scrollTop;}
function __dnn_setScrollTop(iTop)
{
if(__dnn_ClientAPIEnabled())
{
if(iTop==null)
iTop=document.forms[0].ScrollTop.value;
var sID=dnn.getVar('ScrollToControl');
if(sID!=null&&sID.length>0)
{
var oCtl=dnn.dom.getById(sID);
if(oCtl!=null)
{
iTop=dnn.dom.positioning.elementTop(oCtl);
dnn.setVar('ScrollToControl','');}}
window.scrollTo(0,iTop);}}
function __dnn_SetInitialFocus(sID)
{
var oCtl=dnn.dom.getById(sID);
if(oCtl!=null&&__dnn_CanReceiveFocus(oCtl))
oCtl.focus();}
function __dnn_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 __dnn_ContainerMaxMin_OnClick(oLnk,sContentID)
{
var oContent=dnn.dom.getById(sContentID);
if(oContent!=null)
{
var oBtn=oLnk.childNodes[0];
var sContainerID=dnn.getVar('containerid_'+ sContentID);
var sCookieID=dnn.getVar('cookieid_'+ sContentID);
var sCurrentFile=oBtn.src.toLowerCase().substr(oBtn.src.lastIndexOf('/'));
var sMaxFile;
var sMaxIcon;
var sMinIcon;
if(dnn.getVar('min_icon_'+ sContainerID))
sMinIcon=dnn.getVar('min_icon_'+ sContainerID);
else
sMinIcon=dnn.getVar('min_icon');
if(dnn.getVar('max_icon_'+ sContainerID))
sMaxIcon=dnn.getVar('max_icon_'+ sContainerID);
else
sMaxIcon=dnn.getVar('max_icon');
sMaxFile=sMaxIcon.toLowerCase().substr(sMaxIcon.lastIndexOf('/'));
var iNum=5;
var animf=dnn.getVar('animf_'+ sContentID);
if(animf!=null)
iNum=new Number(animf);
if(sCurrentFile==sMaxFile)
{
oBtn.src=sMinIcon;
dnn.dom.expandElement(oContent,iNum);
oBtn.title=dnn.getVar('min_text');
if(sCookieID!=null)
{
if(dnn.getVar('__dnn_'+ sContainerID +':defminimized')=='true')
dnn.dom.setCookie(sCookieID,'true',365);
else
dnn.dom.deleteCookie(sCookieID);}
else
dnn.setVar('__dnn_'+ sContainerID +'_Visible','true');}
else
{
oBtn.src=sMaxIcon;
dnn.dom.collapseElement(oContent,iNum);
oBtn.title=dnn.getVar('max_text');
if(sCookieID!=null)
{
if(dnn.getVar('__dnn_'+ sContainerID +':defminimized')=='true')
dnn.dom.deleteCookie(sCookieID);
else
dnn.dom.setCookie(sCookieID,'false',365);}
else
dnn.setVar('__dnn_'+ sContainerID +'_Visible','false');}
return true;}
return false;}
function __dnn_Help_OnClick(sHelpID)
{
var oHelp=dnn.dom.getById(sHelpID);
if(oHelp!=null)
{
if(oHelp.style.display=='none')
oHelp.style.display='';
else
oHelp.style.display='none';
return true;}
return false;}
function __dnn_SectionMaxMin(oBtn,sContentID)
{
var oContent=dnn.dom.getById(sContentID);
if(oContent!=null)
{
var sMaxIcon=oBtn.getAttribute('max_icon');
var sMinIcon=oBtn.getAttribute('min_icon');
var bCallback=oBtn.getAttribute('userctr')!=null;
var sVal;
if(oContent.style.display=='none')
{
oBtn.src=sMinIcon;
oContent.style.display='';
if(bCallback)
sVal='True';
else
dnn.setVar(oBtn.id +':exp',1);}
else
{
oBtn.src=sMaxIcon;
oContent.style.display='none';
if(bCallback)
sVal='False';
else
dnn.setVar(oBtn.id +':exp',0);}
if(bCallback)
dnncore.setUserProp(oBtn.getAttribute('userctr'),oBtn.getAttribute('userkey'),sVal,null);
return true;}
return false;}
function __dnn_enableDragDrop()
{
var aryConts=dnn.getVar('__dnn_dragDrop').split(";");
var aryTitles;
for(var i=0;i<aryConts.length;i++)
{
aryTitles=aryConts[i].split(" ");
if(aryTitles[0].length>0)
{
var oCtr=dnn.dom.getById(aryTitles[0]);
var oTitle=dnn.dom.getById(aryTitles[1]);
if(oCtr!=null&&oTitle!=null)
{
oCtr.setAttribute('moduleid',aryTitles[2]);
dnn.dom.positioning.enableDragAndDrop(oCtr,oTitle,'__dnn_dragComplete()','__dnn_dragOver()');}}}}
var __dnn_oPrevSelPane;
var __dnn_oPrevSelModule;
var __dnn_dragEventCount=0;
function __dnn_dragOver()
{
__dnn_dragEventCount++;
if(__dnn_dragEventCount%75!=0)
return;
var oCont=dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);
var oPane=__dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);
if(__dnn_oPrevSelPane!=null)
__dnn_oPrevSelPane.pane.style.border=__dnn_oPrevSelPane.origBorder;
if(oPane!=null)
{
__dnn_oPrevSelPane=oPane;
oPane.pane.style.border='4px double '+ DNN_HIGHLIGHT_COLOR;
var iIndex=__dnn_getPaneControlIndex(oCont,oPane);
var oPrevCtl;
var oNextCtl;
for(var i=0;i<oPane.controls.length;i++)
{
if(iIndex>i&&oPane.controls[i].id!=oCont.id)
oPrevCtl=oPane.controls[i];
if(iIndex<=i&&oPane.controls[i].id!=oCont.id)
{
oNextCtl=oPane.controls[i];
break;}}
if(__dnn_oPrevSelModule!=null)
dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border=__dnn_oPrevSelModule.origBorder;
if(oNextCtl!=null)
{
__dnn_oPrevSelModule=oNextCtl;
dnn.dom.getNonTextNode(oNextCtl.control).style.borderTop='5px groove '+ DNN_HIGHLIGHT_COLOR;}
else if(oPrevCtl!=null)
{
__dnn_oPrevSelModule=oPrevCtl;
dnn.dom.getNonTextNode(oPrevCtl.control).style.borderBottom='5px groove '+ DNN_HIGHLIGHT_COLOR;}}}
function __dnn_dragComplete()
{
var oCtl=dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);
var sModuleID=oCtl.getAttribute('moduleid');
if(__dnn_oPrevSelPane!=null)
__dnn_oPrevSelPane.pane.style.border=__dnn_oPrevSelPane.origBorder;
if(__dnn_oPrevSelModule!=null)
dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border=__dnn_oPrevSelModule.origBorder;
var oPane=__dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);
var iIndex;
if(oPane==null)
{
var oPanes=__dnn_Panes();
for(var i=0;i<oPanes.length;i++)
{
if(oPanes[i].id==oCtl.parentNode.id)
oPane=oPanes[i];}}
if(oPane!=null)
{
iIndex=__dnn_getPaneControlIndex(oCtl,oPane);
__dnn_MoveToPane(oPane,oCtl,iIndex);
dnn.callPostBack('MoveToPane','moduleid='+ sModuleID,'pane='+ oPane.paneName,'order='+ iIndex*2);}}
function __dnn_MoveToPane(oPane,oCtl,iIndex)
{
if(oPane!=null)
{
var aryCtls=new Array();
for(var i=iIndex;i<oPane.controls.length;i++)
{
if(oPane.controls[i].control.id!=oCtl.id)
aryCtls[aryCtls.length]=oPane.controls[i].control;
dnn.dom.removeChild(oPane.controls[i].control);}
dnn.dom.appendChild(oPane.pane,oCtl);
oCtl.style.top=0;
oCtl.style.left=0;
oCtl.style.position='relative';
for(var i=0;i<aryCtls.length;i++)
{
dnn.dom.appendChild(oPane.pane,aryCtls[i]);}
__dnn_RefreshPanes();}
else
{
oCtl.style.top=0;
oCtl.style.left=0;
oCtl.style.position='relative';}}
function __dnn_RefreshPanes()
{
var aryPanes=dnn.getVar('__dnn_Panes').split(';');
var aryPaneNames=dnn.getVar('__dnn_PaneNames').split(';');
__dnn_m_aryPanes=new Array();
for(var i=0;i<aryPanes.length;i++)
{
if(aryPanes[i].length>0)
__dnn_m_aryPanes[__dnn_m_aryPanes.length]=new __dnn_Pane(dnn.dom.getById(aryPanes[i]),aryPaneNames[i]);}}
var __dnn_m_aryPanes;
var __dnn_m_aryModules;
function __dnn_Panes()
{
if(__dnn_m_aryPanes==null)
{
__dnn_m_aryPanes=new Array();
__dnn_RefreshPanes();}
return __dnn_m_aryPanes;}
function __dnn_Modules(sModuleID)
{
if(__dnn_m_aryModules==null)
__dnn_RefreshPanes();
return __dnn_m_aryModules[sModuleID];}
function __dnn_getMostSelectedPane(oContent)
{
var oCDims=new dnn.dom.positioning.dims(oContent);
var iTopScore=0;
var iScore;
var oTopPane;
for(var i=0;i<__dnn_Panes().length;i++)
{
var oPane=__dnn_Panes()[i];
var oPDims=new dnn.dom.positioning.dims(oPane.pane);
iScore=dnn.dom.positioning.elementOverlapScore(oPDims,oCDims);
if(iScore>iTopScore)
{
iTopScore=iScore;
oTopPane=oPane;}}
return oTopPane;}
function __dnn_getPaneControlIndex(oContent,oPane)
{
if(oPane==null)
return;
var oCDims=new dnn.dom.positioning.dims(oContent);
var oCtl;
if(oPane.controls.length==0)
return 0;
for(var i=0;i<oPane.controls.length;i++)
{
oCtl=oPane.controls[i];
var oIDims=new dnn.dom.positioning.dims(oCtl.control);
if(oCDims.t<oIDims.t)
return oCtl.index;}
if(oCtl!=null)
return oCtl.index+1;
else
return 0;}
function __dnn_Pane(ctl,sPaneName)
{
this.pane=ctl;
this.id=ctl.id;
this.controls=new Array();
this.origBorder=ctl.style.border;
this.paneName=sPaneName;
var iIndex=0;
var strModuleOrder='';
for(var i=0;i<ctl.childNodes.length;i++)
{
var oNode=ctl.childNodes[i];
if(dnn.dom.isNonTextNode(oNode))
{
if(__dnn_m_aryModules==null)
__dnn_m_aryModules=new Array();
var sModuleID=oNode.getAttribute('moduleid');
if(sModuleID!=null&&sModuleID.length>0)
{
strModuleOrder +=sModuleID +'~';
this.controls[this.controls.length]=new __dnn_PaneControl(oNode,iIndex);
__dnn_m_aryModules[sModuleID]=oNode.id;
iIndex+=1;}}}
this.moduleOrder=strModuleOrder;}
function __dnn_PaneControl(ctl,iIndex)
{
this.control=ctl;
this.id=ctl.id;
this.index=iIndex;
this.origBorder=ctl.style.border;}
function __dnncore()
{
this.GetUserVal=0;
this.SetUserVal=1;}
__dnncore.prototype={
getUserProp:function(sNameCtr,sKey,pFunc){
this._doUserCallBack(dnncore.GetUserVal,sNameCtr,sKey,null,new dnncore.UserPropArgs(sNameCtr,sKey,pFunc));},
setUserProp:function(sNameCtr,sKey,sVal,pFunc){
this._doUserCallBack(dnncore.SetUserVal,sNameCtr,sKey,sVal,new dnncore.UserPropArgs(sNameCtr,sKey,pFunc));},
_doUserCallBack:function(iType,sNameCtr,sKey,sVal,pFunc){
if(dnn&&dnn.xmlhttp)
{
var sPack=iType + COL_DELIMITER + sNameCtr + COL_DELIMITER + sKey + COL_DELIMITER + sVal;
dnn.xmlhttp.doCallBack('__Page',sPack,dnncore._callBackSuccess,pFunc,dnncore._callBackFail,null,true,null,0);}
else
alert('Client Personalization not enabled');},
_callBackSuccess:function(result,ctx,req){
if(ctx.pFunc)
ctx.pFunc(ctx.namingCtr,ctx.key,result);},
_callBackFail:function(result,ctx){
window.status=result;}}
__dnncore.prototype.UserPropArgs=function(sNameCtr,sKey,pFunc)
{
this.namingCtr=sNameCtr;
this.key=sKey;
this.pFunc=pFunc;}
var dnncore=new __dnncore();