Newsgroup: it.comp.www.html
Titolo: _blank e altri

> is.strict) ?12 : 0;
  var pf2 = (mAtt.height%2 == 0) ?1 : 0;
 
tempsub.id
 = name+menuName+"SubItem";
  tempsub.innerHTML = txt;
  var styStr = "width:"+(sAtt.width-wf)+"px; border:solid
"+sAtt.border+"px "+sAtt.border_color+"; border-top-width:0px;
color:"+sAtt.fg_off+"; text-align:"+sAtt.align+"; font-
size:"+sAtt.font_size+"px; font-family:"+sAtt.font+"; padding:"+pf+"px
6px "+(pf+pf2)+"px 6px; background:"+sAtt.bg_off+"; cursor:pointer;
cursor:hand;"   tempsub.style.cssText = styStr;
  tempsub.setAttribute("style", styStr);
  this.subs[parent].lyr.appendChild(tempsub);
 }
 if(is.ie4) {
  var pf = Math.ceil(((mAtt.height-mAtt.font_size)/2)-2);
  var pf2 = (mAtt.height%2 == 0) ?1 : 0;
  var styStr = "width:"+(sAtt.width)+"px; border:solid "+sAtt.border+"px
"+sAtt.border_color+"; border-top-width:0px; color:"+sAtt.fg_off+";
text-align:"+sAtt.align+"; font-size:"+sAtt.font_size+"px;
font-family:"+sAtt.font+"; padding:"+(pf+pf2)+"px 6px "+(pf+pf2)+"px
6px; background:"+sAtt.bg_off+"; cursor:hand;";
  var ts = '<div id="'+name+menuName+'SubItem" style="'+styStr+'"
onmouseover="over_out(this, \''+sAtt.bg_on+'\', \''+sAtt.fg_on+'\')"
onmouseout="over_out(this, \''+sAtt.bg_off+'\', \''+sAtt.fg_off+'\')"
onmousedown="location.href=\''+url+'\'">'+txt+'</div>';
  this.subs[parent].lyr.insertAdjacentHTML("beforeEnd", ts);
 }
 if(!is.ie4) {
  tempsub.onmouseover = Function('over_out(this, "'+sAtt.bg_on+'",
"'+sAtt.fg_on+'")');
  tempsub.onmouseout = Function('over_out(this, "'+sAtt.bg_off+'",
"'+sAtt.fg_off+'")');
  tempsub.onmousedown = Function('location.href = "'+url+'",
target="_blank"');
 }
}
menuObj.prototype.show = function(p) {
 if(p == "h") {
  this.sty.left = this.parent.offX()+css_px;
  this.sty.top = this.parent.offY()+this.parent.offH()+css_px;
 } else {
  this.sty.left = this.parent.offX()+this.parent.offW()+css_px;
  this.sty.top = this.parent.offY()+css_px;
 }
 this.sty.visibility = "visible";
 this.sty.zIndex = "12";
 this.doShow();
}
menuObj.prototype.doShow = function() {
 clearTimeout(this.timer)
 this.clipIt(0, this.offW(), this.wipe, 0);
 this.wipe += 10;
 if(this.wipe <= this.maxWipe()) this.timer = setTimeout(this.obj +
".doShow()", 45)
}
menuObj.prototype.hide = function() {
 clearTimeout(this.timer)
 this.clipIt(0, this.offW(), this.wipe-10, 0);
 this.wipe -= 10;
 if(this.wipe >= 0) this.timer = setTimeout(this.obj + ".hide()", 50);
 else this.sty.visibility = "hidden";
}
function over_out(obj, bg, fg) {
 if(is.ns4) {
  if(bg.indexOf("url") != -1) obj.background.src =
bg.substring(4,bg.length-1)
  else obj.background.src = "", obj.bgColor = bg;
 }
 else {
  obj.style.background = bg;
  obj.style.color = fg;
 }
}
menuObj.prototype.clipIt = function(t,r,b,l) {
 if(!is.ns4) this.sty.clip = "rect("+t+"px, "+r+"px, "+b+"px, "+l+"px)"
 else {
  this.sty.clip.top = t;
  this.sty.clip.right = r;
  this.sty.clip.bottom = b;
  this.sty.clip.left = l;
 }
}
wipeMenu.prototype.buildMenu = function(x,y,spacing) {
 this.mainNum[0].sty.left = x+css_px;
 this.mainNum[0].sty.top = y+css_px;
 if(!is.ns4 && spacing == 0) var spacing = -this.mAtt.border;
 for(i = 1; i < this.mainNum.length; i++) {
  if(this.pos == "h") {
   this.mainNum[i].sty.left =
this.mainNum[i-1].offX()+this.mainNum[i-1].offW()+spacing+css_px;
   this.mainNum[i].sty.top = this.mainNum[i-1].offY()+css_px;
  } else {
   this.mainNum[i].sty.left = this.mainNum[i-1].offX()+css_px;
   this.mainNum[i].sty.top =
this.mainNum[i-1].offY()+this.mainNum[i-1].offH()+spacing+css_px;
  }
 }
}
function wipeMenu(menu,p,ma,sa) {
 
this.name
 = menu;
 this.pos = p;
 this.mAtt = ma;
 this.sAtt = (!sa) ?ma : sa;
 this.main = [];
 this.mainNum = [];
 this.subs = [];
}
function preLoadMenuImages() {
 if(!img) var img = [];
 var imgs = preLoadMenuImages.arguments;
 for(i = 0; i < imgs.length; i++) {
  img[i] = new Image();
  img[i].src = imgs[i];
 }
}
if(document.layers) {
var pX = innerWidth;
var pY = innerHeight;
 onresize= function(){
  if(pX!= innerWidth || pY!= innerHeight) history.go(0);
 }
}
function swapIt(img, src, id) {
 if(is.ie4 || is.ns4 && !id) document.images[img].src = src;
 if(is.ns4 && id) document.layers[id].document.images[img].src = src;
 if(is.dom) document.getElementById(img).setAttribute('src', src);
}
function initSwipeMenu() {
 preLoadMenuImages("button_on.gif", "button_off.gif");
 menuAtt = new Array();
 menuAtt["width"] = 120;
 menuAtt["height"] = 20;
 menuAtt["align"] = "center";
 menuAtt["font"] = "Verdana";
 menuAtt["font_size"] = 10;
 menuAtt["bg_off"] = "#16599D";
 menuAtt["bg_on"] = "#6F91F7";
 menuAtt["fg_off"] = "white";
 menuAtt["fg_on"] = "white";
 menuAtt["border"] = 1;
 menuAtt["border_color"] = "#ffffff";
 //Menu 1
 myMenu = new wipeMenu("myMenu", "h", menuAtt);
 myMenu.addMain("about", true, "FUMETTI", "index.htm");
  myMenu.addSub("aboutSub1", "about", "Sergio Bonelli Editore",
"
http://www.sergiobonellieditore.it/
");
  myMenu.addSub("aboutSub2", "about", "Alex Ross", "whatsvg2.htm");
  myMenu.addSub("aboutSub3", "about", "TexWiller On Line",
"structure3.htm");
 myMenu.addMain("shapes", true, "AUTOMOBILISMO", "shapes4.htm");
  myMenu.addSub("shapesSub1", "shapes", "QuattroRuote",
"rectangle5.htm");   myMenu.addSub("shapesSub2", "shapes", "On the
Road", "corners6.htm");   myMenu.addSub("shapesSub3", "shapes", "Tutto
Formula 1", "lines7.htm");   myMenu.addSub("shapesSub4", "shapes",
"GrandPrix On-Line", "circle8.htm");   myMenu.addSub("shapesSub5",
"shapes", "Emulatore", "ellipse9.htm");
  myMenu.addMain("filters", true, "VARIE", "filters13.htm");
  myMenu.addSub("filtersSub7", "filters", "La Provincia", "blur14.htm");
        myMenu.addSub("filtersSub8", "filters", "Lago di Como",
"turbulance15.htm");
  myMenu.addSub("filtersSub8", "filters", "Claudio Baglioni",
"other16.htm");
  myMenu.addMain("gradient", true, "Gradients", "gradients17.htm");
  myMenu.addSub("gradientSub1", "gradient", "Linear", "linear18.htm");
  myMenu.addSub("gradientSub2", "gradient", "Radial", "radial19.htm");
 myMenu.buildMenu(10,10,2);
}
</script>
</body>
</html>

 seguente stringa:
Questo è un newsgroup di html, NON di Javascript Old Style con chili di
codice per riconoscere il browser tra tutta la marea di quelli esistenti e
100 righe di Javascript per visualizzare alla fine "Spiacente, aggiorna il
tuo browser".
Caso mai ti consiglio it.comp.lang.javascript
Nello.

 ].Go();" scroll=no topmargin=0 marginheight=0>
[CUT]
A parte la tonnellata di codice inutile, era meglio se postavi i tuoi CSS.
Le proprietà su cui devi agire sono position (fixed, static, absolute,
relative), top, left, right, bottom oppure float e clear.
A seconda di come hai strutturato il tuo layout.
Ciao.
-- 
[Non siamo materia che aspetta, ma schemi che si perpetuano.]
Rhadamanth.net (
http://www.rhadamanth.net
)
Web Garbage (
http://www.web-garbage.com
)