 function _aspxDateIncrease(date,spanInMilliseconds){return new Date(date.valueOf()+spanInMilliseconds);}
function _aspxDateDiffInMilliseconds(date1,date2){return date1-date2;}
function _aspxDateTimeToMilliseconds(dateTime){var result=dateTime.valueOf();result-=60000*dateTime.getTimezoneOffset();return result;}
function _aspxDateTimeMinValue(value1,value2){return value1<value2?value1:value2;}
function _aspxDateTimeMaxValue(value1,value2){return value1>value2?value1:value2;}
function _aspxGetShiftKey(evt){if(__aspxIE)return(event!=null)?event.shiftKey:false;else return(evt!=null)?evt.shiftKey:false;}
function _aspxGetCtrlKey(evt){if(__aspxIE)return(event!=null)?event.ctrlKey:false;else return(evt!=null)?evt.ctrlKey:false;}
function aspxIsLeftKey(evt){return evt.keyCode==0x25;}
function aspxIsUpKey(evt){return evt.keyCode==0x26;}
function aspxIsRightKey(evt){return evt.keyCode==0x27;}
function aspxIsDownKey(evt){return evt.keyCode==0x28;}
function _aspxGetIsRightButtonPressed(evt){evt=_aspxGetEvent(evt);if(!_aspxIsExists(evt))return false;if(__aspxIE)return evt.button==2;else if(__aspxNS||__aspxSafari)return evt.which==3;else if(__aspxOpera||__aspxOpera9)return evt.button==1;return true;}
function _aspxFindParentElement(element,testFunc){if(!_aspxIsExists(testFunc))return null;while(element!=null&&element.tagName!="BODY"){if(testFunc(element))return element;element=_aspxGetParentNode(element);}return null;}
function _aspxGetOnMouseOutEventTarget(evt){evt=_aspxGetEvent(evt);if(!_aspxIsExists(evt))return null;return __aspxIE?evt.toElement:evt.relatedTarget;}
function _aspxSetTableCellOffsetWidth(tableCell,newOffsetWidth){if(newOffsetWidth<=0){return;}
tableCell.style.width=newOffsetWidth+"px";_aspxRefreshTableCell(tableCell);var delta=tableCell.clientWidth-newOffsetWidth;var correctedWidth=newOffsetWidth-delta;if(correctedWidth>0)tableCell.style.width=correctedWidth+"px";else tableCell.style.width="0px";_aspxRefreshTableCell(tableCell);}
function _aspxRefreshTableCell(tableCell){if(__aspxOpera){tableCell.style.display="none";tableCell.style.display="table-cell";}}
function _aspxChangeTableLayout(table,layout){if(__aspxIE){table.style.tableLayout=layout;return;}
var parent=table.parentNode;var nextSibling=table.nextSibling;parent.removeChild(table);table.style.tableLayout=layout;if(_aspxIsExists(nextSibling))parent.insertBefore(table,nextSibling);else parent.appendChild(table);}
function _aspxGetItemByLocation(parentTable,location){return parentTable.rows[location[0]].cells[location[1]];}
function aspxSchedulerTableKeyDown(name,evt){var scheduler=aspxGetControlCollection().Get(name);if(scheduler!=null)scheduler.KeyDown(evt);}
function aspxSchedulerNavBtnClick(name,startTime,duration,resourceId){var scheduler=aspxGetControlCollection().Get(name);if(scheduler!=null)scheduler.NavBtnClick(startTime,duration,resourceId);}
function aspxSchedulerMainDivMouseDown(name,evt){var scheduler=aspxGetControlCollection().Get(name);if(scheduler!=null)scheduler.MainDivMouseDown(evt);}
function aspxSchedulerFuncCallback(name,result){var scheduler=aspxGetControlCollection().Get(name);if(scheduler!=null){scheduler.OnFuncCallback(unescape(result));}}
function aspxSchedulerShowViewMenu(name,sender,evt){evt=_aspxGetEvent(evt);var scheduler=aspxGetControlCollection().Get(name);if(scheduler!=null){scheduler.ShowViewMenu(sender,evt);}}
function aspxSchedulerShowAptMenu(name,sender,evt){evt=_aspxGetEvent(evt);var scheduler=aspxGetControlCollection().Get(name);if(scheduler!=null){scheduler.ShowAptMenu(sender,evt);}
evt.returnValue=false;evt.cancelBubble=true;}
function aspxSchedulerAppointmentSmartTagClickMenu(name,sender,evt){var scheduler=aspxGetControlCollection().Get(name);if(scheduler!=null){scheduler.OnAppointmentSmartTagClick(sender,evt);}}
function aspxSchedulerGetSchedulerFromMenu(menu){if(menu==null)return null;var pos=menu.name.lastIndexOf("_");if(pos<0)return null;var name=menu.name.substring(0,pos);pos=name.lastIndexOf("_");if(pos>-1)return aspxGetControlCollection().Get(menu.name.substring(0,pos));return null;}
function aspxSchedulerOnViewMenuClick(s,args){var scheduler=aspxSchedulerGetSchedulerFromMenu(s);if(scheduler!=null){if(args.item.GetItemCount()<=0)scheduler.OnViewMenuClick(args.item.name);}}
function aspxSchedulerOnAptMenuClick(s,args){var scheduler=aspxSchedulerGetSchedulerFromMenu(s);if(scheduler!=null){if(args.item.GetItemCount()<=0)scheduler.OnAptMenuClick(args.item.name);}}
function aspxAppointmentSave(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control)){control.RaiseCallback("APTSAVE|");}}
function aspxAppointmentCancel(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control)){control.CancelFormChangesAndClose(control.aptFormVisibility,"APTCANCEL|");}}
function aspxAppointmentDelete(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control)){control.RaiseCallback("APTDEL|");}}
function aspxInplaceEditorSave(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control)){control.RaiseCallback("INPLACESAVE|");}}
function aspxInplaceEditorEditForm(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control)){control.RaiseCallback("INPLACEFORM|");}}
function aspxShowInplacePopupWindow(name,popupId,aptId){var control=aspxGetControlCollection().Get(name);if(_aspxIsExists(control)){control.SaveCurrentPopupContainer(popupId);control.ShowInplacePopupWindow(popupId,aptId);}}
function aspxShowFormPopupWindow(name,popupId){var control=aspxGetControlCollection().Get(name);if(_aspxIsExists(control)){control.SaveCurrentPopupContainer(popupId);control.ShowFormPopupWindow(popupId);}}
function aspxGotoDateApply(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control)){control.RaiseCallback("GOTODATE|");}}
function aspxGotoDateCancel(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control)){control.CancelFormChangesAndClose(control.gotoDateFormVisibility,"GOTODATECANCEL|");}}
function aspxGotoDateApply(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control)){control.RaiseCallback("GOTODATE|");}}
function aspxRecurrentAptDeleteCancel(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control))control.CancelFormChangesAndClose(control.recurrentAppointmentDeleteFormVisibility,"RECURAPTDELETECANCEL|");}
function aspxRecurrentAptDelete(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control))return control.RaiseCallback("RECURAPTDELETE|");}
function aspxRecurrentAptEditCancel(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control))control.CancelFormChangesAndClose(control.recurrentAppointmentDeleteFormVisibility,"RECURAPTEDITCANCEL|");}
function aspxRecurrentAptEdit(controlId){var control=aspxGetControlCollection().Get(controlId);if(_aspxIsExists(control))return control.RaiseCallback("RECURAPTEDIT|");}
function aspxSchedulerDateTimeComparer(dateTime1,dateTime2){var dif=dateTime2-dateTime1;if(dif==0)return 0;return dif<0?1:-1;}
function aspxMoreButtonClickEvent(evt){var srcMoreButtonDiv=_aspxGetEventSource(evt);var control=srcMoreButtonDiv.schedulerControl;control.RaiseCallback("MOREBTN|"+srcMoreButtonDiv.dateTime);} 