﻿// JScript File

            //to set classes based on browser type http://rafael.adm.br/css_browser_selector
            var css_browser_selector = function() {
                var 
	                ua=navigator.userAgent.toLowerCase(),
	                is=function(t){ return ua.indexOf(t) != -1; },
	                h=document.getElementsByTagName('html')[0],
	                b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
	                os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
                var c=b+os+' js';
                h.className += h.className?' '+c:c;
            }();
   

 
             function ShowEndUserGraphic(){
                if(document.getElementById('divEstuff').style.display == "none"){
                    document.getElementById('divEstuff').style.display = "inline";
                    document.getElementById('divDstuff').style.display = "none";
                    document.getElementById('divDstuff').style.height = "0";
                    document.getElementById('featureHeader').innerHTML = "Think of it as your personal Access guru ;)";
                    document.getElementById('devtoggle').innerHTML = "Developers Click Here...";
                    }
                else{
                    document.getElementById('divEstuff').style.display = "none";
                    document.getElementById('divEstuff').style.height = "0";
                    document.getElementById('divDstuff').style.display = "inline";
                    document.getElementById('featureHeader').innerHTML = "Give your application the edge on custom reporting!";
                    document.getElementById('devtoggle').innerHTML = "Novice & End-Users Click Here..."
                    }
                }
 
                
            function LoadFeatures(){
                var aURL = document.URL;
                var aPosition = aURL.indexOf("?developer");
                if(aPosition !=-1){
                    //alert('found');
                    document.getElementById('divEstuff').style.display = "none";
                    document.getElementById('divDstuff').style.display = "inline";
                    document.getElementById('featureHeader').innerHTML = "Give your application the edge on custom reporting!";
                    document.getElementById('devtoggle').innerHTML = "Novice & End-Users Click Here..."
                    }
                }
                
            function nav(str){
                var i = parseInt(document.getElementById('currentScreen').innerHTML);
                var strMsg
                if(str=='next'){
                    i = i + 1;
                    }
                else {
                    i = i - 1;
                }
                switch(i){
                    case 0:
                        alert("This is the first step. Please click 'Next'");
                        break
                    case 1:
                        strMsg = "Begin by selecting an area to report over.";
                        break    
                    case 2:
                        strMsg = "Choose what fields you want to see on your report.";
                        break    
                    case 3:
                        strMsg = "(optional) Group by any common values.";
                        break    
                    case 4:
                        strMsg = "(optional) Filter to only see what records you want. Sorted to your preference.";
                        break    
                    case 5:
                        strMsg = "You are now ready to preview the final report.";
                        break    
                    case 6:
                        if (confirm('You will now see the final report.  This report is in Adobe Acrobat PDF format for easy viewing on the Internet.  You will need Adobe Acrobat reader (free from www.adobe.com) to view it.\n\n\nDo you want to view the report?')){
                            window.open ("sample_report.pdf","reportWindow"); 
                            }
                        break
                    default:
                    }
               if(i>0 && i<6){
                    document.getElementById('screenCaption').innerHTML = "Step " + i + " of 5: " + strMsg;
                    document.getElementById('currentScreen').innerHTML = i;
                    document.getElementById('imgMagScreen').src = "images/report_writer_magscreen"+i+".jpg";
               } 
            }
