var home_1 = new Array(); var showroom_1 = new Array(); showroom_1[0] = 'Models'; var showroom_models_2 = new Array(); showroom_models_2[0] = 'Choppers'; var showroom_models_choppers_3 = new Array(); showroom_models_2[1] = 'Bobbers'; var showroom_models_bobbers_3 = new Array(); showroom_models_2[2] = 'Pro Street'; var showroom_models_pro_street_3 = new Array(); showroom_models_2[3] = 'Springers'; var showroom_models_springers_3 = new Array(); showroom_models_2[4] = 'How to Order'; var showroom_models_how_to_order_3 = new Array(); showroom_1[1] = 'Featured'; var showroom_featured_2 = new Array(); showroom_featured_2[0] = 'Theme Bikes'; var showroom_featured_theme_bikes_3 = new Array(); showroom_featured_2[1] = 'In Progress'; var showroom_featured_in_progress_3 = new Array(); showroom_featured_2[2] = 'Previous Builds'; var showroom_featured_previous_builds_3 = new Array(); showroom_featured_2[3] = 'Electric Chopper'; var showroom_featured_electric_chopper_3 = new Array(); showroom_1[2] = 'Technology'; var showroom_technology_2 = new Array(); showroom_technology_2[0] = 'Brakester System'; var showroom_technology_brakester_system_3 = new Array(); showroom_technology_2[1] = 'Exhaust'; var showroom_technology_exhaust_3 = new Array(); showroom_technology_2[2] = 'Traction Control'; var showroom_technology_traction_control_3 = new Array(); showroom_1[3] = 'Galleries'; var showroom_galleries_2 = new Array(); showroom_galleries_2[0] = 'Motorcycles'; var showroom_galleries_motorcycles_3 = new Array(); showroom_galleries_2[1] = 'Friends of DiMora'; var showroom_galleries_friends_of_dimora_3 = new Array(); showroom_galleries_2[2] = 'Wallpapers'; var showroom_galleries_wallpapers_3 = new Array(); var dealers_1 = new Array(); dealers_1[0] = 'Locate a Dealer'; var dealers_locate_a_dealer_2 = new Array(); dealers_1[1] = 'Become a Dealer'; var dealers_become_a_dealer_2 = new Array(); dealers_1[2] = 'Dealer Log In'; var dealers_dealer_log_in_2 = new Array(); var events_1 = new Array(); events_1[0] = 'Past Events'; var events_2 = new Array(); var dimora_tv_1 = new Array(); dimora_tv_1[0] = 'Featured Shows'; var dimora_tv_2 = new Array(); var dimora_story_1 = new Array(); dimora_story_1[0] = 'Overview'; var dimora_story_overview_2 = new Array(); dimora_story_1[1] = 'Cars Yeah Interview with Sir Alfred J. DiMora'; var dimora_story_cars_yeah_interview_with_sir_alfred_j._dimora_2 = new Array(); dimora_story_1[2] = 'Star Dedication'; var dimora_story_star_dedication_2 = new Array(); dimora_story_1[3] = 'Natalia SLS 2'; var dimora_story_natalia_sls_2_2 = new Array(); dimora_story_1[4] = 'DiMora Motorcar'; var dimora_story_dimora_motorcar_2 = new Array(); dimora_story_1[5] = 'Classic Clenet Club'; var dimora_story_classic_clenet_club_2 = new Array(); dimora_story_1[6] = 'Clenet Coachworks'; var dimora_story_clenet_coachworks_2 = new Array(); dimora_story_clenet_coachworks_2[0] = 'Overview'; var dimora_story_clenet_coachworks_overview_3 = new Array(); dimora_story_clenet_coachworks_2[1] = 'Factories'; var dimora_story_clenet_coachworks_factories_3 = new Array(); dimora_story_clenet_coachworks_2[2] = 'TV Clips'; var dimora_story_clenet_coachworks_tv_clips_3 = new Array(); dimora_story_clenet_coachworks_2[3] = 'Photos'; var dimora_story_clenet_coachworks_photos_3 = new Array(); dimora_story_clenet_coachworks_2[4] = 'Newspapers'; var dimora_story_clenet_coachworks_newspapers_3 = new Array(); dimora_story_clenet_coachworks_2[5] = 'Magazines'; var dimora_story_clenet_coachworks_magazines_3 = new Array(); dimora_story_1[7] = 'Sceptre 6.6S'; var dimora_story_sceptre_6.6s_2 = new Array(); dimora_story_1[8] = 'Voyager'; var dimora_story_voyager_2 = new Array(); dimora_story_1[9] = 'Star Bridge Systems'; var dimora_story_star_bridge_systems_2 = new Array(); dimora_story_1[10] = 'DiMora Designs'; var dimora_story_dimora_designs_2 = new Array(); dimora_story_dimora_designs_2[0] = 'Company'; var dimora_story_dimora_designs_company_3 = new Array(); dimora_story_dimora_designs_2[1] = 'JX Coupe'; var dimora_story_dimora_designs_jx_coupe_3 = new Array(); dimora_story_dimora_designs_2[2] = 'Scattare'; var dimora_story_dimora_designs_scattare_3 = new Array(); dimora_story_1[11] = 'Other Activities'; var dimora_story_other_activities_2 = new Array(); var media_1 = new Array(); media_1[0] = 'In the News'; var media_in_the_news_2 = new Array(); media_1[1] = 'Pressroom'; var media_pressroom_2 = new Array(); media_1[2] = 'Newsletter'; var media_newsletter_2 = new Array(); var about_us_1 = new Array(); about_us_1[0] = 'Our Mission'; var about_us_our_mission_2 = new Array(); about_us_1[1] = 'Our Values'; var about_us_our_values_2 = new Array(); var contact_us_1 = new Array(); var MaxLevels = '3'; var Menu_1; var DelayName_1; document.write(''); var Menu_2; var DelayName_2; document.write(''); var Menu_3; var DelayName_3; document.write(''); function openPreview(TMPURL) { TMPW = 760; TMPH = 550; var windowOptions = 'history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=yes,width=' + TMPW + ',height=' + TMPH; window.open('/preview.html?URL=' + TMPURL, 'View_Thumbnail', windowOptions); } function CheckSearch(obj,defaulttext) { if (obj.value == defaulttext) { obj.value=""; } else if (obj.value == "") { obj.value=defaulttext; } } // ################################################## // CACHE NAV BG IMAGES img = new Array(); img[0] = new Image(); img[0].scr = "/images/subnav_bk.gif"; img[1] = new Image(); img[1].scr = "/images/subnav_bk-off.gif"; img[2] = new Image(); img[2].scr = "/images/top_links_bg-over.gif"; img[3] = new Image(); img[3].scr = "/images/top_links_bg.gif"; // ################################################## // TMP PLACE HOLDERS var ArrayNameTMP=''; var DivLevelTMP=''; var ActiveDiv=0; var menu_width = 143; var DisappearDelay = 250; // ############################################################################### // CONTENT WRITE / APPEND DIVS function WriteInnerHTML(p_DivID, p_htmlstr) { document.getElementById(p_DivID).innerHTML = p_htmlstr; } function AddInnerHTML(p_DivID, p_htmlstr) { CurContent = document.getElementById(p_DivID).innerHTML; document.getElementById(p_DivID).innerHTML = CurContent + "\n" + p_htmlstr; } // ############################################################################### // MENU SHOW / HIDE FUNCTIONS function MenuShow(ArrayName, DivLevel, ParentName) { CurrentLevel (DivLevel); eval("Menu_" + DivLevel + " = 1;"); var NewDivName = eval("document.getElementById('DropDownMenuDiv_" + DivLevel+"')"); var NewArrayName = eval(ArrayName + "_" + DivLevel); var NewHTML = NewArrayName.join(""); if (DivLevel == 1) { menu1_x = getposOffset(ParentName, "left"); menu1_y = getposOffset(ParentName, "top") + ParentName.offsetHeight; } else { menu1_x = getposOffset(ParentName, "left") + menu_width; menu1_y = getposOffset(ParentName, "top"); } CalculateDropdown (menu1_x, menu1_y, DivLevel); NewDivName.style.left=menu1_x+"px"; NewDivName.style.top=menu1_y+"px"; NewDivName.innerHTML = NewHTML; NewDivName.className="ShowMenu"; } function MenuHide(DivLevel) { var NewDivName = eval("document.getElementById('DropDownMenuDiv_" + DivLevel+"')"); NewDivName.className="HideMenu"; NewDivName.innerHTML = ''; eval("Menu_" + DivLevel +" = 0;"); } function MenuDelayHide(DivLevel) { var tmpvar; var tmpdivlevel = DivLevel; if (DivLevel <= ActiveDiv) tmpdivlevel = 0; for (i=MaxLevels; i >= tmpdivlevel; i--) { if (i != 0) { eval("tmpvar = Menu_" + i); if (tmpvar == 1) { eval("DelayName_" + i + "= setTimeout('MenuHide("+i+")', DisappearDelay)"); } } } } function MenuClearHide(DivLevel) { var tmpvar; for (i=1; i <= DivLevel; i++) { eval("tmpvar = Menu_" + i); if (tmpvar == 1) { eval("clearTimeout(DelayName_" + i +")"); } } } function CurrentLevel (DivLevel) { ActiveDiv = DivLevel; MenuClearHide(DivLevel); MenuDelayHide(eval(DivLevel+1)); } // ############################################################################### // MENU POSITION FUNCTIONS function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function CalculateDropdown (tx, ty, tnum) { txmax2 = window.innerWidth; tymax2 = window.innerHeight; if (txmax2 == undefined) txmax2 = document.body.offsetWidth if (tymax2 == undefined) tymax2 = document.body.offsetHeight if (txmax2 == undefined) txmax2 = screen.Width; if (tymax2 == undefined) tymax2 = screen.Height; //txmax2 = screen.Width; //tymax2 = screen.height; var HTML = ""; if (tnum == 1) { tnum_width = menu_width; backleft = 100; if (tx + tnum_width > txmax2) { HTML += "E: Nav wider then screen:
"; menu1_x = (tx - backleft); } } else { backleft = (menu_width + menu_width); if ((tx + menu_width) > txmax2) { HTML += "E: Nav wider then screen:
"; menu1_x = (tx - backleft); } } }