/*** This is the menu creation code - place it right after you body tag Feel free to add this to a stand-alone js file and link it to your page. **/ //Menu object creation oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname //Menu properties oCMenu.pxBetween=0 //Using the cm_page object to place the menu ---- oCMenu.fromLeft=90 oCMenu.fromTop=27 oCMenu.rows=1 oCMenu.menuPlacement=0 oCMenu.offlineRoot="/ansmann/" oCMenu.onlineRoot="" oCMenu.resizeCheck=1 oCMenu.wait=1000 oCMenu.fillImg="cm_fill.gif" oCMenu.zIndex=0 //Background bar properties oCMenu.useBar=0 //Level properties - ALL properties have to be spesified in level 0 oCMenu.level[0]=new cm_makeLevel() //Add this for each new level oCMenu.level[0].width="250" oCMenu.level[0].height=25 oCMenu.level[0].regClass="clLevel0" oCMenu.level[0].overClass="clLevel0over" oCMenu.level[0].borderX=0 oCMenu.level[0].borderY=0 oCMenu.level[0].borderClass="clLevel0border" oCMenu.level[0].offsetX=0 oCMenu.level[0].offsetY=0 oCMenu.level[0].rows=0 oCMenu.level[0].arrow=0 oCMenu.level[0].arrowWidth=0 oCMenu.level[0].arrowHeight=0 oCMenu.level[0].align="bottom" //EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number) oCMenu.level[1].width=170 oCMenu.level[1].height=20 oCMenu.level[1].regClass="clLevel1" oCMenu.level[1].overClass="clLevel1over" oCMenu.level[1].borderX=1 oCMenu.level[1].borderY=1 oCMenu.level[1].align="right" oCMenu.level[1].offsetX=-50 oCMenu.level[1].offsetY=10 oCMenu.level[1].borderClass="clLevel1border" oCMenu.level[1].align="right" /****************************************** Menu item creation: myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) *************************************/ oCMenu.makeMenu('top0','','','../','','81','21','../files/main_menu_en_r1_c1.gif','../files/main_menu_en_r1_c1_f2.gif') oCMenu.makeMenu('top1','','','../new/','','63','21','../files/main_menu_en_r1_c11.gif','../files/main_menu_en_r1_c11_f2.gif') oCMenu.makeMenu('top2','','','../use/','','120','21','../files/main_menu_en_r1_c13.gif','../files/main_menu_en_r1_c13_f2.gif') //Applications oCMenu.makeMenu('sub221','top2','ЦИФРОВЫЕ ФОТОАППАРАТЫ','../use/all_appl.php?id=1') oCMenu.makeMenu('sub222','top2','ФОТО / АУДИО','../use/all_appl.php?id=2') oCMenu.makeMenu('sub223','top2','МОДЕЛИРОВАНИЕ','../use/all_appl.php?id=3') oCMenu.makeMenu('sub224','top2','АВТОМОБИЛИ','../use/all_appl.php?id=4') oCMenu.makeMenu('sub225','top2','ХОББИ','../use/all_appl.php?id=5') //Catalog oCMenu.makeMenu('top3','','','../catalog/','','52','21','../files/main_menu_en_r1_c17.gif','../files/main_menu_en_r1_c17_f2.gif') oCMenu.makeMenu('sub31','top3','АККУМУЛЯТОРЫ И ЭЛЕМЕНТЫ ПИТАНИЯ','../catalog/section1.php','','250') oCMenu.makeMenu('sub32','top3','ЗАРЯДНЫЕ УСТРОЙСТВА И БЛОКИ ПИТАНИЯ','../catalog/section2.php','','250') oCMenu.makeMenu('sub33','top3','ФОНАРИ','../catalog/section3.php','','250') oCMenu.makeMenu('sub34','top3','ПРОДУКЦИЯ ПРОМЫШЛЕННОГО НАЗНАЧЕНИЯ','../catalog/section4.php','','250') oCMenu.makeMenu('sub35','top3','БАТАРЕЙНЫЕ БЛОКИ','../catalog/section5.php','','250') oCMenu.makeMenu('sub37','top3','БЕБИФОНЫ','../catalog/section7.php','','250') oCMenu.makeMenu('sub317','sub31','Аккумуляторы','../catalog/second_1.php?id=7','','250') oCMenu.makeMenu('sub316','sub31','Первичные элементы питания','../catalog/second_1.php?id=6','','250') oCMenu.makeMenu('sub3146','sub31','Аксессуары','../catalog/second_1.php?id=46','','250') oCMenu.makeMenu('sub3234','sub32','Зарядные устройства','../catalog/second_1.php?id=34','','250') oCMenu.makeMenu('sub3240','sub32','Блоки питания','../catalog/second_1.php?id=40','','250') oCMenu.makeMenu('sub3321','sub33','Аккумуляторные фонари','../catalog/second_1.php?id=21','','250') oCMenu.makeMenu('sub3333','sub33','Металлические светодиодные фонари','../catalog/second_1.php?id=33','','250') oCMenu.makeMenu('sub3341','sub33','Металлические фонари','../catalog/second_1.php?id=41','','250') oCMenu.makeMenu('sub3342','sub33','Налобные фонари','../catalog/second_1.php?id=42','','250') oCMenu.makeMenu('sub3343','sub33','Фонари-ручки','../catalog/second_1.php?id=43','','250') oCMenu.makeMenu('sub3344','sub33','Фонари-брелоки','../catalog/second_1.php?id=44','','250') oCMenu.makeMenu('sub3332','sub33','Аксессуары','../catalog/second_1.php?id=32','','250') oCMenu.makeMenu('sub3331','sub33','Лампочки для фонарей','../catalog/second_1.php?id=31','','250') oCMenu.makeMenu('sub3565','sub35','Батарейные блоки','../catalog/second_1.php?id=65','','250') oCMenu.makeMenu('sub3781','sub37','Бебифоны','../catalog/second_1.php?id=81','','250') oCMenu.makeMenu('sub31711','sub317','мизинчиковые / R03 / AAA','../catalog/second_1.php?id=11','','250') oCMenu.makeMenu('sub31712','sub317','пальчиковые / R6 / AA','../catalog/second_1.php?id=12','','250') oCMenu.makeMenu('sub31713','sub317','средние / R14 / C','../catalog/second_1.php?id=13','','250') oCMenu.makeMenu('sub31714','sub317','большие/ R20 / D','../catalog/second_1.php?id=14','','250') oCMenu.makeMenu('sub31715','sub317','крона/ 6F22','../catalog/second_1.php?id=15','','250') oCMenu.makeMenu('sub31716','sub317','аккумуляторные сборки','../catalog/second_1.php?id=16','','250') oCMenu.makeMenu('sub31756','sub317','Li-Ion аккумуляторы','../catalog/second_1.php?id=56','','250') oCMenu.makeMenu('sub3168','sub316','Алкалиновые (щелочные) элементы питания','../catalog/second_1.php?id=8','','250') oCMenu.makeMenu('sub3169','sub316','Фотолитиевые элементы питания','../catalog/second_1.php?id=9','','250') oCMenu.makeMenu('sub31610','sub316','Дисковые литиевые элементы питания','../catalog/second_1.php?id=10','','250') oCMenu.makeMenu('sub31661','sub316','Воздушно-цинковые элементы питания','../catalog/second_1.php?id=61','','250') oCMenu.makeMenu('sub323467','sub3234','Система управления аккумуляторами','../catalog/second_1.php?id=67','','250') oCMenu.makeMenu('sub323468','sub3234','Сверхбыстрые зарядные устройства','../catalog/second_1.php?id=68','','250') oCMenu.makeMenu('sub323438','sub3234','Зарядные станции для аккумуляторов','../catalog/second_1.php?id=38','','250') oCMenu.makeMenu('sub323439','sub3234','Автоматические зарядные устройства','../catalog/second_1.php?id=39','','250') oCMenu.makeMenu('sub323436','sub3234','Стандартные зарядные устройства','../catalog/second_1.php?id=36','','250') oCMenu.makeMenu('sub323435','sub3234','Зарядные устройства для батарей','../catalog/second_1.php?id=35','','250') oCMenu.makeMenu('sub323477','sub3234','Зарядные устройства в комплекте с аккумуляторами','../catalog/second_1.php?id=77','','250') oCMenu.makeMenu('sub323478','sub3234','Зарядные устройства с технологией Zero Watt','../catalog/second_1.php?id=78','','250') oCMenu.makeMenu('sub323479','sub3234','Зарядные устройства серии Global line','../catalog/second_1.php?id=79','','250') oCMenu.makeMenu('sub323449','sub3234','Зарядные устройства для литий-ионных аккумуляторов','../catalog/second_1.php?id=49','','250') oCMenu.makeMenu('sub323437','sub3234','Зарядные устройства для свинцово-кислотных аккумуляторных батарей','../catalog/second_1.php?id=37','','250') oCMenu.makeMenu('sub323466','sub3234','Зарядные устройства на солнечных батареях','../catalog/second_1.php?id=66','','250') oCMenu.makeMenu('sub323447','sub3234','Аксессуары','../catalog/second_1.php?id=47','','250') oCMenu.makeMenu('sub323480','sub3234','Архив','../catalog/second_1.php?id=80','','250') oCMenu.makeMenu('top4','','','../about/','','72','21','../files/main_menu_en_r1_c18.gif','../files/main_menu_en_r1_c18_f2.gif') oCMenu.makeMenu('sub41','top4','МИССИЯ','../about/mission.php') oCMenu.makeMenu('sub42','top4','ТЕХНОЛОГИИ','../about/technology.php') oCMenu.makeMenu('sub43','top4','ИСТОРИЯ КОМПАНИИ','../about/history.php') oCMenu.makeMenu('sub44','top4','ВЫСТАВКИ','../about/exposition.php') oCMenu.makeMenu('sub45','top4','ГЕОГРАФИЯ ANSMANN','../about/geo.php') oCMenu.makeMenu('sub46','top4','СПОНСОРСТВО','../about/sponsorship.php') oCMenu.makeMenu('sub47','top4','ПРЕССА ОБ ANSMANN ','../about/press.php') oCMenu.makeMenu('top5','','','../info/','','129','21','../files/main_menu_en_r1_c19.gif','../files/main_menu_en_r1_c19_f2.gif') oCMenu.makeMenu('sub51','top5','ЭТО ИНТЕРЕСНО','../info/about.php') oCMenu.makeMenu('sub52','top5','ЧАСТО ЗАДАВАЕМЫЕ ВОПРОСЫ','../info/faq.php') oCMenu.makeMenu('sub53','top5','СЛОВАРЬ ТЕРМИНОВ','../info/terms.php') oCMenu.makeMenu('sub54','top5','КАТАЛОГИ','../info/pr.php') oCMenu.makeMenu('sub55','top5','КАРТА САЙТА','../info/sitemap.php') oCMenu.makeMenu('top6','','','../where/','','100','21','../files/main_menu_en_r1_c21.gif','../files/main_menu_en_r1_c21_f2.gif') //Leave this line - it constructs the menu oCMenu.construct() //Extra code to find position: function findPos(num){ //alert(num) if(bw.ns4){ //Netscape 4 x = document.layers["layerMenu"+num].pageX y = document.layers["layerMenu"+num].pageY }else{ //other browsers x=0; y=0; var el,temp el = bw.ie4?document.all["divMenu"+num]:document.getElementById("divMenu"+num); if(el.offsetParent){ temp = el while(temp.offsetParent){ //Looping parent elements to get the offset of them as well temp=temp.offsetParent; x+=temp.offsetLeft y+=temp.offsetTop; } } x+=el.offsetLeft y+=el.offsetTop } //Returning the x and y as an array return [x,y] } function placeElements(){ //Changing the position of ALL top items: pos = findPos(0) oCMenu.m["top0"].b.moveIt(pos[0],pos[1]) pos = findPos(1) oCMenu.m["top1"].b.moveIt(pos[0],pos[1]) pos = findPos(2) oCMenu.m["top2"].b.moveIt(pos[0],pos[1]) pos = findPos(3) oCMenu.m["top3"].b.moveIt(pos[0],pos[1]) pos = findPos(4) oCMenu.m["top4"].b.moveIt(pos[0],pos[1]) pos = findPos(5) oCMenu.m["top5"].b.moveIt(pos[0],pos[1]) pos = findPos(6) oCMenu.m["top6"].b.moveIt(pos[0],pos[1]) //Setting the fromtop value oCMenu.fromTop = pos[1] } placeElements() //Setting it to re place the elements after resize - the resize is not perfect though.. oCMenu.onafterresize="placeElements()"