var tmr,ok;
var flg = 0;
var act = 0;
if ((navigator.platform.indexOf("Mac") != -1 && navigator.appName.indexOf("Microsoft") != -1) || !document.getElementById)
	ok = 0;
else ok = 1;

function actoff(){
	if (ok){
		if (act > 0){
			clearTimeout(tmr);
			eval('document.getElementById("sn'+act+'").style.display="none"');
			act = 0;
		}
	}
}

function mon(n){
	if (ok){
		if (act > 0){
			actoff();
		}
		eval('document.getElementById("sn'+n+'").style.display="block"');
		act = n;
	}
}

function moff(n){
	if (ok){
		tmr = eval('setTimeout("moff2('+n+')",500)');
	}
}

function moff2(n){
	if (! flg){
		eval('document.getElementById("sn'+n+'").style.display="none"');
		clearTimeout(tmr);
		act = 0;
	}
}

function smon(n){
	flg = 1;
}

function smoff(n){
	flg = 0;
	moff(n);
}

//pop up window
function popUp(page, width, height){
	win = eval('window.open("' + page + '","popup","width='+width+',height='+height+',resizable,scrollbars")');
	win.focus();
}