///////////////////// DSCRIPTS PRESENTS ///////////////////////////////////////                                                                         //    //   This script has been downloaded from http://dscripts.awardspace.com   ////  ---------------------------------------------------------------------  ////                                                                         ////  Script Name: Array Navigation                                          ////  Written on: 5 January 2007                                             //        //  Written by: Burhan Uddin                                               //        //                                                                         //      //  Browse: http://dscripts.awardspace.com for more free scripts.          ////                                                                         ///////////////////////////////////////////////////////////////////////////////// Variables ============================================================================// Set different variables to customize menuvar mouseover_menus = '#996600';var mouseout_menus  = '#665200';var mouseover_items = '#999900';var mouseout_items  = '#996600';// Write menus herevar menus = new Array (                    "Exhibitions",                    "Med Sea Life",                    "Med Wrecks"                    );var items = new Array();items[0]  = new Array (                                        "Med Sea Life|http://www.djsphotoart.com/Exhibit/Medfish/med_fish.html",					"Med Sea Life p2|http://www.djsphotoart.com/Exhibit/Medfish/med_fish_01.html",                    "Med Wrecks|http://www.djsphotoart.com/Exhibit/Medwreck/med_wreck.html"                                        );                    items[1]  = new Array (                    "Amberjack|http://www.djsphotoart.com/Exhibit/Medfish/amberjack-main.html",                    "Barracuda|http://www.djsphotoart.com/Exhibit/Medfish/barracuda_main.html",                    "Sea Bream|http://www.djsphotoart.com/Exhibit/Medfish/bream_main.html",                    "Comber|http://www.djsphotoart.com/Exhibit/Medfish/comber_main.html",                    "Cuttlefish|http://www.djsphotoart.com/Exhibit/Medfish/cuttlefish_main.html",					"Damsel Fish|http://www.djsphotoart.com/Exhibit/Medfish/damsel_main.html",					"Dentex|http://www.djsphotoart.com/Exhibit/Medfish/dentex-main.html",					"Flounder|http://www.djsphotoart.com/Exhibit/Medfish/flounder-main.html",					"Flying Gurnard|http://www.djsphotoart.com/Exhibit/Medfish/Flying%20Gunart_main.html",					"Grouper|http://www.djsphotoart.com/Exhibit/Medfish/grouper_main.html",					"Hermit Crab|http://www.djsphotoart.com/Exhibit/Medfish/Hermit_main.html",					"Jelly Fish|http://www.djsphotoart.com/Exhibit/Medfish/jellyfish-main.html",					"John Dory|http://www.djsphotoart.com/Exhibit/Medfish/JohnDory_main.html",					"Lobster|http://www.djsphotoart.com/Exhibit/Medfish/lobster-main.html",					"Morey Eel|http://www.djsphotoart.com/Exhibit/Medfish/morey_main.html",					"Sea Slugs|http://www.djsphotoart.com/Exhibit/Medfish/nudibranch_main.html",					"Octopus|http://www.djsphotoart.com/Exhibit/Medfish/octopus_main.html",					"Parrot Fish|http://www.djsphotoart.com/Exhibit/Medfish/parrot-main.html",					"Scorpion Fish|http://www.djsphotoart.com/Exhibit/Medfish/scorpion_main.html",					"Squid|http://www.djsphotoart.com/Exhibit/Medfish/squid_main.html",					"Starfish|http://www.djsphotoart.com/Exhibit/Medfish/starfish-main.html",					"Red Mullet|http://www.djsphotoart.com/Exhibit/Medfish/striped_red_mullet_main.html",                    "Wrasse|http://www.djsphotoart.com/Exhibit/Medfish/wrasse_main.html"                                        );                    items[2]  = new Array (                                        "Cominoland|http://www.djsphotoart.com/Exhibit/Medwreck/cominoland-main.html",                    "Faroud|http://www.djsphotoart.com/Exhibit/Medwreck/faroud_main.html",					"Imperial Eagle|http://www.djsphotoart.com/Exhibit/Medwreck/imperial-eagle-main.html",					"Karwela|http://www.djsphotoart.com/Exhibit/Medwreck/karwela-main.html",					"Maori|http://www.djsphotoart.com/Exhibit/Medwreck/maori-main.html",					"P29 Boltenhagen|http://www.djsphotoart.com/Exhibit/Medwreck/p29_main.html",					"P31-Pasewalk|http://www.djsphotoart.com/Exhibit/Medwreck/p31-main.html",					"Rozi|http://www.djsphotoart.com/Exhibit/Medwreck/rozi-main.html",                    "Scotscraig|http://www.djsphotoart.com/Exhibit/Medwreck/scotscraig_main.html"                    );                                        // Functions ============================================================================// Don't Edit Below// Menu Title Mouse Over-Mouse Outfunction menu_over(x)    {        if(document.getElementById||(document.all && !(document.getElementById)))            {                x.style.backgroundColor=mouseover_menus;            }     }function menu_out(x)    {        if(document.getElementById||(document.all && !(document.getElementById)))            {                x.style.backgroundColor=mouseout_menus;            }    }// Item Mouse Over-Mouse Outfunction item_over(x)    {        if(document.getElementById||(document.all && !(document.getElementById)))            {                x.style.backgroundColor=mouseover_items;            }    }function item_out(x)    {        if(document.getElementById||(document.all && !(document.getElementById)))            {                x.style.backgroundColor=mouseout_items;            }    }   // Statement to collapse items;function collapse(id)    {        if (document.getElementById(id).style.display=="")            {                document.getElementById(id).style.display = "none";                return;            }        for (i=0; i<menus.length; i++)            {                var others = document.getElementById(i+1);                others.style.display = "none";            }        document.getElementById(id).style.display = "";    } // Statement to open linksfunction go(url)    {        window.location=url;    }                                               // Writes menufunction write_menu()    {        document.write('<div id="navigation_bar">');                for(x=0; x<menus.length; x++)            {                document.write('<div>');                                // Spilts menus into array for menu name and url                var menu_array  = menus[x].split("|");                // If menus url is not available the just makes expand and collapse effect on menu                if (!menu_array[1])                    {                        var menu  = '<div id="menu" onMouseOver=menu_over(this); onMouseOut=menu_out(this); onClick="collapse(\''+(x+1)+'\')">'+menus[x]+'</div>';                    }                else                    {                        var menu  = '<div id="menu" onMouseOver=menu_over(this); onMouseOut=menu_out(this); onClick="collapse(\''+(x+1)+'\'); go(\''+menu_array[1]+'\')"><a href="'+menu_array[1]+'">'+menu_array[0]+'</a></div>';                    }                document.write(menu);                                     // Checks if current menu has items then writes items                if(items[x] !='')                    {                        // If menu is not current then sets its display to none                        if (menu_array[0] != current_menu)                            {                                document.write('<div style="display:none" id="'+(x+1)+'">');                            }                        else                            {                                document.write('<div style="display:" id="'+(x+1)+'">');                            }                                                            // Writes Items                            for(y=0; y<items[x].length; y++)                                {                                    // Splits current item into name and url                                    var item_array   = items[x][y].split("|");                                                                        // If item name is not current then acts with it as a ordinary item                                    if (item_array[0] != current_item)                                        {                                            document.write('<div id="item" onMouseOver=item_over(this); onMouseOut=item_out(this); onClick="go(\''+item_array[1]+'\')"><a href="'+item_array[1]+'">'+item_array[0]+'</a></div>');                                        }                                    // Or if it current, then removes hyperlink and change it background color to current items background color                                    else                                        {                                            document.write('<div id="current_item">'+item_array[0]+'</div>');                                        }                                        }                        }                                            document.write('</div>');                            document.write('</div>');            }                    document.write('</div>');    }    function stoperror()    {        return true;    }    window.onerror=stoperror