OK, I am a complete n00b at JS, but I hacked up a script for the new version of Tominated Software for the menus and for a safari png thing, but when the script is put into use in IE, the page displays nothing but the background. here is the code:
I have no Idea why safarari will take that code name but not WebKit or safari, but it works. What do you think causes the problem in IE?
Thanks in advance
Code:
var is_Safari = navigator.appCodeName=="Mozilla";
if (is_Safari)
{
document.write('<style type="text/css">');
document.write('#nav {background: rgba(255,255,255,.4);}');
document.write('</style>');
}
var secs
var timerID = null
var timerRunning = false
var delay = 1000
function InitializeTimer()
{
// Set the length of the timer, in seconds
secs = 6
StopTheClock()
StartTheTimer()
}
function StopTheClock()
{
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
function StartTheTimer()
{
if (secs==0)
{
StopTheClock()
// Here's where you put something useful that's
// supposed to happen after the allotted time.
// For example, you could display a message:
document.getElementById('software').style.display = 'none'
document.getElementById('design').style.display = 'none'
}
else
{
secs = secs - 1
timerRunning = true
timerID = self.setTimeout("StartTheTimer()", delay)
}
}
function toggleSubmenu( menuID, otherMenuID )
{
var menuToOpen = document.getElementById( menuID )
var otherMenu = document.getElementById( otherMenuID )
InitializeTimer()
if( otherMenu.style.display == 'none' )
{
menuToOpen.style.display = 'block'
}
else
{
otherMenu.style.display = 'none'
menuToOpen.style.display = 'block'
}
}
Thanks in advance