﻿/*
created by: Brian Gaines
created on: 9/26/2007
filename: _netimg.js
comments:   
    This javascript file contains client scripts specific to the 
    facilities and is stored in the root of all the facility web
    pages. Make sure you reference the _fw.js file as it contains
    functions this script file needs.
    
    The functions contained in this file are specifically geared 
    on image preloading to enhance page peformance.

    **Make sure to use the variable rootpath to obtain the correct path
    of where the files are referenced in development mode vs. 
    production mode. Read more info in App_Themes/Default/Global/Scripts/_fw.js

*/

// -------------------------------------
//      INITIALIZATIONS
// -------------------------------------

var isDefault = checkCurrentPage('Default.aspx');
var isBid = checkCurrentPage('Bid.aspx');
var isBio = checkCurrentPage('Bio.aspx');
var isContact = checkCurrentPage('Contact.aspx');
var isAbout = checkCurrentPage('About.aspx');
var isEmployees = checkCurrentPage('Employees.aspx');

function Init() {
    
    preloadImages();
    
}

// -------------------------------------
//      IMAGE PRELOADS
// -------------------------------------

function preloadImages() {

	if (document.images) {
	
	    // ---------------------------------
	    //      NAVIGATION PRELOADS
	    // ---------------------------------
	
	    //top navigation
        topnav_home_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav1_a.gif");
        topnav_home_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav1_b.gif");

        topnav_about_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav2_a.gif");
        topnav_about_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav2_b.gif");

        topnav_contact_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav3_a.gif");
        topnav_contact_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav3_b.gif");

        topnav_bids_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav4_a.gif");
        topnav_bids_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav4_b.gif");

        topnav_employee_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav5_a.gif");
        topnav_employee_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_nav5_b.gif");
            
        //divisional navigation
        netnav_nethome_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/net_home_a.jpg");
        netnav_nethome_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/net_home_b.jpg");
        
        netnav_fachome_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/net_facility_a.jpg");
        netnav_fachome_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/net_facility_b.jpg");
        
        netnav_quanthome_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/net_quant_a.jpg");
        netnav_quanthome_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/net_quant_b.jpg");            
                    
        //side navigation
        /*
        sidenav_chicago_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_chicago_a.jpg");
        sidenav_chicago_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_chicago_b.jpg");            

        sidenav_florence_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_florence_a.jpg");
        sidenav_florence_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_florence_b.jpg");            

        sidenav_sydney_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_sydney_a.jpg");
        sidenav_sydney_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_sydney_b.jpg");            
        */
        sidenav_us_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_us_a.gif");
        sidenav_us_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_us_b.gif");            
        
        sidenav_intl_off=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_intl_a.gif");
        sidenav_intl_on=newImage(rootpath + "App_Themes/Default/Network/Navigation/fieldwork_net_intl_b.gif");            


	    // ---------------------------------
	    //      PAGE SPECIFIC PRELOADS
	    // ---------------------------------

        switch(true){
            case isDefault:
                //nothing at this time;
                break;
            case isBid:
                //nothing at this time;            
                break;
            case isBio:
                //nothing at this time;            
                break;
            case isContact:
                //nothing at this time;            
                break;
            case isAbout:
                //nothing at this time;            
                break;
            case isEmployees:
                //nothing at this time;            
                break;
        }
        
        preloadFlag = true;
        
    }
}
