// np.js

var isWin = navigator.userAgent.indexOf("Win") > 0 ;
var isMac = navigator.userAgent.indexOf("Mac") > 0 ;
var isGecko = navigator.userAgent.indexOf("Gecko") > 0 ;
var isMSIE = navigator.userAgent.indexOf("MSIE") > 0 ;
var cancelpush ;

var virtualpages=6;

function resize_window() {
	height_offset = 70*(isWin && isMSIE) ;
	if( typeof(window.resizeTo) != "undefined") {
		window.resizeTo(987, 700+height_offset);
	}
}


function initialize_navigation() {
	document.getElementById("text0").style.visibility = "visible";
	for( i=1; i<virtualpages; i++ ) {
		document.getElementById("text" + i).style.visibility = "hidden";
	}
	// show( "text1" );
}

function show( me ) {
	if( cancelpush ) { clearTimeout( cancelpush ); }
	scrollTo(0,0);
	if( me == "text6" ) {
		document.getElementById( me ).style.visibility = "visible";
		return;
	}
	if( me == "photo01" ) {
		document.getElementById( me ).style.visibility = "visible";
		return;
	}
	for( i=1; i<virtualpages; i++ ) {
		document.getElementById("text" + i).style.visibility = "hidden";
		document.getElementById("atext" + i).style.background = "none";
	}
	document.getElementById( me ).style.visibility = "visible";
	document.getElementById( "a"+me ).style.background = "#5c656a";
	if( me == "text5" ) {
		document.getElementById( "text6" ).style.visibility = "visible";
	}
	return false;
}

function nonplusme() {
	cleanslate();
	setTimeout("location.reload(false)",6000 + (9 * Math.random()));
	return false;
}

function cleanslate() {
	for( i=0; i<virtualpages+1; i++ ) {
		document.getElementById("text" + i).style.visibility = "hidden";
	}
	document.getElementById("contact").style.visibility = "hidden";
	document.getElementById("define").style.visibility = "hidden";
}


function openlyrics( theurl ) {
	W = open( theurl, "lyrics",
		"toolbar=0,location=0,directories=0,status=0," + 
		"menubar=0,scrollbars=1,resizable=1,width=400,height=300");
	W.focus();
	return false;
}

function openphoto( theurl, title, xx, yy ) {
	W = open( theurl, "photo",
		"toolbar=0,location=0,directories=0,status=0," + 
		"menubar=0,scrollbars=0,resizable=0,width="+xx+",height="+yy );
	W.focus();
	W.document.title=title;
	W.resizeTo(xx,yy);
	W.focus();
	return false;
}

// title rotate

var NS4 = (document.layers);
var titles = new Array();
var timer;
function setupTR() {
	timer = 7777;
	titles = new Array;
	titles[titles.length] = "Nonplus: Does it see clearly ...or darkly?";
	titles[titles.length] = "Nonplus: The world disappears wrapped within your arms";
	titles[titles.length] = "Nonplus: Are you a liquid?";
	titles[titles.length] = "Nonplus: Let's go play in the radiation";
	titles[titles.length] = "Nonplus: We make lovely common denominators";
	titles[titles.length] = "Nonplus: Raindrops murmur ancient melodies";
	titles[titles.length] = "Nonplus: A dream beyond belief";
	titles[titles.length] = "Nonplus: Sometimes we were oblivious";
	titles[titles.length] = "Nonplus: Who will have won when the soldiers have gone?";
	setTimeout("titleRotate()",timer);
}
function titleRotate() {
	// titles.n++
	// document.title = titles[ titles.n % titles.length ]
	var nextone = Math.round(Math.random() * titles.length); 
	document.title = titles[ nextone % titles.length ];
	window.status = titles[ nextone % titles.length ];
	setTimeout("titleRotate()",timer)
}

window.defaultStatus="";

if(!NS4) setupTR();

// end of text
