var TINY={};

function T$(i){return document.getElementById(i)}
function T$$(e,p){return p.getElementsByTagName(e)}

TINY.slider=function(){
	function slide(n,p){this.n=n; this.init(p)}
	slide.prototype.init=function(p){
		var s=T$(p.id), u=this.u=T$$('ul',s)[0], c=T$$('li',u), l=c.length, i=this.l=this.c=0;
		if(p.navid&&p.activeclass){this.g=T$$('li',T$(p.navid)); this.s=p.activeclass}
		this.a=p.auto||0; this.p=p.resume||0; this.v=p.vertical||0; s.style.overflow='hidden';
		for(i;i<l;i++){if(c[i].parentNode==u){this.l++}}
		if(this.v){;
			u.style.top=0; this.h=p.height||c[0].offsetHeight; u.style.height=(this.l*this.h)+'px'
		}else{
			u.style.left=0; this.w=p.width||c[0].offsetWidth; u.style.width=(this.l*this.w)+'px'
		}
		this.pos(p.position||0,this.a?1:0)
	},
	slide.prototype.auto=function(){
		this.u.ai=setInterval(new Function(this.n+'.move(1,1)'),this.a*1000)
	},
	slide.prototype.move=function(d,a){
		var n=this.c+d, i=d==1?n==this.l?0:n:n<0?this.l-1:n; this.pos(i,a)
	},
	slide.prototype.pos=function(p,a){
		clearInterval(this.u.ai); clearInterval(this.u.si);
		var o=this.v?parseInt(this.u.style.top):parseInt(this.u.style.left),
		t=this.v?p*this.h:p*this.w, d=t>Math.abs(o)?1:-1; t=t*-1; this.c=p;
		if(this.g){for(var i=0;i<this.l;i++){this.g[i].className=i==p?this.s:''}}
		this.u.si=setInterval(new Function(this.n+'.slide('+t+','+d+','+a+')'),20)
	},
	slide.prototype.slide=function(t,d,a){
		var o=this.v?parseInt(this.u.style.top):parseInt(this.u.style.left);
		if(o==t){
			clearInterval(this.u.si); if(a||(this.a&&this.p)){this.auto()}
		}else{
			var v=o-Math.ceil(Math.abs(t-o)*.15)*d+'px';
			this.v?this.u.style.top=v:this.u.style.left=v
		}
	};
	return{slide:slide}
}();

if(document.getElementById('slider') != null) {
var slideshow=new TINY.slider.slide('slideshow',{
	id:'slider',
	auto:3,
	resume:true,
	vertical:false,
	navid:'numbers',
	activeclass:'current',
	position:0
});
}

(function() { var f = document.getElementById('search-top'); if (!f) { f = document.getElementById('searchbox_demo'); } if (f && f.q) { var q = f.q; var n = navigator; var l = location; var su = function () { var u = document.createElement('input'); var v = document.location.toString(); var existingSiteurl = /(?:[?&]siteurl=)([^&#]*)/.exec(v); if (existingSiteurl) { v = decodeURI(existingSiteurl[1]); } var delimIndex = v.indexOf('://'); if (delimIndex >= 0) { v = v.substring(delimIndex + '://'.length, v.length); } u.name = 'siteurl'; u.value = v; u.type = 'hidden'; f.appendChild(u); }; if (n.appName == 'Microsoft Internet Explorer') { var s = f.parentNode.childNodes; for (var i = 0; i < s.length; i++) { if (s[i].nodeName == 'SCRIPT' && s[i].attributes['src'].nodeValue == unescape('http:\x2F\x2Fwww.google.com\x2Fcse\x2Fbrand?form=cse-search-box\x26amp\x3Blang=en')) { su(); break; } } } else { su(); } if (n.platform == 'Win32') { q.style.cssText = ''; } if (window.history.navigationMode) { window.history.navigationMode = 'compatible'; } var b = function() { if (q.value == '') { q.style.background = '#FFFFFF url(http:\x2F\x2Fwww.google.com\x2Fcse\x2Fintl\x2Fen\x2Fimages\x2Fgoogle_custom_search_watermark.gif) left no-repeat'; } }; var f = function() { q.style.background = '#ffffff'; }; q.onfocus = f; q.onblur = b; if (!/[&?]q=[^&]/.test(l.search)) { b(); } } })();

(function() { var f = document.getElementById('search-footer'); if (!f) { f = document.getElementById('searchbox_demo'); } if (f && f.q) { var q = f.q; var n = navigator; var l = location; var su = function () { var u = document.createElement('input'); var v = document.location.toString(); var existingSiteurl = /(?:[?&]siteurl=)([^&#]*)/.exec(v); if (existingSiteurl) { v = decodeURI(existingSiteurl[1]); } var delimIndex = v.indexOf('://'); if (delimIndex >= 0) { v = v.substring(delimIndex + '://'.length, v.length); } u.name = 'siteurl'; u.value = v; u.type = 'hidden'; f.appendChild(u); }; if (n.appName == 'Microsoft Internet Explorer') { var s = f.parentNode.childNodes; for (var i = 0; i < s.length; i++) { if (s[i].nodeName == 'SCRIPT' && s[i].attributes['src'].nodeValue == unescape('http:\x2F\x2Fwww.google.com\x2Fcse\x2Fbrand?form=cse-search-box\x26amp\x3Blang=en')) { su(); break; } } } else { su(); } if (n.platform == 'Win32') { q.style.cssText = ''; } if (window.history.navigationMode) { window.history.navigationMode = 'compatible'; } var b = function() { if (q.value == '') { q.style.background = '#FFFFFF url(http:\x2F\x2Fwww.google.com\x2Fcse\x2Fintl\x2Fen\x2Fimages\x2Fgoogle_custom_search_watermark.gif) left no-repeat'; } }; var f = function() { q.style.background = '#ffffff'; }; q.onfocus = f; q.onblur = b; if (!/[&?]q=[^&]/.test(l.search)) { b(); } } })();

sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
