
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=oLnk.getAttribute('containerid');
var sCookieID=oLnk.getAttribute('cookieid');
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;
if(oLnk.getAttribute('animf')!=null)
iNum=new Number(oLnk.getAttribute('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();
var popCalDstFld;
var temp;
var popCalWin;
function popupCal()
{
var tmpDate=new Date();
var tmpString="";
var tmpNum=0;
var popCalDateVal;
var dstWindowName="";
popCalWin=new Object();
if(arguments.length<2)
{
alert("popupCal(): Wrong number of arguments.");
return void(0);}
dstWindowName=popupCal.arguments[0];
popCalDstFld=popupCal.arguments[1];
temp=popupCal.arguments[1];
popCalDstFmt=popupCal.arguments[2];
popCalMonths=popupCal.arguments[3];
popCalDays=popupCal.arguments[4];
popCalToday=popupCal.arguments[5];
popCalClose=popupCal.arguments[6];
popCalTitle=popupCal.arguments[7];
popCalFirstDayWeek=popupCal.arguments[8];
if(popCalDstFld!="")
popCalDstFld=document.getElementById(popCalDstFld);
if(popCalDstFmt=="")
popCalDstFmt="m/d/yyyy";
if(popCalMonths=="")
popCalMonths="January,February,March,April,May,June,July,August,September,October,November,December";
if(popCalDays=="")
popCalDays="Sun,Mon,Tue,Wed,Thu,Fri,Sat";
if(popCalToday==""||typeof popCalToday=="undefined")
popCalToday="Today";
if(popCalClose==""||typeof popCalClose=="undefined")
popCalClose="Close";
if(popCalTitle==""||typeof popCalTitle=="undefined")
popCalTitle="Calendar";
tmpString=new String(popCalDstFld.value);
if(tmpString=="")
popCalDateVal=new Date()
else
{
tmpNum=tmpString.lastIndexOf("/");
if((tmpString.length - tmpNum)==3)
{
tmpString=tmpString.substring(0,tmpNum + 1)+"20"+tmpString.substr(tmpNum+1);
popCalDateVal=new Date(tmpString);}
else
{
popCalDateVal=getDateFromFormat(tmpString,popCalDstFmt);}}
if(popCalDateVal.toString()=="NaN"||popCalDateVal.toString()=="0")
{
popCalDateVal=new Date();
popCalDstFld.value="";}
var dateString=String(popCalDateVal.getMonth()+1)+"/"+ String(popCalDateVal.getDate())+"/"+ String(popCalDateVal.getFullYear());
reloadCalPopup(dateString,dstWindowName);
return void(0);}
function closeCalPopup()
{
popCalWin.close();
return void(0);}
function reloadCalPopup()
{
var windowFeatures="toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, height=270, width=270, top="+((screen.height - 270)/2).toString()+",left="+((screen.width - 270)/2).toString();
var tmpDate=new Date(reloadCalPopup.arguments[0]);
if(tmpDate.toString()=="Invalid Date")
tmpDate=new Date();
tmpDate.setDate(1);
var popCalData=calPopupSetData(tmpDate,reloadCalPopup.arguments[1]);
if(popCalWin.toString()=="[object Object]")
{
popCalWin=window.open("",reloadCalPopup.arguments[1],windowFeatures);
popCalWin.opener=self;
popCalWin.focus();}
else
{
popCalWin.document.close();
popCalWin.document.clear();}
popCalWin.document.write(popCalData);
return void(1);}
function calPopupSetData(firstDay,dstWindowName)
{
var popCalData="";
var lastDate=0;
var fnt=new Array("<FONT SIZE=\"1\">","<B><FONT SIZE=\"2\">","<FONT SIZE=\"2\" COLOR=\"#EF741D\"><B>");
var dtToday=new Date();
var thisMonth=firstDay.getMonth();
var thisYear=firstDay.getFullYear();
var nPrevMonth=(thisMonth==0)?11:(thisMonth - 1);
var nNextMonth=(thisMonth==11)?0:(thisMonth + 1);
var nPrevMonthYear=(nPrevMonth==11)?(thisYear - 1):thisYear;
var nNextMonthYear=(nNextMonth==0)?(thisYear + 1):thisYear;
var sToday=String((dtToday.getMonth()+1)+"/01/"+ dtToday.getFullYear());
var sPrevMonth=String((nPrevMonth+1)+"/01/"+ nPrevMonthYear);
var sNextMonth=String((nNextMonth+1)+"/01/"+ nNextMonthYear);
var sPrevYear1=String((thisMonth+1)+"/01/"+(thisYear - 1));
var sNextYear1=String((thisMonth+1)+"/01/"+(thisYear + 1));
var tmpDate=new Date(sNextMonth);
tmpDate=new Date(tmpDate.valueOf()- 1001);
lastDate=tmpDate.getDate();
if(this.popCalMonths.split)
{
var monthNames=this.popCalMonths.split(",");
var dayNames=this.popCalDays.split(",");}
else
{
var monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var dayNames=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")}
var styles="<style><!-- body{font-family:Arial,Helvetica,sans-serif;font-size:9pt}; td {  font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #666666}; A { text-decoration: none; };TD.day { border-bottom: solid black; border-width: 0px; }--></style>"
var cellAttribs="align=\"center\" class=\"day\" BGCOLOR=\"#F1F1F1\"onMouseOver=\"temp=this.style.backgroundColor;this.style.backgroundColor='#CCCCCC';\" onMouseOut=\"this.style.backgroundColor=temp;\""
var cellAttribs2="align=\"center\" BGCOLOR=\"#F1F1F1\" onMouseOver=\"temp=this.style.backgroundColor;this.style.backgroundColor='#CCCCCC';\" onMouseOut=\"this.style.backgroundColor=temp;\""
var htmlHead="<HTML><HEAD><TITLE>"+popCalTitle+"</TITLE>"+ styles +"</HEAD><BODY BGCOLOR=\"#F1F1F1\" TEXT=\"#000000\" LINK=\"#364180\" ALINK=\"#FF8100\" VLINK=\"#424282\">";
var htmlTail="</BODY></HTML>";
var closeAnchor="<CENTER><input type=button value=\""+popCalClose+"\" onClick=\"javascript:window.opener.closeCalPopup()\"></CENTER>";
var todayAnchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sToday+"','"+dstWindowName+"');\">"+popCalToday+"</A>";
var prevMonthAnchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sPrevMonth+"','"+dstWindowName+"');\">"+ monthNames[nPrevMonth]+"</A>";
var nextMonthAnchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sNextMonth+"','"+dstWindowName+"');\">"+ monthNames[nNextMonth]+"</A>";
var prevYear1Anchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sPrevYear1+"','"+dstWindowName+"');\">"+(thisYear-1)+"</A>";
var nextYear1Anchor="<A HREF=\"javascript:window.opener.reloadCalPopup('"+sNextYear1+"','"+dstWindowName+"');\">"+(thisYear+1)+"</A>";
popCalData +=(htmlHead + fnt[1]);
popCalData +=("<DIV align=\"center\">");
popCalData +=("<TABLE BORDER=\"0\" cellspacing=\"0\" callpadding=\"0\" width=\"250\"><TR><TD width=\"45\">&nbsp</TD>");
popCalData +=("<TD width=\"45\" align=\"center\" "+ cellAttribs2);
popCalData +=(" >");
popCalData +=(fnt[0]+prevYear1Anchor+"</FONT></TD>");
popCalData +=("<TD width=\"70\" align=\"center\" "+cellAttribs2);
popCalData +=(" >");
popCalData +=(fnt[0]+todayAnchor+"</FONT></TD>");
popCalData +=("<TD width=\"45\" align=\"center\" "+cellAttribs2);
popCalData +=(" >");
popCalData +=(fnt[0]+nextYear1Anchor+"</FONT></TD><TD width=\"45\">&nbsp</TD>");
popCalData +=("</TR></TABLE>");
popCalData +=("<TABLE BORDER=\"0\" cellspacing=\"0\" callpadding=\"0\" width=\"250\">");
popCalData +=("<TR><TD width=\"55\" align=\"center\" "+cellAttribs2);
popCalData +=(" >");
popCalData +=(fnt[0]+ prevMonthAnchor +"</FONT></TD>");
popCalData +=("<TD width=\"140\" align=\"center\">");
popCalData +=("&nbsp;&nbsp;"+fnt[1]+"<FONT COLOR=\"#000000\">"+ monthNames[thisMonth]+", "+ thisYear +"&nbsp;&nbsp;</FONT></TD>");
popCalData +=("<TD width=\"55\" align=\"center\" "+cellAttribs2);
popCalData +=(" >");
popCalData +=(fnt[0]+nextMonthAnchor+"</FONT></TD></TR></TABLE><BR>");
popCalData +=("<TABLE BORDER=\"0\" cellspacing=\"2\" cellpadding=\"1\"  width=\"245\">");
popCalData +=("");
popCalData +=("<TR>");
var xday=0;
for(xday=0;xday<7;xday++)
{
popCalData +=("<TD width=\"35\" align=\"center\">"+fnt[1]+"<FONT COLOR=\"#000000\">"+dayNames[(xday+popCalFirstDayWeek)%7]+"</FONT></TD>");};
popCalData +=("</TR>");
var calDay=0;
var monthDate=1;
var weekDay=firstDay.getDay();
do
{
popCalData +=("<TR>");
for(calDay=0;calDay<7;calDay++)
{
if(((weekDay+7-popCalFirstDayWeek)%7!=calDay)||(monthDate>lastDate))
{
popCalData +=("<TD width=\"35\">"+fnt[1]+"&nbsp;</FONT></TD>");
continue;}
else
{
anchorVal="<A HREF=\"javascript:window.opener.calPopupSetDate(window.opener.popCalDstFld,'"+ constructDate(monthDate,thisMonth+1,thisYear)+"');window.opener.closeCalPopup()\">";
jsVal="javascript:window.opener.calPopupSetDate(window.opener.popCalDstFld,'"+ constructDate(monthDate,thisMonth+1,thisYear)+"');window.opener.closeCalPopup()";
popCalData +=("<TD width=\"35\" "+cellAttribs+" onClick=\""+jsVal+"\">");
if((firstDay.getMonth()==dtToday.getMonth())&&(monthDate==dtToday.getDate())&&(thisYear==dtToday.getFullYear()))
popCalData +=(anchorVal+fnt[2]+monthDate+"</A></FONT></TD>");
else
popCalData +=(anchorVal+fnt[1]+monthDate+"</A></FONT></TD>");
weekDay++;
monthDate++;}}
weekDay=popCalFirstDayWeek;
popCalData +=("</TR>");}while(monthDate<=lastDate);
popCalData +=("</TABLE></DIV><BR>");
popCalData +=(closeAnchor+"</FONT>"+htmlTail);
return(popCalData);}
function calPopupSetDate()
{
calPopupSetDate.arguments[0].value=calPopupSetDate.arguments[1];}
function padZero(num)
{
return((num<=9)?("0"+ num):num);}
function constructDate(d,m,y)
{
var fmtDate=this.popCalDstFmt
fmtDate=fmtDate.replace('dd',padZero(d))
fmtDate=fmtDate.replace('d',d)
fmtDate=fmtDate.replace('MM',padZero(m))
fmtDate=fmtDate.replace('M',m)
fmtDate=fmtDate.replace('yyyy',y)
fmtDate=fmtDate.replace('yy',padZero(y%100))
return fmtDate;}
function _isInteger(val){
var digits="1234567890";
for(var i=0;i<val.length;i++){
if(digits.indexOf(val.charAt(i))==-1){return false;}}
return true;}
function _getInt(str,i,minlength,maxlength){
for(var x=maxlength;x>=minlength;x--){
var token=str.substring(i,i+x);
if(token.length<minlength){return null;}
if(_isInteger(token)){return token;}}
return null;}
function getDateFromFormat(val,format){
val=val+"";
format=format+"";
var i_val=0;
var i_format=0;
var c="";
var token="";
var x,y;
var now=new Date();
var year=now.getYear();
var month=now.getMonth()+1;
var date=1;
while(i_format<format.length){
c=format.charAt(i_format);
token="";
while((format.charAt(i_format)==c)&&(i_format<format.length)){
token +=format.charAt(i_format++);}
if(token=="yyyy"||token=="yy"||token=="y"){
if(token=="yyyy"){x=4;y=4;}
if(token=="yy"){x=2;y=2;}
if(token=="y"){x=2;y=4;}
year=_getInt(val,i_val,x,y);
if(year==null){return 0;}
i_val +=year.length;
if(year.length==2){
if(year>70){year=1900+(year-0);}
else{year=2000+(year-0);}}}
else if(token=="MM"||token=="M"){
month=_getInt(val,i_val,token.length,2);
if(month==null||(month<1)||(month>12)){return 0;}
i_val+=month.length;}
else if(token=="dd"||token=="d"){
date=_getInt(val,i_val,token.length,2);
if(date==null||(date<1)||(date>31)){return 0;}
i_val+=date.length;}
else{
if(val.substring(i_val,i_val+token.length)!=token){return 0;}
else{i_val+=token.length;}}}
if(i_val!=val.length){return 0;}
if(month==2){
if(((year%4==0)&&(year%100!=0))||(year%400==0)){
if(date>29){return 0;}}
else{if(date>28){return 0;}}}
if((month==4)||(month==6)||(month==9)||(month==11)){
if(date>30){return 0;}}
var newdate=new Date(year,month-1,date);
return newdate;}
function Node(id,pid,name,url,title,target,icon,iconOpen,open){
this.id=id;
this.pid=pid;
this.name=name;
this.url=url;
this.title=title;
this.target=target;
this.icon=icon;
this.iconOpen=iconOpen;
this._io=open||false;
this._is=false;
this._ls=false;
this._hc=false;
this._ai=0;
this._p;};
function dTree(objName){
this.config={
target:null,
folderLinks:true,
useSelection:true,
useCookies:true,
useLines:true,
useIcons:true,
useStatusText:false,
closeSameLevel:false,
inOrder:false}
this.icon={
root:'CATALooK_base.gif',
folder:'CATALooK_folder.gif',
folderOpen:'CATALooK_folderopen.gif',
node:'CATALooK_page.gif',
empty:'CATALooK_empty.gif',
line:'CATALooK_line.gif',
join:'CATALooK_join.gif',
joinBottom:'CATALooK_joinbottom.gif',
plus:'CATALooK_plus.gif',
plusBottom:'CATALooK_plusbottom.gif',
minus:'CATALooK_minus.gif',
minusBottom:'CATALooK_minusbottom.gif',
nlPlus:'CATALooK_nolines_plus.gif',
nlMinus:'CATALooK_nolines_minus.gif'};
this.obj=objName;
this.aNodes=[];
this.aIndent=[];
this.root=new Node(-1);
this.selectedNode=null;
this.selectedFound=false;
this.completed=false;};
dTree.prototype.add=function(id,pid,name,url,title,target,icon,iconOpen,open){
this.aNodes[this.aNodes.length]=new Node(id,pid,name,url,title,target,icon,iconOpen,open);};
dTree.prototype.openAll=function(){
this.oAll(true);};
dTree.prototype.closeAll=function(){
this.oAll(false);};
dTree.prototype.toString=function(){
var str='<div class="dtree">\n';
if(document.getElementById){
if(this.config.useCookies)this.selectedNode=this.getSelected();
str +=this.addNode(this.root);}else str +='Browser not supported.';
str +='</div>';
if(!this.selectedFound)this.selectedNode=null;
this.completed=true;
return str;};
dTree.prototype.addNode=function(pNode){
var str='';
var n=0;
if(this.config.inOrder)n=pNode._ai;
for(n;n<this.aNodes.length;n++){
if(this.aNodes[n].pid==pNode.id){
var cn=this.aNodes[n];
cn._p=pNode;
cn._ai=n;
this.setCS(cn);
if(!cn.target&&this.config.target)cn.target=this.config.target;
if(cn._hc&&!cn._io&&this.config.useCookies)cn._io=this.isOpen(cn.id);
if(!this.config.folderLinks&&cn._hc)cn.url=null;
if(this.config.useSelection&&cn.id==this.selectedNode&&!this.selectedFound){
cn._is=true;
this.selectedNode=n;
this.selectedFound=true;}
str +=this.node(cn,n);
if(cn._ls)break;}}
return str;};
dTree.prototype.node=function(node,nodeId){
var str='<div class="dTreeNode">'+ this.indent(node,nodeId);
if(this.config.useIcons){
if(!node.icon)node.icon=(this.root.id==node.pid)?this.icon.root:((node._hc)?this.icon.folder:this.icon.node);
if(!node.iconOpen)node.iconOpen=(node._hc)?this.icon.folderOpen:this.icon.node;
if(this.root.id==node.pid){
node.icon=this.icon.root;
node.iconOpen=this.icon.root;}
str +='<img id="i'+ this.obj + nodeId +'" src="'+((node._io)?node.iconOpen:node.icon)+'" alt="" />';}
if(node.url){
str +='<a id="s'+ this.obj + nodeId +'" class="'+((this.config.useSelection)?((node._is?'nodeSel':'node')):'node')+'" href="'+ node.url +'"';
if(node.title)str +=' title="'+ node.title +'"';
if(node.target)str +=' target="'+ node.target +'"';
if(this.config.useStatusText)str +=' onmouseover="window.status=\''+ node.name +'\';return true;" onmouseout="window.status=\'\';return true;" ';
if(this.config.useSelection&&((node._hc&&this.config.folderLinks)||!node._hc))
str +=' onclick="javascript: '+ this.obj +'.s('+ nodeId +');"';
str +='>';}
else if((!this.config.folderLinks||!node.url)&&node._hc&&node.pid!=this.root.id)
str +='<a href="javascript: '+ this.obj +'.o('+ nodeId +');" class="node">';
str +=node.name;
if(node.url||((!this.config.folderLinks||!node.url)&&node._hc))str +='</a>';
str +='</div>';
if(node._hc){
str +='<div id="d'+ this.obj + nodeId +'" class="clip" style="display:'+((this.root.id==node.pid||node._io)?'block':'none')+';">';
str +=this.addNode(node);
str +='</div>';}
this.aIndent.pop();
return str;};
dTree.prototype.indent=function(node,nodeId){
var str='';
if(this.root.id!=node.pid){
for(var n=0;n<this.aIndent.length;n++)
str +='<img src="'+((this.aIndent[n]==1&&this.config.useLines)?this.icon.line:this.icon.empty)+'" alt="" />';
(node._ls)?this.aIndent.push(0):this.aIndent.push(1);
if(node._hc){
str +='<a href="javascript: '+ this.obj +'.o('+ nodeId +');"><img id="j'+ this.obj + nodeId +'" src="';
if(!this.config.useLines)str +=(node._io)?this.icon.nlMinus:this.icon.nlPlus;
else str +=((node._io)?((node._ls&&this.config.useLines)?this.icon.minusBottom:this.icon.minus):((node._ls&&this.config.useLines)?this.icon.plusBottom:this.icon.plus));
str +='" alt="" /></a>';}else str +='<img src="'+((this.config.useLines)?((node._ls)?this.icon.joinBottom:this.icon.join):this.icon.empty)+'" alt="" />';}
return str;};
dTree.prototype.setCS=function(node){
var lastId;
for(var n=0;n<this.aNodes.length;n++){
if(this.aNodes[n].pid==node.id)node._hc=true;
if(this.aNodes[n].pid==node.pid)lastId=this.aNodes[n].id;}
if(lastId==node.id)node._ls=true;};
dTree.prototype.getSelected=function(){
var sn=this.getCookie('cs'+ this.obj);
return(sn)?sn:null;};
dTree.prototype.s=function(id){
if(!this.config.useSelection)return;
var cn=this.aNodes[id];
if(cn._hc&&!this.config.folderLinks)return;
if(this.selectedNode!=id){
if(this.selectedNode||this.selectedNode==0){
eOld=document.getElementById("s"+ this.obj + this.selectedNode);
eOld.className="node";}
eNew=document.getElementById("s"+ this.obj + id);
eNew.className="nodeSel";
this.selectedNode=id;
if(this.config.useCookies)this.setCookie('cs'+ this.obj,cn.id);}};
dTree.prototype.o=function(id){
var cn=this.aNodes[id];
this.nodeStatus(!cn._io,id,cn._ls);
cn._io=!cn._io;
if(this.config.closeSameLevel)this.closeLevel(cn);
if(this.config.useCookies)this.updateCookie();};
dTree.prototype.oAll=function(status){
for(var n=0;n<this.aNodes.length;n++){
if(this.aNodes[n]._hc&&this.aNodes[n].pid!=this.root.id){
this.nodeStatus(status,n,this.aNodes[n]._ls)
this.aNodes[n]._io=status;}}
if(this.config.useCookies)this.updateCookie();};
dTree.prototype.openTo=function(nId,bSelect,bFirst){
if(!bFirst){
for(var n=0;n<this.aNodes.length;n++){
if(this.aNodes[n].id==nId){
nId=n;
break;}}}
var cn=this.aNodes[nId];
if(cn.pid==this.root.id||!cn._p)return;
cn._io=true;
cn._is=bSelect;
if(this.completed&&cn._hc)this.nodeStatus(true,cn._ai,cn._ls);
if(this.completed&&bSelect)this.s(cn._ai);
else if(bSelect)this._sn=cn._ai;
this.openTo(cn._p._ai,false,true);};
dTree.prototype.closeLevel=function(node){
for(var n=0;n<this.aNodes.length;n++){
if(this.aNodes[n].pid==node.pid&&this.aNodes[n].id!=node.id&&this.aNodes[n]._hc){
this.nodeStatus(false,n,this.aNodes[n]._ls);
this.aNodes[n]._io=false;
this.closeAllChildren(this.aNodes[n]);}}}
dTree.prototype.closeAllChildren=function(node){
for(var n=0;n<this.aNodes.length;n++){
if(this.aNodes[n].pid==node.id&&this.aNodes[n]._hc){
if(this.aNodes[n]._io)this.nodeStatus(false,n,this.aNodes[n]._ls);
this.aNodes[n]._io=false;
this.closeAllChildren(this.aNodes[n]);}}}
dTree.prototype.nodeStatus=function(status,id,bottom){
eDiv=document.getElementById('d'+ this.obj + id);
eJoin=document.getElementById('j'+ this.obj + id);
if(this.config.useIcons){
eIcon=document.getElementById('i'+ this.obj + id);
eIcon.src=(status)?this.aNodes[id].iconOpen:this.aNodes[id].icon;}
eJoin.src=(this.config.useLines)?
((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
((status)?this.icon.nlMinus:this.icon.nlPlus);
eDiv.style.display=(status)?'block':'none';};
dTree.prototype.clearCookie=function(){
var now=new Date();
var yesterday=new Date(now.getTime()- 1000*60*60*24);
this.setCookie('co'+this.obj,'cookieValue',yesterday);
this.setCookie('cs'+this.obj,'cookieValue',yesterday);};
dTree.prototype.setCookie=function(cookieName,cookieValue,expires,path,domain,secure)
{
var path="/";
document.cookie=
escape(cookieName)+'='+ escape(cookieValue)
+(expires?'; expires='+ expires.toGMTString():'')
+(path?'; path='+ path:'')
+(domain?'; domain='+ domain:'')
+(secure?'; secure':'');};
dTree.prototype.getCookie=function(cookieName){
var cookieValue='';
var posName=document.cookie.indexOf(escape(cookieName)+'=');
if(posName!=-1){
var posValue=posName +(escape(cookieName)+'=').length;
var endPos=document.cookie.indexOf(';',posValue);
if(endPos!=-1)cookieValue=unescape(document.cookie.substring(posValue,endPos));
else cookieValue=unescape(document.cookie.substring(posValue));}
return(cookieValue);};
dTree.prototype.updateCookie=function(){
var str='';
for(var n=0;n<this.aNodes.length;n++){
if(this.aNodes[n]._io&&this.aNodes[n].pid!=this.root.id){
if(str)str +='.';
str +=this.aNodes[n].id;}}
this.setCookie('co'+ this.obj,str);};
dTree.prototype.isOpen=function(id){
var aOpen=this.getCookie('co'+ this.obj).split('.');
for(var n=0;n<aOpen.length;n++)
if(aOpen[n]==id)return true;
return false;};
if(!Array.prototype.push){
Array.prototype.push=function array_push(){
for(var i=0;i<arguments.length;i++)
this[this.length]=arguments[i];
return this.length;}};
if(!Array.prototype.pop){
Array.prototype.pop=function array_pop(){
lastElement=this[this.length-1];
this.length=Math.max(this.length-1,0);
return lastElement;}};
Array.prototype.removeDuplicates=function(){for(var i=1;i<this.length;i++){if(this[i][0]==this[i-1][0]){this.splice(i,1);}}}
Array.prototype.empty=function(){for(var i=0;i<=this.length;i++){this.shift();}}
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');}
function LyteBox(){
this.theme='grey';
this.hideFlash=true;
this.outerBorder=true;
this.resizeSpeed=8;
this.maxOpacity=50;
this.navType=2;
this.autoResize=true;
this.doAnimations=true;
this.borderSize=12;
this.slideInterval=4000;
this.showNavigation=true;
this.showClose=true;
this.showDetails=true;
this.showPlayPause=true;
this.autoEnd=true;
this.pauseOnNextClick=false;
this.pauseOnPrevClick=true;
if(this.resizeSpeed>10){this.resizeSpeed=10;}
if(this.resizeSpeed<1){resizeSpeed=1;}
this.resizeDuration=(11 - this.resizeSpeed)*0.15;
this.resizeWTimerArray=new Array();
this.resizeWTimerCount=0;
this.resizeHTimerArray=new Array();
this.resizeHTimerCount=0;
this.showContentTimerArray=new Array();
this.showContentTimerCount=0;
this.overlayTimerArray=new Array();
this.overlayTimerCount=0;
this.imageTimerArray=new Array();
this.imageTimerCount=0;
this.timerIDArray=new Array();
this.timerIDCount=0;
this.slideshowIDArray=new Array();
this.slideshowIDCount=0;
this.imageArray=new Array();
this.activeImage=null;
this.slideArray=new Array();
this.activeSlide=null;
this.frameArray=new Array();
this.activeFrame=null;
this.checkFrame();
this.isSlideshow=false;
this.isLyteframe=false;
this.ie=false;
this.ie7=(this.ie&&window.XMLHttpRequest);
this.initialize();}
LyteBox.prototype.initialize=function(){
this.updateLyteboxItems();
var objBody=this.doc.getElementsByTagName("body").item(0);
if(this.doc.getElementById('lbOverlay')){
objBody.removeChild(this.doc.getElementById("lbOverlay"));
objBody.removeChild(this.doc.getElementById("lbMain"));}
var objOverlay=this.doc.createElement("div");
objOverlay.setAttribute('id','lbOverlay');
objOverlay.setAttribute((this.ie?'className':'class'),this.theme);
if((this.ie&&!this.ie7)||(this.ie7&&this.doc.compatMode=='BackCompat')){
objOverlay.style.position='absolute';}
objOverlay.style.display='none';
objBody.appendChild(objOverlay);
var objLytebox=this.doc.createElement("div");
objLytebox.setAttribute('id','lbMain');
objLytebox.style.display='none';
objBody.appendChild(objLytebox);
var objOuterContainer=this.doc.createElement("div");
objOuterContainer.setAttribute('id','lbOuterContainer');
objOuterContainer.setAttribute((this.ie?'className':'class'),this.theme);
objLytebox.appendChild(objOuterContainer);
var objIframeContainer=this.doc.createElement("div");
objIframeContainer.setAttribute('id','lbIframeContainer');
objIframeContainer.style.display='none';
objOuterContainer.appendChild(objIframeContainer);
var objIframe=this.doc.createElement("iframe");
objIframe.setAttribute('id','lbIframe');
objIframe.setAttribute('name','lbIframe');
objIframe.style.display='none';
objIframeContainer.appendChild(objIframe);
var objImageContainer=this.doc.createElement("div");
objImageContainer.setAttribute('id','lbImageContainer');
objOuterContainer.appendChild(objImageContainer);
var objLyteboxImage=this.doc.createElement("img");
objLyteboxImage.setAttribute('id','lbImage');
objImageContainer.appendChild(objLyteboxImage);
var objLoading=this.doc.createElement("div");
objLoading.setAttribute('id','lbLoading');
objOuterContainer.appendChild(objLoading);
var objDetailsContainer=this.doc.createElement("div");
objDetailsContainer.setAttribute('id','lbDetailsContainer');
objDetailsContainer.setAttribute((this.ie?'className':'class'),this.theme);
objLytebox.appendChild(objDetailsContainer);
var objDetailsData=this.doc.createElement("div");
objDetailsData.setAttribute('id','lbDetailsData');
objDetailsData.setAttribute((this.ie?'className':'class'),this.theme);
objDetailsContainer.appendChild(objDetailsData);
var objDetails=this.doc.createElement("div");
objDetails.setAttribute('id','lbDetails');
objDetailsData.appendChild(objDetails);
var objCaption=this.doc.createElement("span");
objCaption.setAttribute('id','lbCaption');
objDetails.appendChild(objCaption);
var objHoverNav=this.doc.createElement("div");
objHoverNav.setAttribute('id','lbHoverNav');
objImageContainer.appendChild(objHoverNav);
var objBottomNav=this.doc.createElement("div");
objBottomNav.setAttribute('id','lbBottomNav');
objDetailsData.appendChild(objBottomNav);
var objPrev=this.doc.createElement("a");
objPrev.setAttribute('id','lbPrev');
objPrev.setAttribute((this.ie?'className':'class'),this.theme);
objPrev.setAttribute('href','#');
objHoverNav.appendChild(objPrev);
var objNext=this.doc.createElement("a");
objNext.setAttribute('id','lbNext');
objNext.setAttribute((this.ie?'className':'class'),this.theme);
objNext.setAttribute('href','#');
objHoverNav.appendChild(objNext);
var objNumberDisplay=this.doc.createElement("span");
objNumberDisplay.setAttribute('id','lbNumberDisplay');
objDetails.appendChild(objNumberDisplay);
var objNavDisplay=this.doc.createElement("span");
objNavDisplay.setAttribute('id','lbNavDisplay');
objNavDisplay.style.display='none';
objDetails.appendChild(objNavDisplay);
var objClose=this.doc.createElement("a");
objClose.setAttribute('id','lbClose');
objClose.setAttribute((this.ie?'className':'class'),this.theme);
objClose.setAttribute('href','#');
objBottomNav.appendChild(objClose);
var objPause=this.doc.createElement("a");
objPause.setAttribute('id','lbPause');
objPause.setAttribute((this.ie?'className':'class'),this.theme);
objPause.setAttribute('href','#');
objPause.style.display='none';
objBottomNav.appendChild(objPause);
var objPlay=this.doc.createElement("a");
objPlay.setAttribute('id','lbPlay');
objPlay.setAttribute((this.ie?'className':'class'),this.theme);
objPlay.setAttribute('href','#');
objPlay.style.display='none';
objBottomNav.appendChild(objPlay);};
LyteBox.prototype.updateLyteboxItems=function(){
var anchors=(this.isFrame)?window.parent.frames[window.name].document.getElementsByTagName('a'):document.getElementsByTagName('a');
for(var i=0;i<anchors.length;i++){
var anchor=anchors[i];
var relAttribute=String(anchor.getAttribute('rel'));
if(anchor.getAttribute('href')){
if(relAttribute.toLowerCase().match('lytebox')){
anchor.onclick=function(){myLytebox.start(this,false,false);return false;}}else if(relAttribute.toLowerCase().match('lyteshow')){
anchor.onclick=function(){myLytebox.start(this,true,false);return false;}}else if(relAttribute.toLowerCase().match('lyteframe')){
anchor.onclick=function(){myLytebox.start(this,false,true);return false;}}}}};
LyteBox.prototype.start=function(imageLink,doSlide,doFrame){
if(this.ie&&!this.ie7){this.toggleSelects('hide');}
if(this.hideFlash){this.toggleFlash('hide');}
this.isLyteframe=(doFrame?true:false);
var pageSize=this.getPageSize();
var objOverlay=this.doc.getElementById('lbOverlay');
var objBody=this.doc.getElementsByTagName("body").item(0);
objOverlay.style.height=pageSize[1]+"px";
objOverlay.style.display='';
this.appear('lbOverlay',(this.doAnimations?0:this.maxOpacity));
var anchors=(this.isFrame)?window.parent.frames[window.name].document.getElementsByTagName('a'):document.getElementsByTagName('a');
if(this.isLyteframe){
this.frameArray=[];
this.frameNum=0;
if((imageLink.getAttribute('rel')=='lyteframe')){
var rev=imageLink.getAttribute('rev');
this.frameArray.push(new Array(imageLink.getAttribute('href'),imageLink.getAttribute('title'),(rev==null||rev==''?'width: 400px; height: 400px; scrolling: auto;':rev)));}else{
if(imageLink.getAttribute('rel').indexOf('lyteframe')!=-1){
for(var i=0;i<anchors.length;i++){
var anchor=anchors[i];
if(anchor.getAttribute('href')&&(anchor.getAttribute('rel')==imageLink.getAttribute('rel'))){
var rev=anchor.getAttribute('rev');
this.frameArray.push(new Array(anchor.getAttribute('href'),anchor.getAttribute('title'),(rev==null||rev==''?'width: 400px; height: 400px; scrolling: auto;':rev)));}}
this.frameArray.removeDuplicates();
while(this.frameArray[this.frameNum][0]!=imageLink.getAttribute('href')){this.frameNum++;}}}}else{
this.imageArray=[];
this.imageNum=0;
this.slideArray=[];
this.slideNum=0;
if((imageLink.getAttribute('rel')=='lytebox')){
this.imageArray.push(new Array(imageLink.getAttribute('href'),imageLink.getAttribute('title')));}else{
if(imageLink.getAttribute('rel').indexOf('lytebox')!=-1){
for(var i=0;i<anchors.length;i++){
var anchor=anchors[i];
if(anchor.getAttribute('href')&&(anchor.getAttribute('rel')==imageLink.getAttribute('rel'))){
this.imageArray.push(new Array(anchor.getAttribute('href'),anchor.getAttribute('title')));}}
this.imageArray.removeDuplicates();
while(this.imageArray[this.imageNum][0]!=imageLink.getAttribute('href')){this.imageNum++;}}
if(imageLink.getAttribute('rel').indexOf('lyteshow')!=-1){
for(var i=0;i<anchors.length;i++){
var anchor=anchors[i];
if(anchor.getAttribute('href')&&(anchor.getAttribute('rel')==imageLink.getAttribute('rel'))){
this.slideArray.push(new Array(anchor.getAttribute('href'),anchor.getAttribute('title')));}}
this.slideArray.removeDuplicates();
while(this.slideArray[this.slideNum][0]!=imageLink.getAttribute('href')){this.slideNum++;}}}}
var object=this.doc.getElementById('lbMain');
object.style.top=(this.getPageScroll()+(pageSize[3]/15))+"px";
object.style.display='';
if(!this.outerBorder){
this.doc.getElementById('lbOuterContainer').style.border='none';
this.doc.getElementById('lbDetailsContainer').style.border='none';}else{
this.doc.getElementById('lbOuterContainer').style.borderBottom='';
this.doc.getElementById('lbOuterContainer').setAttribute((this.ie?'className':'class'),this.theme);}
this.doc.getElementById('lbOverlay').onclick=function(){myLytebox.end();return false;}
this.doc.getElementById('lbMain').onclick=function(e){
var e=e;
if(!e){
if(window.parent.frames[window.name]&&(parent.document.getElementsByTagName('frameset').length<=0)){
e=window.parent.window.event;}else{
e=window.event;}}
var id=(e.target?e.target.id:e.srcElement.id);
if(id=='lbMain'){myLytebox.end();return false;}}
this.doc.getElementById('lbClose').onclick=function(){myLytebox.end();return false;}
this.doc.getElementById('lbPause').onclick=function(){myLytebox.togglePlayPause("lbPause","lbPlay");return false;}
this.doc.getElementById('lbPlay').onclick=function(){myLytebox.togglePlayPause("lbPlay","lbPause");return false;}
this.isSlideshow=doSlide;
this.isPaused=(this.slideNum!=0?true:false);
if(this.isSlideshow&&this.showPlayPause&&this.isPaused){
this.doc.getElementById('lbPlay').style.display='';
this.doc.getElementById('lbPause').style.display='none';}
if(this.isLyteframe){
this.changeContent(this.frameNum);}else{
if(this.isSlideshow){
this.changeContent(this.slideNum);}else{
this.changeContent(this.imageNum);}}};
LyteBox.prototype.changeContent=function(imageNum){
if(this.isSlideshow){
for(var i=0;i<this.slideshowIDCount;i++){window.clearTimeout(this.slideshowIDArray[i]);}}
this.activeImage=this.activeSlide=this.activeFrame=imageNum;
if(!this.outerBorder){
this.doc.getElementById('lbOuterContainer').style.border='none';
this.doc.getElementById('lbDetailsContainer').style.border='none';}else{
this.doc.getElementById('lbOuterContainer').style.borderBottom='';
this.doc.getElementById('lbOuterContainer').setAttribute((this.ie?'className':'class'),this.theme);}
this.doc.getElementById('lbLoading').style.display='';
this.doc.getElementById('lbImage').style.display='none';
this.doc.getElementById('lbIframe').style.display='none';
this.doc.getElementById('lbPrev').style.display='none';
this.doc.getElementById('lbNext').style.display='none';
this.doc.getElementById('lbIframeContainer').style.display='none';
this.doc.getElementById('lbDetailsContainer').style.display='none';
this.doc.getElementById('lbNumberDisplay').style.display='none';
if(this.navType==2||this.isLyteframe){
object=this.doc.getElementById('lbNavDisplay');
object.innerHTML='&nbsp;&nbsp;&nbsp;<span id="lbPrev2_Off" style="display: none;" class="'+ this.theme +'">&laquo;</span><a href="#" id="lbPrev2" class="'+ this.theme +'" style="display: none;">&laquo;</a> <b id="lbSpacer" class="'+ this.theme +'">||</b> <span id="lbNext2_Off" style="display: none;" class="'+ this.theme +'">&raquo;</span><a href="#" id="lbNext2" class="'+ this.theme +'" style="display: none;">&raquo;</a>';
object.style.display='none';}
if(this.isLyteframe){
var iframe=myLytebox.doc.getElementById('lbIframe');
var styles=this.frameArray[this.activeFrame][2];
var aStyles=styles.split(';');
for(var i=0;i<aStyles.length;i++){
if(aStyles[i].indexOf('width:')>=0){
var w=aStyles[i].replace('width:','');
iframe.width=w.trim();}else if(aStyles[i].indexOf('height:')>=0){
var h=aStyles[i].replace('height:','');
iframe.height=h.trim();}else if(aStyles[i].indexOf('scrolling:')>=0){
var s=aStyles[i].replace('scrolling:','');
iframe.scrolling=s.trim();}else if(aStyles[i].indexOf('border:')>=0){}}
this.resizeContainer(parseInt(iframe.width),parseInt(iframe.height));}else{
imgPreloader=new Image();
imgPreloader.onload=function(){
var imageWidth=imgPreloader.width;
var imageHeight=imgPreloader.height;
if(myLytebox.autoResize){
var pagesize=myLytebox.getPageSize();
var x=pagesize[2]- 150;
var y=pagesize[3]- 150;
if(imageWidth>x){
imageHeight=Math.round(imageHeight*(x/imageWidth));
imageWidth=x;
if(imageHeight>y){
imageWidth=Math.round(imageWidth*(y/imageHeight));
imageHeight=y;}}else if(imageHeight>y){
imageWidth=Math.round(imageWidth*(y/imageHeight));
imageHeight=y;
if(imageWidth>x){
imageHeight=Math.round(imageHeight*(x/imageWidth));
imageWidth=x;}}}
var lbImage=myLytebox.doc.getElementById('lbImage')
lbImage.src=(myLytebox.isSlideshow?myLytebox.slideArray[myLytebox.activeSlide][0]:myLytebox.imageArray[myLytebox.activeImage][0]);
lbImage.width=imageWidth;
lbImage.height=imageHeight;
myLytebox.resizeContainer(imageWidth,imageHeight);
imgPreloader.onload=function(){};}
imgPreloader.src=(this.isSlideshow?this.slideArray[this.activeSlide][0]:this.imageArray[this.activeImage][0]);}};
LyteBox.prototype.resizeContainer=function(imgWidth,imgHeight){
this.wCur=this.doc.getElementById('lbOuterContainer').offsetWidth;
this.hCur=this.doc.getElementById('lbOuterContainer').offsetHeight;
this.xScale=((imgWidth +(this.borderSize*2))/this.wCur)*100;
this.yScale=((imgHeight +(this.borderSize*2))/this.hCur)*100;
var wDiff=(this.wCur - this.borderSize*2)- imgWidth;
var hDiff=(this.hCur - this.borderSize*2)- imgHeight;
if(!(hDiff==0)){
this.hDone=false;
this.resizeH('lbOuterContainer',this.hCur,imgHeight + this.borderSize*2,this.getPixelRate(this.hCur,imgHeight));}else{
this.hDone=true;}
if(!(wDiff==0)){
this.wDone=false;
this.resizeW('lbOuterContainer',this.wCur,imgWidth + this.borderSize*2,this.getPixelRate(this.wCur,imgWidth));}else{
this.wDone=true;}
if((hDiff==0)&&(wDiff==0)){
if(this.ie){this.pause(250);}else{this.pause(100);}}
this.doc.getElementById('lbPrev').style.height=imgHeight +"px";
this.doc.getElementById('lbNext').style.height=imgHeight +"px";
this.doc.getElementById('lbDetailsContainer').style.width=(imgWidth +(this.borderSize*2)+(this.ie&&this.doc.compatMode=="BackCompat"&&this.outerBorder?2:0))+"px";
this.showContent();};
LyteBox.prototype.showContent=function(){
if(this.wDone&&this.hDone){
for(var i=0;i<this.showContentTimerCount;i++){window.clearTimeout(this.showContentTimerArray[i]);}
if(this.outerBorder){
this.doc.getElementById('lbOuterContainer').style.borderBottom='none';}
this.doc.getElementById('lbLoading').style.display='none';
if(this.isLyteframe){
this.doc.getElementById('lbIframe').style.display='';
this.appear('lbIframe',(this.doAnimations?0:100));}else{
this.doc.getElementById('lbImage').style.display='';
this.appear('lbImage',(this.doAnimations?0:100));
this.preloadNeighborImages();}
if(this.isSlideshow){
if(this.activeSlide==(this.slideArray.length - 1)){
if(this.autoEnd){
this.slideshowIDArray[this.slideshowIDCount++]=setTimeout("myLytebox.end('slideshow')",this.slideInterval);}}else{
if(!this.isPaused){
this.slideshowIDArray[this.slideshowIDCount++]=setTimeout("myLytebox.changeContent("+(this.activeSlide+1)+")",this.slideInterval);}}
this.doc.getElementById('lbHoverNav').style.display=(this.showNavigation&&this.navType==1?'':'none');
this.doc.getElementById('lbClose').style.display=(this.showClose?'':'none');
this.doc.getElementById('lbDetails').style.display=(this.showDetails?'':'none');
this.doc.getElementById('lbPause').style.display=(this.showPlayPause&&!this.isPaused?'':'none');
this.doc.getElementById('lbPlay').style.display=(this.showPlayPause&&!this.isPaused?'none':'');
this.doc.getElementById('lbNavDisplay').style.display=(this.showNavigation&&this.navType==2?'':'none');}else{
this.doc.getElementById('lbHoverNav').style.display=(this.navType==1&&!this.isLyteframe?'':'none');
if((this.navType==2&&!this.isLyteframe&&this.imageArray.length>1)||(this.frameArray.length>1&&this.isLyteframe)){
this.doc.getElementById('lbNavDisplay').style.display='';}else{
this.doc.getElementById('lbNavDisplay').style.display='none';}
this.doc.getElementById('lbClose').style.display='';
this.doc.getElementById('lbDetails').style.display='';
this.doc.getElementById('lbPause').style.display='none';
this.doc.getElementById('lbPlay').style.display='none';}
this.doc.getElementById('lbImageContainer').style.display=(this.isLyteframe?'none':'');
this.doc.getElementById('lbIframeContainer').style.display=(this.isLyteframe?'':'none');
try{
this.doc.getElementById('lbIframe').src=this.frameArray[this.activeFrame][0];}catch(e){}}else{
this.showContentTimerArray[this.showContentTimerCount++]=setTimeout("myLytebox.showContent()",200);}};
LyteBox.prototype.updateDetails=function(){
var object=this.doc.getElementById('lbCaption');
var sTitle=(this.isSlideshow?this.slideArray[this.activeSlide][1]:(this.isLyteframe?this.frameArray[this.activeFrame][1]:this.imageArray[this.activeImage][1]));
object.style.display='';
object.innerHTML=(sTitle==null?'':sTitle);
this.updateNav();
this.doc.getElementById('lbDetailsContainer').style.display='';
object=this.doc.getElementById('lbNumberDisplay');
if(this.isSlideshow&&this.slideArray.length>1){
object.style.display='';
object.innerHTML=eval(this.activeSlide + 1)+" / "+ this.slideArray.length;
this.doc.getElementById('lbNavDisplay').style.display=(this.navType==2&&this.showNavigation?'':'none');}else if(this.imageArray.length>1&&!this.isLyteframe){
object.style.display='';
object.innerHTML=eval(this.activeImage + 1)+" / "+ this.imageArray.length;
this.doc.getElementById('lbNavDisplay').style.display=(this.navType==2?'':'none');}else if(this.frameArray.length>1&&this.isLyteframe){
object.style.display='';
object.innerHTML="Page "+ eval(this.activeFrame + 1)+" of "+ this.frameArray.length;
this.doc.getElementById('lbNavDisplay').style.display='';}else{
this.doc.getElementById('lbNavDisplay').style.display='none';}
this.appear('lbDetailsContainer',(this.doAnimations?0:100));};
LyteBox.prototype.updateNav=function(){
if(this.isSlideshow){
if(this.activeSlide!=0){
var object=(this.navType==2?this.doc.getElementById('lbPrev2'):this.doc.getElementById('lbPrev'));
object.style.display='';
object.onclick=function(){
if(myLytebox.pauseOnPrevClick){myLytebox.togglePlayPause("lbPause","lbPlay");}
myLytebox.changeContent(myLytebox.activeSlide - 1);return false;}}else{
if(this.navType==2){this.doc.getElementById('lbPrev2_Off').style.display='';}}
if(this.activeSlide!=(this.slideArray.length - 1)){
var object=(this.navType==2?this.doc.getElementById('lbNext2'):this.doc.getElementById('lbNext'));
object.style.display='';
object.onclick=function(){
if(myLytebox.pauseOnNextClick){myLytebox.togglePlayPause("lbPause","lbPlay");}
myLytebox.changeContent(myLytebox.activeSlide + 1);return false;}}else{
if(this.navType==2){this.doc.getElementById('lbNext2_Off').style.display='';}}}else if(this.isLyteframe){
if(this.activeFrame!=0){
var object=this.doc.getElementById('lbPrev2');
object.style.display='';
object.onclick=function(){
myLytebox.changeContent(myLytebox.activeFrame - 1);return false;}}else{
this.doc.getElementById('lbPrev2_Off').style.display='';}
if(this.activeFrame!=(this.frameArray.length - 1)){
var object=this.doc.getElementById('lbNext2');
object.style.display='';
object.onclick=function(){
myLytebox.changeContent(myLytebox.activeFrame + 1);return false;}}else{
this.doc.getElementById('lbNext2_Off').style.display='';}}else{
if(this.activeImage!=0){
var object=(this.navType==2?this.doc.getElementById('lbPrev2'):this.doc.getElementById('lbPrev'));
object.style.display='';
object.onclick=function(){
myLytebox.changeContent(myLytebox.activeImage - 1);return false;}}else{
if(this.navType==2){this.doc.getElementById('lbPrev2_Off').style.display='';}}
if(this.activeImage!=(this.imageArray.length - 1)){
var object=(this.navType==2?this.doc.getElementById('lbNext2'):this.doc.getElementById('lbNext'));
object.style.display='';
object.onclick=function(){
myLytebox.changeContent(myLytebox.activeImage + 1);return false;}}else{
if(this.navType==2){this.doc.getElementById('lbNext2_Off').style.display='';}}}
this.enableKeyboardNav();};
LyteBox.prototype.enableKeyboardNav=function(){document.onkeydown=this.keyboardAction;};
LyteBox.prototype.disableKeyboardNav=function(){document.onkeydown='';};
LyteBox.prototype.keyboardAction=function(e){
var keycode=key=escape=null;
keycode=(e==null)?event.keyCode:e.which;
key=String.fromCharCode(keycode).toLowerCase();
escape=(e==null)?27:e.DOM_VK_ESCAPE;
if((key=='x')||(key=='c')||(keycode==escape)){
myLytebox.end();}else if((key=='p')||(keycode==37)){
if(myLytebox.isSlideshow){
if(myLytebox.activeSlide!=0){
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeSlide - 1);}}else if(myLytebox.isLyteframe){
if(myLytebox.activeFrame!=0){
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeFrame - 1);}}else{
if(myLytebox.activeImage!=0){
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeImage - 1);}}}else if((key=='n')||(keycode==39)){
if(myLytebox.isSlideshow){
if(myLytebox.activeSlide!=(myLytebox.slideArray.length - 1)){
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeSlide + 1);}}else if(myLytebox.isLyteframe){
if(myLytebox.activeFrame!=(myLytebox.frameArray.length - 1)){
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeFrame + 1);}}else{
if(myLytebox.activeImage!=(myLytebox.imageArray.length - 1)){
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeImage + 1);}}}};
LyteBox.prototype.preloadNeighborImages=function(){
if(this.isSlideshow){
if((this.slideArray.length - 1)>this.activeSlide){
preloadNextImage=new Image();
preloadNextImage.src=this.slideArray[this.activeSlide + 1][0];}
if(this.activeSlide>0){
preloadPrevImage=new Image();
preloadPrevImage.src=this.slideArray[this.activeSlide - 1][0];}}else{
if((this.imageArray.length - 1)>this.activeImage){
preloadNextImage=new Image();
preloadNextImage.src=this.imageArray[this.activeImage + 1][0];}
if(this.activeImage>0){
preloadPrevImage=new Image();
preloadPrevImage.src=this.imageArray[this.activeImage - 1][0];}}};
LyteBox.prototype.togglePlayPause=function(hideID,showID){
if(this.isSlideshow&&hideID=="lbPause"){
for(var i=0;i<this.slideshowIDCount;i++){window.clearTimeout(this.slideshowIDArray[i]);}}
this.doc.getElementById(hideID).style.display='none';
this.doc.getElementById(showID).style.display='';
if(hideID=="lbPlay"){
this.isPaused=false;
if(this.activeSlide==(this.slideArray.length - 1)){
this.end();}else{
this.changeContent(this.activeSlide + 1);}}else{
this.isPaused=true;}};
LyteBox.prototype.end=function(caller){
var closeClick=(caller=='slideshow'?false:true);
if(this.isSlideshow&&this.isPaused&&!closeClick){return;}
this.disableKeyboardNav();
this.doc.getElementById('lbMain').style.display='none';
this.fade('lbOverlay',(this.doAnimations?this.maxOpacity:0));
this.toggleSelects('visible');
if(this.hideFlash){this.toggleFlash('visible');}
if(this.isSlideshow){
for(var i=0;i<this.slideshowIDCount;i++){window.clearTimeout(this.slideshowIDArray[i]);}}
if(this.isLyteframe){
this.initialize();}};
LyteBox.prototype.checkFrame=function(){
if(window.parent.frames[window.name]&&(parent.document.getElementsByTagName('frameset').length<=0)){
this.isFrame=true;
this.lytebox="window.parent."+ window.name +".myLytebox";
this.doc=parent.document;}else{
this.isFrame=false;
this.lytebox="myLytebox";
this.doc=document;}};
LyteBox.prototype.getPixelRate=function(cur,img){
var diff=(img>cur)?img - cur:cur - img;
if(diff>=0&&diff<=100){return 10;}
if(diff>100&&diff<=200){return 15;}
if(diff>200&&diff<=300){return 20;}
if(diff>300&&diff<=400){return 25;}
if(diff>400&&diff<=500){return 30;}
if(diff>500&&diff<=600){return 35;}
if(diff>600&&diff<=700){return 40;}
if(diff>700){return 45;}};
LyteBox.prototype.appear=function(id,opacity){
var object=this.doc.getElementById(id).style;
object.opacity=(opacity/100);
object.MozOpacity=(opacity/100);
object.KhtmlOpacity=(opacity/100);
object.filter="alpha(opacity="+(opacity + 10)+")";
if(opacity==100&&(id=='lbImage'||id=='lbIframe')){
try{object.removeAttribute("filter");}catch(e){}
this.updateDetails();}else if(opacity>=this.maxOpacity&&id=='lbOverlay'){
for(var i=0;i<this.overlayTimerCount;i++){window.clearTimeout(this.overlayTimerArray[i]);}
return;}else if(opacity>=100&&id=='lbDetailsContainer'){
try{object.removeAttribute("filter");}catch(e){}
for(var i=0;i<this.imageTimerCount;i++){window.clearTimeout(this.imageTimerArray[i]);}
this.doc.getElementById('lbOverlay').style.height=this.getPageSize()[1]+"px";}else{
if(id=='lbOverlay'){
this.overlayTimerArray[this.overlayTimerCount++]=setTimeout("myLytebox.appear('"+ id +"', "+(opacity+20)+")",1);}else{
this.imageTimerArray[this.imageTimerCount++]=setTimeout("myLytebox.appear('"+ id +"', "+(opacity+10)+")",1);}}};
LyteBox.prototype.fade=function(id,opacity){
var object=this.doc.getElementById(id).style;
object.opacity=(opacity/100);
object.MozOpacity=(opacity/100);
object.KhtmlOpacity=(opacity/100);
object.filter="alpha(opacity="+ opacity +")";
if(opacity<=0){
try{
object.display='none';}catch(err){}}else if(id=='lbOverlay'){
this.overlayTimerArray[this.overlayTimerCount++]=setTimeout("myLytebox.fade('"+ id +"', "+(opacity-20)+")",1);}else{
this.timerIDArray[this.timerIDCount++]=setTimeout("myLytebox.fade('"+ id +"', "+(opacity-10)+")",1);}};
LyteBox.prototype.resizeW=function(id,curW,maxW,pixelrate,speed){
if(!this.hDone){
this.resizeWTimerArray[this.resizeWTimerCount++]=setTimeout("myLytebox.resizeW('"+ id +"', "+ curW +", "+ maxW +", "+ pixelrate +")",100);
return;}
var object=this.doc.getElementById(id);
var timer=speed?speed:(this.resizeDuration/2);
var newW=(this.doAnimations?curW:maxW);
object.style.width=(newW)+"px";
if(newW<maxW){
newW +=(newW + pixelrate>=maxW)?(maxW - newW):pixelrate;}else if(newW>maxW){
newW -=(newW - pixelrate<=maxW)?(newW - maxW):pixelrate;}
this.resizeWTimerArray[this.resizeWTimerCount++]=setTimeout("myLytebox.resizeW('"+ id +"', "+ newW +", "+ maxW +", "+ pixelrate +", "+(timer+0.02)+")",timer+0.02);
if(parseInt(object.style.width)==maxW){
this.wDone=true;
for(var i=0;i<this.resizeWTimerCount;i++){window.clearTimeout(this.resizeWTimerArray[i]);}}};
LyteBox.prototype.resizeH=function(id,curH,maxH,pixelrate,speed){
var timer=speed?speed:(this.resizeDuration/2);
var object=this.doc.getElementById(id);
var newH=(this.doAnimations?curH:maxH);
object.style.height=(newH)+"px";
if(newH<maxH){
newH +=(newH + pixelrate>=maxH)?(maxH - newH):pixelrate;}else if(newH>maxH){
newH -=(newH - pixelrate<=maxH)?(newH - maxH):pixelrate;}
this.resizeHTimerArray[this.resizeHTimerCount++]=setTimeout("myLytebox.resizeH('"+ id +"', "+ newH +", "+ maxH +", "+ pixelrate +", "+(timer+.02)+")",timer+.02);
if(parseInt(object.style.height)==maxH){
this.hDone=true;
for(var i=0;i<this.resizeHTimerCount;i++){window.clearTimeout(this.resizeHTimerArray[i]);}}};
LyteBox.prototype.getPageScroll=function(){
if(self.pageYOffset){
return this.isFrame?parent.pageYOffset:self.pageYOffset;}else if(this.doc.documentElement&&this.doc.documentElement.scrollTop){
return this.doc.documentElement.scrollTop;}else if(document.body){
return this.doc.body.scrollTop;}};
LyteBox.prototype.getPageSize=function(){
var xScroll,yScroll,windowWidth,windowHeight;
if(window.innerHeight&&window.scrollMaxY){
xScroll=this.doc.scrollWidth;
yScroll=(this.isFrame?parent.innerHeight:self.innerHeight)+(this.isFrame?parent.scrollMaxY:self.scrollMaxY);}else if(this.doc.body.scrollHeight>this.doc.body.offsetHeight){
xScroll=this.doc.body.scrollWidth;
yScroll=this.doc.body.scrollHeight;}else{
xScroll=this.doc.getElementsByTagName("html").item(0).offsetWidth;
yScroll=this.doc.getElementsByTagName("html").item(0).offsetHeight;
xScroll=(xScroll<this.doc.body.offsetWidth)?this.doc.body.offsetWidth:xScroll;
yScroll=(yScroll<this.doc.body.offsetHeight)?this.doc.body.offsetHeight:yScroll;}
if(self.innerHeight){
windowWidth=(this.isFrame)?parent.innerWidth:self.innerWidth;
windowHeight=(this.isFrame)?parent.innerHeight:self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){
windowWidth=this.doc.documentElement.clientWidth;
windowHeight=this.doc.documentElement.clientHeight;}else if(document.body){
windowWidth=this.doc.getElementsByTagName("html").item(0).clientWidth;
windowHeight=this.doc.getElementsByTagName("html").item(0).clientHeight;
windowWidth=(windowWidth==0)?this.doc.body.clientWidth:windowWidth;
windowHeight=(windowHeight==0)?this.doc.body.clientHeight:windowHeight;}
var pageHeight=(yScroll<windowHeight)?windowHeight:yScroll;
var pageWidth=(xScroll<windowWidth)?windowWidth:xScroll;
return new Array(pageWidth,pageHeight,windowWidth,windowHeight);};
LyteBox.prototype.toggleFlash=function(state){
var objects=this.doc.getElementsByTagName("object");
for(var i=0;i<objects.length;i++){
objects[i].style.visibility=(state=="hide")?'hidden':'visible';}
var embeds=this.doc.getElementsByTagName("embed");
for(var i=0;i<embeds.length;i++){
embeds[i].style.visibility=(state=="hide")?'hidden':'visible';}
if(this.isFrame){
for(var i=0;i<parent.frames.length;i++){
try{
objects=parent.frames[i].window.document.getElementsByTagName("object");
for(var j=0;j<objects.length;j++){
objects[j].style.visibility=(state=="hide")?'hidden':'visible';}}catch(e){}
try{
embeds=parent.frames[i].window.document.getElementsByTagName("embed");
for(var j=0;j<embeds.length;j++){
embeds[j].style.visibility=(state=="hide")?'hidden':'visible';}}catch(e){}}}};
LyteBox.prototype.toggleSelects=function(state){
var selects=this.doc.getElementsByTagName("select");
for(var i=0;i<selects.length;i++){
selects[i].style.visibility=(state=="hide")?'hidden':'visible';}
if(this.isFrame){
for(var i=0;i<parent.frames.length;i++){
try{
selects=parent.frames[i].window.document.getElementsByTagName("select");
for(var j=0;j<selects.length;j++){
selects[j].style.visibility=(state=="hide")?'hidden':'visible';}}catch(e){}}}};
LyteBox.prototype.pause=function(numberMillis){
var now=new Date();
var exitTime=now.getTime()+ numberMillis;
while(true){
now=new Date();
if(now.getTime()>exitTime){return;}}};
if(window.addEventListener){
window.addEventListener("load",initLytebox,false);}else if(window.attachEvent){
window.attachEvent("onload",initLytebox);}else{
window.onload=function(){initLytebox();}}
function initLytebox(){myLytebox=new LyteBox();}