Post by wooper on Aug 28, 2005 10:35:46 GMT -5
<script>
//menu manipulator
//wooper
//which function do you want to do?
//1 = align menu left
//2= align menu right
//3 = add button on the left
//4 = add button on the right
//5 change height of menu cell
var action = "5";
if (action=="5")
{
var height = "100"; //edit if changing height
}
if (action=="3" || action == "4")
{
var TextImage = "2"; //1 for an image link, 2 for a text link
var buttonText = "text" // add button text if adding a text link
var buttonImage = "http://www.networkboards.com/boardimages/face.gif" //add button image if adding a button
var buttonLink = "http://www.wooplog.com" //add button link when adding a button
}
var TD = document.getElementsByTagName("TD");
for (i=0; i<TD.length; i++)
{
if (TD[i].className == "menubg" && TD[i].align=="center")
{
if(action == "1")
{
TD[i].align="left";
}
if(action == "2")
{
TD[i].align="right";
}
if(action == "3" && TextImage == "1")
{
var menu = TD[i].innerHTML;
TD[i].innerHTML = "<a href='"+buttonLink+"' target='_blank'><img src='"+buttonImage+"' border='0' /></a> "+menu;
}
if(action == "3" && TextImage == "2")
{
var menu = TD[i].innerHTML;
TD[i].innerHTML = "<a href='"+buttonLink+"' target='_blank'>["+buttonText+"]</a> "+menu;
}
if(action == "4" && TextImage == "1")
{
TD[i].innerHTML += "<a href='"+buttonLink+"' target='_blank'><img src='"+buttonImage+"' border='0' /></a> ";
}
if(action == "4" && TextImage == "2")
{
TD[i].innerHTML += "<a href='"+buttonLink+"' target='_blank'>["+buttonText+"]</a> ";
}
if(action == "5")
{
TD[i].height = height;
}
}
}
</script>
Global Headers.
Just change the function to what you want it to do and modify the requested variables for them.