// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults


// function show_tip(id, mouse_x, mouse_y) {
// 	tooltip = $('tooltip_' + id);
// 	Element.show(tooltip);
// 
//   	var dimensions = Element.getDimensions(tooltip);
// 	var element_width = dimensions.width;
// 	var element_height = dimensions.height;
// 	
// 	if ( (element_width + mouse_x) >= ( getWindowWidth() - 5) ){ // too big for X
// 		mouse_x = mouse_x - element_width;
// 		mouse_x = mouse_x - 5;
// 	} else {
// 		mouse_x = mouse_x + 5;
// 	}
// 	
// 	if ( (element_height + mouse_y) >= ( getWindowHeight() - 5) ){ // too big for Y
// 		mouse_y = mouse_y - element_height;
// 	 // apply min_distance to make sure that the mouse is not on the tool-tip
// 		mouse_y = mouse_y - 5;
// 	} else {
// 		mouse_y = mouse_y + 5;
// 	}
// 	
// 	alert(mouse_y);
// 
// }
// 
// function hide_tip(id) {
// 	Element.hide('tooltip_' + id);
// }
//  
// 
// function getWindowHeight (){
//   var innerHeight;
// 	  if (navigator.appVersion.indexOf('MSIE')>0) {
// 		  innerHeight = document.body.clientHeight;
//   } else {
// 		  innerHeight = window.innerHeight;
//   }
//   return innerHeight;	
// }
// 
// function getWindowWidth (){
//   var innerWidth;
// 	  if (navigator.appVersion.indexOf('MSIE')>0) {
// 		  innerWidth = document.body.clientWidth;
//   } else {
// 		  innerWidth = window.innerWidth;
//   }
//   return innerWidth;	
// }

