By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,508 Members | 1,856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,508 IT Pros & Developers. It's quick & easy.

Can anyone help with this script "MM_swapImage() { //v1.0"

P: n/a
I am trying to add an additional photo/hyperlink to the company web
site (I didn't create it) without any luck. The mouseover feature
'highlights' pics by swapping them with another pic using this command
in some type of array. I added the mailbox in the lower left corner
(see link below)http://www.aamechanical.com/indextemp.htm
but I cannot get it to swap. Here is the code for the page:
Thanks for your help in advance

Allen
<html>

<head>

<meta NAME="GENERATOR" CONTENT="Microsoft FrontPage 4.0">

<title>Home Page</title>

<script language="JavaScript">

function MM_swapImage() { //v1.0

var i,theObj,j=0,swapArray=new
Array,oldArray=document.MM_swapImgData;

for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {

theObj = eval(MM_swapImage.arguments[(navigator.appName ==
'Netscape')?i:i+1])

if (theObj != null) {

swapArray[j++] = theObj;

swapArray[j++] = (oldArray==null ||
oldArray[j-1]!=theObj)?theObj.src:oldArray[j];

theObj.src = MM_swapImage.arguments[i+2];

} }

document.MM_swapImgData = swapArray; //used for restore

}

</script>

<script language="JavaScript">

function MM_swapImgRestore() { //v1.0

if (document.MM_swapImgData != null)

for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)

document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];

}

</script>

</head>

<body BACKGROUND="images/background.GIF">
<!-- #BeginBehavior MM_swapImage8 -->

<script language="javascript1.1">

//prefetch images for MM_swapImage function

var MM_swapImage8Array = new Array();

MM_swapImage8Array[7] = new Image; MM_swapImage8Array[7].src =
'images/mailbox_hglt.gif';

</script>
<!-- #EndBehavior MM_swapImage8 -->

<!-- #BeginBehavior MM_swapImage7 -->

<script language="javascript1.1">

//prefetch images for MM_swapImage function

var MM_swapImage7Array = new Array();

MM_swapImage7Array[6] = new Image; MM_swapImage7Array[6].src =
'images/mailbox_hglt.gif';

</script>
<!-- #EndBehavior MM_swapImage7 -->

<!-- #BeginBehavior MM_swapImage6 -->

<script language="javascript1.1">

//prefetch images for MM_swapImage function

var MM_swapImage6Array = new Array();

MM_swapImage6Array[5] = new Image; MM_swapImage6Array[5].src =
'images/construction_hglt.GIF';

</script>

<!-- #EndBehavior MM_swapImage6 -->

<!-- #BeginBehavior MM_swapImage5 -->

<script language="javascript1.1">

//prefetch images for MM_swapImage function

var MM_swapImage5Array = new Array();

MM_swapImage5Array[4] = new Image; MM_swapImage5Array[4].src =
'images/pm_hglt.GIF';

</script>

<!-- #EndBehavior MM_swapImage5 -->

<!-- #BeginBehavior MM_swapImage4 -->

<script language="javascript1.1">

//prefetch images for MM_swapImage function

var MM_swapImage4Array = new Array();

MM_swapImage4Array[3] = new Image; MM_swapImage4Array[3].src =
'images/plumbing_hglt.GIF';

</script>

<!-- #EndBehavior MM_swapImage4 -->

<!-- #BeginBehavior MM_swapImage3 -->

<script language="javascript1.1">

//prefetch images for MM_swapImage function

var MM_swapImage3Array = new Array();

MM_swapImage3Array[2] = new Image; MM_swapImage3Array[2].src =
'images/bldg auto_hglt.GIF';

</script>

<!-- #EndBehavior MM_swapImage3 -->

<!-- #BeginBehavior MM_swapImage2 -->

<script language="javascript1.1">

//prefetch images for MM_swapImage function

var MM_swapImage2Array = new Array();

MM_swapImage2Array[1] = new Image; MM_swapImage2Array[1].src =
'images/boiler_hglt.GIF';

</script>

<!-- #EndBehavior MM_swapImage2 -->

<!-- #BeginBehavior MM_swapImage1 -->

<script language="javascript1.1">

//prefetch images for MM_swapImage function

var MM_swapImage1Array = new Array();

MM_swapImage1Array[0] = new Image; MM_swapImage1Array[0].src =
'images/chillers_hglt.GIF';

</script>

<!-- #EndBehavior MM_swapImage1 -->

<table BORDER="0" CELLSPACING="0" CELLPADDING="0">

<tr>

<td VALIGN="top" width="112"><font color="#FFFFFF" face="Arial
Black"><small><small><small>Chillers</small></small></small></font><br>

<a HREF="chillers.htm"
onmouseover="MM_swapImage('document.chiller','docu ment.chiller','images/chillers_hglt.GIF','MM_swapImage1')"
onmouseout="MM_swapImgRestore()"><img SRC="images/chillers.GIF"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" BORDER="0" name="chiller"
alt="Chillers" WIDTH="91" HEIGHT="78"></a><br>

<font color="#FFFFFF" face="Arial
Black"><small><small><small>Boilers</small></small></small></font><br
CLEAR="ALL">

<a HREF="boilers.htm"
onmouseover="MM_swapImage('document.boiler','docum ent.boiler','images/boiler_hglt.GIF','MM_swapImage2')"
onmouseout="MM_swapImgRestore()"><img SRC="images/boiler.gif"
WIDTH="81" HEIGHT="61" ALIGN="BOTTOM" NATURALSIZEFLAG="0" BORDER="0"
name="boiler" alt="Boilers"></a><br>

<font color="#FFFFFF" face="Arial
Black"><small><small><small>Building</small></small></small><br>

<small><small><small>Automation</small></small></small></font><br
CLEAR="ALL">

<a HREF="bldgauto.htm"
onmouseover="MM_swapImage('document.bldg_auto','do cument.bldg_auto','images/bldg%20auto_hglt.GIF','MM_swapImage3')"
onmouseout="MM_swapImgRestore()"><img SRC="images/bldg_auto.GIF"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" BORDER="0" name="bldg_auto"
alt="Building Automation" WIDTH="79" HEIGHT="79"></a><br>

<font color="#FFFFFF" face="Arial
Black"><small><small><small>Plumbing</small></small></small></font><br
CLEAR="ALL">

<a href="plumbing.htm"
onmouseover="MM_swapImage('document.plumbing','doc ument.plumbing','images/plumbing_hglt.GIF','MM_swapImage4')"
onmouseout="MM_swapImgRestore()"><img SRC="images/plumbing.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" BORDER="0" name="plumbing"
alt="Plumbing" WIDTH="80" HEIGHT="80"></a><br>

<font color="#FFFFFF" face="Arial
Black"><small><small><small>Preventive</small></small></small><br>

<small><small><small>Maintenance</small></small></small></font><br
CLEAR="ALL">

<a HREF="pm.htm"
onmouseover="MM_swapImage('document.pm','document. pm','images/pm_hglt.GIF','MM_swapImage5')"
onmouseout="MM_swapImgRestore()"><img SRC="images/pm.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" BORDER="0" name="pm"
alt="Preventative Maintenance" WIDTH="86" HEIGHT="86"></a><br>

<font color="#FFFFFF" face="Arial
Black"><small><small><small>Construction</small></small></small><br>

</font><a href="construction.htm"
onmouseover="MM_swapImage('document.construction', 'document.construction','images/construction_hglt.GIF','MM_swapImage6')"
onmouseout="MM_swapImgRestore()"><img src="images/construction.GIF"
alt="Construction" border="0" name="construction" WIDTH="80"
HEIGHT="80"></a><br>

<font color="#FFFFFF" face="Arial
Black"><small><small><small>Email</small></small></small><br>

</font><a href="email.htm"
onmouseover="MM_swapImage('document.email','docume nt.email','images/mailbox_hglt.gif','MM_swapImage7')"
onmouseout="MM_swapImgRestore()"><img src="images/mailbox.gif"
alt="Email" border="0" name="email" WIDTH="80" HEIGHT="80"></a>

<font color="#FFFFFF" face="Arial
Black"><small><small><small>Bidding</small></small></small></font><br>

<a HREF="bidlist.htm"
onmouseover="MM_swapImage('document.email','docume nt.email','images/mailbox_hglt.gif','MM_swapImage8')"
onmouseout="MM_swapImgRestore()"><img SRC="images/mailbox.gif"
WIDTH="70" HEIGHT="70" ALIGN="BOTTOM" NATURALSIZEFLAG="0" BORDER="0"
name="Bid List" alt="Bid List"></a><br>

<td>

<td VALIGN="top" width="75">&nbsp;<p>&nbsp;</p>

<p><a href="chillers.htm"
onmouseover="MM_swapImage('document.chiller','docu ment.chiller','images/chillers_hglt.GIF')"
onmouseout="MM_swapImgRestore()"><img SRC="images/button.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" name="Button1" border="0"
WIDTH="34" HEIGHT="35" alt="Chillers" title="Chillers"></a><br
CLEAR="ALL">

<a href="boilers.htm"
onmouseover="MM_swapImage('document.boiler','docum ent.boiler','images/boiler_hglt.GIF')"
onmouseout="MM_swapImgRestore()"><img SRC="images/button.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" name="Button2" border="0"
WIDTH="34" HEIGHT="35" alt="Boilers" title="Boilers"></a><br
CLEAR="ALL">

<a href="bldgauto.htm"
onmouseover="MM_swapImage('document.bldg_auto','do cument.bldg_auto','images/bldg%20auto_hglt.GIF')"
onmouseout="MM_swapImgRestore()"><img SRC="images/button.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" name="Button3" border="0"
WIDTH="34" HEIGHT="35" alt="Building Automation" title="Building
Automation"></a><br CLEAR="ALL">

<a href="plumbing.htm"
onmouseover="MM_swapImage('document.plumbing','doc ument.plumbing','images/plumbing_hglt.GIF')"
onmouseout="MM_swapImgRestore()"><img SRC="images/button.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" name="Button4" border="0"
WIDTH="34" HEIGHT="35" alt="Plumbing" title="Plumbing"></a><br
CLEAR="ALL">

<a href="pm.htm"
onmouseover="MM_swapImage('document.pm','document. pm','images/pm_hglt.GIF')"
onmouseout="MM_swapImgRestore()"><img SRC="images/button.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" name="Button5" border="0"
WIDTH="34" HEIGHT="35" alt="Preventive Maintenance" title="Preventive
Maintenance"></a><br CLEAR="ALL">

<a href="construction.htm"
onmouseover="MM_swapImage('document.construction', 'document.construction','images/construction_hglt.GIF')"
onmouseout="MM_swapImgRestore()"><img SRC="images/button.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" name="Button6" border="0"
WIDTH="34" HEIGHT="35" alt="Construction" title="Construction"></a><br
CLEAR="ALL">

<a href="email.htm"
onmouseover="MM_swapImage('document.email','docume nt.email','images/mailbox_hglt.gif')"
onmouseout="MM_swapImgRestore()"><img SRC="images/button.gif"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" name="Button7" border="0"
WIDTH="34" HEIGHT="35" alt="Email" title="Email"></a></p>

</td>

<td VALIGN="top"><img src="images/anlogo.gif" alt="anlogo.gif
(27439 bytes)" loop="infinite" start="fileopen" WIDTH="440"
HEIGHT="66"><br>

<strong><font face="Arial"><small>We provide a full range of
mechanical systems and

maintenance to business and industry which assures the comfort,
convenience,</small><big> </big><small>and

productivity of their environment so they receive the maximum
benefit of their facilities.</small></font></strong>
<table BORDER="0" CELLSPACING="0" CELLPADDING="0">
<tr>
<td VALIGN="TOP"><img SRC="images/people_pic.GIF" WIDTH="71"
HEIGHT="70" ALIGN="BOTTOM" NATURALSIZEFLAG="3"></td>
<td VALIGN="TOP"><img SRC="images/people_bar.GIF"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" alt="PEOPLE" WIDTH="252"
HEIGHT="39"><br CLEAR="ALL">
<font SIZE="-1" face="Arial">Through loyalty and equality
we commit
to enhance the lives of all personnel, by assuring a safe
work environment;
showing appreciation; and providing a superior benefit
package in
our industry.</font></td>
</tr>
<tr>
<td VALIGN="TOP"><img SRC="images/integrity_pic.GIF"
WIDTH="72" HEIGHT="71" ALIGN="BOTTOM" NATURALSIZEFLAG="3"></td>
<td VALIGN="TOP"><img SRC="images/integrity_bar.GIF"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" alt="INTEGRITY" WIDTH="253"
HEIGHT="40"><br CLEAR="ALL">
<font SIZE="-1" face="Arial">Being trustworthy and
believing in others
creates an empowering atmosphere that enables us to
accomplish our
work and earn a fair profit.</font></td>
</tr>
<tr>
<td VALIGN="TOP"><img SRC="images/respect_pic.GIF"
WIDTH="72" HEIGHT="71" ALIGN="BOTTOM" NATURALSIZEFLAG="3"></td>
<td VALIGN="TOP"><img SRC="images/respect_bar.GIF"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" alt="RESPECT" WIDTH="253"
HEIGHT="39"><br CLEAR="ALL">
<font SIZE="-1" face="Arial">The willingness to work
together as a
team generates harmony and earns us the recognition we
seek.</font></td>
</tr>
<tr>
<td VALIGN="TOP"><img SRC="images/profess_pic.GIF"
WIDTH="71" HEIGHT="70" ALIGN="BOTTOM" NATURALSIZEFLAG="3"></td>
<td VALIGN="TOP"><img SRC="images/profess_bar.GIF"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" alt="PROFESSIONAL" WIDTH="255"
HEIGHT="40"><br CLEAR="ALL">
<font SIZE="-1" face="Arial">Projecting an attitude of
competence
creates a role model that helps us lead our
industry.</font></td>
</tr>
<tr>
<td VALIGN="TOP"><img SRC="images/respons_pic.GIF"
WIDTH="73" HEIGHT="73" ALIGN="BOTTOM" NATURALSIZEFLAG="3"></td>
<td VALIGN="TOP"><img SRC="images/respons_bar.GIF"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" alt="RESPONSIBILITY" WIDTH="252"
HEIGHT="39"><br CLEAR="ALL">
<font SIZE="-1" face="Arial">We stand accountable for the
consequences
of our actions as we work together.</font></td>
</tr>
<tr>
<td VALIGN="TOP"><img SRC="images/flexible_pic.GIF"
WIDTH="75" HEIGHT="73" ALIGN="BOTTOM" NATURALSIZEFLAG="3"></td>
<td VALIGN="TOP"><img SRC="images/flexible_bar.GIF"
ALIGN="BOTTOM" NATURALSIZEFLAG="3" alt="FLEXIBLE" WIDTH="252"
HEIGHT="39"><br CLEAR="ALL">
<font SIZE="-1" face="Arial">The ability to adjust the
work we do,
accept change, and listen for the right direction enables
us to adapt
to meet the needs of our customers.</font></td>
</tr>
<tr>
<td VALIGN="TOP"></td>
<td VALIGN="TOP">&nbsp;
<p><small><font face="Arial Black">Enjoy the luxury of
utilizing one
company for all of your mechanical needs. . . remember,
we are environmentally
conscious.</font></small>
</td>
</tr>
<tr>
<td VALIGN="TOP"></td>
<td VALIGN="TOP">&nbsp;
<p><font face="Arial"><b>A & A Mechanical,
Inc.</b></font><br>
<font face="Arial" size="2">1111 Ulrich Ave. <br>
Louisville, KY 40219 <br>
Phone:(502) 968-0164<br>
Fax: (502) 968-0170 </font>
</td>
</tr>
</table>

</td>

</tr>

</table>
</body>

</html>
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Allen wrote:
I am trying to add an additional photo/hyperlink to the company web
site (I didn't create it) without any luck. The mouseover feature
'highlights' pics by swapping them with another pic using this command
in some type of array. I added the mailbox in the lower left corner
(see link below)http://www.aamechanical.com/indextemp.htm
but I cannot get it to swap. Here is the code for the page:
Thanks for your help in advance

Allen

<snip>

MM_swapImage was created with Macromedia Dreamweaver. It might be
easier to use the Dreamweaver interface for doing this...

Brian

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.