/**
 * @author divonei macedo
 */

var imagesplash = new Array("images/splashstaff.jpg", "images/splashstaff.jpg");


var objeto, objeto1;

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

function O(value)
{
	//alert(value);
	objeto.style.opacity = value/10;
	objeto.style.filter = 'alpha(opacity=' + value*10 + ')';
}

function O2(value)
{
	//alert(value);
	objeto1.style.opacity = value/10;
	objeto1.style.filter = 'alpha(opacity=' + value*10 + ')';
}

function f(b){
	//alert(b);
	objeto = document.getElementById(b);		
	for (var i=0;i<11;i++){
		setTimeout('O('+i+')', 100*i);
		//alert(i);
	}
	return false;
}

function f2(b){
	//alert(b);
	objeto1 = document.getElementById(b);		
	for (var i=0;i<11;i++){
		setTimeout('O2('+i+')', 100*i);
		//alert(i);
	}
	return false;
}

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




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();		
}

