function init(){
	initRolloverImages();
}

//
// DOM rollover script
// apply "rollover" class to an image,(or input type="image")
// will swap for image with "_over" appended to the filename
//
function initRolloverImages(){
	var i;
	preLoadImgs = [];
	rolloverImages=document.getElementsByTagName("img");
	rolloverInputs=document.getElementsByTagName("input");
	rolloverTags=[]
	for(i in rolloverImages){
		rolloverTags.push(rolloverImages[i]);
	}
	for(i in rolloverInputs){
		rolloverTags.push(rolloverInputs[i]);
	}
	for(i in rolloverTags){
		tag = rolloverTags[i]
		if(tag.className == "rollover"){
			src = new String(tag.src)
			tag.setAttribute("outSrc" , src);
			ext = src.match(/(\.)([^\.]*$)/)[2];
			regEx = new RegExp("\."+ext, "i")  
			tag.setAttribute("overSrc" , src.replace(regEx, "_over."+ext));
			preLoadImgs[i] = new Image();
			preLoadImgs[i].src = tag.getAttribute("overSrc");
			tag.onmouseover = function() {
				this.src = this.getAttribute("overSrc");
				}
			tag.onmouseout = function() {
				this.src = this.getAttribute("outSrc");
				}
		}
	}

}




//clears the cursor current field of default to accept user input
function clearDefault(el) {
  		if (el.defaultValue==el.value) el.value = ""
}

/* 
Correctly handle PNG transparency in Win IE 5.5 & 6.
http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.

Use in <HEAD> with DEFER keyword wrapped in conditional comments:
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
*/

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 5.5) && (document.body.filters)) 
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}




function initMooFx(){
	
	var stretchers = $$('div.accordion');
	stretchers.each(function(item){
		item.setStyles({'height': '0', 'overflow': 'hidden'});
	});
	
	window.onload = function(){ //safari cannot get style if window isnt fully loaded
		
		var togglers = $$('h3.toggler');
		
		var bgFx = [];
		
		togglers.each(function(toggler, i){
			toggler.defaultColor = toggler.getStyle('background-color');
			
			//fx creation
			bgFx[i] = new Fx.Color(toggler, 'background-color', {wait: false});
		});
	
		var myAccordion = new Fx.Accordion(togglers, stretchers, { opacity: true, start: true, transition: Fx.Transitions.quadOut,
			
			onActive: function(toggler, i){
				bgFx[i].toColor('#ff0000');
				toggler.getFirst().setStyle('color', '#000');
			},
		
			onBackground: function(toggler, i){
				bgFx[i].clearTimer();
				toggler.setStyle('background-color', '#2f2f2f');
				toggler.getFirst().setStyle('color', '#FFF');
			}
		});
		
		//anchors
		function checkHash(){
			var found = false;
			$$('h3.toggler a').each(function(link, i){
				if (window.location.hash.test(link.hash)){
					myAccordion.showThisHideOpen(i);
					found = true;
				}
			});
			return found;
		}

		if (!checkHash()) myAccordion.showThisHideOpen(0);
		
};
	
	try {
		Window.disableImageCache();
	}catch(e){}
	
}
  
  