<!--


$(function()
			{
				
				// this initialises the demo scollpanes on the page - each with different
				// animation characteristics.
				$('#pane1').jScrollPane({animateTo:true, animateInterval:1350, animateStep:25});
                $('#pane1').jScrollPane({showArrows:true});
				// set up the links
				
			});

	
function desinitLogin() {
	document.getElementById("divlog").style.display = "none";
	document.getElementById(linkId).href="javascript:initLogin();";
}
function initLogin() {
	logId = 'loginform';
	linkId = 'linklog';
	image = document.getElementById(logId);
	setOpacity(image, 0);
	document.getElementById("divlog").style.display = "block";
	image.style.visibility = "visible";
	fadeIn(logId,0);
	document.getElementById(linkId).href="javascript:desinitLogin();";
}
function initImage(newSrc) {
	imageId = newSrc;
	image = document.getElementById(imageId);
	setOpacity(image, 0);
	image.style.visibility = "visible";
	fadeIn(imageId,0);
}

function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			setOpacity(obj, opacity);
			opacity += 25;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 70);
		}
	}
}
function setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}

function chImg(newSrc, newText)
	{
	  if (document.getElementById)
		{
		document.getElementById("thephoto").src=newSrc;
		document.getElementById("thephoto").style.visibility= "hidden";
		document.getElementById("thephoto").style.visibility= "visible";
		document.getElementById("thetext").innerHTML= newText;
		initImage('thephoto');		}
	  else if (document.all)
		{
	    document.all["thephoto"].src=newSrc;
    	document.all["thephoto"].style.visibility= "hidden";
		initImage('thephoto');
		}
	}

	
function chMain(newSrc)
	{
	  if (document.getElementById)
		{
		document.getElementById("big").src=newSrc;
		document.getElementById("big").style.visibility= "hidden";
		document.getElementById("big").style.visibility= "visible";
		initImage('big');		}
	  else if (document.all)
		{
	    document.all["big"].src=newSrc;
    	document.all["big"].style.visibility= "hidden";
		initImage('thephoto');
		}
	}

	
	
window.onload = function() {initImage('thephoto');  }

// -->

	   $(document).ready(
				function(){
					$('ul#newsticker').innerfade({
						speed: 'normal',
						timeout: 5000,
						type: 'sequence',
						containerheight: 'auto'
					});
					
			});

		//<![CDATA[
		<!-- 
		function clearText(thefield){
		  if (thefield.defaultValue==thefield.value)
			thefield.value = ""
		}
		function addText(thefield,thetext){
		if (thefield.value=="")
		thefield.value = thetext;
		}
		 		 
		// -->
		//]]>
    $(function() {
        $('#lightbox a').lightBox();
    });
	
		$(document).ready(function(){
		// apply ifixpng
	 	$('img[@src$=.png], #logo').ifixpng(); 
	});	

$(function() {
	$('#slideshow').cycle({
		fx:     'fade',
		prev:   '#prev',
		next:   '#next',
		nowrap:  1,
		timeout: 0
	});
});

function onAfter(curr, next, opts) {
    var index = $(this).parent().children().index(this);
    $('#prev')[index == 0 ? 'hide' : 'show']();
    $('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}

