var behaviours = {
	'#tabHumor' : function(element) { element.onclick = function() { EnableTab(element,new Array("tabHumor","tabGames","tabOfficeFun")); } },
	'#tabGames' : function(element) { element.onclick = function() { EnableTab(element,new Array("tabHumor","tabGames","tabOfficeFun")); } },
	'#tabOfficeFun' : function(element) { element.onclick = function() { EnableTab(element,new Array("tabHumor","tabGames","tabOfficeFun"));	} },
	'#officeFunTabsHumor' : function(element) { element.onclick = function() { EnableTab(element,new Array("officeFunTabsHumor","officeFunTabsGames","officeFunTabsBusinessCards")); } },
	'#officeFunTabsGames' : function(element) { element.onclick = function() { EnableTab(element,new Array("officeFunTabsHumor","officeFunTabsGames","officeFunTabsBusinessCards")); } },
	'#officeFunTabsBusinessCards' : function(element) { element.onclick = function() { EnableTab(element,new Array("officeFunTabsHumor","officeFunTabsGames","officeFunTabsBusinessCards"));	} },
	'#tabGamesSpecficHumor' : function(element) { element.onclick = function() { EnableTab(element,new Array("tabGamesSpecficHumor","tabGamesSpecficGames","tabGamesSpecficOfficeFun")); } },
	'#tabGamesSpecficGames' : function(element) { element.onclick = function() { EnableTab(element,new Array("tabGamesSpecficHumor","tabGamesSpecficGames","tabGamesSpecficOfficeFun")); } },
	'#tabGamesSpecficOfficeFun' : function(element) { element.onclick = function() { EnableTab(element,new Array("tabGamesSpecficHumor","tabGamesSpecficGames","tabGamesSpecficOfficeFun"));	} },
	'.subNavItem' : function(element) {
		element.onmouseover = function() { this.style.backgroundColor = "#cbe8ec"; }
		element.onmouseout = function() { this.style.backgroundColor = "#ffffff"; }
	},
/*
	'#shows' : function(element) {
		element.onmouseover = function() { 
			PositionSubMenu(this); 
			this.style.background = getBackgroundImage(-61, -92); 
		}
		element.onmouseout = function() { 
			document.getElementById(this.id + "Menu").style.display = "none"; 
			setOriginalMenuStyle(this);
		}
	},
	'#showsMenu' : function(element) {
		element.onmouseover = function() { 
			this.style.display = "inline";
			document.getElementById("shows").style.background = getBackgroundImage(-61, -92); 
		}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			setOriginalMenuStyle(document.getElementById("shows"));
		}
	},
	'#movies' : function(element) {
		element.onmouseover = function() { 
			PositionSubMenu(this); 
			document.getElementById(this.id).style.background = getBackgroundImage(-122, -92); 
		}
		element.onmouseout = function() { 
			document.getElementById(this.id + "Menu").style.display = "none"; 
			document.getElementById(this.id).style.background = "none"; 
		}
	},
	'#moviesMenu' : function(element) {
		element.onmouseover = function() { 
			this.style.display = "inline"; 
			document.getElementById("movies").style.background = getBackgroundImage(-122, -92); 			
		}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			document.getElementById("movies").style.background = "none"; 			
		}
	},
	'#sports' : function(element) {
		element.onmouseover = function() { 
			PositionSubMenu(this); 
			document.getElementById(this.id).style.background = getBackgroundImage(-195, -92);
		}
		element.onmouseout = function() {
			document.getElementById(this.id + "Menu").style.display = "none";
			document.getElementById(this.id).style.background = "none"; 
		 }
	},
	'#sportsMenu' : function(element) {
		element.onmouseover = function() {
			this.style.display = "inline"; 
			document.getElementById("sports").style.background = getBackgroundImage(-195, -92);
		}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			document.getElementById("sports").style.background = "none"; 
		}
	},
	'#schedule' : function(element) {
		element.onmouseover = function() {
			PositionSubMenu(this); 
			document.getElementById(this.id).style.background = getBackgroundImage(-259, -92);
		}
		element.onmouseout = function() { 
			document.getElementById(this.id + "Menu").style.display = "none"; 
			setOriginalMenuStyle(this);
		}
	},
	'#scheduleMenu' : function(element) {
		element.onmouseover = function() { 
			this.style.display = "inline"; 
			document.getElementById("schedule").style.background = getBackgroundImage(-259, -92);
		}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			setOriginalMenuStyle(document.getElementById("schedule"));
		}
	},
	'#videos' : function(element) {
		element.onmouseover = function() {
			PositionSubMenu(this);
			document.getElementById(this.id).style.background = getBackgroundImage(-342, -92);
		}
		element.onmouseout = function() { 
			document.getElementById(this.id + "Menu").style.display = "none"; 
			document.getElementById(this.id).style.background = "none";
		}
	},
	'#videosMenu' : function(element) {
		element.onmouseover = function() { 
			this.style.display = "inline"; 
			document.getElementById("videos").style.background = getBackgroundImage(-342, -92);
		}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			document.getElementById("videos").style.background = "none";
		}
	},
	'#humor' : function(element) {
		element.onmouseover = function() { 
			PositionSubMenu(this); 
			document.getElementById(this.id).style.background = getBackgroundImage(-410, -92);
		}
		element.onmouseout = function() { 
			document.getElementById(this.id + "Menu").style.display = "none"; 
			document.getElementById(this.id).style.background = "none";
		}
	},
	'#humorMenu' : function(element) {
		element.onmouseover = function() { 
			this.style.display = "inline"; 
			document.getElementById("humor").style.background = getBackgroundImage(-410, -92);
		}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			document.getElementById("humor").style.background = "none";
		}
	},
	'#games' : function(element) {
		element.onmouseover = function() {
			PositionSubMenu(this); 
			document.getElementById(this.id).style.background = getBackgroundImage(-478, -92);
		}
		element.onmouseout = function() {
			document.getElementById(this.id + "Menu").style.display = "none"; 
			document.getElementById(this.id).style.background = "none";
		}
	},
	'#gamesMenu' : function(element) {
		element.onmouseover = function() {
			this.style.display = "inline"; 
			document.getElementById("games").style.background = getBackgroundImage(-478, -92);
			}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			document.getElementById("games").style.background = "none";
		}
	},
	'#officeFun' : function(element) {
		element.onmouseover = function() { 
			PositionSubMenu(this); 
			document.getElementById(this.id).style.background = getBackgroundImage(-542, -92);
		}
		element.onmouseout = function() { 
			document.getElementById(this.id + "Menu").style.display = "none"; 
			setOriginalMenuStyle(this);
		}
	},
	'#officeFunMenu' : function(element) {
		element.onmouseover = function() { 
			this.style.display = "inline"; 
			document.getElementById("officeFun").style.background = getBackgroundImage(-542, -92);
		}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			setOriginalMenuStyle(document.getElementById("officeFun"));
		}
	},
	'#contests' : function(element) {
		element.onmouseover = function() { 
			PositionSubMenu(this); 
			document.getElementById(this.id).style.background = getBackgroundImage(-629, -92);
		}
		element.onmouseout = function() {
			document.getElementById(this.id + "Menu").style.display = "none"; 
			document.getElementById(this.id).style.background = "none";
		}
	},
	'#contestsMenu' : function(element) {
		element.onmouseover = function() { 
			this.style.display = "inline"; 
			document.getElementById("contests").style.background = getBackgroundImage(-629, -92);
		}
		element.onmouseout = function() { 
			this.style.display = "none"; 
			document.getElementById("contests").style.background = "none";
		}
	},

	'div.scheduleTab' : function(element){ 
		element.onclick = function(){ 
			//dbscott function
			
			//Schedule.BuildSelectedTab(this);
			 //commented out to prevent call to load schedule dbs
			Schedule.LoadMainSchedule(this, document.getElementById("scheduleBody"));
			
			Behaviour.apply();
			loadScheduleTab(this.attributes.numericdate.value);
		} 
	},
	*/
	/*
	'div.scheduleRow2':	function (element) { 
		element.onclick = function () {Schedule.cleanWhitespace(this);
		Schedule.SelectRowDetails(this);
		//var detailId = this.getAttribute("linkId");
		//document.getElementById("details_" + detailId).setAttribute("style", "");
		//alert(document.getElementById("details_" + detailId).getAttribute("style"));
		
		 
		showAlert();
		showDescription(this.getAttribute("linkId"));
		//alert(document.getElementById("details_" + detailId).getAttribute("style"));
		
		
		
		
		Schedule.LoadAdditionalInfo(this,
			(this.childNodes[1].attributes.franchiseairingid?this.childNodes[1].attributes.franchiseairingid:this.childNodes[1].attributes.franchiseAiringId).value, 
			(this.childNodes[1].attributes.franchiseid?this.childNodes[1].attributes.franchiseid:this.childNodes[1].attributes.franchiseId).value, 
			(this.childNodes[2].attributes.titleid?this.childNodes[2].attributes.titleid:this.childNodes[2].attributes.titleId).value);
		Schedule.LoadRelatedItems(
			(this.childNodes[2].attributes.titleid?this.childNodes[2].attributes.titleid:this.childNodes[2].attributes.titleId).value);
			
			}; 
	 },	
	
	'div.scheduleRow1': function (element) { 
		element.onclick = function () {
			Schedule.cleanWhitespace(this);
			 
			Schedule.SelectRowDetails(this);
			//var detailId = this.getAttribute("linkId");
		///document.getElementById("details_" + detailId).setAttribute("style", "");
		//alert(document.getElementById("details_" + detailId).getAttribute("style"));
		 showAlert();
		showDescription(this.getAttribute("linkId"));
		//alert(document.getElementById("details_" + detailId).getAttribute("style"));
		
			
			Schedule.LoadAdditionalInfo(this,
			(this.childNodes[1].attributes.franchiseairingid?this.childNodes[1].attributes.franchiseairingid:this.childNodes[1].attributes.franchiseAiringId).value, 
			(this.childNodes[1].attributes.franchiseid?this.childNodes[1].attributes.franchiseid:this.childNodes[1].attributes.franchiseId).value, 
			(this.childNodes[2].attributes.titleid?this.childNodes[2].attributes.titleid:this.childNodes[2].attributes.titleId).value);
			
			Schedule.LoadRelatedItems(
			(this.childNodes[2].attributes.titleid?this.childNodes[2].attributes.titleid:this.childNodes[2].attributes.titleId).value);
			
			}; 
	 },
	*/

	 '#btnUp' :function (element) {
	 	element.onmousedown = function() {
	 		ActionRepeater.addAction('scrollUp', 75, function(){if (
	 								document.getElementById('scheduleLeftCol_content').scrollTop > 10){
	 									document.getElementById('scheduleLeftCol_content').scrollTop -=10;
	 								}
	 								else 
	 								{
	 									document.getElementById('scheduleLeftCol_content').scrollTop = 0
	 								}
	 							});
	 		ActionRepeater.startAction('scrollUp');
	 	}
	 	element.onmouseup = function() {
	 		ActionRepeater.removeAction('scrollUp');
	 	}
	 	element.onmouseout = function() {
	 		ActionRepeater.removeAction('scrollUp');
	 	}
	 },
	 '#btnDn' :function (element) {
	 	 	element.onmousedown = function() {
	 	 		ActionRepeater.addAction('scrollDown', 75, function(){if (document.getElementById('scheduleLeftCol_content').scrollTop < document.getElementById('scheduleLeftCol_content').scrollHeight){document.getElementById('scheduleLeftCol_content').scrollTop +=10;}else {document.getElementById('scheduleLeftCol_content').scrollTop = document.getElementById('scheduleLeftCol_content').scrollHeight}});
	 	 		ActionRepeater.startAction('scrollDown');
	 	 	}
	 	 	element.onmouseup = function() {
	 	 		ActionRepeater.removeAction('scrollDown');
	 	 	}
	 	 	element.onmouseout = function() {
	 	 		ActionRepeater.removeAction('scrollDown');
	 	 	}
	 },
	 
	 '#additionalInfo_btnUp' :function (element) {
	 	 	element.onmousedown = function() {
	 	 		ActionRepeater.addAction('scrollUp', 75, function(){if (
	 	 								document.getElementById('additionalInfo').childNodes[1].scrollTop > 10){
	 	 									document.getElementById('additionalInfo').childNodes[1].scrollTop -=10;
	 	 								}
	 	 								else 
	 	 								{
	 	 									document.getElementById('additionalInfo').childNodes[1].scrollTop = 0
	 	 								}
	 	 							});
	 	 		ActionRepeater.startAction('scrollUp');
	 	 	}
	 	 	element.onmouseup = function() {
	 	 		ActionRepeater.removeAction('scrollUp');
	 	 	}
	 	 	element.onmouseout = function() {
	 	 		ActionRepeater.removeAction('scrollUp');
	 	 	}
	 	 },
 	 '#additionalInfo_btnDn' :function (element) {
	 	 	 	element.onmousedown = function() {
	 	 	 		ActionRepeater.addAction('scrollDown', 75, function(){if (document.getElementById('additionalInfo').childNodes[1].scrollTop < document.getElementById('additionalInfo').childNodes[1].scrollHeight){document.getElementById('additionalInfo').childNodes[1].scrollTop +=10;}else {document.getElementById('additionalInfo').childNodes[1].scrollTop = document.getElementById('additionalInfo').childNodes[1].scrollHeight}});
	 	 	 		ActionRepeater.startAction('scrollDown');
	 	 	 	}
	 	 	 	element.onmouseup = function() {
	 	 	 		ActionRepeater.removeAction('scrollDown');
	 	 	 	}
	 	 	 	element.onmouseout = function() {
	 	 	 		ActionRepeater.removeAction('scrollDown');
	 	 	 	}
	 	 },
	 	 
	 '#relatedItems_btnUp' :function (element) {
	 	 	 	element.onmousedown = function() {
	 	 	 		ActionRepeater.addAction('scrollUp', 75, function(){if (
	 	 	 								document.getElementById('relatedItems').scrollTop > 10){
	 	 	 									document.getElementById('relatedItems').scrollTop -=10;
	 	 	 								}
	 	 	 								else 
	 	 	 								{
	 	 	 									document.getElementById('relatedItems').scrollTop = 0
	 	 	 								}
	 	 	 							});
	 	 	 		ActionRepeater.startAction('scrollUp');
	 	 	 	}
	 	 	 	element.onmouseup = function() {
	 	 	 		ActionRepeater.removeAction('scrollUp');
	 	 	 	}
	 	 	 	element.onmouseout = function() {
	 	 	 		ActionRepeater.removeAction('scrollUp');
	 	 	 	}
	 	 	 },
	 '#relatedItems_btnDn' :function (element) {
				element.onmousedown = function() {
					ActionRepeater.addAction('scrollDown', 75, function(){if (document.getElementById('relatedItems').scrollTop < document.getElementById('relatedItems').scrollHeight){document.getElementById('relatedItems').scrollTop +=10;}else {document.getElementById('relatedItems').scrollTop = document.getElementById('relatedItems').scrollHeight}});
					ActionRepeater.startAction('scrollDown');
				}
				element.onmouseup = function() {
					ActionRepeater.removeAction('scrollDown');
				}
				element.onmouseout = function() {
					ActionRepeater.removeAction('scrollDown');
				}
	 },
	 
	 '#btnPrev' :function (element) {
	 	element.onclick = function(){ 
	 		
	 			Schedule.BuildMainScheduleTabsPreviousWeek(document.getElementById("menu"),document.getElementById("scheduleBody"));
	 			Behaviour.apply();
	 			loadScheduleTab(this.attributes.numericdate.value);
	 		 
	 	}
	 	
	 },
	 '#btnNext' :function (element) {
	 	element.onclick = function(){ 
	 		Schedule.BuildMainScheduleTabsNextWeek(document.getElementById("menu"),document.getElementById("scheduleBody"));
	 		Behaviour.apply();
	 		loadScheduleTab(this.attributes.numericdate.value);
	 	}
	 	
	 }

};

Behaviour.register(behaviours);

/*** OnLoad functions ***/
