wenn du magst .) hier ist das ganze:
// ****************************************************************************
// x42 menu-generator
// 07/2001 by Oliver, oliver@webwichtel.de
// ****************************************************************************
// 9 topics main-menu
// each main-topic can have upt to 9 sub-topics
// the topic-numer 0 (null) is needed for technical reasons
// ****************************************************************************
// variables
var id = ""; // layername
var xPos = 0; // pos from left
var yPos = 0; // pos from top
var textColor = ""; // text-color
var textSize = ""; // text-size
var bgColor = ""; // bgcolor
var hoverBgColor = ""; // bgcolor onMouseOver
var view = ""; // initial visibility mode
var leftBorder = 0; // border-setting for IE
var rightBorder = 0; // border-setting for IE
var topBorder = 0; // border-setting for IE
var bottomBorder = 0; // border-setting for IE
var borderStyle = ""; // border-style for IE
var layWidth = 0; // width of topic displayed
var layHeight = 0; // height of topic displayed
var bgImage = ""; // optional background image for IE
var content = ""; // content of topic
// array for menu-topics
var topics = new Array();
// parameters are devided by "|"
// don't start with [0], start with [1], like the example
// you may use HTML using single exclamation marks like /'/ instead of /"/
// topics[number] = ("id|xPos|yPos|textColor|textSize|bgColor|hoverBgColor|view|leftBorder|rightBorder|topBorder|bottomBorder|layWidth|layHeight|bgImage|content");
topics[1] = ("lay1|100|100|#ffffff|12|#000000|#0000ff|visible|1|1|1|1|solid|150|16|0|<a href='#'>menupunkt 1</a>");
topics[2] = ("lay2|100|120|#ffffff|12|#000000|#0000ff|visible|1|1|1|1|solid|150|16|0|menupunkt 1");
topics[3] = ("lay3|100|140|#ffffff|12|#000000|#0000ff|visible|1|1|1|1|solid|150|16|0|menupunkt 1");
// this function controls menu-generation
function makeMenu(){
for(i=1;i<=(topics.length-1);i++){
createLay(topics[i]);
//alert(topics[i]);
}
}
// create menu-layers --> bg-image does not work
function createLay(tmpString){
$tmp = tmpString.split("|");
for(k=0;k<=$tmp.length;k++){
id = $tmp[0];
xPos = parseInt($tmp[1])+"px";
yPos = parseInt($tmp[2])+"px";
textColor = $tmp[3];
textSize = parseInt($tmp[4])+"px";
bgColor = $tmp[5];
hoverBgColor = $tmp[6];
view = $tmp[7];
leftBorder = parseInt($tmp[8])+"px";
rightBorder = parseInt($tmp[9])+"px";
topBorder = parseInt($tmp[10])+"px";
bottomBorder = parseInt($tmp[11])+"px";
borderStyle = $tmp[12];
layWidth = parseInt($tmp[13])
layHeight = parseInt($tmp[14])
bgImage = $tmp[15];
content = $tmp[16];
}
if(isNN){
$lay ="immer nur langsam";
}
if((isIE)||(isGecko)){
$lay ="<div id='"+id+"' style='position:absolute;left:"+xPos+";top:"+yPos+";color:"+textColor+";font-size:"+textSize+";background:"+bgColor+";visibility:"+view+";border-left:"+leftBorder+" "+borderStyle+";border-right:"+rightBorder+" "+borderStyle+";border-top:"+topBorder+" "+borderStyle+";border-bottom:"+bottomBorder+" "+borderStyle+";width:"+layWidth+";height:"+layHeight+"'>";
$lay += content;
$lay += "</div>\n";
}
document.write($lay);
}
:o) Oli
was ist Dir eigentlich aufgefallen? Das der Itentifier mit $ losgeht?