window.onload = initAll;

function initAll(){
	//document.getElementById("verif").innerHTML = "";
	document.getElementById("celHome").onmouseover = meniuSusMouseOverHome;
	document.getElementById("celHome").onmouseout = meniuSusMouseOutHome;
	if (document.getElementById("butPort")!=null){
		document.getElementById("butPort").onmouseover = butPortOver;
		document.getElementById("butPort").onmouseout = butPortOut;
		document.getElementById("butPort").onclick = butPortClick;
	}
	if (document.getElementById("offerBut1")!=null){
		document.getElementById("offerBut1").onmouseover = offerButOver;
		document.getElementById("offerBut1").onmouseout = offerButOut;
		document.getElementById("offerBut1").onclick = butOffer1Click;
	}
	if (document.getElementById("offerBut2")!=null){
		document.getElementById("offerBut2").onmouseover = offerButOver;
		document.getElementById("offerBut2").onmouseout = offerButOut;
		document.getElementById("offerBut2").onclick = butOffer2Click;
	}
	if (document.getElementById("offerBut3")!=null){
		document.getElementById("offerBut3").onmouseover = offerButOver;
		document.getElementById("offerBut3").onmouseout = offerButOut;
		document.getElementById("offerBut3").onclick = butOffer3Click;
	}
	if (document.getElementById("portfolioId")!=null){
		document.getElementById("portfolioId").onclick = bandaPortClick;
	}
	document.getElementById("celHome").onclick = clickCelHome;
	document.getElementById("celPort").onmouseover = meniuSusMouseOver;
	document.getElementById("celPort").onmouseout = meniuSusMouseOut;
	document.getElementById("celPort").onclick = clickCelPort;
	document.getElementById("celHowIt").onmouseover = meniuSusMouseOver;
	document.getElementById("celHowIt").onmouseout = meniuSusMouseOut;
	document.getElementById("celHowIt").onclick = clickCelHowIt;
	document.getElementById("celPricing").onmouseover = meniuSusMouseOver;
	document.getElementById("celPricing").onmouseout = meniuSusMouseOut;
	document.getElementById("celPricing").onclick = clickCelPric;
	document.getElementById("celContact").onmouseover = meniuSusMouseOverCon;
	document.getElementById("celContact").onmouseout = meniuSusMouseOutCon;
	document.getElementById("celContact").onclick = clickCelContact;
		//document.getElementById("warnMess").innerHTML += "<br/>Intrat init all";
	
	//preload images
	pic1= new Image(100,25); 
	pic1.src="images/baraMeniuSusDreaptaPe.gif";
	pic2= new Image(100,25); 
	pic2.src="images/baraMeniuSusPe.gif";
	pic3= new Image(100,25); 
	pic3.src="images/baraMeniuSusStangaPe.gif";
	pic4= new Image(100,25); 
	pic4.src="images/butPortPe.gif";
	pic5= new Image(100,25); 
	pic5.src="images/offerButOn.gif";
		
	if (window.initAll2){
		initAll2();
	}
	
	var preLoad = new Array("images/butPortPe.gif","images/baraMeniuSusPe.gif","images/baraMeniuSusStangaPe.gif","images/baraMeniuSusDreaptaPe.gif");
}

function bandaPortClick(){
	window.location = "portfolio.php";	
}

function butPortClick(){
	window.location = "portfolio.php";	
}

function butOffer1Click(){
	window.location = "contact.php";	
}

function butOffer2Click(){
	window.location = "pricing.html";	
}

function butOffer3Click(){
	window.location = "contact.php";	
}

function butPortOver(){
	this.style.backgroundImage = "url(images/butPortPe.gif)";
}

function butPortOut(){
	this.style.backgroundImage = "url(images/butPort.gif)";
}

function offerButOver(){
	this.style.backgroundImage = "url(images/offerButOn.gif)";
}

function offerButOut(){
	this.style.backgroundImage = "url(images/offerBut.gif)";
}


function meniuSusMouseOverHome(){
	this.style.backgroundImage = "url(images/baraMeniuSusPe.gif)";
	document.getElementById("celSt").style.backgroundImage = "url(images/baraMeniuSusStangaPe.gif)";
	//document.getElementById("verif").innerHTML = "mouse pe";
}

function meniuSusMouseOutHome(){
	this.style.backgroundImage = "url(images/baraMeniuSus.gif)";
	document.getElementById("celSt").style.backgroundImage = "url(images/baraMeniuSusStanga.gif)";
	//ocument.getElementById("verif").innerHTML = "mouse out";
}
function meniuSusMouseOverCon(){
	this.style.backgroundImage = "url(images/baraMeniuSusPe.gif)";
	document.getElementById("celDr").style.backgroundImage = "url(images/baraMeniuSusDreaptaPe.gif)";
	//document.getElementById("verif").innerHTML = "mouse pe";
}

function meniuSusMouseOutCon(){
	this.style.backgroundImage = "url(images/baraMeniuSus.gif)";
	document.getElementById("celDr").style.backgroundImage = "url(images/baraMeniuSusDreapta.gif)";
	//ocument.getElementById("verif").innerHTML = "mouse out";
}
function meniuSusMouseOver(){
	this.style.backgroundImage = "url(images/baraMeniuSusPe.gif)";	
	//ocument.getElementById("verif").innerHTML = "mouse pe";
}

function meniuSusMouseOut(){
	this.style.backgroundImage = "url(images/baraMeniuSus.gif)";
	//document.getElementById("verif").innerHTML = "mouse out";
}

function clickCelPort(){
	window.location = "clipping-paths.html";
}

function clickCelHome(){
	window.location = "index.html";
}

function clickCelHowIt(){
	window.location = "color-paths.html";
}

function clickCelPric(){
	window.location = "pricing.html";
}

function clickCelContact(){
	window.location = "contact.php";
}
