// JavaScript Document
function setHighlightImg()
{
	var locate = location.href;
	locate = locate.substring(locate.lastIndexOf("/") + 1);
	//alert(locate);
	if (locate == "index.html")
	{
		document.getElementById("homebutton").src = "images/Menu - Head/home-o.png";
		document.getElementById("homebutton").onmouseout = "";
		document.getElementById("homebutton").onmouseover = "";
	}
	else if (locate == "about.html")
	{
		document.getElementById("aboutbutton").src = "images/Menu - Head/about-o.png";
		document.getElementById("aboutbutton").onmouseout = "";
		document.getElementById("aboutbutton").onmouseover = "";
	}
	else if (locate == "portfolio.html")
	{
		document.getElementById("portfoliobutton").src = "images/Menu - Head/portfolio-o.png";
		document.getElementById("portfoliobutton").onmouseout = "";
		document.getElementById("portfoliobutton").onmouseover = "";
	}
	else if (locate == "services.html")
	{
		document.getElementById("servicesbutton").src = "images/Menu - Head/services-o.png";
		document.getElementById("servicesbutton").onmouseout = "";
		document.getElementById("servicesbutton").onmouseover = "";
	}
	else if (locate == "contact.php")
	{
		document.getElementById("contactbutton").src = "images/Menu - Head/contact-o.png";
		document.getElementById("contactbutton").onmouseout = "";
		document.getElementById("contactbutton").onmouseover = "";
	}
}

function blackNames()
{
	document.getElementById("dereklink").style.color = "Black";	
	document.getElementById("ryanlink").style.color = "Black";
	document.getElementById("jesselink").style.color = "Black";
	document.getElementById("rodlink").style.color = "Black";
}
function hideContent()
{
		document.getElementById("aboutContent1").style.visibility = "hidden";
		document.getElementById("aboutContent2").style.visibility = "hidden";
		document.getElementById("aboutContent3").style.visibility = "hidden";
		document.getElementById("aboutContent4").style.visibility = "hidden";
}
function colorNames(linkToChange)
{
		blackNames();
		hideContent();
		document.getElementById(linkToChange).style.color = "Red";
		
		if (linkToChange == "dereklink")
		{
				document.getElementById("aboutContent1").style.visibility = "visible";
			}
		else if (linkToChange == "ryanlink")
		{
			document.getElementById("aboutContent2").style.visibility = "visible";
			}
		else if (linkToChange == "jesselink")
		{
			document.getElementById("aboutContent3").style.visibility = "visible";
			}
		else if (linkToChange == "rodlink")
		{
			document.getElementById("aboutContent4").style.visibility = "visible";
			}
}

function swapServiceButton(buttonName)
{
		var picPath = "";
		document.getElementById("serviceContent1").style.visibility = "hidden";
		document.getElementById("serviceContent2").style.visibility = "hidden";
		document.getElementById("serviceContent3").style.visibility = "hidden";
		document.getElementById("serviceContent4").style.visibility = "hidden";
		
		document.getElementById("webdesign").src = "images/Services/websitedesign-w.png";
		document.getElementById("graphicdesign").src = "images/Services/graphicdesign-w.png";
		document.getElementById("market").src = "images/Services/marketingbranding-w.png";
		document.getElementById("software").src = "images/Services/customsoftware-w.png";
		
		/*document.getElementById("webdesign").onmouseout = "this.src=\"images/Services/websitedesign-w.png\";";
		document.getElementById("graphicdesign").onmouseout = "this.src=\"images/Services/graphicdesign-w.png\";";
		document.getElementById("market").onmouseout = "this.src=\"images/Services/marketingbranding-w.png\";";
		document.getElementById("software").onmouseout = "this.src=\"images/Services/customsoftware-w.png\";";
		
		document.getElementById("webdesign").onmouseover = "this.src=\"images/Services/websitedesign-o.png\";";
		document.getElementById("graphicdesign").onmouseover = "this.src=\"images/Services/graphicdesign-o.png\";";
		document.getElementById("market").onmouseover = "this.src=\"images/Services/marketingbranding-o.png\";";
		document.getElementById("software").onmouseover = "this.src=\"images/Services/customsoftware-o.png\";";*/
		
		if (buttonName == "webdesign")
		{
				picPath =  "images/Services/websitedesign-o.png";
				document.getElementById("serviceContent1").style.visibility = "visible";
		}
		else if (buttonName == "graphicdesign")
		{
				picPath =  "images/Services/graphicdesign-o.png";
				document.getElementById("serviceContent2").style.visibility = "visible";
		}
		else if (buttonName == "market")
		{
				picPath =  "images/Services/marketingbranding-o.png";
				document.getElementById("serviceContent3").style.visibility = "visible";
		}
		else if (buttonName == "software")
		{
				picPath =  "images/Services/customsoftware-o.png";
				document.getElementById("serviceContent4").style.visibility = "visible";
		}
		
		document.getElementById(buttonName).src = picPath;
		/*document.getElementById(buttonName).onmouseover = "";
		document.getElementById(buttonName).onmouseout = "";*/
}

function loadingimg()
{
	var loadimg = document.getElementById("loadingimg");
	
	if (loadimg.style.visibility == "hidden")
	{
		loadimg.style.visibility = "visible";
	
		setTimeout("loadingimg()", 1000);
	}
	else 
	{
		loadimg.style.visibility = "hidden";
	}	
}

function displayThumbnail(previewOrView, picname)
{
	loadingimg();
	
	if (previewOrView == "layer1show")
	{
		document.getElementById("portPrev").src = "";
		document.getElementById("portlayer2").style.visibility = "hidden";
		document.getElementById("portlayer1").style.visibility = "visible";
		document.getElementById("portlayer1").style.zIndex = "6";
		document.getElementById("portPrev").src = "images/Portfolio/" + picname + ".jpg"
	}
	else if(previewOrView == "layer1hide")
	{
		document.getElementById("portlayer2").style.visibility = "visible";
		document.getElementById("portlayer1").style.visibility = "hidden";
		document.getElementById("portlayer1").style.zIndex = "-5";
		document.getElementById("portPrev").src = "";
		
	}
	else if (previewOrView == "layer2show")
	{
		document.getElementById("portlayer2").style.visibility = "visible";
		document.getElementById("portlayer1").style.visibility = "hidden";
		document.getElementById("portlayer1").style.zIndex = "-5";
		document.getElementById("portMain").src = "images/Portfolio/" + picname + ".jpg"
		//document.getElementById("portlayer2").style.visibility = "hidden";
		//document.getElementById("portlayer2").style.zIndex = "-5";
	}
}

function blackfontport()
{
	document.getElementById("isiweb").style.color = "Black";
	document.getElementById("mikma").style.color = "Black";
	document.getElementById("digicareweb").style.color = "Black";	
	document.getElementById("digicareprint").style.color = "Black";
	document.getElementById("michaelsbarweb").style.color = "Black";
	document.getElementById("michaelsgrillweb").style.color = "Black";
	document.getElementById("papamariosweb").style.color = "Black";
	document.getElementById("archercertsweb").style.color = "Black";
	document.getElementById("radcweb").style.color = "Black";
	document.getElementById("antonioweb").style.color = "Black";
	document.getElementById("cocoweb").style.color = "Black";
	document.getElementById("bryonyweb").style.color = "Black";
	
}

