if (!window.Guidance) {
    Guidance = new Object();
}




/**
* Common
*/
Guidance.Common = function() { 


}

Guidance.Common.prototype = {

    myBrowser: function() {
        var userAgent = navigator.userAgent; 
        var isOpera = userAgent.indexOf("Opera") > -1; 
        var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera;  
        var isFF = userAgent.indexOf("Firefox") > -1; 
        var isSafari = userAgent.indexOf("Safari") > -1; 


        if (isIE) { return "IE" } //isIE end

        if (isFF) { return "FF"; }
        if (isOpera) { return "Opera"; }
        if (isSafari) { return "Safari"; }
    },
    get: function(id) {
        return document.getElementById(id);
    },

    getLocation: function(ele) {
        var location = { left: 0, top: 0 };
        var el = ele;
        while (el) {
            location.left += parseInt(el.offsetLeft);
            location.top += parseInt(el.offsetTop);
            el = el.offsetParent;
        }

        return location;
    },

    getBounds: function(ele) {
        var bounds = { width: 0, height: 0 };
        bounds.width = parseInt(ele.offsetWidth);
        bounds.height = parseInt(ele.offsetHeight);

        return bounds;
    },
    getClientBounds: function() {
        /// <summary>
        /// Gets the width and height of the browser client window (excluding scrollbars)
        /// </summary>
        /// <returns type="Sys.UI.Bounds">
        /// Browser's client width and height
        /// </returns>

        var clientWidth;
        var clientHeight;
        var browser = this.myBrowser();
        switch (browser) {
            case "IE":
                clientWidth = document.documentElement.clientWidth;
                clientHeight = document.documentElement.clientHeight;
                break;
            case "Safari":
                clientWidth = window.innerWidth;
                clientHeight = window.innerHeight;
                break;
            case "Opera":
                clientWidth = Math.min(window.innerWidth, document.body.clientWidth);
                clientHeight = Math.min(window.innerHeight, document.body.clientHeight);
                break;
            default:  // Sys.Browser.Firefox, etc.
                clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
                clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
                break;
        }
       
        var bounds = { width: clientWidth, height: clientHeight };
        return bounds;

     
    },
    getClientScroll: function() {
        /// <summary>
        /// Get Client ScrollLeft and ScrollTop
        /// </summary>
        var scrollLeft = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
        var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);

        return { left: scrollLeft, top: scrollTop };
    },
    getElementsByClassName: function(ele, className) {
        var eles = [];
        for (var i = 0; i < ele.childNodes.length; i++) {
            if (ele.childNodes[i].className == className) {
                eles.push(ele.childNodes[i]);
            }
        }

        return eles;
    },

    getCurrentStyle: function(element, attribute, defaultValue) {
        var currentValue = null;
        if (element) {
            if (element.currentStyle) {
                currentValue = element.currentStyle[attribute];
            } else if (document.defaultView && document.defaultView.getComputedStyle) {
                var style = document.defaultView.getComputedStyle(element, null);
                if (style) {
                    currentValue = style[attribute];
                }
            }

            if (!currentValue && element.style.getPropertyValue) {
                currentValue = element.style.getPropertyValue(attribute);
            }
            else if (!currentValue && element.style.getAttribute) {
                currentValue = element.style.getAttribute(attribute);
            }
        }

        if ((!currentValue || currentValue == "" || typeof (currentValue) === 'undefined')) {
            if (typeof (defaultValue) != 'undefined') {
                currentValue = defaultValue;
            }
            else {
                currentValue = null;
            }
        }
        return currentValue;
    },

    getElementOpacity: function(element) {
        var hasOpacity = false;
        var opacity;

        if (element.filters) {
            var filters = element.filters;
            if (filters.length !== 0) {
                var alphaFilter = filters['DXImageTransform.Microsoft.Alpha'];
                if (alphaFilter) {
                    opacity = alphaFilter.opacity / 100.0;
                    hasOpacity = true;
                }
            }
        }
        else {
            opacity = this.getCurrentStyle(element, 'opacity', 1);
            hasOpacity = true;
        }

        if (hasOpacity === false) {
            return 1.0;
        }
        return parseFloat(opacity);
    },

    setElementOpacity: function(element, value) {
        if (!element) {
            throw Error.argumentNull('element');
        }

        if (element.filters) {
            var filters = element.filters;
            var createFilter = true;
            if (filters.length !== 0) {
                var alphaFilter = filters['DXImageTransform.Microsoft.Alpha'];
                if (alphaFilter) {
                    createFilter = false;
                    alphaFilter.opacity = value * 100;
                }
            }
            if (createFilter) {
                element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (value * 100) + ')';
            }
        }
        else {
            element.style.opacity = value;
        }
    },

    addListener: function(element, eventName, handler) {
        if (element.attachEvent) {
            element.attachEvent("on" + eventName, handler);
        }
        else if (element.addEventListener) {
            element.addEventListener(eventName, handler, false);
        }
    },

    createDelegate: function(instance, method, params) {
        if (arguments.length == 2) {
            return function() {
                method.call(instance);
            }
        }
        else if (arguments.length == 3) {
            return function() {
                method.apply(instance, params);
            }
        }
    }
}

$Common = new Guidance.Common();

/**
* NavigationMenu
*/
Guidance.NavigationMenuHeader = function(sender, width, text, topAdjust, leftAdjust,imgUrl) {
    this._sender = sender;
    this._width = width;
    //this._height = height;
    this._text = text;
    this._topAdjust = topAdjust;
    this._leftAdjust = leftAdjust;

    // create popup
    this._item = document.createElement("div");
    this._item.style.position = "absolute";
    this._item.style.zIndex = 10000;
    this._item.style.width = this._width + "px";
    this._item.className = "NavigationMenuHeader";
    this._item.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="100%">' +
                                '<tr>' +
                                    '<td><img src="images/bar/1_left.png" /></td>' +
    //'<td style="width:' + (width - 10) + 'px; height:30px; background-image:url(images/bar/1_med.png); text-align:center">' +
                                    '<td style="width:' + (width - 10) + 'px; height:30px; text-align:center">' +
    //  '<span class="h_text">' + text + '</span>' +
                                      '<img src="' + imgUrl + '">' +
                                    '</td>' +
                                    '<td><img src="images/bar/1_right.png" /></td>' +
                                '</tr>' +
                            '</table>';
    this._item.style.display = "none";
}

Guidance.NavigationMenuHeader.prototype = {

    getSender: function() {
        return this._sender;
    },

    getItem: function() {
        return this._item;
    },

    show: function() {
        this.setLocation();
        this._item.style.display = "block";
    },

    hide: function() {
        this._item.style.display = "none";
    },

    setLocation: function() {
        var location = $Common.getLocation(this._sender);
        this._item.style.left = location.left - this._leftAdjust + "px";
        this._item.style.top = location.top - this._topAdjust + "px";
    }
}

Guidance.NavigationMenuItem = function(text, url) {
    this._text = text;
    this._url = url;

    //create item
    this._item = document.createElement("div");
    this._item.className = "NavigationMenuItem";
    this._item.innerHTML = text;
    //    this._link = document.createElement("a");
    //    this._link.href = url;
    //    this._link.innerHTML = text;
    //    this._link.style.color = "#e6e6e6";
    //    this._link.style.textDecoration = "none";
    //    this._item.appendChild(this._link);

    this.addHandlers();
}

Guidance.NavigationMenuItem.prototype = {

    getSender: function() {
        return this._sender;
    },

    getItem: function() {
        return this._item;
    },

    addHandlers: function() {
        $Common.addListener(this._item, "mouseover", $Common.createDelegate(this, this.onMouseOver));
        $Common.addListener(this._item, "mouseout", $Common.createDelegate(this, this.onMouseOut));
        $Common.addListener(this._item, "click", $Common.createDelegate(this, this.onClick));
    },

    onMouseOver: function() {
        //this._link.style.color = "white";
        this._item.style.backgroundImage = "url(images/bar/3.png)";
        
    //    this.cursorHand();
    //      open it while using flex
    },

    onMouseOut: function() {
        //this._link.style.color = "#e6e6e6";
        this._item.style.backgroundImage = "url(images/bar/2.png)";
    //    this.cursorNormal();
    //      open it while using flex
    },

    onClick: function() {
        window.location = this._url;
    },
    
    cursorHand: function() {
        var fxControl = document.flashContent || window.flashContent;
        
        if (fxControl)
            if (typeof fxControl.cursorHand == "function")
                fxControl.cursorHand();
    },
    
    cursorNormal: function() {
        var fxControl = document.flashContent || window.flashContent;
        if (fxControl)
          if (typeof fxControl.cursorNormal == "function")
              fxControl.cursorNormal();
    }
    
}

Guidance.NavigationMenuBody = function(sender, width, topAdjust, leftAdjust, items) {
    this._sender = sender;
    this._width = width;
    this._topAdjust = topAdjust;
    this._leftAdjust = leftAdjust;
    this._items = items;

    // create body
    this._item = document.createElement("div");
    this._item.style.position = "absolute";
    this._item.style.zIndex = 10000;
    this._item.style.width = this._width + "px";
    for (var i = 0; i < this._items.length; i++) {
        this._item.appendChild(this._items[i].getItem());
    }
    this._item.style.display = "none";
}

Guidance.NavigationMenuBody.prototype = {

    getSender: function() {
        return this._sender;
    },

    getItem: function() {
        return this._item;
    },

    show: function() {
        this.setLocation();
        this._item.style.display = "block";
    },

    hide: function() {
        this._item.style.display = "none";
    },

    setLocation: function() {
        var location = $Common.getLocation(this._sender);
        this._item.style.left = location.left - this._leftAdjust + "px";
        this._item.style.top = location.top - this._topAdjust + "px";
    }
}

/**
* headerConfig: {width, text, topAdjust, leftAdjust}
* bodyConfig: {width, topAdjust, leftAdjust, items}     
*/
Guidance.NavigationMenu = function(sender, headerConfig, bodyConfig) {
    this._sender = sender;

    this._header = new Guidance.NavigationMenuHeader(sender, headerConfig.width, headerConfig.text, headerConfig.topAdjust, headerConfig.leftAdjust, headerConfig.imgUrl);
    this._body = new Guidance.NavigationMenuBody(sender, bodyConfig.width, bodyConfig.topAdjust, bodyConfig.leftAdjust, bodyConfig.items);

    document.body.appendChild(this._header.getItem());
    document.body.appendChild(this._body.getItem());
}

Guidance.NavigationMenu.prototype = {
    getSender: function() {
        return this._sender;
    },

    getHeader: function() {
        return this._header;
    },

    getBody: function() {
        return this._body;
    },

    show: function() {
        this._header.show();
        this._body.show();
    },

    hide: function() {
        this._header.hide();
        this._body.hide();
    }
}

Guidance.NavigationMenuList = function(menuItems,menuContainer) {
this._menuItems = menuItems;
this._menuContainer = menuContainer;

$Common.addListener(this._menuContainer, "mouseout", $Common.createDelegate(this, this.hideAllMenus));

    for (var i = 0; i < menuItems.length; i++) {
        $Common.addListener(menuItems[i].getHeader().getItem(), "mouseover", $Common.createDelegate(this, this.menuItemMouseOver, [menuItems[i]]));
        $Common.addListener(menuItems[i].getBody().getItem(), "mouseover", $Common.createDelegate(this, this.menuItemMouseOver, [menuItems[i]]));
        $Common.addListener(menuItems[i].getHeader().getItem(), "focus", $Common.createDelegate(this, this.menuItemMouseOver, [menuItems[i]]));
        $Common.addListener(menuItems[i].getBody().getItem(), "focus", $Common.createDelegate(this, this.menuItemMouseOver, [menuItems[i]]));
        $Common.addListener(menuItems[i].getHeader().getItem(), "mouseout", $Common.createDelegate(this, this.menuItemMouseOut, [menuItems[i]]));
        $Common.addListener(menuItems[i].getBody().getItem(), "mouseout", $Common.createDelegate(this, this.menuItemMouseOut, [menuItems[i]]));
        $Common.addListener(menuItems[i].getHeader().getItem(), "blur", $Common.createDelegate(this, this.menuItemMouseOut, [menuItems[i]]));
        $Common.addListener(menuItems[i].getBody().getItem(), "blur", $Common.createDelegate(this, this.menuItemMouseOut, [menuItems[i]]));
        //$Common.addListener(menuItems[i].getHeader().getItem(), "mousemove", $Common.createDelegate(this, this.menuItemMouseMove, [menuItems[i]]));
        //$Common.addListener(menuItems[i].getBody().getItem(), "mousemove", $Common.createDelegate(this, this.menuItemMouseMove, [menuItems[i]]));
        $Common.addListener(menuItems[i].getSender(), "mouseover", $Common.createDelegate(this, this.onMouseOver, [menuItems[i]]));
        $Common.addListener(menuItems[i].getSender(), "mouseout", $Common.createDelegate(this, this.onMouseOut, [menuItems[i]]));
    }

    this._showMenu = false;
}

Guidance.NavigationMenuList.prototype = {

    getItems: function() {
        return this._menuItems;
    },

    menuItemMouseOver: function(menu) {
        menu.show();
    },

    menuItemMouseOut: function(menu) {
        menu.hide();
    },

    menuItemMouseMove: function(menu) {
        menu.show();
    },

    onMouseOver: function(menu) {
        this._showMenu = true;
        setTimeout($Common.createDelegate(this, this.showMenu, [menu]), 200);
    },

    onMouseOut: function(menu) {
        this._showMenu = false;
    },

    showMenu: function(menu) {
        if (this._showMenu) {
            for (var i = 0; i < this._menuItems.length; i++) {
                this._menuItems[i].hide();
            }
            menu.show();
        }
    },

    hideAllMenus: function() {
        for (var i = 0; i < this._menuItems.length; i++) {
            this._menuItems[i].hide();
        }
    }
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


// Modal Window
Guidance.ModalWindow = function(title, width, maxHeight, targetUrl) {

    this._background = null;
    this._container = null;
    this._header = null;
    this._btnClose = null;
    this._body = null;
    this._footer = null;
    this._iframe = null;

    //variables
    this._title = title;
    this._width = width;
    this._maxHeight = maxHeight;
    this._minHeight = 200;
    this._minPaddingBottom = 20;
    this._minPaddingTop = 20;
    this._targetUrl = targetUrl;

    //others
    this._btnClose = null;
    this._btnCloseUpImageUrl = 'images/btn_close_up.png';
    this._btnCloseOverImageUrl = 'images/btn_close_over.png';

    this._titleImgUrl = "images/contactme.jpg";
    this._containerLocation = null;






    this.initialize();
}

Guidance.ModalWindow.prototype = {


    initialize: function() {

        var bounds = $Common.getClientBounds(document.body);

        //initialize background
        if (document.getElementById("popbackground")) {
            document.body.removeChild(document.getElementById("popbackground"));
        }
        
        this._background = document.createElement('div');
        this._background.id = "popbackground";
        this._background.style.position = 'absolute';
        this._background.style.zIndex = 9999;
        this._background.style.width = "100%";
        this._background.style.height = "100%";
        this._background.style.left = '0px';
        this._background.style.top = '0px';

        this._background.style.backgroundColor = "#4c4c4c";
        this._background.style.opacity = "0.5";
        this._background.style.filter = "alpha(opacity=50)";
        this._background.style.display = 'none';
        document.body.appendChild(this._background);



        //initialize container
        if (document.getElementById("popcontainer")) {
            document.body.removeChild(document.getElementById("popcontainer"));
        }
        this._container = document.createElement('div');
        this._container.id = "popcontainer";
        this._container.style.position = 'absolute';
        this._container.style.zIndex = 10000;
        this._container.style.width = this._width + 'px';
        //this._container.style.height = this._height + 41 + 29 + 'px';
        //        this._container.style.backgroundColor = "red";

        this._container.style.display = 'none';
        this._containerLocation = { x: 0, y: 0 };
        document.body.appendChild(this._container);

        //initialize header
        this._header = document.createElement('div');
        this._header.style.position = 'relative';
        this._header.style.width = this._width + 'px';
        this._header.style.height = '41px';
        this._header.style.left = '0px';
        this._header.style.top = '0px';

        this._header.style.backgroundImage = "url(images/contact_1.png)";
        this._header.innerHTML = this._title;

        this._container.appendChild(this._header);

        //initialize title
        var imgTitle = document.createElement('img');
        imgTitle.style.position = 'absolute';
        imgTitle.style.top = '15px';
        imgTitle.style.left = '15px';

        imgTitle.src = this._titleImgUrl;
        this._header.appendChild(imgTitle);

        //initialize close button
        this._btnClose = document.createElement('img');
        this._btnClose.style.position = 'absolute';
        this._btnClose.style.top = '10px';
        this._btnClose.style.right = '15px';
        this._btnClose.style.cursor = "pointer";
        this._btnClose.src = this._btnCloseUpImageUrl;

        $Common.addListener(this._btnClose, "click", $Common.createDelegate(this, this.hide));
        $Common.addListener(this._btnClose, "mouseover", $Common.createDelegate(this, this.onCloseImgMouseover));
        $Common.addListener(this._btnClose, "mouseout", $Common.createDelegate(this, this.onCloseImgMouseout));
        this._header.appendChild(this._btnClose);

        //initialize body
        this._body = document.createElement('div');
        this._body.style.position = 'relative';
        //this._body.style.height = this._height + 'px';
        this._body.style.width = this._width + 'px';
        this._body.style.top = '0px';
        this._body.style.left = '0px';
        this._body.style.backgroundImage = "url(images/contact_2.jpg)"
      
        this._container.appendChild(this._body);

        //initialize body
        this._footer = document.createElement('div');
        this._footer.style.position = 'relative';
        this._footer.style.height = '29px';
        this._footer.style.width = this._width + 'px';
        this._footer.style.top = '0px';
        this._footer.style.left = '0px';
        this._footer.style.backgroundImage = "url(images/contact_3.png)"

        this._container.appendChild(this._footer);

        //initialize iframe
        this._iframe = document.createElement('iframe');

        this._iframe.style.borderStyle = 'none';
        this._iframe.frameBorder = '0';
        this._iframe.style.marginLeft = '0px';
        this._iframe.style.marginTop = '0px';
        this._iframe.style.width = this._width - 35 + 'px';
        //this._iframe.style.height = this._height + 'px';
        this._iframe.style.left = '0px';
        this._iframe.style.top = '0px';
        this._iframe.style.marginLeft = "15px";
//        this._iframe.style.backgroundColor = "blue";
        this._body.appendChild(this._iframe);
        var browser = $Common.myBrowser();
        //for IE
        if(browser == "IE")
        {
            this._iframe.src = this._targetUrl;
        }
        //other browser[Firefox, Safari]
        else
        {
            this._iframe.contentDocument.location = this._targetUrl;
        }

        $Common.addListener(window, "resize", $Common.createDelegate(this, this._layout));
        $Common.addListener(window, "scroll", $Common.createDelegate(this, this._layout));

        //new Ext.dd.DDProxy(this._container.id, [this._header.id]);

        this._layout();

    },
    show: function() {
        this._layout();
        this._background.style.display = 'block';

        this._container.style.display = 'block';
        document.documentElement.style.overflow = "hidden";
        if (this._iframe.contentWindow.document.getElementsByTagName("input").length > 0) {
            this._iframe.contentWindow.document.getElementsByTagName("input")[0].focus();
        }
    },
    hide: function() {
        this._background.style.display = 'none';

        this._container.style.display = 'none';
        document.documentElement.style.overflow = "auto";
    },


    _layout: function() {
        var bounds = $Common.getClientBounds();
        var scroll = $Common.getClientScroll();

        //this._background.style.width = bounds.width + 'px';
        //this._background.style.height = bounds.height + 'px';
        this._background.style.left = scroll.left + 'px';
        this._background.style.top = scroll.top + 'px';
        
        if(bounds.height - this._minPaddingBottom - this._minPaddingTop >= this._maxHeight)
        {
            this.setContainerHeight(this._maxHeight);
        }
        else if(bounds.height - this._minPaddingBottom - this._minPaddingTop < this._maxHeight 
                && bounds.height - this._minPaddingBottom - this._minPaddingTop >= this._minHeight)
        {
            this.setContainerHeight(bounds.height - this._minPaddingBottom - this._minPaddingTop);
        }
        else
        {
            this.setContainerHeight(this._minHeight);
        }

        var x = bounds.width - parseInt(this._container.style.width);
        var y = bounds.height - parseInt(this._container.style.height);
        this._containerLocation.x = x > 0 ? x / 2 : 0;
        this._containerLocation.y = y > 0 ? y / 2 : 0;

        this._container.style.left = this._containerLocation.x + scroll.left + 'px';
        this._container.style.top = this._containerLocation.y + scroll.top + 'px';


    },
    setContainerHeight:function(newHeight){
        this._container.style.height = newHeight + 'px';
        this._body.style.height = newHeight - 49 - 29 + 'px';
        this._iframe.style.height = newHeight - 49 - 29 + 'px';
    },
    onCloseImgMouseover: function() {
        this._btnClose.src = this._btnCloseOverImageUrl;
    },
    onCloseImgMouseout: function() {
        this._btnClose.src = this._btnCloseUpImageUrl;
    }
}


/**
* Guidance.UI
*/
Guidance.UI = {};

Guidance.UI.initNews = function() {
    Guidance.News.instance = new Guidance.News();
    Guidance.News.instance.autoChange();
}

Guidance.UI.createPopupMenu = function() {
var senders = [$Common.get("h2ImgMenuProducts"),
                    $Common.get("h2ImgMenuTraining"),
                    $Common.get("h2ImgMenuService"),
                    $Common.get("h2ImgMenuResources"),
                    $Common.get("h2ImgMenuCustomerCenter"),
                    $Common.get("h2ImgMenuPartner"),
                    $Common.get("h2ImgMenuAboutUs")
                  ];

    var menuContainer = $Common.get("menuContainer");
    
    var item1 = new Guidance.NavigationMenu(senders[0],
                                            { width: 120, text: "PRODUCTS", topAdjust: 5, leftAdjust: 5, imgUrl: "images/bar/product.jpg" },
                                            { width: 260, topAdjust: -25, leftAdjust: 5, items: [
                                                new Guidance.NavigationMenuItem("EnCase&#174; Enterprise Platform", "http://www.guidancesoftware.com/computer-forensics-fraud-investigation-software.htm"),
                                                new Guidance.NavigationMenuItem("EnCase&#174; eDiscovery", "http://www.guidancesoftware.com/computer-forensics-ediscovery-software-frcp.htm"),
                                                new Guidance.NavigationMenuItem("EnCase&#174; Data Audit &amp; Policy Enforcement", "http://www.guidancesoftware.com/computer-forensics-data-audit-policy-enforcement.htm"),
                                                new Guidance.NavigationMenuItem("EnCase&#174; Information Assurance", "http://www.guidancesoftware.com/computer-forensics-ediscovery-software-dcid-fisma.htm"),
                                                new Guidance.NavigationMenuItem("EnCase&#174; Forensic", "http://www.guidancesoftware.com/computer-forensics-ediscovery-software-digital-evidence.htm")
                                            ]
                                            });
    var item2 = new Guidance.NavigationMenu(senders[1],
                                            { width: 118, text: "TRAINING", topAdjust: 5, leftAdjust: 3, imgUrl: "images/bar/training.jpg" },
                                            { width: 160, topAdjust: -25, leftAdjust: 3, items: [
                                            	new Guidance.NavigationMenuItem("Training Overview", "http://www.guidancesoftware.com/computer-forensics-training.htm"),
                                                new Guidance.NavigationMenuItem("Course Offerings", "http://www.guidancesoftware.com/computer-forensics-training-courses.htm"),
                                                new Guidance.NavigationMenuItem("Course Schedule", "http://www.guidancesoftware.com/computer-forensics-training-classes.htm"),
                                                new Guidance.NavigationMenuItem("Training Programs", "http://www.guidancesoftware.com/computer-forensics-training-programs.htm"),
                                                new Guidance.NavigationMenuItem("EnCE&#174; Certification", "http://www.guidancesoftware.com/computer-forensics-training-ence-certification.htm"),
                                                new Guidance.NavigationMenuItem("Certifying Organizations", "http://www.guidancesoftware.com/computer-forensics-training-certifying-organizations.htm"),
                                                new Guidance.NavigationMenuItem("Training Partners", "http://www.guidancesoftware.com/computer-forensics-training-partners.htm")
                                            ]
                                            });
    var item3 = new Guidance.NavigationMenu(senders[2],
                                            { width: 112, text: "SERVICES", topAdjust: 5, leftAdjust: 4, imgUrl: "images/bar/services.jpg" },
                                            { width: 150, topAdjust: -25, leftAdjust: 4, items: [
						new Guidance.NavigationMenuItem("Professional Services", "http://www.guidancesoftware.com/guidance-software-professional-services.htm"),
                                                new Guidance.NavigationMenuItem("eDiscovery", "http://www.guidancesoftware.com/ediscovery-services.htm"),
                                                new Guidance.NavigationMenuItem("Forensic", "http://www.guidancesoftware.com/computer-forensics-investigation-record-management-services.htm"),
                                                new Guidance.NavigationMenuItem("Incident Response", "http://www.guidancesoftware.com/computer-security-breach-incident-response-services.htm"),
                                                new Guidance.NavigationMenuItem("Data Auditing", "http://www.guidancesoftware.com/data-audit-policy-enforcement-service.htm"),
                                                new Guidance.NavigationMenuItem("Customized Solution", "http://www.guidancesoftware.com/computer-forensics-software-customization.htm")

                                            ]
                                            });
    var item4 = new Guidance.NavigationMenu(senders[3],
                                            { width: 125, text: "RESOURCES", topAdjust: 5, leftAdjust: 3, imgUrl: "images/bar/resources.jpg" },
                                            { width: 170, topAdjust: -25, leftAdjust: 3, items: [
                                                new Guidance.NavigationMenuItem("Demos", "http://www.guidancesoftware.com/resources-demos.htm"),
                                                new Guidance.NavigationMenuItem("Webinars", "http://www.guidancesoftware.com/resources-webinars.htm"),
                                                new Guidance.NavigationMenuItem("Brochures", "http://www.guidancesoftware.com/resources-brochures.htm"),
                                                new Guidance.NavigationMenuItem("Whitepapers", "http://www.guidancesoftware.com/resources-whitepapers.htm"),
                                                new Guidance.NavigationMenuItem("Real eDiscovery Magazine", "http://www.guidancesoftware.com/real-ediscovery-magazine-spring-2009.htm.htm"),
                                                new Guidance.NavigationMenuItem("EnCase&#174; Legal Journal", "http://www.guidancesoftware.com/encase-legal-journal.htm")
                                            ]
                                            });
    var item5 = new Guidance.NavigationMenu(senders[4],
                                            { width: 168, text: "CUSTOMER CENTER", topAdjust: 5, leftAdjust: 4, imgUrl: "images/bar/customer.jpg" },
                                            { width: 163, topAdjust: -25, leftAdjust: 4, items: [
                                                new Guidance.NavigationMenuItem("Customer Service", "http://www.guidancesoftware.com/customer-service.htm"),
                                                new Guidance.NavigationMenuItem("Technical Support", "http://www.guidancesoftware.com/technical-support.htm"),
                                                new Guidance.NavigationMenuItem("CEIC Conference", "http://www.ceicconference.com"),
                                                new Guidance.NavigationMenuItem("Training", "http://www.guidancesoftware.com/computer-forensics-training.htm"),
                                                new Guidance.NavigationMenuItem("Professional Services", "http://www.guidancesoftware.com/guidance-software-professional-services.htm"),
                                                new Guidance.NavigationMenuItem("Product Registration", "http://www.guidancesoftware.com/myaccount/registration.aspx")
                                            ]
                                            });
    var item6 = new Guidance.NavigationMenu(senders[5],
                                            { width: 120, text: "PARTNERS", topAdjust: 5, leftAdjust: 3, imgUrl: "images/bar/partners.jpg" },
                                            { width: 160, topAdjust: -25, leftAdjust: 3, items: [
                                                new Guidance.NavigationMenuItem("Channel Partner Program", "http://www.guidancesoftware.com/worldwide-channel-program.htm"),
                                                new Guidance.NavigationMenuItem("Channel Partners", "http://www.guidancesoftware.com/worldwide-channel-partners.htm"),
                                                new Guidance.NavigationMenuItem("Channel Partner Portal", "http://resellers.guidancesoftware.com/login.aspx")
                                            ]
                                            });
    var item7 = new Guidance.NavigationMenu(senders[6],
                                            { width: 128, text: "ABOUT US", topAdjust: 5, leftAdjust: 3, imgUrl: "images/bar/about.jpg" },
                                            { width: 123, topAdjust: -25, leftAdjust: 3, items: [
                                                 new Guidance.NavigationMenuItem("Company Overview", "http://www.guidancesoftware.com/computer-forensics-ediscovery-leader.htm"),
                                                 new Guidance.NavigationMenuItem("Management", "http://www.guidancesoftware.com/management.htm"),
                                                 new Guidance.NavigationMenuItem("Newsroom", "http://www.guidancesoftware.com/computer-forensics-ediscovery-news.htm"),
                                                 new Guidance.NavigationMenuItem("Events Calendar", "http://www.guidancesoftware.com/computer-forensics-ediscovery-events.htm"),
                                                 new Guidance.NavigationMenuItem("Careers", "http://www.guidancesoftware.com/careers.htm"),
                                                 new Guidance.NavigationMenuItem("Investors", "index.cfm"),
                                                 new Guidance.NavigationMenuItem("Contact Us", "http://www.guidancesoftware.com/contact.htm")

                                            ]
                                            });

    var menuList = new Guidance.NavigationMenuList([item1, item2, item3, item4, item5, item6, item7], menuContainer);
}

Guidance.UI.showDialogWindow = function(title, width, height, targetUrl) {

    pop = new Guidance.ModalWindow(title, width, height, targetUrl);
    
    setTimeout($Common.createDelegate(pop, pop.show), 500);
}


function pagenumbers(number) {
    document.getElementById("hrf1").style.display = "none";
    document.getElementById("hrf2").style.display = "none";
    document.getElementById("hrf3").style.display = "none";
    document.getElementById("hrf4").style.display = "none";
    document.getElementById("hrf5").style.display = "none";
    var hrf = eval("document.getElementById('hrf" + number + "')");
    hrf.style.display = "block";
}

function showpopup(pp)
{
    var back = document.getElementById("blackbak");
    var clientWidth, clientHeight;
    if(navigator.userAgent.indexOf(' MSIE ') > -1)
    {
        clientWidth = document.documentElement.clientWidth;
        clientHeight = document.documentElement.clientHeight;
    }
    else if (navigator.userAgent.indexOf(' Safari/') > -1)
    {
        clientWidth = window.innerWidth;
        clientHeight = window.innerHeight;
    }
    else
    {
        clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
        clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
    }

    back.style.width = Math.max(Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), clientWidth)+'px';
    back.style.height = Math.max(Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), clientHeight)+'px';
    pp.style.display='block';
}



