//Nav Hide and Show
var stopflag = 0;
var oldmenu = '';

function hidepops(){
		if (document.getElementById('wtmenu').style.display == 'block')
			document.getElementById('wtmenu').style.display='none';
		if (document.getElementById('dpmenu').style.display == 'block')
			document.getElementById('dpmenu').style.display='none';
		if (document.getElementById('csmenu').style.display == 'block')
			document.getElementById('csmenu').style.display='none';
}

function showme(ID){
	document.getElementById(ID).style.display='block';
}


function startnoshow(ID){
	stopflag = 1;
	oldmenu = document.getElementById(ID);
	setTimeout("noshow()",'200');
}

function noshow(ID){
	if (stopflag == 1 && oldmenu != document.getElementById(ID)){
		Menu_swapImgRestore();
		if (oldmenu != ''){
			oldmenu.style.display='none';
		}
		stopflag = 0;
		oldmenu = '';
	}
}

function stopnoshow(){
	stopflag = 0;
}

function Menu_swapImgRestore() { //v3.0
  var i,x,a=document.Menu_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}



function navon(nav){
	nav = $(nav);
        for (i=0; i<nav.childNodes.length; i++){
            node = nav.childNodes[i];
            if (node.nodeName=="A"){
				node.className += ' off';
               }
          }
}
function navoff(nav){
	nav = $(nav);
        for (i=0; i<nav.childNodes.length; i++){
            node = nav.childNodes[i];
            if (node.nodeName=="A"){
				node.className=node.className.replace('off', '');
				node.className=node.className.replace('hover', '');
               }
          }
}


	
	var movocp = 1;
	var movom = false;
	function govo(t){
		p = t - movocp;
		movo(p);
	}
	function movo(p){
   		if (!movom && (movocp + p) > 0 && (movocp + p) < movomax){
			movom = true;
			d = p * -755;
			movocp = movocp + p;
			new Effect.Move('pholder', { x: d, y: 0, duration:0.8, mode: 'relative', transition:Effect.Transitions.EaseFromTo, afterFinish:function(){
				movom = false;
			}});
		}
	}

	
	function photoswap(imgurl,capt,num,projID){
		if (num.parentNode.lastone != undefined){
			num.parentNode.lastone.style.color='';
		}
		$('mainphoto'+projID).src = imgurl;
		$('maincaption'+projID).innerHTML = capt;
		num.blur();
		num.style.color='#779ed3';
		num.parentNode.lastone = num;
	}	
	
	
function ahopd(ID){
	$(ID).style.display = 'block';
	if( $(ID).scrollHeight > 100){
		var num = $(ID).scrollHeight - 100;
		$(ID).style.top = (parseInt($(ID).style.top) - num) +'px';
	}
	$(ID).style.display = 'none';
}
	
//-->