// Show Hide Objects
function displayHide(obj) 
{
	var ele = document.getElementById(obj).style;
	if (ele.display == "block")
	{
		ele.display = "none";
	}
	else
	{
		ele.display = "block";
	}
	return false;
}


// Show Hide Objects
var winName=0;


var exampleWin;

function openNewWindow(winurl,winname,winfeatures)
{
	//This launches a new window and then
	//focuses it if window.focus() is supported.
	exampleWin = window.open(winurl,winname,winfeatures);

		//delay a bit here because IE4 encounters errors
		//when trying to focus a recently opened window
 		setTimeout('exampleWin.focus();',250);

}
















//copyright www.mad4milk.net



var count = 0;

var allStretch, linktextsize;

var m4mSet = {

	'body': function(){

		ScrollLinks.start();

	},



	'#container' : function(element){

		linktextsize = new fx.RememberText(element);

		var divs = $S(".sliding");

		allStretch = new fx.MultiFadeSize(divs, {duration: 400});

	},



	'#textsize a.one' : function(element){

		element.style.cursor = "pointer";

		element.onclick = function(){

			if (linktextsize) linktextsize.custom(1.1, 1);

		}

	},



	'#textsize a.three' : function(element){

		element.style.cursor = "pointer";

		element.onclick = function(){

			if (linktextsize) linktextsize.custom(1, 1.1);

		}

	},



	'div.slidingblock' : function(element){

		Element.cleanWhitespace(element);

	},



	'h5.slidetitle' : function(h5){

		count += 1;

		h5.style.cursor = "pointer";

		var div = h5.nextSibling;

		if (count != 1) allStretch.hide(div, 'height');

		h5.onclick = function(){

			if (allStretch) allStretch.showThisHideOpen(div, 100, 'height');

		}

	}

};

//Attitude.append(m4mSet);



var ScrollLinks = {

	currentHash: false,

	start: function(){

		this.scroll = new fx.Scroll({duration: 800, onComplete: function(){this.end();}.bind(this)});

		this.allinks = $S('a');

		this.allinks.action({

			initialize: function(lnk){

				if ((lnk.href && lnk.href.indexOf('#') != -1) && ( (lnk.pathname == location.pathname) || ('/'+lnk.pathname == location.pathname) ) && (lnk.search == location.search)) {

					lnk.onclick = function(){

						ScrollLinks.scroll.clearTimer();

						this.initialHref = this.href;

						this.initialHash = this.hash;

						this.href = "javascript:void(0)";

						setTimeout(function(){this.href = this.initialHref;}.bind(this), 200);

						ScrollLinks.go(this);

					}

				}

			}

		});

	},



	go: function(link){

		this.currentHash = link.initialHash.slice(1);

		if (this.currentHash) {

			this.allinks.action({

				initialize: function(lnk){

					if (lnk.id == ScrollLinks.currentHash){

						if (!window.opera) ScrollLinks.scroll.scrollTo(lnk);

						else ScrollLinks.scroll.scrollTo(lnk.parentNode);

						return;

					}

				}

			});

		}

	},



	end: function(){

		if (!/Konqueror|Safari|KHTML/.test(navigator.userAgent)) window.location.hash = "#"+this.currentHash;

		this.currentHash = false;

	}

}