function change(objectid, classid) { if (objectid != '' && classid != '') { if (document.getElementById(objectid) != null) document.getElementById(objectid).className = classid } } function ShowGeneralConditions() { window.open('/Support/GeneralConditions.html', 'WinGeneralConditions', 'left=20,top=20,width=500,height=500,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1') } function ShowCalendarLegenda() { window.open('/Support/CalendarLegenda.html', 'WinCalendarLegenda', 'left=20,top=20,width=550,height=250,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1') } function OnEnterWhereTrail() { if (window.event && window.event.keyCode == 13) { FindLocation() } } function ClearSearchTextBox(text, clientid) { if (document.getElementById(clientid) != null) if (document.getElementById(clientid).value == text) document.getElementById(clientid).value = '' } function ContextMenuActionAgenda(controlprefix, action) { var id = $get(controlprefix + '_txtCalendarItemId').value; if (action == 'log') { location.href = '/Pages/TrainingForm.aspx?calendaritemid=' + id } else if (action == 'edit') { location.href = '/Pages/CalendarItemForm.aspx?id=' + id } else if (action == 'delete') { var message = $get(controlprefix + '_txtDeleteCalendarItemMessage').value; var answer = confirm(message); if (answer) { $get(controlprefix + '_btnDelete').click() } } } function StartAgenda(controlprefix, caller, id) { var location = Sys.UI.DomElement.getLocation(caller); $get('mousepositionAgenda').value = location.y + ',' + location.x; $get(controlprefix + '_btnInfo').click(); $get(controlprefix + '_txtCalendarItemId').value = id } function CloseAgenda(controlprefix) { $get(controlprefix + '_btnClose').click() } function CoverAgenda(bottom, top, ignoreSize) { var y = 0; var x = 0; if (bottom.id == 'flyoutAgenda') { var location = Sys.UI.DomElement.getLocation(bottom); y = location.y; x = location.x } else { var bottomLocation = $get('mousepositionAgenda').value.split(","); y = (bottomLocation[0] * 1); x = (bottomLocation[1] * 1) } top.style.position = 'absolute'; top.style.top = y + 'px'; top.style.left = x + 'px'; if (!ignoreSize) { top.style.height = bottom.offsetHeight + 'px'; top.style.width = bottom.offsetWidth + 'px' } } function StartFriends(caller, pictureurl, activities) { var location = Sys.UI.DomElement.getLocation(caller); var activitycollection = activities.split(""); if (activitycollection[0] == 1) { $get('ctl00__WebPartManager_gwpfriends_friends__lblCompetition').style.visibility = "visible" } if (activitycollection[1] == 1) { $get('ctl00__WebPartManager_gwpfriends_friends__lblTraining').style.visibility = "visible" } if (activitycollection[2] == 1) { $get('ctl00__WebPartManager_gwpfriends_friends__lblRunnerMedia').style.visibility = "visible" } $get('mousepositionFriends').value = location.y + ',' + location.x; $get('profileimage').src = pictureurl; $get('ctl00__WebPartManager_gwpfriends_friends_btnInfo').click() } function CloseFriends() { $get('ctl00__WebPartManager_gwpfriends_friends_btnClose').click() } function NavigateFriends(url) { self.parent.location = url } function CoverFriends(bottom, top, ignoreSize) { var y = 0; var x = 0; if (bottom.id == 'flyoutFriends') { var location = Sys.UI.DomElement.getLocation(bottom); y = location.y; x = location.x } else { var bottomLocation = $get('mousepositionFriends').value.split(","); y = (bottomLocation[0] * 1); x = (bottomLocation[1] * 1) } top.style.position = 'absolute'; top.style.top = y + 'px'; top.style.left = x + 'px'; if (!ignoreSize) { top.style.height = bottom.offsetHeight + 'px'; top.style.width = bottom.offsetWidth + 'px' } }