ADDING JAVA

Here is the java script and added html that will produce rollover buttons in the workshop assignment.You can use this file for future reference.Just follow the underlined text and copy and paste the appropriate into your index.htm document.

 

THE FOLLOWING SCRIPT GOES WITHIN THE HEAD

 

<script language="JavaScript">

<!--

function MM_swapImgRestore() { //v2.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];

}

 

function MM_preloadImages() { //v2.0

if (document.images) {

††† var imgFiles = MM_preloadImages.arguments;

††† if (document.preloadArray==null) document.preloadArray = new Array();

††† var i = document.preloadArray.length;

††† with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){

††††† preloadArray[i] = new Image;

††††† preloadArray[i++].src = imgFiles[j];

} }

}

 

function MM_swapImage() { //v2.0

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

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

††† objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];

††† if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||

††††† ††(objStr.indexOf('document.all[')†† ==0 && document.all†† ==null))

††††† objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);

††† obj = eval(objStr);

††† if (obj != null) {

††††† swapArray[j++] = obj;

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

††††† obj.src = MM_swapImage.arguments[i+2];

} }

document.MM_swapImgData = swapArray; //used for restore

}

//-->

</script>

 

THE FOLLOWING TEXT GOES AFTER THIS.. <body bgcolor="#FFFFFF"

 

onLoad="MM_preloadImages('images/about_on.gif','#976394344120');MM_preloadImages('images/philos_on.gif','#976394948850');MM_preloadImages('images/memb_on.gif','#976395041240');MM_preloadImages('images/works_on.gif','#976395102420');MM_preloadImages('images/help_on.gif','#976395157180');MM_preloadImages('images/cont_on.gif','#976395563630')"

>

 

LINK TAG ALSO HOLDS INFO FOR ROLLOVER IMAGE, THE FIRST LOOKS LIKE THIS (DONíT FORGET THE END </A> FOR ALL BUTTONS)

 

<a href="index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('document.aboutbutton','document.aboutbutton','images/about_on.gif','#976394344120')"> <img name="aboutbutton"OFF VERSION OF BUTTON GOES HERE WHICH IS src="images/about_off.gif" border="0" vspace="5" hspace="0" alt="About Us" ></a>

 

HERE ARE THE REST..

 

<a href="philos.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('document.philbutton','document.philbutton','images/philos_on.gif','#976394948850')">

 

<a href="memb.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('document.membutton','document.membutton','images/memb_on.gif','#976395041240')">

 

<a href="works.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('document.worksbutton','document.worksbutton','images/works_on.gif','#976395102420')">

 

<a href="help.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('document.helpbutton','document.helpbutton','images/help_on.gif','#976395157180')">

 

<a href="cont.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('document.contbutton','document.contbutton','images/cont_on.gif','#976395563630')">