window.onload=function() {
	var all_links=document.links;
	var all_links_len=all_links.length;
	for (var i=0; i<all_links_len; i++) {
		if (all_links[i].getAttribute("rel")=="external") {
			all_links[i].onclick=function() {
				window.open(this.href);
				return false;
			}
		}
	}
	if ($("index-testimonials")) {
		var testimonials=$("index-testimonials").getElementsByTagName("li");
		var testimonials_len=testimonials.length;
		for (var i=0; i<testimonials_len; i++) {
			testimonials[i].style.display="none";
			testimonials[i].style.opacity=1;
		}
		testimonials[0].style.display="block";
		var i=0;
		var loopThroughLIs=setInterval(function() {
			/*var z=i;
			var fadeLI=setInterval(function() {
				testimonials[z].style.opacity=(testimonials[z].style.opacity)-0.05;
				if (testimonials[z].style.opacity<0.05) {
					testimonials[z].style.display="none";
					clearInterval(fadeLI);
				}
			}, 80);*/
			testimonials[i].style.display="none";
			i++;
			if (i==4) i=0;
			testimonials[i].style.display="block";
			testimonials[i].style.opacity=1;
		}, 8000);
	}
	if ($("recent_jobs_ol")) {
		var Scroller=function(frameId, contentId, tempo, w, h) {
			// default parameters
			var thisObj=this;
			this.nXlocation=0;
			this.nYlocation=0;
			this.nFrameHeight=h;
			this.nFrameWidth=w;
			this.nTempo=tempo;
			this.scrollerStat=true;
			this.objFrame=$(contentId);
			// frame parameter
			f=$(frameId);
			f.style.height=h+"px";
			f.style.width=w+"px";
			this.MoveScroller=function() {
				this.nXlocation--;
				this.objFrame.style.top=this.nXlocation+"px";
			}
			this.CheckScroller=function() {
				if ((0-this.nXlocation)>this.objFrame.offsetHeight) this.nXlocation=this.nFrameHeight;
			}
			this.RunScroll=function() {
				if (this.scrollerStat) {
					this.MoveScroller();
					this.CheckScroller();
				}
			}
			this.StartScroll=function() {
				intval=setInterval(function() {thisObj.RunScroll();},thisObj.nTempo);
			}
			this.StopScroll=function() {
				clearInterval(intval);
			}
		}
		var s=new Scroller("scrollframe", "recent_jobs_ol", 44, 140, 140);
		s.StartScroll();
		$("recent_jobs_ol").onmouseover=function() {s.StopScroll();}
		$("recent_jobs_ol").onmouseout=function() {s.StartScroll();}
	}
}
function $(id) {return document.getElementById(id);}
