rem: function(element){ element.onclick = function(){ var d = new Date(); var beginOfFunction = d.getTime();  if(resizedElements){ for(var index=0; index<resizedElements.length; index++) { resizedElements[index].removeClass(classNamesForExpanding[index]); if(index < 5){  resizedElements[index].addClass('collapsed'); } else{ resizedElements[index].addClass('collapsed'); } } } var dd = new Date(); var after = dd.getTime(); resizedElements = new Array(); classNamesForExpanding = new Array(); var trElement = element.parentNode; var tableElement = trElement.parentNode; var tdDay = tableElement.parentNode;  var trParent = tdDay.parentNode; var tbody = trParent.parentNode; var isSunday = false;  if (trParent.getChildren().length == 1) isSunday = true; for(var i=0; i<tbody.getChildren().length; i++) { trParent = tbody.getChildren()[i]; if(isSunday){ if(i % 2 != 0){ trParent.getChildren()[0].removeClass('notSelectedDay'); trParent.getChildren()[0].addClass('selectedDay'); } else{ for(var index=0; index<trParent.getChildren().length; index++) { trParent.getChildren()[index].removeClass('selectedDay'); trParent.getChildren()[index].addClass('notSelectedDay'); } } } else{ if(i % 2 == 0){ for(var index=0; index<trParent.getChildren().length; index++) { if(trParent.getChildren()[index] != tdDay){ trParent.getChildren()[index].removeClass('selectedDay'); trParent.getChildren()[index].addClass('notSelectedDay'); } else{ trParent.getChildren()[index].removeClass('notSelectedDay'); trParent.getChildren()[index].addClass('selectedDay'); } } } else{ trParent.getChildren()[0].removeClass('selectedDay'); trParent.getChildren()[0].addClass('notSelectedDay'); } } } /* var widthTime = new Date(); var afterExpandingWidth = widthTime.getTime(); */ trParent = tdDay.parentNode;  if (tdDay.getAttribute('class').match('workday')){ resizedElements.push(trParent); classNamesForExpanding.push('expandedWorkday'); trParent.removeClass('collapsed'); trParent.addClass('expandedWorkday'); trParent = trParent.getNext(); trParent.removeClass('collapsed'); trParent.addClass('expandedWorkday'); resizedElements.push(trParent); classNamesForExpanding.push('expandedWorkday');  /* resizedElements.push(element); classNamesForExpanding.push('workdayExpanded'); element.removeClass('workdayCollapsed'); element.addClass('workdayExpanded'); var tdElements = trParent.getElementsByTagName('td'); var dayNumber = 0; for(var index=0; index<tdElements.length; index++) { var currentTdElement = tdElements[index]; if(currentTdElement.getAttribute('class')){ if(currentTdElement.getAttribute('class').toString().match('content')){  dayNumber++; if(dayNumber != 6){ if(element != tdElements[index]){ resizedElements.push(tdElements[index]); classNamesForExpanding.push('workdayExpanded'); tdElements[index].removeClass('workdayCollapsed'); tdElements[index].addClass('workdayExpanded'); } } else{ resizedElements.push(tdElements[index]); classNamesForExpanding.push('weekendOnExpandedWorkday'); tdElements[index].removeClass('weekendCollapsed'); tdElements[index].addClass('weekendOnExpandedWorkday'); } } } } trParent = trParent.getNext(); tdElements = trParent.getElementsByTagName('td'); for(var index=0; index<tdElements.length; index++) { var currentTdElement = tdElements[index]; if(currentTdElement.getAttribute('class')){   if(currentTdElement.getAttribute('class').toString().match('content')){ resizedElements.push(tdElements[index]); classNamesForExpanding.push('weekendOnExpandedWorkday'); tdElements[index].removeClass('weekendCollapsed'); tdElements[index].addClass('weekendOnExpandedWorkday'); } } } */ } else{ if (trParent.getChildren().length == 1){ trParent = trParent.getPrevious();  trParent.removeClass('collapsed'); trParent.addClass('expandedSunday'); resizedElements.push(trParent); classNamesForExpanding.push('expandedSunday'); trParent = trParent.getNext(); trParent.removeClass('collapsed'); trParent.addClass('expandedSunday'); resizedElements.push(trParent); classNamesForExpanding.push('expandedSunday');  var tdElements = trParent.getElementsByTagName('td'); var dayNumber = 0; /* for(var index=0; index<tdElements.length; index++) { var currentTdElement = tdElements[index]; if(currentTdElement.getAttribute('class')){ if((currentTdElement.getAttribute('class').toString() == 'content')){ dayNumber++; if(dayNumber != 6){ resizedElements.push(tdElements[index]); classNamesForExpanding.push('workdayOnExpandedWeekend'); tdElements[index].removeClass('workdayCollapsed'); tdElements[index].addClass('workdayOnExpandedWeekend'); } } } } */ /* resizedElements.push(element); classNamesForExpanding.push('weekendExpanded'); element.removeClass('weekendCollapsed'); element.addClass('weekendExpanded'); */ } else{  trParent.removeClass('collapsed'); trParent.addClass('expandedSaturday'); resizedElements.push(trParent); classNamesForExpanding.push('expandedSaturday'); trParent = trParent.getNext(); trParent.removeClass('collapsed'); trParent.addClass('expandedSaturday'); resizedElements.push(trParent); classNamesForExpanding.push('expandedSaturday');    /* for(var index=0; index<tdElements.length; index++) { var currentTdElement = tdElements[index]; if(currentTdElement.getAttribute('class')){ if((currentTdElement.getAttribute('class').toString() == 'content')|| (currentTdElement.getAttribute('class').toString() == 'content weekendCollapsed')|| (currentTdElement.getAttribute('class').toString() == 'content workdayCollapsed')){ dayNumber++; if(dayNumber != 6){ resizedElements.push(tdElements[index]); classNamesForExpanding.push('workdayOnExpandedWeekend'); currentTdElement.removeClass('workdayCollapsed'); currentTdElement.addClass('workdayOnExpandedWeekend'); } else{ resizedElements.push(currentTdElement); classNamesForExpanding.push('weekendExpanded'); currentTdElement.removeClass('weekendCollapsed'); currentTdElement.addClass('weekendExpanded');   } } } } */   /* for(var index=0; index<tdElements.length; index++) { var currentTdElement = tdElements[index]; if(currentTdElement.getAttribute('class')){ if(currentTdElement.getAttribute('class').toString() == 'content'){   } } } */ /* resizedElements.push(element); classNamesForExpanding.push('weekendExpanded'); element.removeClass('weekendCollapsed'); element.addClass('weekendExpanded'); */ }  } var d2 = new Date(); var endOfFunction = d2.getTime(); }   } 
add: function(element) { element.onmouseover = function(e) { displayEntryInfo(element, e); } element.onmouseout = function(){ removeChildren(entryInfo); } } 
context: 		    	function(element){					element.onclick = function(){						var d = new Date();						var beginOfFunction = d.getTime();							if(resizedElements){							for(var index=0; index<resizedElements.length; index++) {								resizedElements[index].removeClass(classNamesForExpanding[index]);								if(index < 5){//									resizedElements[index].addClass('workdayCollapsed');									resizedElements[index].addClass('collapsed');								}								else{									resizedElements[index].addClass('collapsed');								}							}						}						var dd = new Date();						var after = dd.getTime();						resizedElements = new Array();						classNamesForExpanding = new Array();						var trElement = element.parentNode;						var tableElement = trElement.parentNode;						var tdDay = tableElement.parentNode;	//					tdDay.addClass('selectedDay'); 						var trParent = tdDay.parentNode;						var tbody = trParent.parentNode;						var isSunday = false;												if (trParent.getChildren().length == 1)							isSunday = true;						for(var i=0; i<tbody.getChildren().length; i++) {							trParent = tbody.getChildren()[i];							if(isSunday){								if(i % 2 != 0){									trParent.getChildren()[0].removeClass('notSelectedDay');									trParent.getChildren()[0].addClass('selectedDay');																}								else{									for(var index=0; index<trParent.getChildren().length; index++) {										trParent.getChildren()[index].removeClass('selectedDay');										trParent.getChildren()[index].addClass('notSelectedDay'); 									}								}								}		//workday or saturday (not sunday)							else{								if(i % 2 == 0){									for(var index=0; index<trParent.getChildren().length; index++) {										if(trParent.getChildren()[index] != tdDay){											trParent.getChildren()[index].removeClass('selectedDay');											trParent.getChildren()[index].addClass('notSelectedDay'); 										}										else{											trParent.getChildren()[index].removeClass('notSelectedDay');																					trParent.getChildren()[index].addClass('selectedDay'); 										}			 									}															}								else{									trParent.getChildren()[0].removeClass('selectedDay');									trParent.getChildren()[0].addClass('notSelectedDay');								}							}						}/*				var widthTime = new Date();var afterExpandingWidth = widthTime.getTime();					*/ 						trParent = tdDay.parentNode;	//					if (tsesedDay.getAttribute('class').substring(4,11) == 'workday'){			//WORKDAY						if (tdDay.getAttribute('class').match('workday')){			//WORKDAY							resizedElements.push(trParent);							classNamesForExpanding.push('expandedWorkday');							trParent.removeClass('collapsed');							trParent.addClass('expandedWorkday');							trParent = trParent.getNext();							trParent.removeClass('collapsed');							trParent.addClass('expandedWorkday');							resizedElements.push(trParent);							classNamesForExpanding.push('expandedWorkday');							/*													resizedElements.push(element);							classNamesForExpanding.push('workdayExpanded');  							element.removeClass('workdayCollapsed');							element.addClass('workdayExpanded');							var tdElements = trParent.getElementsByTagName('td');							var dayNumber = 0;							for(var index=0; index<tdElements.length; index++) {								var currentTdElement = tdElements[index];								if(currentTdElement.getAttribute('class')){									if(currentTdElement.getAttribute('class').toString().match('content')){											dayNumber++;										if(dayNumber != 6){											if(element != tdElements[index]){												resizedElements.push(tdElements[index]);												classNamesForExpanding.push('workdayExpanded');												tdElements[index].removeClass('workdayCollapsed');												tdElements[index].addClass('workdayExpanded');											}										}										else{											resizedElements.push(tdElements[index]);											classNamesForExpanding.push('weekendOnExpandedWorkday');											tdElements[index].removeClass('weekendCollapsed');																					tdElements[index].addClass('weekendOnExpandedWorkday');										}									}								}							}								trParent = trParent.getNext();							tdElements = trParent.getElementsByTagName('td');							for(var index=0; index<tdElements.length; index++) {								var currentTdElement = tdElements[index];								if(currentTdElement.getAttribute('class')){	//								if((currentTdElement.getAttribute('class').toString() == 'content')||	//									(currentTdElement.getAttribute('class').toString() == 'content weekendCollapsed')){									if(currentTdElement.getAttribute('class').toString().match('content')){										resizedElements.push(tdElements[index]);										classNamesForExpanding.push('weekendOnExpandedWorkday');										tdElements[index].removeClass('weekendCollapsed');										tdElements[index].addClass('weekendOnExpandedWorkday');									}								}													}		*/																	}						else{							if (trParent.getChildren().length == 1){				//SUNDAY								trParent = trParent.getPrevious();																trParent.removeClass('collapsed');								trParent.addClass('expandedSunday');								resizedElements.push(trParent);								classNamesForExpanding.push('expandedSunday');								trParent = trParent.getNext();								trParent.removeClass('collapsed');								trParent.addClass('expandedSunday');									resizedElements.push(trParent);								classNamesForExpanding.push('expandedSunday');																							var tdElements = trParent.getElementsByTagName('td');								var dayNumber = 0;/*																for(var index=0; index<tdElements.length; index++) {									var currentTdElement = tdElements[index];									if(currentTdElement.getAttribute('class')){										if((currentTdElement.getAttribute('class').toString() == 'content')){											dayNumber++;											if(dayNumber != 6){												resizedElements.push(tdElements[index]);												classNamesForExpanding.push('workdayOnExpandedWeekend');												tdElements[index].removeClass('workdayCollapsed');												tdElements[index].addClass('workdayOnExpandedWeekend');											}										}									}								}*/								/*								resizedElements.push(element);								classNamesForExpanding.push('weekendExpanded');															element.removeClass('weekendCollapsed');								element.addClass('weekendExpanded');*/															}							else{	//SATURDAY															trParent.removeClass('collapsed');								trParent.addClass('expandedSaturday');								resizedElements.push(trParent);								classNamesForExpanding.push('expandedSaturday');								trParent = trParent.getNext();								trParent.removeClass('collapsed');								trParent.addClass('expandedSaturday');									resizedElements.push(trParent);								classNamesForExpanding.push('expandedSaturday');								//								var tdElements = trParent.getElementsByTagName('td');//								var dayNumber = 0;/*																for(var index=0; index<tdElements.length; index++) {									var currentTdElement = tdElements[index];									if(currentTdElement.getAttribute('class')){										if((currentTdElement.getAttribute('class').toString() == 'content')||											(currentTdElement.getAttribute('class').toString() == 'content weekendCollapsed')||											(currentTdElement.getAttribute('class').toString() == 'content workdayCollapsed')){											dayNumber++;											if(dayNumber != 6){												resizedElements.push(tdElements[index]);												classNamesForExpanding.push('workdayOnExpandedWeekend');												currentTdElement.removeClass('workdayCollapsed');												currentTdElement.addClass('workdayOnExpandedWeekend');											}											else{												resizedElements.push(currentTdElement);												classNamesForExpanding.push('weekendExpanded');												currentTdElement.removeClass('weekendCollapsed');												currentTdElement.addClass('weekendExpanded');		//											tdElements[index].style.height = tdElements[index].getCoordinates().height+heightToAdd+'px';											}										}									}								}*/								//								var trParent = trParent.getNext();//								tdElements = trParent.getElementsByTagName('td');	/*															for(var index=0; index<tdElements.length; index++) {									var currentTdElement = tdElements[index];									if(currentTdElement.getAttribute('class')){										if(currentTdElement.getAttribute('class').toString() == 'content'){	//										tdElements[index].style.height = ((currentHeight-18)/2)+'px';	//										tdElements[index].style.height = previousHeight+'px';										}										}													}	*//*								resizedElements.push(element);								classNamesForExpanding.push('weekendExpanded');											element.removeClass('weekendCollapsed');												element.addClass('weekendExpanded');*/							}																			}						var d2 = new Date();						var endOfFunction = d2.getTime();					}	//	    		var previousHeight = null;	    				    	}
meta: 8390	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8390/b0239ca13bf899f606c2000f0e252a59db748455/CalendarList.js/clean/resources/javascript/CalendarList.js