// JavaScript Document

/*clear text box*/

function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
} 
function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}

/*smooth scroll*/

window.onDomReady(function(){ new SmoothScroll({duration: 800}); }); 

/*accordion*/

		window.addEvent('domready', function(){
			var accordion = new Accordion('h3.atStart', 'div.atStart', {
				opacity: false,
				onActive: function(toggler, element){
					toggler.setStyle('color', '#ff3300');
					toggler.setStyle('background', 'url(images/icon_close.gif) no-repeat left 3px #efede5');
				},				
				onBackground: function(toggler, element){
					toggler.setStyle('color', '#0054a6');
					toggler.setStyle('background', 'url(images/icon_open.gif) no-repeat left 3px');
				}
			}, $('accordion'));
		});
		
/*lightbox*/

			window.addEvent('domready',function(){
				Lightbox.init({descriptions: '.lightboxDesc', showControls: true});
			});
			
/*text size*/

function doZoom(size)
{
document.getElementById('zoom').style.fontSize=size+'em';
}

/*collapes*/

function toggleMe(obj, a){
	var e=document.getElementById(a);
		if(!e)return true;
		if(e.style.display=="none"){
		e.style.display="block"
		obj.firstChild.data='Less links';
} else {
		e.style.display="none"
		obj.firstChild.data='Show all links';
}
return true;
}

/*IE filter*/

document.writeln("<style type=\"text\/css\">");
document.writeln("<!--");
document.writeln(".photobox a:hover img {");
document.writeln("filter: alpha(opacity=90);");
document.writeln("-moz-opacity: 0.9;");
document.writeln("}");

document.writeln(".changecss {");
document.writeln("filter: alpha(opacity=80);");
document.writeln("-moz-opacity: 0.8;");
document.writeln("}");

document.writeln(".message:hover span {");
document.writeln("filter: alpha(opacity=80);");
document.writeln("-moz-opacity: 0.8;");
document.writeln("word-break:normal;");
document.writeln("text-justify:inter-ideograph;");
document.writeln("}");

document.writeln(".info:hover span {");
document.writeln("filter: alpha(opacity=80);");
document.writeln("-moz-opacity: 0.8;");
document.writeln("word-break:normal;");
document.writeln("text-justify:inter-ideograph;");
document.writeln("}");

document.writeln(".example a:hover img {");
document.writeln("filter: alpha(opacity=90);");
document.writeln("-moz-opacity: 0.9;");
document.writeln("}");

/*PNG fix*/

document.writeln("#logo h1, #header, .decoration_left, .decoration_right, #footerlogo h4 {");
document.writeln("behavior: url(js/iepngfix.htc);");
document.writeln("}");

document.writeln("-->");
document.writeln("<\/style>")
