Newsgroup: it.lavoro.professioni.webmaster
Titolo: domanda: Xara Webstyle (barra di navigazione)

Ho creato una barra di navigazione con Xara Webstyle e mi ha creato oltre
alle immagini e al file html, due files: blueballs.js
if(typeof(loc)=="undefined"||loc==""){var
loc="";if(document.body&&document.body.innerHTML){var
tt=document.body.innerHTML.toLowerCase();var
last=tt.indexOf("blueballs.js\"");if(last>0){var
first=tt.lastIndexOf("\"",last);if(first>0&&first<last)loc=document.body.inn
erHTML.substr(first+1,last-first-1);}}}
var bd=0
document.write("<style type=\"text/css\">");
document.write("\n<!--\n");
document.write(".blueballs_menu
{z-index:999;border-color:#000000;border-style:solid;border-width:"+bd+"px
0px "+bd+"px
0px;background-color:#ffffff;position:absolute;left:0px;top:0px;visibility:h
idden;}");
document.write(".blueballs_plain, a.blueballs_plain:link,
a.blueballs_plain:visited{text-align:left;background-color:#ffffff;color:#99
9999;text-decoration:none;border-color:#000000;border-style:solid;border-wid
th:0px "+bd+"px 0px "+bd+"px;padding:2px 0px 2px
0px;cursor:hand;display:block;font-size:10pt;font-family:Tahoma, Verdana,
Arial, sans-serif;font-weight:bold;}");
document.write("a.blueballs_plain:hover,
a.blueballs_plain:active{background-color:#cfdfe4;color:#000000;text-decorat
ion:none;border-color:#000000;border-style:solid;border-width:0px "+bd+"px
0px "+bd+"px;padding:2px 0px 2px
0px;cursor:hand;display:block;font-size:10pt;font-family:Tahoma, Verdana,
Arial, sans-serif;font-weight:bold;}");
document.write("\n-->\n");
document.write("</style>");
var fc=0x000000;
var bc=0xcfdfe4;
if(typeof(frames)=="undefined"){var frames=0;}
startMainMenu("",0,0,2,0,0)
mainMenuItem("blueballs_b1",".jpg",22,161,"javascript:;","","Attività",2,2,"
blueballs_plain");
mainMenuItem("blueballs_b2",".jpg",22,161,"javascript:;","","Prodotti",2,2,"
blueballs_plain");
mainMenuItem("blueballs_b3",".jpg",22,161,"javascript:;","","Categorie
Merceologiche",2,2,"blueballs_plain");
mainMenuItem("blueballs_b4",".jpg",22,161,"javascript:;","","Marchi
trattati",2,2,"blueballs_plain");
mainMenuItem("blueballs_b5",".jpg",22,161,"javascript:;","","Contatti",2,2,"
blueballs_plain");
mainMenuItem("blueballs_b6",".jpg",22,161,"javascript:;","","Home",2,2,"blue
balls_plain");
endMainMenu("",0,0);
startSubmenu("blueballs_b4","blueballs_menu",161);
submenuItem("LAINIÈRE DE PICARDIE","javascript:;","","blueballs_plain");
submenuItem("TRE PIÙ","javascript:;","","blueballs_plain");
submenuItem("BLITZ STAR","javascript:;","","blueballs_plain");
submenuItem("COFACET TRAC","javascript:;","","blueballs_plain");
endSubmenu("blueballs_b4");
startSubmenu("blueballs_b3","blueballs_menu",167);
submenuItem("Abbigliamento industria","javascript:;","","blueballs_plain");
submenuItem("forniture ed accessori","javascript:;","","blueballs_plain");
submenuItem("Foderami","javascript:;","","blueballs_plain");
endSubmenu("blueballs_b3");
startSubmenu("blueballs_b2","blueballs_menu",237);
submenuItem("appendiabiti","javascript:;","","blueballs_plain");
submenuItem("appendiabiti in plastica","javascript:;","","blueballs_plain");
submenuItem("buste copriabiti","javascript:;","","blueballs_plain");
submenuItem("chiusure lampo","javascript:;","","blueballs_plain");
submenuItem("etichette per
abbigliamento","javascript:;","","blueballs_plain");
submenuItem("etichette tessute","javascript:;","","blueballs_plain");
submenuItem("fodere","javascript:;","","blueballs_plain");
submenuItem("spalline in gomma","javascript:;","","blueballs_plain");
submenuItem("tele e fliseline adesive per
interni","javascript:;","","blueballs_plain");
submenuItem("appendiabiti in legno","javascript:;","","blueballs_plain");
submenuItem("bauletti capi appesi","javascript:;","","blueballs_plain");
submenuItem("carta e materiale per la sala
taglio","javascript:;","","blueballs_plain");
submenuItem("copriabiti per
abbigliamento","javascript:;","","blueballs_plain");
submenuItem("etichette stampate","javascript:;","","blueballs_plain");
submenuItem("filati CUCIRINI","javascript:;","","blueballs_plain");
submenuItem("ovatta per imbottitura","javascript:;","","blueballs_plain");
submenuItem("spalline in ovatta","javascript:;","","blueballs_plain");
endSubmenu("blueballs_b2");
startSubmenu("blueballs_b1","blueballs_menu",161);
submenuItem("forniture ed accessori","javascript:;","","blueballs_plain");
endSubmenu("blueballs_b1");
loc="";
e xaramenu.js
// ©Xara Ltd 2002
var ma=new Array();var mx=new Array();var my=new Array();var mc=new
Array();var mal=0;var main=0;var menuw=200;var psrc=0;var pname="";var
al="";var gd=0;var gx,gy;var d=document;var
NS7=(!d.all&&d.getElementById);var NS4=(!d.getElementById);var
IE5=(!NS4&&!NS7&&navigator.userAgent.indexOf('MSIE 5.0')!=-1);var
NS6=(NS7&&navigator.userAgent.indexOf('Netscape6')!=-1);if(navigator.userAge
nt.indexOf('Opera')!=-1){if(navigator.userAgent.indexOf('Opera
7')!=-1||navigator.userAgent.indexOf('Opera 8')!=-1)NS7=1;else NS4=1;}var
ifr=(!NS7&&!NS4);function
startMainMenu(file,h,w,dir,space,align){if(w>0)menuw=w;main=dir;if(main==1||
main==2)d.write("<table border=\"0\" cellspacing=\""+space+"\"
cellpadding=\"0\">");if(file!=""){al="";if(align==1)al="
align=\"right\"";if(align==2)al="
align=\"center\"";if(main==1||main==2)d.write("<tr><td"+al+">");d.write("<im
g src=\""+loc+file+"\" border=\"0\"");if(h>0)d.write("
height=\""+h+"\"");if(w>0)d.write(" width=\""+w+"\"");d.write("
/>");if(main==1||main==2)d.write("</td>");if(main==1)d.write("</tr>");if(mai
n==3)d.write("<br />");}}function
endMainMenu(file,h,w){if(file!=""){if(main==1)d.write("<tr>");if(main==1||ma
in==2)d.write("<td"+al+">");d.write("<img src=\""+loc+file+"\"
border=\"0\"");if(h>0)d.write(" height=\""+h+"\"");if(w>0)d.write("
width=\""+w+"\"");d.write("
/>");if(main==1||main==2)d.write("</td></tr>");}if(main==1||main==2)d.write(
"</table>");main=0;}function
mainMenuItem(name,ext,h,w,url,tar,alt,dir,state,s){if(NS4&&main==0)return;va
r
isgraphic=ext.charAt(0)==".";if(main==1)d.write("<tr>");if(main==1||main==2)
d.write("<td"+al+">");d.write("<a
");if(url!=""||!isgraphic)d.write("href=\""+url+"\"
");if(tar!="")d.write("target=\""+tar+"\"
");d.write("onmouseout=\"");if(dir>0)d.write("tidyMenu(event);");d.write("\"
onmouseover=\"");if(dir>0)d.write("openMenu(event,
'"+name+"',"+dir+","+bc+","+fc+");");if(state>1&&isgraphic){d[name+"_over"]=
new
Image();d[name+"_over"].src=loc+name+"_over"+ext;d.write("setGraphic(event,
'"+loc+name+"_over"+ext+"');");}d.write("return
false;\"");if(!isgraphic)d.write(" class=\""+s+"\"
style=\"width:"+(w>0?w:menuw)+"px\"");d.write(">");if(isgraphic){d.write("<i
mg src=\""+loc+name+ext+"\" border=\"0\"");if(h>0)d.write("
height=\""+h+"\"");if(w>0)d.write(" width=\""+w+"\"");if(alt!="")d.write("
alt=\""+alt+"\"");d.write("
/>");}else{d.write("&nbsp;"+ext+"&nbsp;");}d.write("</a>");if(main==1||main=
=2)d.write("</td>");if(main==1)d.write("</tr>");if(main==3)d.write("<br
/>");}function
startSubmenu(name,style,sw){if(NS4)return;if(sw>0)menuw=sw;d.write("<div
id=\""+name+"\" class=\""+style+"\"
style=\"width:"+(menuw+(NS7?bd*2:0))+"px\">");}function
endSubmenu(name){if(NS4)return;d.write("</div>");if(!NS7)d.getElementById(na
me).onmouseout=tidyMenu;}function
submenuItem(text,url,tar,s){if(NS4)return;if(text.charAt(0)=='<')d.write(tex
t);else if(text=="---")d.write("<div class=\""+s+"\"
style=\"width:"+menuw+"px\"><center><img src=\""+loc+"---.gif\" height=\"8\"
width=\""+(menuw-6-(2*bd))+"\" border=0/></center></div>");else{d.write("<a
");if(url!="")d.write("href=\""+url+"\"
");if(tar!="")d.write("target=\""+tar+"\" ");d.write("class=\""+s+"\"
style=\"width:"+menuw+"px\">&nbsp;"+text+"&nbsp;</a>");}}function
setGraphic(event,name){if(NS4)return;psrc=(NS7)?event.target:event.srcElemen
t;pname=psrc.src;if(NS7)event.target.src=name;else
event.srcElement.src=name;}function
openMenu(event,id,pos,bc,fc){if(NS4)return;var el,x,y,dx,dy;if(gd==0){var
p=d.getElementById(id);gx=0;gy=0;while(p&&p.parentNode.nodeName!="BODY"){p=p
.parentNode;if(p.nodeName=="DIV"||p.nodeName=="LAYER"||p.nodeName=="SPAN")if
(p.style.position=="absolute"){gx+=p.offsetLeft;gy+=p.offsetTop;}}if(p)gd=1;
}if(mal>0){el=d.getElementById(ma[mal-1]);if(mx[mal-1]!=el.offsetLeft||my[ma
l-1]!=el.offsetTop){el.style.left=mx[mal-1];el.style.top=my[mal-1];}tidyMenu
(event);}if(NS7){var
p=event.target;if(p.nodeName!="A"&&p.nodeName!="IMG"&&p.parentNode.nodeName=
="A")p=p.parentNode;dx=p.offsetWidth;dy=p.offsetHeight;if(mal==0){x=p.x;y=p.
y;if(typeof(p.x)=="undefined"||!NS6){x=p.offsetLeft;y=p.offsetTop;while(!NS6
&&p.parentNode.nodeName!="BODY"){p=p.parentNode;if(p.nodeName=="TD"||p.nodeN
ame=="TABLE"){x+=p.offsetLeft;y+=p.offsetTop;}}}}else{el=d.getElementById(ma
[mal-1]);x=el.offsetLeft;y=el.offsetTop+p.offsetTop;}if(pos!=3)x-=bd;if(pos=
=3&&mal>0)x+=bd;}else{x=event.clientX-event.offsetX+d.body.scrollLeft-d.body
.clientLeft;y=event.clientY-event.offsetY+d.body.scrollTop-d.body.clientTop;
dx=event.srcElement.offsetWidth;dy=event.srcElement.offsetHeight;if(mal>0){y
-=bd;if(pos!=3)x-=2*bd;}x-=gx;y-=gy;}el=d.getElementById(id);if(el&&el.style
.visibility!="visible"){if(pos==1){x+=dx;el.style.left=x-el.offsetWidth+"px"
;el.style.top=y+"px";nspeed=el.offsetWidth/frames;}else
if(pos==2){y+=dy;el.style.left=x+"px";el.style.top=y-el.offsetHeight+"px";ns
peed=el.offsetHeight/frames;}else
if(pos==3){x-=el.offsetWidth;el.style.left=x+el.offsetWidth+"px";
el.style.to
p=y+"px";nspeed=el.offsetWidth/frames;}mx[mal]=x;my[mal]=y;if(NS7||IE5||fram
es==0){el.style.left=x+"px";el.style.top=y+"px";}if(!IE5)clipMenu(mal,el);el
.style.visibility="visible";ma[mal]=id;if(NS7){var
p=event.target;if(p.nodeName!="A"&&p.parentNode.nodeName=="A")p=p.parentNode
;mc[mal]=p.style;if(!NS6){mc[mal].backgroundColor="#"+bc.toString(16);mc[mal
].color="#"+fc.toString(16);}el.onmouseout=tidyMenu;}else{mc[mal]=event.srcE
lement.style;if(mal>0){mc[mal].backgroundColor=bc;mc[mal].color=fc;}}mal++;}
if(ifr&&el&&frames==0&&(typeof(tr)=="undefined"||tr=="")){var
p=d.getElementById(id+"i");if(p){p.style.top=y+"px";p.style.left=x+"px";
p.st
yle.width=el.style.width;p.style.height=el.offsetHeight+"px";p.style.display
="block";}else{ifr="<iframe id=\""+id+"i\"
style=\"position:absolute;left:"+x+"px;width:"+el.style.width+";height:"+el.
offsetHeight+"px;top:"+y+"px;z-index:998;display:block;\" scrolling=\"no\"
frameborder=\"0\"></iframe>";el.insertAdjacentHTML('beforeBegin',ifr);}}}fun
ction overMenu(x,y){x-=gx;y-=gy;for(i=0;i<mal;i++){var
el=d.getElementById(ma[i]);if(el.offsetLeft+el.offsetWidth>x&&el.offsetLeft<
=x&&el.offsetTop+el.offsetHeight>y&&el.offsetTop<=y){return ma[i];}}return
"";}function
tidyMenu(e){if(NS4)return;if(NS7){t=overMenu(e.pageX,e.pageY);if(t!=""&&(e.t
arget.firstChild==e.relatedTarget||e.target==e.relatedTarget.firstChild))ret
urn;}else
t=overMenu(event.clientX+d.body.scrollLeft-d.body.clientLeft,event.clientY+d
.body.scrollTop-d.body.clientTop);om=0;for(i=0;i<mal;i++){var
mail=ma[i].length;if(mail>t.length||t.substring(0,mail)!=ma[i]){var
el=d.getElementById(ma[i]);el.style.visibility="hidden";mc[i].backgroundColo
r="";mc[i].color="";if(ifr){var
p=d.getElementById(ma[i]+"i");if(p)p.style.display="none";}}else{ma[om]=ma[i
];mx[om]=mx[i];my[om]=my[i];om++;}}mal=om;if(mal==0&&psrc)psrc.src=pname;}fu
nction animate(){for(i=0;i<mal;i++){var
el=d.getElementById(ma[i]);if(el.style.visibility=="visible"){if(el.offsetLe
ft<mx[i])el.style.left=Math.min(el.offsetLeft+nspeed,mx[i])+"px";if(el.offse
tLeft>mx[i])el.style.left=Math.max(el.offsetLeft-nspeed,mx[i])+"px";if(el.of
fsetTop<my[i])el.style.top=Math.min(el.offsetTop+nspeed,my[i])+"px";clipMenu
(i,el);}}if(mal!=0||frames!=0)setTimeout("animate()",50);}function
clipMenu(i,el){if(el.offsetLeft>mx[i])el.style.clip="rect("+(my[i]-el.offset
Top)+"px "+(el.offsetWidth+(mx[i]-el.offsetLeft))+"px "+el.offsetHeight+"px
"+0+"px)";else el.style.clip="rect("+(my[i]-el.offsetTop)+"px
"+el.offsetWidth+"px "+el.offsetHeight+"px "+(mx[i]-el.offsetLeft)+"px)";}
Come faccio ad inserire un collegamento ipertestuale e quindi far funzionare
la barra se non sò dove modificare i file *.js?
Con Dreamweaver posso?


Fallo quando definisci i collegamenti nel programma stesso......... non c'č
alcun motivo di andare a lavorare sul codice.... fa tutto il programma.
Cooper.