rem: classNamesForExpanding.push('workdayExpanded'); 
add: classNamesForExpanding.push('workdayExpanded'); 
context: 		    	function(element){					element.onclick = function(){						var d = new Date();	//console.log(d.getTime());						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');								}								else{									resizedElements[index].addClass('weekendCollapsed');								}							}						}						var dd = new Date();						var after = dd.getTime();/*							console.log(after);						console.log(beginOfFunction);	console.log('cycle for resized elements:');						console.log(after - beginOfFunction);					*/						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							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');								}							}						}											trParent = tdDay.parentNode;	//					if (tdDay.getAttribute('class').substring(4,11) == 'workday'){			//WORKDAY						if (tdDay.getAttribute('class').match('workday')){			//WORKDAY							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() == 'content') 										||(currentTdElement.getAttribute('class').toString() == 'content workdayExpanded')										||(currentTdElement.getAttribute('class').toString() == 'content workdayCollapsed')										||(currentTdElement.getAttribute('class').toString() == 'content weekendCollapsed')) {	*/									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();								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');												tdElements[index].removeClass('workdayCollapsed');												tdElements[index].addClass('workdayOnExpandedWeekend');											}										}									}								}								resizedElements.push(element);								classNamesForExpanding.push('weekendExpanded');															element.removeClass('weekendCollapsed');								element.addClass('weekendExpanded');							}							else{	//SATURDAY								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();/*							console.log('TOTAL TIME');						console.log(endOfFunction - beginOfFunction);	console.log(d2.getTime());					*/											}	//	    		var previousHeight = null;	    				    	}
meta: 8390	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8390/316a70b49c62b3358bea97a5c16aa1b2a5201369/CalendarList.js/clean/resources/javascript/CalendarList.js