// JavaScript Document


function rolloffhome(){
		if(window.homepage == 1){
			document.getElementById("navhome").style.backgroundPosition = '0px -52px';
		}
		else{
			document.getElementById("navhome").style.backgroundPosition = '0px 0px';	
		}
}


function rollonhome(){
		if(window.homepage == 1){
			document.getElementById("navhome").style.backgroundPosition = '0px -52px';
		}
		else{
			document.getElementById("navhome").style.backgroundPosition = '0px -52px';	
		}
}



function navigationmarker(){
	if(window.homepage == 1){
		document.getElementById("navhome").style.backgroundPosition = '0px -52px';
	}
	if(window.news == 1){
		document.getElementById("navnews").style.backgroundPosition = '0px -164px';
	}
	if(window.capabilities == 1){
		document.getElementById("navcapabilities").style.backgroundPosition = '0px -164px';
	}
	if(window.blog == 1){
		document.getElementById("navblog").style.backgroundPosition = '0px -164px';
	}
	if(window.portfolio == 1){
		document.getElementById("navportfolio").style.backgroundPosition = '0px -164px';
	}
	if(window.about == 1){
		document.getElementById("navabout").style.backgroundPosition = '0px -164px';
	}
	if(window.contact == 1){
		document.getElementById("navcontact").style.backgroundPosition = '0px -164px';
	}
}








//////////////////////////////////////////////////////////////         BLOG BLOG BLOG BLOG BLOG BLOG BLOG BLOG BLOG BLOG BLOG 

function blogsubnav(x){
	document.getElementById("subnav"+x).className='highlighted';
	
	for(w=1;w<x;w++){
	document.getElementById("subnav"+w).className = 'nothighlighted';	
	}
	for(i=x+1;i<10;i++){
	document.getElementById("subnav"+i).className = 'nothighlighted';	
	}
	

}

function showcomments(x){
	document.getElementById("commentsholder"+x).style.display = 'block';
	document.getElementById("commentform"+x).style.display = 'block';
	

	for(w=1;w<x;w++){
	document.getElementById("commentsholder"+w).style.display = 'none' ;	
	document.getElementById("commentform"+w).style.display= 'none';	
	}
	for(i=x+1;i<300;i++){
	document.getElementById("commentsholder"+i).style.display = 'none' ;		
	document.getElementById("commentform"+i).style.display = 'none';	
	}
	
	
}



//////////////////////////////////////////////////////////////         CAPABILITIES CAPABILITIES CAPABILITIES CAPABILITIES 

function capabilitiessubnav(x){
		
	document.getElementById("subnav"+x).className='highlighted';
	document.getElementById("capabilities"+x).style.display = 'block' ;	

	for(w=1;w<x;w++){
	document.getElementById("capabilities"+w).style.display = 'none' ;	
	document.getElementById("subnav"+w).className = 'nothighlighted';	
	}
	for(i=x+1;i<10;i++){
	document.getElementById("capabilities"+i).style.display = 'none' ;		
	document.getElementById("subnav"+i).className = 'nothighlighted';	
	}
	
}
	
	
	
//////////////////////////////////////////////////////////////         PORTFOLIO PORTFOLIO PORTFOLIO PORTFOLIO PORTFOLIO 
function showcategory(ind, maxn) {
	document.getElementById("plus" + ind).src = 'images/portfolio/minus.gif';         //change plus to minus 
	document.getElementById("category" + ind).style.display = 'block';                //expand category
	document.getElementById("link" + ind).className = 'highlighted2';	                //highlight current link

	for(var w = 1; w <= maxn; w++) {
		if (w != ind) {
			document.getElementById("plus" + w).src = 'images/portfolio/plus.gif';		
			document.getElementById("category" + w).style.display = 'none';	
			document.getElementById("link" + w).className = 'nothighlighted';
		}
	}

}

function showwork(n){
	document.getElementById("screenshot").src = "images/portfolio/sample.jpg";	
	document.getElementById("portfolioinfo1").style.display = 'block';
}

