
var nr=0;
window.onload = function load_modules(){
	if(document.getElementById("gallery_left_arrow")){
document.getElementById("gallery_left_arrow").onclick=Function('left();return false');
document.getElementById("gallery_right_arrow").onclick=Function('right();return false');
	}
	
	if(document.getElementById('testimonials')){
		var h=document.getElementById('testimonials').clientHeight;
		var n=document.getElementById('testimonials').getElementsByTagName('a').length;
		var m;
		if(document.getElementById('consultants')){m=130;}
		var x=0;
		while(x<=n-1){
		if(document.getElementById('testimonials').getElementsByTagName('a')[x]){
			//document.getElementById('testimonials').getElementsByTagName('a')[x].style.height=(h+m)+"px";
			}
		x++;
		}
setTimeout('testimonials()',7000);
	}


//document.getElementById('testimonials').onmouseover=testimonials_stop;
//document.getElementById('testimonials').onmouseout=testimonials_start;
}
var t;
var stop_this=0;

function testimonials(){
if(stop_this==0){
var h=document.getElementById('testimonials').clientHeight;
var n=document.getElementById('testimonials').getElementsByTagName('a').length;
var aw=document.getElementById('testimonials').getElementsByTagName('a')[0].clientWidth;
var m=document.getElementById('testimonials').style.marginLeft.split("px")[0];


if(!m){m=0;}
var to=m-aw-8;
if(to<n*((aw-1)*-1-8)){to=0;}
opacity('testimonials',m, to, 500, 'marginLeft');
}
t = setTimeout('testimonials()',7000);
}

function testimonials_stop(){stop_this=1;}
function testimonials_start(){stop_this=0;}


function change(id){
var s=document.getElementById(id).href;
document.getElementById('embed').src=s;
var t=document.getElementById('map').title;
document.getElementById('map').title=id;
document.getElementById(t).className='img';
document.getElementById(id).className='img active';
}


function left(){
var g=document.getElementById("browse").style.marginTop.split("px").join("");
var c=parseInt(g)+(5*47);
if(c<=0){
opacity("browse", parseInt(g), c, 500,"marginTop");
}
}


function right(){
var g=document.getElementById("browse").style.marginTop.split("px").join("");
if(!g){g=0;}
var c=parseInt(g)-(5*47);
if(c>=document.getElementById("browse").getElementsByTagName('a').length*-47){
opacity("browse", parseInt(g), c, 500,"marginTop");
}
}

var ti;
function loop(nr){
//clearTimeout(ti);
//var u=document.getElementById("browse").getElementsByTagName('span')[0].title;
//document.getElementById("browse").getElementsByTagName("a")[u].className="";
var c=document.getElementById("browse").getElementsByTagName('a');

nr++;
if(nr>c.length){nr=1;}

document.getElementById("browse").getElementsByTagName('span')[0].title=nr;
var x=1;
while (x<=c.length){
if(x==nr){
	
	var u=c[(x-1)].rel.split("*");
	var n=opacity('browse2',1, 0, 500, 'opacity');
	var r=u[0].split("amp;").join("").split("w=49").join("w=899").split("h=49").join("h=444");
	var n=setTimeout('document.getElementById("browse2").style.backgroundImage="url('+r+')"',500);
	var t=setTimeout('document.getElementById("client").innerHTML="'+u[1]+'"',500);
	var t=setTimeout('document.getElementById("link").href="'+u[2]+'"',500);
	var t=setTimeout("var t= opacity('browse2',0, 1, 500, 'opacity');",500);
}
x++;
}
//ti=setTimeout('loop('+nr+')',5000);
}


function opacity(id, opacStart, opacEnd, speed,type) {
exampleFx = new Fx.Tween(id, {property: type,duration: speed, transition: Fx.Transitions.Quart.easeInOut});
exampleFx.start(opacStart,opacEnd);
return exampleFx;
}
