Here is my Code:
<html>
<head>
<style>
<!--
#slidemenubar, #slidemenubar2{
position:absolute;
left:10px;
height:200px;
width:200px;
top:150px;
border:0;
background-color:green;
font:bold 12px Verdana;}
-->
</style>
<script>
<!--
var g_images = new Array();
g_images[0] = new Image();
g_images[0].src = "News1.gif";
g_images[1] = new Image();
g_images[1].src = "News2.gif";
g_images[2] = new Image();
g_images[2].src = "AdminButton1.gif";
g_images[3] = new Image();
g_images[3].src = "AdminButton2.gif";
g_images[4] = new Image();
g_images[4].src = "Links1.gif";
g_images[5] = new Image();
g_images[5].src = "Links2.gif";
g_images[6] = new Image();
g_images[6].src = "Home1.gif";
g_images[7] = new Image();
g_images[7].src = "Home2.gif";
function imgRotate(nIndex){
if ( g_images[0].complete)
document.images[1].src = g_images[nIndex].src;}
function imgRotate2(nIndex){
if ( g_images[2].complete)
document.images[3].src = g_images[nIndex].src;}
function imgRotate3(nIndex){
if ( g_images[4].complete)
document.images[5].src = g_images[nIndex].src;}
function imgRotate4(nIndex){
if ( g_images[6].complete)
document.images[7].src = g_images[nIndex].src;}
//-->
</SCRIPT>
</head>
<body>
<script language="JavaScript1.2">
<!--
if (document.all)
document.write('<div id="slidemenubar" style="left:10" onMouseout="draw()" onMouseover="pull()">
//--></script>
<layer id="slidemenubar2" onMouseover="pull()" onMouseout="draw()">
<a href="#" onmousedown="imgRotate(1)"; onmouseup="imgRotate(0)"><img src="Info1.gif" border="0" height="50" width="200"/></a></br>
<a href="#" onmousedown="imgRotate2(3)"; onmouseup="imgRotate2(2)"><img src="News1.gif" border="0" height="50" width="200"/></a></br>
<a href="#" onmousedown="imgRotate3(5)"; onmouseup="imgRotate3(4)"><img src="AdminButton1.gif" border="0" height="50" width="200"/></a></br>
<a href="#" onmousedown="imgRotate4(7)"; onmouseup="imgRotate4(6)"><img src="Links1.gif" border="0" height="50" width="200"/></a></br>
</layer>
<script language="JavaScript1.2">
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",400)
}
window.onload=regenerate2
if (document.all){
document.write('</div>')
themenu=document.all.slidemenubar2.style
rightboundary=0
leftboundary=-173
}
else{
themenu=document.layers.slidemenubar
rightboundary=173
leftboundary=10
}
function pull(){
if (window.drawit)
clearInterval(drawit)
pullit=setInterval("pullengine()",50)
}
function draw(){
clearInterval(pullit)
drawit=setInterval("drawengine()",30)
}
function pullengine(){
if (document.all&&themenu.pixelLeft<rightboundary)
themenu.pixelLeft+=20
else if(document.layers&&themenu.left<rightboundary)
themenu.left+=20
else if (window.pullit)
clearInterval(pullit)
}
function drawengine(){
if (document.all&&themenu.pixelLeft>leftboundary)
themenu.pixelLeft-=5
else if(document.layers&&themenu.left>leftboundary)
themenu.left-=5
else if (window.drawit)
clearInterval(drawit)
}
</script>
</body>
</html>
:
Now, I get an error mesage that says, "Line 58, Char 97, Error Unterminated String Constant". I have NO clue what is going on, can anyone help. I'm also having some problems w/ the images. When I initate the rollover the first link, it changes the image under it. & the last two images give me this message "document.images.5" is null or not an object. Am I using too many rollovers? I would appreciate any helpful insight anyone can offer on this.
<html>
<head>
<style>
<!--
#slidemenubar, #slidemenubar2{
position:absolute;
left:10px;
height:200px;
width:200px;
top:150px;
border:0;
background-color:green;
font:bold 12px Verdana;}
-->
</style>
<script>
<!--
var g_images = new Array();
g_images[0] = new Image();
g_images[0].src = "News1.gif";
g_images[1] = new Image();
g_images[1].src = "News2.gif";
g_images[2] = new Image();
g_images[2].src = "AdminButton1.gif";
g_images[3] = new Image();
g_images[3].src = "AdminButton2.gif";
g_images[4] = new Image();
g_images[4].src = "Links1.gif";
g_images[5] = new Image();
g_images[5].src = "Links2.gif";
g_images[6] = new Image();
g_images[6].src = "Home1.gif";
g_images[7] = new Image();
g_images[7].src = "Home2.gif";
function imgRotate(nIndex){
if ( g_images[0].complete)
document.images[1].src = g_images[nIndex].src;}
function imgRotate2(nIndex){
if ( g_images[2].complete)
document.images[3].src = g_images[nIndex].src;}
function imgRotate3(nIndex){
if ( g_images[4].complete)
document.images[5].src = g_images[nIndex].src;}
function imgRotate4(nIndex){
if ( g_images[6].complete)
document.images[7].src = g_images[nIndex].src;}
//-->
</SCRIPT>
</head>
<body>
<script language="JavaScript1.2">
<!--
if (document.all)
document.write('<div id="slidemenubar" style="left:10" onMouseout="draw()" onMouseover="pull()">
//--></script>
<layer id="slidemenubar2" onMouseover="pull()" onMouseout="draw()">
<a href="#" onmousedown="imgRotate(1)"; onmouseup="imgRotate(0)"><img src="Info1.gif" border="0" height="50" width="200"/></a></br>
<a href="#" onmousedown="imgRotate2(3)"; onmouseup="imgRotate2(2)"><img src="News1.gif" border="0" height="50" width="200"/></a></br>
<a href="#" onmousedown="imgRotate3(5)"; onmouseup="imgRotate3(4)"><img src="AdminButton1.gif" border="0" height="50" width="200"/></a></br>
<a href="#" onmousedown="imgRotate4(7)"; onmouseup="imgRotate4(6)"><img src="Links1.gif" border="0" height="50" width="200"/></a></br>
</layer>
<script language="JavaScript1.2">
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",400)
}
window.onload=regenerate2
if (document.all){
document.write('</div>')
themenu=document.all.slidemenubar2.style
rightboundary=0
leftboundary=-173
}
else{
themenu=document.layers.slidemenubar
rightboundary=173
leftboundary=10
}
function pull(){
if (window.drawit)
clearInterval(drawit)
pullit=setInterval("pullengine()",50)
}
function draw(){
clearInterval(pullit)
drawit=setInterval("drawengine()",30)
}
function pullengine(){
if (document.all&&themenu.pixelLeft<rightboundary)
themenu.pixelLeft+=20
else if(document.layers&&themenu.left<rightboundary)
themenu.left+=20
else if (window.pullit)
clearInterval(pullit)
}
function drawengine(){
if (document.all&&themenu.pixelLeft>leftboundary)
themenu.pixelLeft-=5
else if(document.layers&&themenu.left>leftboundary)
themenu.left-=5
else if (window.drawit)
clearInterval(drawit)
}
</script>
</body>
</html>
:
Now, I get an error mesage that says, "Line 58, Char 97, Error Unterminated String Constant". I have NO clue what is going on, can anyone help. I'm also having some problems w/ the images. When I initate the rollover the first link, it changes the image under it. & the last two images give me this message "document.images.5" is null or not an object. Am I using too many rollovers? I would appreciate any helpful insight anyone can offer on this.