/****************************************************************************
* by: James-Ryan Merket
* coded: 06-08-2006
* for: Pendergraphics Design Group, LLC
*****************************************************************************/

function setdiv(nav){
	var wL = new fx.Width(nav, {duration: 400});
	return wL;
}

function wideLoad(id) {
	
	var obj = document.getElementById(id).offsetWidth;
	if (obj > 34)
	return true;
	
	document.getElementById(id).style.width = "34px";
	
	document.getElementById(id).style.cursor = "auto";

	if (id=="ourwork"){
		document.getElementById(id).style.backgroundPosition = "top left";
		wL = setdiv(id);
		wL.custom(33,280);			
		hide("ourworkNav");
		err = setTimeout('fadein(\'ourworkNav\')',400);
		err = setTimeout('fadein(\'ourworkNavbut\')',600);
	}
	
	if (id=="ourservices"){
		document.getElementById(id).style.backgroundPosition = "top left";
		wL = setdiv(id);
		wL.custom(33,280);
		hide('ourservicesNav');
		err = setTimeout('fadein(\'ourservicesNav\')',400);
		err = setTimeout('fadein(\'ourservicesNavbut\')',600);
	}

	if (id=="ourculture"){
		document.getElementById(id).style.backgroundPosition = "top left";
		wL = setdiv(id);
		wL.custom(33,280);
		hide('ourcultureNav');
		err = setTimeout('fadein(\'ourcultureNav\')',400);
		err = setTimeout('fadein(\'ourcultureNavbut\')',600);
	}
	
	if (id=="contact"){
		document.getElementById(id).style.backgroundPosition = "top left";
		wL = setdiv(id);
		wL.custom(33,280);
		hide('contactNav');
		err = setTimeout('fadein(\'contactNav\')',400);
		err = setTimeout('fadein(\'contactNavbut\')',600);
	}
	
	
}
	
function resetnav(id){
	fadeout(id+"Nav");
	wL = setdiv(id);
	wL.custom(280,33);
	err = setTimeout("bullparade('"+id+"')",320);
	document.getElementById(id).style.cursor = "pointer";
	
}



function bullparade(id){
	document.getElementById(id+'Navbut').style.display = "none";
	document.getElementById(id).style.backgroundPosition = "center left";
}

function hide(id){
	document.getElementById(id).style.display = "none";
}

function orange(obj){
		var h = document.getElementById(obj);
		var w = h.offsetWidth;
		if (w < 34) {
			h.style.backgroundPosition = "0px -170px";
		}
}

function noorange(obj){
		var h = document.getElementById(obj);
		var w = h.offsetWidth;
		if (w < 34) {
			h.style.backgroundPosition = "center left";
		}
}

//
// fadeout() utilizes moo.fx to create a fade out effect.
//

function fadeout(q) {
	
	var qw;
	var qw = new fx.Opacity(q, {duration: 480, onComplete: function()
  {
document.getElementById(q).style.display = "none";
  }
	});
  
	qw.setOpacity(1);
	qw.custom(1, 0);
	
}

function close(){
document.getElementById('webstd').style.display = "none";
}

function fix(){
setTimeout('close()', 0);
}



//
// fadein() utilizes moo.fx to create a fade in effect.
//

function fadein(a) {
	var as;
	var as = new fx.Opacity(a, {duration: 480});
	as.setOpacity(0);
document.getElementById(a).style.display = "block";
	as.custom(0, 1);

}








function portfolioOut(q) {
	
	var qw;
	var qw = new fx.Opacity(q, {duration: 480, onComplete: function()
  {
document.getElementById(q).style.display = "none";
  }
	});
  
	qw.setOpacity(1);
	qw.custom(1, 0);
}


//
// fadein() utilizes moo.fx to create a fade in effect.
//

function portfolioIn(a) {
	var as;
	var as = new fx.Opacity(a, {duration: 480});
	as.setOpacity(0);
document.getElementById(a).style.display = "block";
	as.custom(0, 1);

}


//
// popup for video
//

function pv() {
window.open("watchvideo.html",null,"width=395,height=100,status=yes,toolbar=no,menubar=no,location=no");
return false;
}
