Newsgroup: it.comp.lang.javascript
Titolo: Non funziona..mi date una mano?

Ho provato a mettere il seguente Js per richiamare la pagina a monte ma il
browser mi da errore. Non riesco a capire dove sia il problema. Potete darci
un occhiata?
Grazie per l'aiuto
-----------------------------
<html>
<head>
<script language="javascript" name="passData"><!--
var whichAnchor = "#Anchor-Top";
var linkTo = document.URL + whichAnchor;
var imageAlign = "bottomright";
var myLevel = 1
var bodyWidth = 500
// -->
  </script>
  <script language="javascript" if(linkTo.indexOf("#")>-1){
myIndex=linkTo.indexOf("#")
linkTo=linkTo.substring(0,myIndex) + whichAnchor
file://linkTo="../indexB.html"
file://alert(linkTo)
}
if(myLevel==1) {
 imageSource = "../images/su.gif"
 }
else if(myLevel==2) {
 imageSource = "../images/su.gif"
 }
else if(myLevel==3) {
 imageSource = "../images/su.gif"
 }
imageWidth = 17
imageHeight = 38
if (bodyWidth==null) {
 var bodyWidth = 500
 }
n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
topMsg="Inizio pagina"
function topOverLink() {
 return overLink(topMsg)
 }
function topOutLink() {
 return outLink()
 }
function watermarkgraphic() {
 if (n || ie) {
     file://createLayer("watermark",null,0,0,imageWidth,imageHeight,"<A
HREF=\'" + linkTo + "\' onmouseover=\'return topOverLink()\'
onmouseout=\'return topOutLink()\'><IMG SRC=\'" + imageSource + "\'
BORDER=0></A>")
     createLayer("watermark",null,0,0,imageWidth,imageHeight,"<A HREF=\'
#Anchor-Top\' onmouseover=\'return topOverLink()\' onmouseout=\'return
topOutLink()\'><IMG SRC=\'" + imageSource + "\' BORDER=0></A>")
mark = new dynLayer("watermark")
     setInterval("wtrmark()",100)
     }
 }
function dynLayer(id,nestref) {
 if (n) {
  this.css = document.layers[id]
  }
 else if (ie) {
  this.css = document.all[id].style
  }
    this.moveBy = dynLayerMoveBy
    this.moveTo = dynLayerMoveTo
 }
function dynLayerMoveBy(x,y) {
    this.x += x
    this.css.left = this.x
    this.y += y
    this.css.top = this.y
 }
function dynLayerMoveTo(x,y) {
    this.x = x
    this.css.left = this.x
    this.y = y
    this.css.top = this.y
}
function wtrmark() {
 if (n) {
     windowWidth = window.innerWidth-17
     windowHeight = window.innerHeight-17
//     myOoffset = ((window.innerWidth-bodyWidth)/2)-(imageWidth/2)
     myOoffset =
((window.innerWidth-bodyWidth)/2)-(imageWidth/2)-(imageWidth/2)
     myVoffset = 28
     if (imageAlign == "topleft")
mark.moveTo(window.pageXOffset,window.pageYOffset)
     if (imageAlign == "topright")
mark.moveTo(windowWidth-imageWidth+window.pageXOffset,window.pageYOffset)
     if (imageAlign == "bottomleft")
mark.moveTo(window.pageXOffset,windowHeight-imageHeight+window.pageYOffset)
     if (imageAlign ==
"bottomright")mark.moveTo(windowWidth-imageWidth+window.pageXOffset-myOoffse
t,windowHeight-imageHeight+window.pageYOffset-myVoffset)
     }
 else if (ie) {
     windowWidth = document.body.clientWidth
     windowHeight = document.body.clientHeight
//      myOoffset = ((windowWidth-bodyWidth)/2)
      myOoffset = ((windowWidth-bodyWidth)/2)-(imageWidth/2)
      myVoffset = 50
  if (imageAlign == "topleft")
mark.moveTo(document.body.scrollLeft,document.body.scrollTop)
  if (imageAlign == "topright")
mark.moveTo(windowWidth-imageWidth+document.body.scrollLeft,
document.body.sc
rollTop)
  if (imageAlign == "bottomleft")
mark.moveTo(document.body.scrollLeft,windowHeight-imageHeight+document.body.
scrollTop)
  if (imageAlign ==
"bottomright")mark.moveTo(windowWidth+document.body.scrollLeft-myOoffset-(im
ageWidth/2),windowHeight-imageHeight+document.body.scrollTop-myVoffset)
  }
 }
function
createLayer(id,nestref,left,top,width,height,content,bgColor,visibility,zInd
ex) {
 if (n) {
  if (nestref) {
   var lyr = eval("document."+nestref+".document."+id+" = new Layer(width,
document."+nestref+")")
   }
  else {
   var lyr = document.layers[id] = new Layer(width)
   eval("document."+id+" = lyr")
   }
 
lyr.name
 = id
  lyr.left = left
  lyr.top = top
  if (height!=null) lyr.clip.height = height
  if (bgColor!=null) lyr.bgColor = bgColor
  lyr.visibility = (visibility=='hidden')? 'hide' : 'show'
  if (zIndex!=null) lyr.zIndex = zIndex
  if (content) {
   lyr.document.open()
   lyr.document.write(content)
   lyr.document.close()
   }
  }
 else if (ie) {
  var str = '\n<DIV id='+id+' style="position:absolute; left:'+left+';
top:'+top+'; width:'+width
  if (height!=null) {
   str += '; height:'+height
   str += '; clip:rect(0,'+width+','+height+',0)'
   }
  if (bgColor!=null) str += '; background-color:'+bgColor
  if (zIndex!=null) str += '; z-index:'+zIndex
  if (visibility) str += '; visibility:'+visibility
  str += ';">'+((content)? content :'')+'</DIV>'
  if (nestref) {
   index = nestref.lastIndexOf(".")
   var nestlyr = (index != -1)? nestref.substr(index+1) : nestref
   document.all[nestlyr].insertAdjacentHTML("BeforeEnd",str);
   }
  else {
   document.body.insertAdjacentHTML("BeforeEnd",str)
   }
  }
 }
</script>
</head>
<body bgcolor="#FFFFFF" marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0"  onload="watermarkgraphic()" >
<table border="0" cellpadding="0" cellspacing="0" width="625" valign="top"
height="94">
  <tr>
    <td align="top" height="88" width="500" bgcolor="#EBE5CC">
      <center><A name="Anchor-Top"></A>
</body>
</html>

Che msg. di errore da??
--
Bye
Ro<*¿*>berto

 wrote in message
8i84l3$b1n$2...@fe1.cs.interbusiness.it...


>  <script language="javascript" if(linkTo.indexOf("#")>-1){
Non capisco questa riga...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<?xml version="1.0" encoding="UTF-8"?>
<sign>
<author>the fly on the net</author>
<description>il webmaster più alto del mondo </description>
<a href="
http://www.probo.it/aoj
">Art of JavaS.</a>
<a href="
http://www.devil-inside.net/
">the devil inside</a>
<a href="mailto:
net...@netbusiness.it
">e-mail</a>
</sign>

[CUT]