Question : Javascript menu positioning - need to make it relative to a cell in a table not absolute.

Hi,
I have created a javascript menu using sample code.

The menu is all working fine apart from the links which I haven't added yet. However I can't get the menu to position into the cell to the left of the image gallery.

I have placed "menu to go in here" text in the page where I want it.

The link to the page is

http://www.showpiecelifestyle.co.uk/new/index.html

I have attached the javascript code for the files I am using.
exmplmenu_var.js and below it the code for menu_com.js.

These files are also in the folder
http://www.showpiecelifestyle.co.uk/new

The stylesheet for this page is located here if you need it.
http://www.showpiecelifestyle.co.uk/new/css/stylesheetshowpieceaug.css

I know there is probably a very simple work around for this but I am not great with javascript and tried a few of the solutions available on the web but they didn't seem to apply to this menu or I couldn't get them to work.

What I really need is the html code for the index page with the code to bring up the menu where I want it so I can create a new page and get it to work from there.

Also the new code or information of exactly where to place the amendments for the javascript if that is required.  As I said I am a novice regarding javascript coding.

Thanks for your help











Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
/***********************************************************************************
*	(c) Ger Versluis 2000 version 5.411 24 December 2001 (updated Jan 31st, 2003 by Dynamic Drive for Opera7)
*	For info write to [email protected]		          *
*	You may remove all comments for faster loading	          *		
***********************************************************************************/
 
	var NoOffFirstLineMenus=11;			// Number of first level items
	var LowBgColor='#333333';			// Background color when mouse is not over
	var LowSubBgColor='#9A9A9A';			// Background color when mouse is not over on subs
	var HighBgColor='#333333';			// Background color when mouse is over
	var HighSubBgColor='#333333';			// Background color when mouse is over on subs
	var FontLowColor='silver';			// Font color when mouse is not over
	var FontSubLowColor='black';			// Font color subs when mouse is not over
	var FontHighColor='white';			// Font color when mouse is over
	var FontSubHighColor='white';			// Font color subs when mouse is over
	var BorderColor='#333333';			// Border color
	var BorderSubColor='#333333';			// Border color for subs
	var BorderWidth=1;				// Border width
	var BorderBtwnElmnts=1;			// Border between elements 1 or 0
	var FontFamily="arial,comic sans ms,technical"	// Font family menu items
	var FontSize=9;				// Font size menu items
	var FontBold=1;				// Bold menu items 1 or 0
	var FontItalic=0;				// Italic menu items 1 or 0
	var MenuTextCentered='left';			// Item text position 'left', 'center' or 'right'
	var MenuCentered='left';			// Menu horizontal position 'left', 'center' or 'right'
	var MenuVerticalCentered='top';		// Menu vertical position 'top', 'middle','bottom' or static
	var ChildOverlap=.2;				// horizontal overlap child/ parent
	var ChildVerticalOverlap=.2;			// vertical overlap child/ parent
	var StartTop=0;				// Menu offset x coordinate
	var StartLeft=1;				// Menu offset y coordinate
	var VerCorrect=0;				// Multiple frames y correction
	var HorCorrect=0;				// Multiple frames x correction
	var LeftPaddng=3;				// Left padding
	var TopPaddng=2;				// Top padding
	var FirstLineHorizontal=0;			// SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
	var MenuFramesVertical=1;			// Frames in cols or rows 1 or 0
	var DissapearDelay=1000;			// delay before menu folds in
	var TakeOverBgColor=1;			// Menu frame takes over background color subitem frame
	var FirstLineFrame='navig';			// Frame where first level appears
	var SecLineFrame='space';			// Frame where sub levels appear
	var DocTargetFrame='space';			// Frame where target documents appear
	var TargetLoc='';				// span id for relative positioning
	var HideTop=0;				// Hide first level when loading new document 1 or 0
	var MenuWrap=1;				// enables/ disables menu wrap 1 or 0
	var RightToLeft=0;				// enables/ disables right to left unfold 1 or 0
	var UnfoldsOnClick=0;			// Level 1 unfolds onclick/ onmouseover
	var WebMasterCheck=0;			// menu tree checking on or off 1 or 0
	var ShowArrow=1;				// Uses arrow gifs when 1
	var KeepHilite=1;				// Keep selected path highligthed
	var Arrws=['singlearrow.gif',20,12,'tridown.gif',10,5,'trileft.gif',5,10];	// Arrow source, width and height
 
function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}
 
 
// Menu tree
//	MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
//	For rollover images set "Text to show" to:  "rollover:Image1.jpg:Image2.jpg"
 
Menu1=new Array("Home","http://www.showpiecelifestyle.co.uk","",0,20,138);
 
Menu2=new Array("Kitchens","http://www.showpiecelifestyle.co.uk/showpiece_kitchens.htm","",10);
	Menu2_1=new Array("Gallery","http://www.showpiecelifestyle.co.uk/showpiece_kitchen-ranges.htm","",0,20,150);	
		Menu2_2=new Array("Doors","http://www.showpiecelifestyle.co.uk/showpiece_kitchen-doors.htm","",0);
	
		
		Menu2_3=new Array("Handles","http://www.showpiecelifestyle.co.uk/showpiece_kitchen-handles.htm","",0);
	    Menu2_4=new Array("Appliances","http://www.showpiecelifestyle.co.uk/showpiece_kitchen-appliances.htm","",3);
		        Menu2_4_1=new Array("Cooking","blank.htm","",0,20,200);
		        Menu2_4_2=new Array("Cooling","blank.htm","",0);
		        Menu2_4_3=new Array("Cleaning","blank.htm","",0);
 
		   
		   
		Menu2_5=new Array("Sinks and Taps","blank.htm","",3);
	            Menu2_5_1=new Array("Modern Sinks","blank.htm","",0,20,200);
	            Menu2_5_2=new Array("Modern Sinks","blank.htm","",0);
		        Menu2_5_3=new Array("Taps","blank.htm","",0);
 
	    Menu2_6=new Array("Worktops","blank.htm","",4);
                Menu2_6_1=new Array("Granite","blank.htm","",0,20,200);
	            Menu2_6_2=new Array("Stainless Steel","blank.htm","",0);
		        Menu2_6_3=new Array("Wood","blank.htm","",0);
		        Menu2_6_4=new Array("Composites","blank.htm","",0);
 
	    Menu2_7=new Array("Tiles","blank.htm","",0);
	    Menu2_8=new Array("Storage","blank.htm","",0);
        Menu2_9=new Array("Lighting","blank.htm","",0);
        Menu2_10=new Array("Kitchen Makeover","blank.htm","",0);
 
 
Menu3=new Array("Bathrooms","blank.htm","",3);
		Menu3_1=new Array("Baths","blank.htm","",3,20,150);
            	Menu3_1_1=new Array("Designer","blank.htm","",0,20,200);
				Menu3_1_2=new Array("Japanese","blank.htm","",0);
				Menu3_1_3=new Array("Traditional","blank.htm","",0);
		Menu3_2=new Array("Showers","blank.htm","",0);
		
		Menu3_3=new Array("Taps","blank.htm","",2);
                    Menu3_3_1=new Array("Modern","blank.htm","",0,20,200);
                    Menu3_3_2=new Array("Traditional","blank.htm","",0);
                    
                    
                    
		Menu3_4=new Array("Sinks","blank.htm","",2);
                    Menu3_4_1=new Array("Modern","blank.htm","",0,20,200);
                    Menu3_4_2=new Array("Traditional","blank.htm","",0);
		Menu3_5=new Array("Tiles","blank.htm","",0);
		Menu3_6=new Array("Wet / Steam Rooms","blank.htm","",0);
		Menu3_7=new Array("Accessories","blank.htm","",0);
		Menu3_8=new Array("Furniture","blank.htm","",0);
				
				
				
				
 
Menu4=new Array("Bespoke Projects","blank.htm","",6,20,150);
	Menu4_1=new Array("Heating","blank.htm","",0,20,180);
	Menu4_2=new Array("Bedrooms","blank.htm","",0);
	Menu4_3=new Array("Wood Floors","blank.htm","",0);
	Menu4_4=new Array("Furniture","blank.htm","",0);
	Menu4_5=new Array("Wall Coverings","blank.htm","",0);
	Menu4_6=new Array("Finishing Touches","blank.htm","",0);
 
	
Menu5=new Array("","http://www.showpiecelifestyle.co.uk","",0,20,138);
 
	
Menu6=new Array("Recent Projects","blank.htm","",6);
	Menu6_1=new Array("Bracknell Kitchen","#","",0,20,200);
	Menu6_2=new Array("Tiling Projects","#","",0);
	Menu6_3=new Array("Travertine Bath","#","",0);
	Menu6_4=new Array("Inkpen Kitchen","#","",0);
	Menu6_5=new Array("Makeover","#","",0);
	Menu6_6=new Array("Patio & Decking","#","",0);
	
	
Menu7=new Array("Innovations","#","",0);
 
Menu8=new Array("Products","#","",0);
 
Menu9=new Array("Latest Trends","#","",0);
 
Menu10=new Array("Tell a Friend","#","",0);
 
Menu11=new Array("Contact Us","#","",0);
	
	
 
 
 
 
 
 
CODE FOR MENU_COM.JS
 
/************************************************************************************
	(c) Ger Versluis 2000 version 5.5 24 December 2001 (updated Jan 31st, 2003 by Dynamic Drive for Opera7)
	Updated 19 July, 2003 by GV for CSS CompatMode	
	HV Menu found on Dynamic Drive ONLY may be used on both commercial and non commerical sites	
	For info write to [email protected]							        
	This script featured on Dynamic Drive DHTML code library: http://www.dynamicdrive.com
*************************************************************************************/
	var AgntUsr=navigator.userAgent.toLowerCase();
	var AppVer=navigator.appVersion.toLowerCase();
	var DomYes=document.getElementById?1:0;
	var NavYes=AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')==-1?1:0;
	var ExpYes=AgntUsr.indexOf('msie')!=-1?1:0;
	var Opr=AgntUsr.indexOf('opera')!=-1?1:0;
	var Opr6orless=window.opera && navigator.userAgent.search(/opera.[1-6]/i)!=-1 //DynamicDrive.com added code
	if(Opr){NavYes=1;ExpYes=0;}
	var DomNav=DomYes&&NavYes?1:0;
 	var DomExp=DomYes&&ExpYes?1:0;
	var Nav4=NavYes&&!DomYes&&document.layers?1:0;
	var Exp4=ExpYes&&!DomYes&&document.all?1:0;
	var Exp6Plus=(AppVer.indexOf("msie 6")!= -1||AppVer.indexOf("msie 7")!= -1)?1:0
	var PosStrt=(NavYes||ExpYes||Opr)&&!Opr6orless?1:0;
	var P_X=DomYes?"px":"",FHtml=null,ScHtml=null,FCmplnt=0,SCmplnt=0;
	var FrstLoc,ScLoc,DcLoc;
	var ScWinWdth,ScWinHght,FrstWinWdth,FrstWinHght;
	var ScLdAgainWin;
	var FirstColPos,SecColPos,DocColPos;
	var RcrsLvl=0;
	var FrstCreat=1,Loadd=0,Creatd=0,IniFlg,AcrssFrms=1;
	var FrstCntnr=null,CurrntOvr=null,CloseTmr=null;
	var CntrTxt,TxtClose,ImgStr;
	var Ztop=100;
	var ShwFlg=0;
	var M_StrtTp=StartTop,M_StrtLft=StartLeft;
	var StaticPos=0;
	var M_Hide=Nav4?'hide':'hidden';
	var M_Show=Nav4?'show':'visible';
	var Par=parent.frames[0]&&FirstLineFrame!=SecLineFrame?parent:window;
	var Doc=Par.document;
	var Bod=Doc.body;
	var Trigger=NavYes&&!Opr?Par:Bod;
 
	MenuTextCentered=MenuTextCentered==1||MenuTextCentered=='center'?'center':MenuTextCentered==0||MenuTextCentered!='right'?'left':'right';
 
	WbMstrAlrts=["Item not defined: ","Item needs height: ","Item needs width: "];
 
	if(Trigger.onload)Dummy=Trigger.onload;
	Trigger.onload=Go;
 
function Dummy(){return}
 
function CnclSlct(){return false}
 
function RePos(){
	FrstWinWdth=ExpYes?FCmplnt?FHtml.clientWidth:FrstLoc.document.body.clientWidth:FrstLoc.innerWidth;
	FrstWinHght=ExpYes?FCmplnt?FHtml.clientHeight:FrstLoc.document.body.clientHeight:FrstLoc.innerHeight;
	ScWinWdth=ExpYes?SCmplnt?ScHtml.clientWidth:ScLoc.document.body.clientWidth:ScLoc.innerWidth;
	ScWinHght=ExpYes?SCmplnt?ScHtml.clientHeight:ScLoc.document.body.clientHeight:ScLoc.innerHeight;
	if(MenuCentered=='justify'&&FirstLineHorizontal){
		FrstCntnr.style.width=FrstWinWdth+P_X;
		var LftXtra=(DomNav&&!Opr)||FCmplnt?LeftPaddng:0;
		ClcJus();
		var P=FrstCntnr.FrstMbr,W=Menu1[5],i;
		for(i=0;i":"";
		TxtClose=""+MenuTextCentered!='left'?"":""}
	FirstColPos=Nav4?FrstLoc.document:FrstLoc.document.body;
	SecColPos=Nav4?ScLoc.document:ScLoc.document.body;
	DocColPos=Nav4?DcLoc.document:ScLoc.document.body;
	if (TakeOverBgColor)FirstColPos.bgColor=AcrssFrms?SecColPos.bgColor:DocColPos.bgColor;
	if(MenuCentered=='justify'&&FirstLineHorizontal)ClcJus();
	if(FrstCreat){
		FrstCntnr=CreateMenuStructure('Menu',NoOffFirstLineMenus);
		FrstCreat=AcrssFrms?0:1}
	else CreateMenuStructureAgain('Menu',NoOffFirstLineMenus);
	if(TargetLoc)ClcTrgt();
	if(MenuCentered)ClcLft();
	if(MenuVerticalCentered)ClcTp();
	PosMenu(FrstCntnr,StartTop,StartLeft);
	IniFlg=1;
	Initiate();
	Creatd=1;
	if (AcrssFrms){
		ScLdAgainWin=ExpYes?ScLoc.document.body:ScLoc;
		ScLdAgainWin.onunload=UnLoaded}
	Trigger.onresize=Nav4?ReDoWhole:RePos;
	AfterBuild();
	if(MenuVerticalCentered=='static'&&!AcrssFrms)setInterval('KeepPos()',250);
	status='Menu ready for use'}
 
function KeepPos(){
	var TS=ExpYes?SCmplnt?ScHtml.scrollTop:FrstLoc.document.body.scrollTop:FrstLoc.pageYOffset;
	if(TS!=StaticPos){
		var FCStyle=Nav4?FrstCntnr:FrstCntnr.style;
		FrstCntnr.OrgTop=StartTop+TS;StaticPos=TS;
		FCStyle.top=FrstCntnr.OrgTop+P_X}}
 
function ClcJus(){
	var a=BorderBtwnElmnts?1:2,b=BorderBtwnElmnts?BorderWidth:0;
	var Size=Math.round(((FrstWinWdth-a*BorderWidth)/NoOffFirstLineMenus)-b),i,j;
	for(i=1;iScWinWdth+LScrlld)SubLt=ScWinWdth+LScrlld-CCW}
			else{	if(SubLt+CCW>ScWinWdth+LScrlld)SubLt=this.Level==1?ScWinWdth+LScrlld-CCW:SubLt-(CCW+(1-2*ChildOverlap)*ThisWt);
				if(SubLtTpScrlld+ScWinHght)SubTp=this.Level==1?SubTp=TpScrlld+ScWinHght-CCH:SubTp-CCH+(1-2*ChildVerticalOverlap)*ThisHt;
			if(SubTp"}
	this.value=MemVal;
	if(RcrsLvl==1){
		a=LowBgColor;
		b=HighBgColor;
		c=FontLowColor;
		d=FontHighColor}
	else{	a=LowSubBgColor;
		b=HighSubBgColor;
		c=FontSubLowColor;
		d=FontSubHighColor}
	this.LoBck=a;
	this.LwFntClr=c;
	this.HiBck=b;
	this.HiFntClr=d;
	this.style.color=this.LwFntClr;
	if(this.LoBck)this.style.backgroundColor=this.LoBck;
	this.style.textAlign=MenuTextCentered;
	if(eval(WhatMenu+'[2]'))this.style.backgroundImage="url(\'"+eval(WhatMenu+'[2]')+"\')";
	if(MemVal.indexOf('<')==-1){
		this.style.width=Wdth-LftXtra+P_X;
		this.style.height=Hght-TpXtra+P_X;
		this.style.paddingLeft=LeftPaddng+P_X;
		this.style.paddingTop=TopPaddng+P_X}
	else{	this.style.width=Wdth+P_X;
		this.style.height=Hght+P_X}
	if(MemVal.indexOf('<')==-1&&DomYes){
		t=Location.document.createTextNode(MemVal);
		this.appendChild(t)}
	else this.innerHTML=MemVal;
	if(eval(WhatMenu+'[3]')&&ShowArrow){
		a=RcrsLvl==1&&FirstLineHorizontal?3:RightToLeft?6:0;
		S=Arrws[a];
		W=Arrws[a+1];
		H=Arrws[a+2];
		T=RcrsLvl==1&&FirstLineHorizontal?Hght-H-2:(Hght-H)/2;
		L=RightToLeft?2:Wdth-W-2;
		if(DomYes){
 
			t=Location.document.createElement('img');
			this.appendChild(t);
			t.style.position='absolute';
			t.src=S;
 
			t.style.width=W+P_X;
			t.style.height=H+P_X;
			t.style.top=T+P_X;
			t.style.left=L+P_X}
		else{	MemVal+="
"; this.innerHTML=MemVal}} if(ExpYes){this.onselectstart=CnclSlct; this.onmouseover=RcrsLvl==1&&UnfoldsOnClick?OpenMenuClick:OpenMenu; this.onmouseout=CloseMenu; this.onclick=RcrsLvl==1&&UnfoldsOnClick&&eval(WhatMenu+'[3]')?OpenMenu:GoTo } else{ RcrsLvl==1&&UnfoldsOnClick?this.addEventListener('mouseover',OpenMenuClick,false):this.addEventListener('mouseover',OpenMenu,false); this.addEventListener('mouseout',CloseMenu,false); RcrsLvl==1&&UnfoldsOnClick&&eval(WhatMenu+'[3]')?this.addEventListener('click',OpenMenu,false):this.addEventListener('click',GoTo,false)}} function NavMbrSetUp(MmbrCntnr,PrMmbr,WhatMenu,Wdth,Hght){ var a,b,c,d; if(RcrsLvl==1){ a=LowBgColor; b=HighBgColor; c=FontLowColor; d=FontHighColor} else { a=LowSubBgColor; b=HighSubBgColor; c=FontSubLowColor; d=FontSubHighColor } this.value=eval(WhatMenu+'[0]'); this.ro=0; if(this.value.indexOf('rollover')!=-1){ this.ro=1; this.ri1=this.value.substring(this.value.indexOf(':')+1,this.value.lastIndexOf(':')); this.ri2=this.value.substring(this.value.lastIndexOf(':')+1,this.value.length); this.rid=WhatMenu+'i';this.value=""} if(LeftPaddng&&this.value.indexOf('<')==-1&&MenuTextCentered=='left')this.value=' \;'+this.value; if(FontBold)this.value=this.value.bold(); if(FontItalic)this.value=this.value.italics(); this.Ovalue=this.value; this.value=this.value.fontcolor(c); this.Ovalue=this.Ovalue.fontcolor(d); this.value=CntrTxt+""+this.value+TxtClose; this.Ovalue=CntrTxt+""+this.Ovalue+TxtClose; this.LoBck=a; this.HiBck=b; this.ChildCntnr=null; this.PrvMbr=PrMmbr; this.Hilite=0; this.visibility='inherit'; if(this.LoBck)this.bgColor=this.LoBck; this.resizeTo(Wdth,Hght); if(!AcrssFrms&&eval(WhatMenu+'[2]'))this.background.src=eval(WhatMenu+'[2]'); this.document.write(this.value); this.document.close(); this.CmdLyr=new Layer(Wdth,MmbrCntnr); this.CmdLyr.Level=RcrsLvl; this.CmdLyr.LinkTxt=eval(WhatMenu+'[1]'); this.CmdLyr.visibility='inherit'; this.CmdLyr.onmouseover=RcrsLvl==1&&UnfoldsOnClick?OpenMenuClick:OpenMenu; this.CmdLyr.onmouseout=CloseMenu; this.CmdLyr.captureEvents(Event.MOUSEUP); this.CmdLyr.onmouseup=RcrsLvl==1&&UnfoldsOnClick&&eval(WhatMenu+'[3]')?OpenMenu:GoTo; this.CmdLyr.LowLyr=this; this.CmdLyr.resizeTo(Wdth,Hght); this.CmdLyr.Container=MmbrCntnr; if(eval(WhatMenu+'[3]')&&ShowArrow){ a=RcrsLvl==1&&FirstLineHorizontal?3:RightToLeft?6:0; this.CmdLyr.ImgLyr=new Layer(Arrws[a+1],this.CmdLyr); this.CmdLyr.ImgLyr.visibility='inherit'; this.CmdLyr.ImgLyr.top=RcrsLvl==1&&FirstLineHorizontal?Hght-Arrws[a+2]-2:(Hght-Arrws[a+2])/2; this.CmdLyr.ImgLyr.left=RightToLeft?2:Wdth-Arrws[a+1]-2; this.CmdLyr.ImgLyr.width=Arrws[a+1]; this.CmdLyr.ImgLyr.height=Arrws[a+2]; ImgStr=""; this.CmdLyr.ImgLyr.document.write(ImgStr); this.CmdLyr.ImgLyr.document.close()}} function CreateMenuStructure(MName,NumberOf){ RcrsLvl++; var i,NoOffSubs,Mbr,Wdth=0,Hght=0; var PrvMmbr=null; var WMnu=MName+'1'; var MenuWidth=eval(WMnu+'[5]'); var MenuHeight=eval(WMnu+'[4]'); var Location=RcrsLvl==1?FrstLoc:ScLoc; if (RcrsLvl==1&&FirstLineHorizontal){ for(i=1;i
Open in New Window Select All

Answer : Javascript menu positioning - need to make it relative to a cell in a table not absolute.

Your problem will be here --

//HV Menu v5.411- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more


You did not mention that this was a canned DHTML menu from off the web.  Those are almost ALWAYS done with their own CSS, javascript, DIVs and absolute or relative positioning.  All of that is incompatible with a table cell.  If you want to solve the problem, you will have to get into that menu's code and CSS or DIV or whatever positioning it is using, and change it.
Random Solutions  
 
programming4us programming4us