var docClickLoader = new RemoteFileLoader('docClickLoader');
var docClickLoaderx = new RemoteFileLoader('docClickLoader');
var docClickLoadery = new RemoteFileLoader('docClickLoader');
var docClickLoaderz = new RemoteFileLoader('docClickLoader');

function showProject(id,pathx){
	getElemRefs('backBottonX').style.visibility='hidden';
resetBtn();
frames['targetArea'].location.href='projectPage.asp?id='+id+'&pathx='+pathx	;
	getElemRefs('btn_projects').style.backgroundColor='#cc0000';
	
	elmentId=getElemRefs('btn_projects');
	docClickLoaderx.loadInto('projectMenu.asp','menuArea');	
	
}function showProjecta(id){
	getElemRefs('backBottonX').style.visibility='hidden';
resetBtn();
frames['targetArea'].location.href='projectPage.asp?id='+id+'&pathx=Archive'	;
	getElemRefs('btn_archive').style.backgroundColor='#cc0000';
	
	elmentId=getElemRefs('btn_archive');
	docClickLoaderx.loadInto('projectMenu.asp','menuArea');	
	
}
function openUserLogin(){
	
   var errorWin;

       try {
			window.open ('/user_login.asp','ul','width=500,height=350');
			
    }
        // If pop-up gets blocked, inform user
      catch(e) {
              alert('Please allow pop-ups from this Web site.');
       }	
	
	
	
	
}
var elmentId;

function mouseOver(id){
	id.style.backgroundColor='#cc0000';
}

function mouseOut(id){
	if (elmentId!=id){
		id.style.backgroundColor='#a0a0a0';
	}
}

function showMain(){
	shDiv('mainDIv','inline');
}

function resetBtn(){
	bgc('btn_about','#a0a0a0');	
	bgc('btn_contact','#a0a0a0');	
	bgc('btn_archive','#a0a0a0');	
	bgc('btn_projects','#a0a0a0');	
	bgc('btn_news','#a0a0a0');	
	bgc('btn_users','#a0a0a0');	
}

function callPage(id,page){
	//if (elmentId!=id){
		getElemRefs('backBottonX').style.visibility='hidden';
			
			elmentId=id;resetBtn();
			id.style.backgroundColor='#cc0000';
			
			if (page=='ProjectMenum.asp'  ){
			
		//	docClickLoader.loadInto('sideMenu.asp','menuArea');
			}else{
			docClickLoader.loadInto('projectMenu.asp','menuArea');	
			}
			frames['targetArea'].location.href=page;
	//	}
}

function enterSite(){
	initLightbox();
		getElemRefs('btn_projects').style.backgroundColor='#cc0000';
	
	elmentId=getElemRefs('btn_projects');
	frames['targetArea'].location.href='ProjectMenum.asp?pathx=Projects';
	docClickLoader.loadInto('sideMenu.asp','menuArea');	
   shDiv('introContainer','none');
   var oNodeToRemove = document.getElementById("introDiv");
   oNodeToRemove.parentNode.removeChild(oNodeToRemove);
}

function showIntro(){

window.location.href='';

}
function startUp(){

	bgc('btn_projects','#cc0000');	
    elmentId=getElemRefs('btn_projects');
	
}
/////////////////////////////////////////////////////////////////////////
function shDiv(id,dis){
if (chkObject(id)==true){
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display =dis;
  
} 
}
function bgc(id,color){
if (chkObject(id)==true){
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.backgroundColor =color;
  
} 
}

/////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////UTIL
					function chkObject(theVal) {
					
						  if (getElemRefs(theVal) != null) {
							 return true;
						  } else {
							 return false;
						  }
					 }
					 function getElemRefs(id) {
						var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
						if (el) el.css = (el.style)? el.style: el;
						return el;
					}
///////////////////////////////////////////////////////////////////////
