/**
* This file contains extentions of the Prototype based JavaScript libraries. 
* 
* For Prototype, Scriptaculous, Behaviour, Window, ect.
* 
* @author James Grundner <jgrundner@dyrectmedia.com>
* @version $Id: class-extentions.js,v 1.1 2006/07/13 20:10:18 jgrundner Exp $
* @package 		CMS 
* @copyright 	Copyright 2006
* 
*/

/**
* Extend the Prototype.Element class
* 
* This differs from the Element.toggle method is that 
* it works on the "element.style.display" attribute instead of 
* the "element.visibility" attribute. This solves the problem 
* where visibility takes up page realestate even when hidden.
* 
* @author James Grundner <jgrundner@dyrectmedia.com>
* @param string The id name of the DOM object being effected
*/
Element.toggleDisplay = function() {
	for (var i = 0; i < arguments.length; i++) {
		if (Element.getStyle($(arguments[i]), 'display') == 'none') {
			Element.show($(arguments[i]));
		}else{
			Element.hide($(arguments[i]));
		}
	}
}
