<!--//--><![CDATA[//><!--

function validateSearch(obj) {
	if(obj.value == "") {
		alert("Please enter a search phrase");
		return false;
	} else {
		location.href = '/cms/search/search2.asp?zoom_query=' + obj.value;
		return false;
	}
}

function flashWrite(flashfile,x,y,flashvar) {
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+ x +"' height='"+ y +"'>");
	document.write("<param name='movie' value='"+ flashfile +"' />");
	document.write("<param name='quality' value='high' />");
	document.write("<param name='flashvars' value='"+ flashvar +"' />");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<embed src='"+ flashfile +"' wmode='transparent' ");
	document.write("flashvars='"+ flashvar +"'  ");
	document.write("quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ x +"' height='"+ y +"'></embed>");
	document.write("</object>");
}

function printYear() {
	var today = new Date();
	document.write(today.getFullYear());
}

function writeEmail(email) {
	document.write('<a href="mailto:'+email+'">'+email+'</a>');
}

function changeTextSize(textSize) {
	document.body.className = 'site ' + textSize;
	return false;
}

function printPage() {
	window.print();
	return false;
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
        
Event.observe(window, 'load', function() {
    var counter = 0;
    $('content').select('div.hiddenBox').each(function(divs){
        var innertags = '';
        divs.select('p').each(function(pEl){
            innertags += '<p>' + pEl.innerHTML + '</p>';
        });
        divs.update('<h2><a href="#" id="btnPlus' + counter + '" class="btnPlus"><img src="/cms/outertemplates/images/btn-open.gif" alt="open" />' + divs.down('h2').innerHTML + '</a></h2><div id="hideThis' + counter + '" class="hideThis">' + innertags + '</div>');            
        counter++;         
    });            
    
    $('content').select('div.hideThis').each(function(divHide){
        divHide.setStyle({height: (divHide.getHeight()+10)+"px"});
        divHide.hide();
    });
    
    $('content').select('a.btnPlus').each(function(aBtn){
        aBtn.observe('click',function(event){
            event.stop();
            if (aBtn.down('img').src.indexOf('btn-open.gif') > -1) {
                aBtn.down('img').src = '/cms/outertemplates/images/btn-close.gif';
                aBtn.down('img').alt = 'close';
            } else {
                aBtn.down('img').src = '/cms/outertemplates/images/btn-open.gif';
                aBtn.down('img').alt = 'open';
            }
                                    
            new Effect.toggle('hideThis' + aBtn.id.substring(aBtn.id.length-1), 'slide', {queue:{position:'end', scope: 'myscopeone'},duration:0.3});
        });                 
    });                 
});
//--><!]]>