// Place application-specific JavaScript in here

function $P(value) {
  return parseInt(document.documentElement.clientWidth * value / 100.0);
}

function evalRequest(request) { eval(request.responseText); };

// create a rollover effect for the element give in parameter 
function rollover(element, backgroundColor, highlightColor) {
  if (((typeof element == 'object') || 
        (typeof element == 'function')) && 
        (element.length))
    element = element;
  else
    element = $(element);

  Event.observe(element, 'mouseover', function(e) { Element.setStyle(element,{backgroundColor: highlightColor}); }, false);
  Event.observe(element, 'mouseout', function(e) { Element.setStyle(element,{backgroundColor: backgroundColor}); }, false);       
}

// create a rollover effect on each element which owns a specific className for IE !
function rolloverForIE(className, backgroundColor, highlightColor) {
    if (/MSIE/.test(navigator.userAgent) == false)
      return;

    if (className == null || className.length == 0)
      return false;

		var nodesList = document.getElementsByClassName(className);
		
		$A(nodesList).each(function(node) {
		    if (/headerRow/.test(node.className) == false)
				  rollover(node, backgroundColor, highlightColor);
			});
}