|
Help change code to fit my needs
I am panning on using the below code on a website I am making, however I need for the code to fit into where I want the images assosated with the code to be placed where the javascript is located in my HTML file. Thanks for anyhelp you can give me.
Below is the HTML Code:
php Code:
Original
- php Code |
|
|
|
<HTML> <Head> <!-- Below is the javacode for image rollover --> <SCRIPT LANGUAGE="JavaScript"> home = new Image(); home.src = "images/home_rollover.gif"; staff = new Image(); staff.src = "images/staff_rollover.gif"; </script> <!-- Below is the code for the menu --> <script language="javascript" src="Config.js"></script> <script language="javascript" src="Menu.js"></script> </header> <Body BGCOLOR='#000000'> <CENTER> <!-- Below is the code for the toolbar --> <Table cellpadding="0" cellspacing="0" border="0"> <tr> <td> <img BORDER="0" src='images/lt_end.gif'> </td> <td> <a href="index.php" onmouseover="home.src='images/home_rollover.gif';"onmouseout="home.src='images/home.gif';"><img name="home" src="images/home.gif" border=0></a> </td> <td> <img BORDER="0" src='images/spacer.gif'> </td> <td> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin AddMenu("1" , "1" , "" , "images/pictures.gif" , "images/pictures_rollover.gif" , ""); AddMenu("2" , "1" , "Me" , "" , "" , "http://www.javascriptsource.com"); AddMenu("3" , "1" , "Trip to Vegas" , "" , "" , "http://www.javascriptsource.com"); AddMenu("4" , "1" , "Star Trek" , "" , "" , "http://www.javascriptsource.com"); AddMenu("5" , "1" , "Random Pictures" , "" , "" , "http://www.javascriptsource.com"); Build(); // End --> </script> </td> <td> <img BORDER="0" src='images/middle.gif'> </td> <td> <a href="staff/" onmouseover="staff.src='images/staff_rollover.gif';"onmouseout="staff.src='images/staff.gif';"><img name="staff" src="images/staff.gif" border=0></a> </td> <td> <img BORDER="0" src='images/rt_end.gif'> </td> </tr> </Table> </Center> </Body> </HTML>
here is the Config.js
php Code:
Original
- php Code |
|
|
|
//Author: Younes Bouab //Date: 05-02-02 //Title: Menu Configuration: Config.js // //Copyright: Younes Bouab 2001 //Technical Support: bouaby@SUPEReDITION.com // ///////////////////////////////////////////////////////////////////////////////////// //Copyright (c) 2002 Younes Bouab (www.SUPEReDITION.com) Version 1.0 // //Eperience the DHTML Menu - Get it at www.SUPEReDITION.com // //This script can be used freely as long as all copyright messages are intact. // //Menu HomePage: http://www.superedition.com/Main.asp?Page=Tutorials&query=Javascript ////////////////////////////////////////////////////////////////////////////////////// //Menu Configuration File ///////////////////////////////////////////////// /////You can change the value of a variable /////below or turn it off by making it equal "" /////to suit your needs, but you should not /////delete any variable. /////////////////////////////////////////////// /**********************************************/ //Menu Type: Do Not Change! /**********************************************/ MENU_TYPE=1; //1: Horizental //2: Vertical Sort= 0; //Sort: When set to 1, the //menu items are sorted according //to the index value. This feature //can be used when a server side //language (asp. jsp. php,...) //is used to generate the menu items //from a database and they are not always //in order. /**********************************************/ //Menu Starting point /**********************************************/ TOP=50; LEFT=50; /**********************************************/ //Menu item Dimension /**********************************************/ WIDTH=69; HEIGHT=30; /**********************************************/ //Layers Alignment /**********************************************/ HALIGN="LEFT"; VALIGN="MIDDLE"; /**********************************************/ //Global Menu Settings for all /**********************************************/ //Main Menu Items LayerColor="#FFFFFF"; LayerRollColor="#CCCCCC"; FONT="verdana"; FONTSIZE="1"; FONTSTYLE="" // "": Normal, "B": Bold, "I": Italic FONTCOLOR="#000033"; ROLL_FONTCOLOR="#000000"; START_CHAR="-"; //Starting Character /**********************************************/ //Main Parent Settings: Optional // leave empty "", if you would like to use // the Global Menu Settings above /**********************************************/ Main_Parent_LayerColor=""; Main_Parent_LayerRollColor=""; Main_Parent_FONT="verdana"; Main_Parent_FONTSTYLE=""; Main_Parent_FONTSIZE=""; Main_Parent_FONTCOLOR=""; Main_Parent_ROLL_FONTCOLOR=""; Main_Parent_START_CHAR=""; /**********************************************/ //Layer Border Properties /**********************************************/ LayerBorderSize="1"; LayerBorderStyle="solid"; LayerBorderColor="#000000"; /**********************************************/ //Menu Children Offsets /**********************************************/ TOP_OFFSET=0; LEFT_OFFSET=0;
and here is Menu.js
php Code:
Original
- php Code |
|
|
|
//Author: Younes Bouab //Date: 03-05-01 //Title: Menu Generator: Menu.js //Copyright: Younes Bouab 2001 //Technical Support: bouaby@SUPEReDITION.com //////////////////////////////////////////// //////////////////////////////////////////// //DO NOT CHANGE ANYTHING IN THIS FILE! //"Config.js" is the file you can edit //////////////////////////////////////////// /*******************************************/ //Dreamweaver Show/Hide/Obj Layer functions /*******************************************/ function showHideLayers() { var i,p,v,obj,args=showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; } obj.visibility=v; } } function findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x; } function changeProp(objName,x,theProp,theValue) { var obj = findObj(objName); if (obj && (theProp.indexOf ("style.")==- 1 || obj.style )) eval("obj."+theProp+ "='"+theValue+ "'"); } function reloadPage(init) { if (init==true) with (navigator) { if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; } } else if (innerWidth!=document.pgW || innerHeight!=document.pgH) {location.reload();} } reloadPage(true);
|