﻿// JScript File

        function showBackNext(){
            Show('achvback');
            Show('achvnext')
        }
        function hideBackNext(){
            Hide('achvnext');
            Hide('achvback');
        }    
        function caseStudiesOff(){                   
            hideBackNext();
            Hide('textLinks');            
            Hide('intro');
            //reset header info            
            document.getElementById('achv_hdr').style.backgroundImage='url(images/achievment_header.png)';
            //reset button states
            document.getElementById('problem').className="problem";
            document.getElementById('strategy').className="strategy";
            document.getElementById('execution').className="execution";
            document.getElementById('results').className="results";            
            //hide case studies 
            Hide('salesgrowth');
            Hide('sales_problem');
            Hide('sales_strategy');
            Hide('sales_execution');
            Hide('sales_results');
            
            Hide('roi_attend');
            Hide('roi_problem'); 
            Hide('roi_strategy');
            Hide('roi_execution');
            Hide('roi_results');
            
            Hide('service_awards');
            Hide('service_problem'); 
            Hide('service_strategy');
            Hide('service_execution');
            Hide('service_results');
             
            Hide('intergrated_programs');
            Hide('intergrated_problem'); 
            Hide('intergrated_strategy');
            Hide('intergrated_execution');
            Hide('intergrated_results');           
            
            Hide('spot_recognition');
            Hide('spot_problem'); 
            Hide('spot_strategy');
            Hide('spot_execution');
            Hide('spot_results');
            
            Hide('incentive_process');
            Hide('incentive_problem'); 
            Hide('incentive_strategy');
            Hide('incentive_execution');
            Hide('incentive_results');
            
            Hide('roi_culture');
            Hide('culture_problem'); 
            Hide('culture_strategy');
            Hide('culture_execution');
            Hide('culture_results');           
        }
        
   //store which case study you are on
    var isAt = null; 
             
      //turn on case studies
      function caseStudiesOn(id){ 
        caseStudiesOff(); 
        Show('textLinks'); 
        document.getElementById('subspace5').innerHTML = id;                  
        //case 1         
        if(id == 'salesgrowth' && isAt=='1'){ 
            document.getElementById('achv_hdr').style.backgroundImage='url(images/sales_growth_header.png)';
            document.getElementById('problem').className="problem_selected";
            Show('salesgrowth');       
            Show('sales_problem');            
            Show('achvnext');            
         }else if(id=='problem'&& isAt=='1'){ 
            document.getElementById('achv_hdr').style.backgroundImage='url(images/sales_growth_header.png)';
            document.getElementById('problem').className="problem_selected";            
            Show('salesgrowth');       
            Show('sales_problem');            
            Show('achvnext');
         }else if(id=='strategy'&& isAt=='1'){ 
            document.getElementById('achv_hdr').style.backgroundImage='url(images/sales_growth_header.png)';
            document.getElementById('strategy').className="strategy_selected";            
            Show('salesgrowth');       
            Show('sales_strategy');            
            showBackNext();
         }else if(id=='execution'&& isAt=='1'){ 
            document.getElementById('achv_hdr').style.backgroundImage='url(images/sales_growth_header.png)'; 
            document.getElementById('execution').className="execution_selected";           
            Show('salesgrowth');       
            Show('sales_execution');            
            showBackNext();
         }else if(id=='results'&& isAt=='1'){
            document.getElementById('achv_hdr').style.backgroundImage='url(images/sales_growth_header.png)';
            document.getElementById('results').className="results_selected";             
            Show('salesgrowth');       
            Show('sales_results');            
            Show('achvback'); 
            
        //case2    
        }else if(id == 'roi_attend'&& isAt=='2'){
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_perfectattend.png)';
            document.getElementById('problem').className="problem_selected";
            Show('roi_attend');
            Show('roi_problem');
            Show('achvnext');
        }else if(id=='problem'&& isAt=='2'){ 
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_perfectattend.png)';
            document.getElementById('problem').className="problem_selected";            
            Show('roi_attend');
            Show('roi_problem');            
            Show('achvnext');    
        }else if(id=='strategy'&& isAt=='2'){
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_perfectattend.png)';
            document.getElementById('strategy').className="strategy_selected";             
            Show('roi_attend');       
            Show('roi_strategy');            
            showBackNext();    
        }else if(id=='execution'&& isAt=='2'){
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_perfectattend.png)';
            document.getElementById('execution').className="execution_selected";              
            Show('roi_attend');       
            Show('roi_execution');            
            showBackNext();
        }else if(id=='results'&& isAt=='2'){
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_perfectattend.png)';
            document.getElementById('results').className="results_selected";             
            Show('roi_attend');       
            Show('roi_results');            
            Show('achvback');    
        
        //case3    
        }else if(id == 'service_awards'&& isAt=='3'){
            document.getElementById('problem').className="problem_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/service_awards_header.png)';
            Show('service_awards');
            Show('service_problem');
            Show('achvnext');
        }else if(id=='problem'&& isAt=='3'){
            document.getElementById('problem').className="problem_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/service_awards_header.png)';             
            Show('service_awards');
            Show('service_problem');            
            Show('achvnext');    
        }else if(id=='strategy'&& isAt=='3'){
            document.getElementById('strategy').className="strategy_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/service_awards_header.png)';             
            Show('service_awards');       
            Show('service_strategy');            
            showBackNext();    
        }else if(id=='execution'&& isAt=='3'){
            document.getElementById('execution').className="execution_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/service_awards_header.png)';             
            Show('service_awards');       
            Show('service_execution');            
            showBackNext();
        }else if(id=='results'&& isAt=='3'){
            document.getElementById('results').className="results_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/service_awards_header.png)';             
            Show('service_awards');       
            Show('service_results');            
            Show('achvback');
            
        //case4
        }else if(id == 'intergrated_programs'&& isAt=='4'){
            document.getElementById('problem').className="problem_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/integrated_process_header.png)';
            Show('intergrated_programs');
            Show('intergrated_problem');
            Show('achvnext'); 
        }else if(id=='problem'&& isAt=='4'){
            document.getElementById('problem').className="problem_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/integrated_process_header.png)';             
            Show('intergrated_programs');
            Show('intergrated_problem');            
            Show('achvnext');    
        }else if(id=='strategy'&& isAt=='4'){
            document.getElementById('strategy').className="strategy_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/integrated_process_header.png)';             
            Show('intergrated_programs');       
            Show('intergrated_strategy');            
            showBackNext();    
        }else if(id=='execution'&& isAt=='4'){ 
            document.getElementById('execution').className="execution_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/integrated_process_header.png)';            
            Show('intergrated_programs');       
            Show('intergrated_execution');            
            showBackNext();
        }else if(id=='results'&& isAt=='4'){
            document.getElementById('results').className="results_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/integrated_process_header.png)';             
            Show('intergrated_programs');       
            Show('intergrated_results');            
            Show('achvback');
            
        //case5          
        }else if(id == 'spot_recognition'&& isAt=='5'){
            document.getElementById('problem').className="problem_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/ontheSpot_header.png)';
            Show('spot_recognition');
            Show('spot_problem');
            Show('achvnext');
        }else if(id=='problem'&& isAt=='5'){
            document.getElementById('problem').className="problem_selected"; 
            document.getElementById('achv_hdr').style.backgroundImage='url(images/ontheSpot_header.png)';            
            Show('spot_recognition');
            Show('spot_problem');            
            Show('achvnext');    
        }else if(id=='strategy'&& isAt=='5'){
            document.getElementById('strategy').className="strategy_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/ontheSpot_header.png)';             
            Show('spot_recognition');       
            Show('spot_strategy');            
            showBackNext();    
        }else if(id=='execution'&& isAt=='5'){
            document.getElementById('execution').className="execution_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/ontheSpot_header.png)';           
            Show('spot_recognition');       
            Show('spot_execution');            
            showBackNext();
        }else if(id=='results'&& isAt=='5'){ 
            document.getElementById('results').className="results_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/ontheSpot_header.png)';            
            Show('spot_recognition');       
            Show('spot_results');            
            Show('achvback');
            
        //case6            
        }else if(id == 'incentive_process'&& isAt=='6'){
            document.getElementById('problem').className="problem_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/incentive_process_header.png)';
            Show('incentive_process');
            Show('incentive_problem');
            Show('achvnext');
        }else if(id=='problem'&& isAt=='6'){ 
            document.getElementById('problem').className="problem_selected"; 
            document.getElementById('achv_hdr').style.backgroundImage='url(images/incentive_process_header.png)';           
            Show('incentive_process');
            Show('incentive_problem');            
            Show('achvnext');    
        }else if(id=='strategy'&& isAt=='6'){
            document.getElementById('strategy').className="strategy_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/incentive_process_header.png)';             
            Show('incentive_process');       
            Show('incentive_strategy');            
            showBackNext();    
        }else if(id=='execution'&& isAt=='6'){
            document.getElementById('execution').className="execution_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/incentive_process_header.png)';             
            Show('incentive_process');       
            Show('incentive_execution');            
            showBackNext();
        }else if(id=='results'&& isAt=='6'){
            document.getElementById('results').className="results_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/incentive_process_header.png)';             
            Show('incentive_process');       
            Show('incentive_results');            
            Show('achvback'); 
             
        //case7         
        }else if(id == 'roi_culture'&& isAt=='7'){
            document.getElementById('problem').className="problem_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_safeCulter_header.png)';
            Show('roi_culture');
            Show('culture_problem');
            Show('achvnext');
        }else if(id=='problem'&& isAt=='7'){
            document.getElementById('problem').className="problem_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_safeCulter_header.png)';             
            Show('roi_culture');
            Show('culture_problem');            
            Show('achvnext');    
        }else if(id=='strategy'&& isAt=='7'){
            document.getElementById('strategy').className="strategy_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_safeCulter_header.png)';             
            Show('roi_culture');       
            Show('culture_strategy');            
            showBackNext();    
        }else if(id=='execution'&& isAt=='7'){
            document.getElementById('execution').className="execution_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_safeCulter_header.png)';             
            Show('roi_culture');       
            Show('culture_execution');            
            showBackNext();
        }else if(id=='results'&& isAt=='7'){ 
            document.getElementById('results').className="results_selected";
            document.getElementById('achv_hdr').style.backgroundImage='url(images/roi_safeCulter_header.png)';            
            Show('roi_culture');       
            Show('culture_results');            
            Show('achvback');
        }
      }
      
   //next case study
        function nextCaseStudy(id){        
            document.getElementById('subspace5').innerHTML = id;          
           //case1          
            if(id == 'salesgrowth' && isAt=='1'){            
               id="strategy";
               caseStudiesOn(id);
            }else if(id=='problem' && isAt=='1'){
                id="strategy"
                caseStudiesOn(id);   
            }else if(id=='strategy' && isAt=='1'){
                id="execution"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='1'){
                id="results"
                caseStudiesOn(id);
                
           //case2
            }else if(id == 'roi_attend' && isAt=='2'){            
               id="strategy";
               caseStudiesOn(id);
            }else if(id=='problem' && isAt=='2'){
                id="strategy"
                caseStudiesOn(id);   
            }else if(id=='strategy' && isAt=='2'){
                id="execution"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='2'){
                id="results"
                caseStudiesOn(id);
                
           //case3
            }else if(id == 'service_awards' && isAt=='3'){            
               id="strategy";
               caseStudiesOn(id);
            }else if(id=='problem' && isAt=='3'){
                id="strategy"
                caseStudiesOn(id);   
            }else if(id=='strategy' && isAt=='3'){
                id="execution"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='3'){
                id="results"
                caseStudiesOn(id);
                
            //case4
            }else if(id == 'intergrated_programs' && isAt=='4'){            
               id="strategy";
               caseStudiesOn(id);
            }else if(id=='problem' && isAt=='4'){
                id="strategy"
                caseStudiesOn(id);   
            }else if(id=='strategy' && isAt=='4'){
                id="execution"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='4'){
                id="results"
                caseStudiesOn(id);
                
            //case5
            }else if(id == 'spot_recognition' && isAt=='5'){            
               id="strategy";
               caseStudiesOn(id);
            }else if(id=='problem' && isAt=='5'){
                id="strategy"
                caseStudiesOn(id);   
            }else if(id=='strategy' && isAt=='5'){
                id="execution"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='5'){
                id="results"
                caseStudiesOn(id);
                
            //case6
            }else if(id == 'incentive_process' && isAt=='6'){            
               id="strategy";
               caseStudiesOn(id);
            }else if(id=='problem' && isAt=='6'){
                id="strategy"
                caseStudiesOn(id);   
            }else if(id=='strategy' && isAt=='6'){
                id="execution"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='6'){
                id="results"
                caseStudiesOn(id);
                
           //case7
            }else if(id == 'roi_culture' && isAt=='7'){            
               id="strategy";
               caseStudiesOn(id);
            }else if(id=='problem' && isAt=='7'){
                id="strategy"
                caseStudiesOn(id);   
            }else if(id=='strategy' && isAt=='7'){
                id="execution"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='7'){
                id="results"
                caseStudiesOn(id);
                
                
            }
        }
        
     //previous case study
        function previousCaseStudy(id){
            document.getElementById('subspace5').innerHTML = id;          
            //case1
            if(id=='strategy' && isAt=='1'){
                id="problem"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='1'){
                id="strategy"
                caseStudiesOn(id);
            }else if(id=='results' && isAt=='1'){
                id="execution"
                caseStudiesOn(id);
                
            //case2    
            }else if(id=='strategy' && isAt=='2'){
                id="problem"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='2'){
                id="strategy"
                caseStudiesOn(id);
            }else if(id=='results' && isAt=='2'){
                id="execution"
                caseStudiesOn(id);  
           
            //case3    
            }else if(id=='strategy' && isAt=='3'){
                id="problem"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='3'){
                id="strategy"
                caseStudiesOn(id);
            }else if(id=='results' && isAt=='3'){
                id="execution"
                caseStudiesOn(id);  
                
            //case4    
            }else if(id=='strategy' && isAt=='4'){
                id="problem"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='4'){
                id="strategy"
                caseStudiesOn(id);
            }else if(id=='results' && isAt=='4'){
                id="execution"
                caseStudiesOn(id); 
                
                
            //case5    
            }else if(id=='strategy' && isAt=='5'){
                id="problem"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='5'){
                id="strategy"
                caseStudiesOn(id);
            }else if(id=='results' && isAt=='5'){
                id="execution"
                caseStudiesOn(id);  
                
                
            //case6    
            }else if(id=='strategy' && isAt=='6'){
                id="problem"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='6'){
                id="strategy"
                caseStudiesOn(id);
            }else if(id=='results' && isAt=='6'){
                id="execution"
                caseStudiesOn(id); 
                
            //case7    
            }else if(id=='strategy' && isAt=='7'){
                id="problem"
                caseStudiesOn(id);
            }else if(id=='execution' && isAt=='7'){
                id="strategy"
                caseStudiesOn(id);
            }else if(id=='results' && isAt=='7'){
                id="execution"
                caseStudiesOn(id); 
                
            }
        
        }
