
ver=parseInt(navigator.appVersion)
ie4=(ver>3  && navigator.appName!="Netscape")?1:0
ns4=(ver>3  && navigator.appName=="Netscape")?1:0
ns3=(ver==3 && navigator.appName=="Netscape")?1:0

function getExpiry(d,days){
 d.setTime(Date.parse(d)+days *24 *60 *60 *1000);
 return d.toUTCString();
}
// getExpiry((new Date()), #);

function music() {
var nextyear = new Date();
nextyear.setFullYear(nextyear.getFullYear() + 1);
x = document.getElementById('music').innerHTML;
if(x == 'Music Off'){
document.getElementById('music').innerHTML = 'Music On';
document.cookie = "music=" + x + "; expires=" + nextyear.toGMTString();
stopSound();
}
else{
document.getElementById('music').innerHTML = 'Music Off';
document.cookie = "music=" + x + "; expires=" + nextyear.toGMTString();
playSound();
}
return;
}
function playSound() {
document.all['BGSOUND_ID'].src='midis/campanel.mid';
}

function stopSound() {
document.all['BGSOUND_ID'].src='midis/jsilence.mid';
}
function music_check() {
var allcookies,music,start3,end3,value,value2,value3;
allcookies = document.cookie;
music = allcookies.indexOf('music=');
start3 = music + 6;
end3 = allcookies.indexOf(';',start3);
value3 = allcookies.substring(start3,end3);
if(value3 == 'Music On'){
playSound();
document.getElementById('music').innerHTML = 'Music Off';
}
return;
}

