/**
 * @author divonei macedo
 */
var imagesplash = new Array("images/splashservices.jpg", "images/splashclients.jpg");
var side = new Array("images/ourclients.jpg", "images/services.jpg");
var Obj, Obj1;


function Init(f){
	//sideFade(f);
	//splashFade(f);
	 web_kit()
	 preaload();	
}

function splashFade(fade)
{
	var i;
	var image = document.getElementById("splashid");	
	fade=="staff" ?  i = 1 :  i = 0;			
	imgPreload = new Image();	
	imgPreload.onload=function(){		
		//alert(imagesplash[i] + " contador " + i);
		image.src = imagesplash[i];			
		var oq = "splashid";
		Fade(oq);
		image.style.display="block";			
				
	}
		imgPreload.src = imagesplash[i];
}

function sideFade(fade){
	var i;
	var image = document.getElementById("staff");
	fade=="staff" ?  i = 1 :  i = 0;			
	imgPreload = new Image();	
	imgPreload.onload=function(){		
		//alert(imagesplash[i] + " contador " + i);
		image.src = side[i];			
		var oq = "staff";
		Fade1(oq);
		image.style.display="block";			
				
	}
		imgPreload.src = side[i];	
}

function Fade(b) {		
	Obj = document.getElementById(b);		
	for (var i=0;i<11;i++)
		setTimeout('setOpacity('+i+')',100*i);
	return false;
}

function setOpacity(value)
{
	Obj.style.opacity = value/10;
	Obj.style.filter = 'alpha(opacity=' + value*10 + ')';
}

function Fade1(b) {		
	Obj1 = document.getElementById(b);		
	for (var i=0;i<11;i++)
		setTimeout('setOpacity1('+i+')',100*i);
	return false;
}

function setOpacity1(value)
{
	Obj1.style.opacity = value/10;
	Obj1.style.filter = 'alpha(opacity=' + value*10 + ')';
}

function teste(str, nav){
	
	var p = document.getElementById('q');
	if(p){
		if(str=="show"){		
			p.style.display = "block";
			if(nav=='safari')			
				p.style.backgroundColor = "#000";
		}
		else
			p.style.display = "none";
	}
	
}

function data(){
	var data = new Date;
	document.write(data.getFullYear());
}

function web_kit(){     
	  	var p = document.getElementById('q');
		//p.setAttribute("type", "search");
		preaload();	
}