var butoane = new Array();
function change(id, state){
	for(i=0;i<=butoane.length-1;i++)
		if(butoane[i][0]==id){
			document.getElementById(id).src = butoane[i][state].src;
		}
}
function Preload(){
	numberofPictures = 6;
	for(i=0;i<=numberofPictures-1;i++)butoane[i]=new Array();
	butoane[0][0]  = "contact";
	butoane[1][0]  = "controlul calitatii";
	butoane[2][0]  = "home";
	butoane[3][0]  = "portofoliu";
	butoane[4][0]  = "cariere";
	butoane[5][0]  = "servicii";
	for(i=0;i<=butoane.length-1;i++){
		butoane[i][1] = new Image();
		butoane[i][1].src = "images/buttons/buton - "+butoane[i][0]+".jpg"; 
		butoane[i][2] = new Image();
		butoane[i][2].src = "images/buttons/active/buton - "+butoane[i][0]+" - activ.jpg"; 
	}
	load('contact');
	load('controlul calitatii');
	load('home');
	load('portofoliu');
	load('cariere');
	load('servicii');
}
function load(id){
	for(j=0;j<=butoane.length-1;j++)
		if(butoane[j][0]==id){
			document.getElementById(id).src = butoane[j][1].src;
		}
}
