
	    	var timerID = null;
		var timerOn = false;
		var timecount = 1000;
		var what = null;
		var newbrowser = true;
		var check = false;

          if (document.layers) {
                        layerRef="document.layers";
                        styleSwitch="";
                        visibleVar="show";
			screenSize = window.innerWidth;
			what ="ns4";
			
	  	}else if(document.getElementById){
                        layerRef="document.getElementByID";
                        styleSwitch=".style";
                        visibleVar="visible";
			what="moz";
				
          	}else if(document.all){
                        layerRef="document.all";
                        styleSwitch=".style";
                        visibleVar="visible";
			screenSize = document.body.clientWidth + 18;
			what ="ie";


		  
	 	 }else{
			what="none";
			newbrowser = false;
		  }


        function showLayer(layerName,idName){
        	var idNameB=idName + "b";
        		if (what =="none"){
        			return;
        			}
	        	else if (what == "moz"){ 
                                document.getElementById(layerName).style.visibility="visible";
                                document.getElementById(idName).className="menubartopOn";
                                document.getElementById(idNameB).className="menubarbottomOn";

        			}
        		else{
                  		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
                                alert(idName + "   " + idNameB);                  		
                  }
                  }
		     		
        function hideLayer(layerName,idC){
        		var idCb = idC + "b";
        		if (what =="none"){
        			return;
        			}
        		else if (what == "moz"){
        			document.getElementById(layerName).style.visibility="hidden";
        			}
        		else{
                  		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
		}
        	}
        	
 		function hideAll(){
				hideLayer('Services');
				hideLayer('Contact');
				hideLayer('About');
//				hideLayer('Success');
				backColor('nav1');
				backColor('nav2');
				backColor('nav3');
//				backColor('nav4');
				backColor('nav5');
				
		}
		
		function startTime() {
	        		if (timerOn == false) {
                		timerID=setTimeout( "hideAll()" , timecount);
                		timerOn = true;
	        }
		}


		function stopTime() {
	        		if (timerOn) {
    	       			clearTimeout(timerID);
                		timerID = null;
                		timerOn = false;
	        }
		}

function flipColor(idName) {

	idName.style.backgroundColor="#fcee6b";
	idName.style.color="#000080";
	
	return;
	}
function backColor(idName) {
	var idC = idName + "b";
      document.getElementById(idName).className="menubartopOff";
      document.getElementById(idC).className="menubarbottomOff";
	return;
	}		

function mailShow(ename,sname,cname,dname)  {
if (dname) {
	edomain = dname;}
	else {
	edomain = "rpmhealth";}
	etld = "com";
document.write("<a class= "+ "'" + cname + "'" + " href= " + '"' + "mailto:" + ename + "&#64;" + edomain + "." + etld + '"' + ">" + sname + "<\/a>");
}

