cookabarra
23 Apr 2011, 03:49 PM
I folks I created a perfectly good and working page but I have now been asked to mark the scripts in the code to explain how they work. Could anybody help me out there as I just copy and pasted the scripts and modified them slightly for myself.
This is the code of the page as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="Freaky Site.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript">
<!-- ;
var newwindow = ''
function popitup(url) {
if (newwindow.location && !newwindow.closed)
{ newwindow.location.href = url; newwindow.focus(); }
else
{ newwindow=window.open(url,'htmlname','width=360,height=360,resizable=1') ; }
}
function tidy()
{
if (newwindow.location && !newwindow.closed) { newwindow.close(); }
}
//Routines specifically for popup feedback windows
var fbwindow
function fbpopitup(url) {
if (fbwindow && !fbwindow.closed)
{ fbwindow.location.href = url; fbwindow.focus(); }
else
{ fbwindow=window.open(url,'fhtmlname','width=520,height=420,resizable=1,scrollbars=1,top=50,left=10') ; }
}
function fbtidy(){
if (fbwindow && !fbwindow.closed) {fbwindow.close(); } }
// Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->
</script>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
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=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body>
<div id="container">
<div id="header">
</div>
<div id="sidecol">
<a href="FSiteHome.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('HomeButton','','FSButHomeRO.jpg',0)">
<img src="FSButHome.jpg" name="HomeButton" width="180" height="43" border="0" id="HomeButton" alt="Home Button" /></a>
<a href="FSiteBio.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('BioButton','','FSButBioRO.jpg',0)">
<img src="FSButBio.jpg" name="BioButton" width="180" height="43" border="0" id="BioButton" alt="Biography Button" /></a>
<a href="FSiteDisco.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('DiscoButton','','FSButDiscoRO.jpg',0)">
<img src="FSButDisco.jpg" name="DiscoButton" width="180" height="43" border="0" id="DiscoButton" alt="Discography Button" /></a>
<img src="FSButGalO.jpg" name="GalButton" width="180" height="43" border="0" id="GalButton" alt="Gallery Button" />
<a href="FSiteNews.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('NewsButton','','FSButNewsRO.jpg',0)">
<img src="FSButNews.jpg" name="NewsButton" width="180" height="43" border="0" id="NewsButton" alt="News Button" /></a>
<a href="FSiteCont.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('ContButton','','FSButContRO.jpg',0)">
<img src="FSButCont.jpg" name="ContButton" width="180" height="43" border="0" id="ContButton" alt="Contact Us Button" /></a>
<a href="FSitestep1.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('StepButton','','FSButStepRO.jpg',0)">
<img src="FSButStep.jpg" name="StepButton" width="180" height="43" border="0" id="StepButton" alt="Step On Button" /></a>
</div>
<div id="maincol">
<table width="787" cellspacing="5" cellpadding="5" bgcolor="#ffffff" style="margin: auto auto; background-color: #ffffff; color: #ffffff">
<tr>
<td><a href="javascript:popitup('FSGallery/Shaun036d.jpg')">
<img src="FSGallery/Shaun036dtumb.jpg" border="0" hspace="10" vspace="5" alt="Shaun036" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays001d.jpg')">
<img src="FSGallery/mondays001dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays001" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays019d.jpg')">
<img src="FSGallery/mondays019dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays019" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/Shaun034d.jpg')">
<img src="FSGallery/Shaun034dtumb.jpg" border="0" hspace="10" vspace="5" alt="Shaun034" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/Bez005d.jpg')">
<img src="FSGallery/Bez005dtumb.jpg" border="0" hspace="10" vspace="5" alt="Bez005" align="left" /></a></td>
</tr>
<tr>
<td><a href="javascript:popitup('FSGallery/BezShaun007d.jpg')">
<img src="FSGallery/BezShaun007dtumb.jpg" border="0" hspace="10" vspace="5" alt="BezShaun007" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays003d.jpg')">
<img src="FSGallery/mondays003dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays003" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays012d.jpg')">
<img src="FSGallery/mondays012dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays012" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays013d.jpg')">
<img src="FSGallery/mondays013dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays013" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/BezHorsed.jpg')">
<img src="FSGallery/BezHorsedtumb.jpg" border="0" hspace="10" vspace="5" alt="BezHorse" align="left" /></a></td>
</tr>
</table>
</div>
<div id="Footer">
<div id="Clock">
<applet code="DigitalClock2ech.class" width="190" height="20" archive="DigitalClock2.jar">
<param name="COPYRIGHT" value="DigitalClock applet, Copyright 1998, Eric Harshbarger"/>
<param name="AUTHOR" value="Eric Harshbarger, http://www.ericharshbarger.org"/>
<param name="TIME.DISPLAY" value="24hr Party Clock $hour$:$min$:$sec$"/>
<param name="ESCAPE.CHARACTER" value="$"/>
<param name="WEEKDAYS" value="Sunday Mon Tuesday Wednesday Thursday Friday Saturday"/>
<param name="24HOUR" value="True"/>
<param name="FGCOLOR" value="0,0,0"/>
<param name="BGCOLOR" value="255,50,0"/>
<param name="ALIGN" value="centre"/>
<param name="FONTSIZE" value="12"/>
<param name="FONTNAME" value="Arial"/>
</applet>
</div>
</div>
</div>
</body>
</html>
This is the code of the page as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="Freaky Site.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript">
<!-- ;
var newwindow = ''
function popitup(url) {
if (newwindow.location && !newwindow.closed)
{ newwindow.location.href = url; newwindow.focus(); }
else
{ newwindow=window.open(url,'htmlname','width=360,height=360,resizable=1') ; }
}
function tidy()
{
if (newwindow.location && !newwindow.closed) { newwindow.close(); }
}
//Routines specifically for popup feedback windows
var fbwindow
function fbpopitup(url) {
if (fbwindow && !fbwindow.closed)
{ fbwindow.location.href = url; fbwindow.focus(); }
else
{ fbwindow=window.open(url,'fhtmlname','width=520,height=420,resizable=1,scrollbars=1,top=50,left=10') ; }
}
function fbtidy(){
if (fbwindow && !fbwindow.closed) {fbwindow.close(); } }
// Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->
</script>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
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=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body>
<div id="container">
<div id="header">
</div>
<div id="sidecol">
<a href="FSiteHome.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('HomeButton','','FSButHomeRO.jpg',0)">
<img src="FSButHome.jpg" name="HomeButton" width="180" height="43" border="0" id="HomeButton" alt="Home Button" /></a>
<a href="FSiteBio.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('BioButton','','FSButBioRO.jpg',0)">
<img src="FSButBio.jpg" name="BioButton" width="180" height="43" border="0" id="BioButton" alt="Biography Button" /></a>
<a href="FSiteDisco.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('DiscoButton','','FSButDiscoRO.jpg',0)">
<img src="FSButDisco.jpg" name="DiscoButton" width="180" height="43" border="0" id="DiscoButton" alt="Discography Button" /></a>
<img src="FSButGalO.jpg" name="GalButton" width="180" height="43" border="0" id="GalButton" alt="Gallery Button" />
<a href="FSiteNews.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('NewsButton','','FSButNewsRO.jpg',0)">
<img src="FSButNews.jpg" name="NewsButton" width="180" height="43" border="0" id="NewsButton" alt="News Button" /></a>
<a href="FSiteCont.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('ContButton','','FSButContRO.jpg',0)">
<img src="FSButCont.jpg" name="ContButton" width="180" height="43" border="0" id="ContButton" alt="Contact Us Button" /></a>
<a href="FSitestep1.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('StepButton','','FSButStepRO.jpg',0)">
<img src="FSButStep.jpg" name="StepButton" width="180" height="43" border="0" id="StepButton" alt="Step On Button" /></a>
</div>
<div id="maincol">
<table width="787" cellspacing="5" cellpadding="5" bgcolor="#ffffff" style="margin: auto auto; background-color: #ffffff; color: #ffffff">
<tr>
<td><a href="javascript:popitup('FSGallery/Shaun036d.jpg')">
<img src="FSGallery/Shaun036dtumb.jpg" border="0" hspace="10" vspace="5" alt="Shaun036" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays001d.jpg')">
<img src="FSGallery/mondays001dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays001" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays019d.jpg')">
<img src="FSGallery/mondays019dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays019" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/Shaun034d.jpg')">
<img src="FSGallery/Shaun034dtumb.jpg" border="0" hspace="10" vspace="5" alt="Shaun034" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/Bez005d.jpg')">
<img src="FSGallery/Bez005dtumb.jpg" border="0" hspace="10" vspace="5" alt="Bez005" align="left" /></a></td>
</tr>
<tr>
<td><a href="javascript:popitup('FSGallery/BezShaun007d.jpg')">
<img src="FSGallery/BezShaun007dtumb.jpg" border="0" hspace="10" vspace="5" alt="BezShaun007" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays003d.jpg')">
<img src="FSGallery/mondays003dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays003" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays012d.jpg')">
<img src="FSGallery/mondays012dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays012" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/mondays013d.jpg')">
<img src="FSGallery/mondays013dtumb.jpg" border="0" hspace="10" vspace="5" alt="mondays013" align="left" /></a></td>
<td><a href="javascript:popitup('FSGallery/BezHorsed.jpg')">
<img src="FSGallery/BezHorsedtumb.jpg" border="0" hspace="10" vspace="5" alt="BezHorse" align="left" /></a></td>
</tr>
</table>
</div>
<div id="Footer">
<div id="Clock">
<applet code="DigitalClock2ech.class" width="190" height="20" archive="DigitalClock2.jar">
<param name="COPYRIGHT" value="DigitalClock applet, Copyright 1998, Eric Harshbarger"/>
<param name="AUTHOR" value="Eric Harshbarger, http://www.ericharshbarger.org"/>
<param name="TIME.DISPLAY" value="24hr Party Clock $hour$:$min$:$sec$"/>
<param name="ESCAPE.CHARACTER" value="$"/>
<param name="WEEKDAYS" value="Sunday Mon Tuesday Wednesday Thursday Friday Saturday"/>
<param name="24HOUR" value="True"/>
<param name="FGCOLOR" value="0,0,0"/>
<param name="BGCOLOR" value="255,50,0"/>
<param name="ALIGN" value="centre"/>
<param name="FONTSIZE" value="12"/>
<param name="FONTNAME" value="Arial"/>
</applet>
</div>
</div>
</div>
</body>
</html>