/** 
 * General JavaScripts
 * (c)2004 Nick Nettleton / Plum Digital Media
 * www.plumdigitalmedia.com
 */
window.onload = function()
{
	// rollovers
	autoRoll() ;
	if(window.onload2) window.onload2()
}

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  return false;
}
//-->

/**
 * Clears the default value of a form element
 */
function clearDefault(el)
{
	if(el.value == el.defaultValue) el.value = '' ;
}

/**
 * Automatically creates rollovers for images with an oversrc attribute.
 * If the image has the attribute selected="selected", then its is displayed
 * in a selected state, using the oversrc.
 */
function autoRoll()
{
	if(!document.images || !document.getElementById) return ;
	var imgs	= document.images ;
	var plds	= [] ;
	for(var i=0; i<imgs.length; i++){
		if(imgs[i].getAttribute("oversrc")){
			var img = imgs[i] ;
			img.outsrc		= img.src ;
			img.oversrc		= img.getAttribute("oversrc") ;
			if(img.getAttribute("selected")){
				img.src	= img.oversrc ;
			} else {
				img.onmouseout	= function(){ this.src = this.outsrc }
				img.onmouseover	= function(){ this.src = this.oversrc }
			}
			if(img.outsrc != img.oversrc){
				plds[i]			= new Image() ;
				plds[i].src		= img.oversrc ;
			}
		}
	}
}

/**
 * For the preview on comments
 */
function ReloadTextDiv()
{
document.getElementById('TextDisplay').innerHTML = '<p>'+document.getElementById('DynamicText').value.replace(/(\n|\r)/g,'<br />').replace(/(<br \/>){2,}/gi,'<'+'/p><p>')+'<'+'/p>';
}
