/* 
 * Tiny MCE Init
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
 		convert_urls : false,
		debug : false,
		object_resizing : false,
		height : "200px",
		width : "450px",
		theme_advanced_layout_manager : "SimpleLayout",
		theme_advanced_buttons1 : "bold,italic,underline,separator,undo,redo,separator,cleanup,separator,bullist,numlist,separator,link,image,code,separator,help",
		theme_advanced_buttons2 : "",
		theme_advanced_buttons3 : ""
	});

 */


/*
 * Parameters:   parentElementTag - parent tag name
 *               parentElementClass - class assigned to the parent; if
 *               null, all parentElementTag elements will be affected
 *               childElementTag -  tag name of the child elements to
 *               apply the styles to
 *               styleClasses - comma separated list of any number of
 *               style classes (using 2 classes gives the classic
 *               "zebra" effect)
 */

function striper(parentElementTag, parentElementClass, childElementTag, styleClasses)
{
	var i=0,currentParent,currentChild;
	// capability and sanity check
	if ((document.getElementsByTagName)&&(parentElementTag)&&(childElementTag)&&(styleClasses)) {
		// turn the comma separate list of classes into an array
		var styles = styleClasses.split(','); 
		// get an array of all parent tags
		var parentItems = document.getElementsByTagName(parentElementTag);
		
		while (currentParent = parentItems[i++]) {
			// if parentElementClass was null, or if the current
			// parent's class matches the specified class
			if (currentParent.className != "nostripe") {
				if ((parentElementClass == null)||(currentParent.className == parentElementClass)) {
					var j=0,k=0;
					// get all child elements in the current parent element
					var childItems = currentParent.getElementsByTagName(childElementTag);
					// loop through all child elements
					while (currentChild = childItems[j++]) {
						// based on the current element and the number
						// of styles in the array, work out which class
						// to apply
						k = (j+(styles.length-1)) % styles.length;
						// add the class to the child element - if any
						// other classes were already present, they're
						// kept intact
						currentChild.className = currentChild.className+" "+styles[k];
					}
			 	}
			}
		}
	}
}


/*
 *  Popup window (From KU Template)
 */

    function popup(url, id, width, height)
    {
      newwindow =
window.open(url,id,'toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=yes,width='
+ width + ',height=' + height);
      newwindow.focus();
    }

	
	

