// java script by Tig, last updated 09:10 03-02-02
// java script by Tig, last updated 13:15 25-02-02
// java script by Tig, last updated 14:25 28-02-02: Finished WebCam() function - works now!

function MusicOptions() {
	status="Loading Music Options..";
	alert("Click on the tune you want, then the window will close.");
        open("tuneset.html", "music_options", "height=240,width=200");
}

function SetMusic(FileAddy) {
	extra=open("", "extra", "");
	extra.document.write('<html><body><bgsound src="'+FileAddy+'"></body></html>');
	extra.document.close();
	self.close();
}

function DeadLink() {
        status="Oops.. That link doesn't work!";
	alert("Sorry, the link is currently unavailable.");
}

function MakeWin(ItsHere, ItsAbout, x, y) {
	status="Loading '"+ItsAbout+"' image..";
	newWin=open("", "", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,height="+(y + 30)+",width="+(x + 50)+"");
	newWin.document.write('<html><head><title>'+ItsAbout+'</title></head><body><center><img src="'+ItsHere+'" alt="'+ItsAbout+'"></body></html>');
	newWin.document.close()
}

function LinkWin(WebAddy, ItsAbout, x, y) {
	status="Loading site..";
	if (ItsAbout!='') {
		newWin=open("", "", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,height="+(y + 30)+",width="+(x + 50)+"");
		newWin.document.write('<html><head><title>'+ItsAbout+'</title></head><frameset rows="100%" border="0" frameborder="0" framespacing="0"><frame src="'+WebAddy+'" scrolling="yes" noresize></frameset></html>');
		newWin.document.close();
	} else {
		newWin=open(WebAddy, "", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,height="+(y + 30)+",width="+(x + 50)+"");
	}
}

function CountMe(id) {
	status="you've just hit the poor web counter.. :( what did it ever do to you, eh?";
	extra=open("", "extra", "");
	extra.document.write('<html><body><a href="http://angrybeancounter.com" target="_blank">');
	if (navigator.appName == "Netscape") {
		sd = screen.pixelDepth;
	} else {
		sd = screen.colorDepth;
	};
	extra.document.write('<img src="http://cgi.angrybeancounter.com/cgi-bin/counter.cgi?id='+id+'&d='+sd+'&s='+screen.width+'x'+screen.height+'&js=1&j='+navigator.javaEnabled()+'&r='+escape(document.referrer)+'">');
	extra.document.write('<img src="http://cgi.angrybeancounter.com/cgi-bin/counter.cgi?id='+id+'"></a></body></html>');
	extra.document.close();
}

function WebCam(WebAddy,Info,Update,x,y) {
	status="Loading '"+Info+"' Cam..";
	if ( Update > 60000 ) {
		title=((Update/1000)/60)+" mins";
	} else {
		title=(Update/1000)+" seconds";
	}
	CamWin=open("", Info, "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,height="+(y + 30)+",width="+(x + 50)+"");
	CamWin.document.write('<html><head><title>'+Info+' (updated every '+title+')</title><script language="JavaScript" src="java.txt"></script></head><frameset rows="100%,0" border="0" frameborder="0" framespacing="0"><frame src="'+WebAddy+'" scrolling="yes" noresize><frame name="WebCam'+Info+'"></frameset></html>');
	CamWin.document.close();
	UpdWin=open("", "WebCam"+Info, "");
	UpdWin.document.write('<html><body onload="setTimeout(\'parent.WebCam(\\\''+WebAddy+'\\\',\\\''+Info+'\\\','+Update+','+x+','+y+')\','+Update+')"></body></html>');
	UpdWin.document.close();
}

function sb(msg) {
  status=msg;
}           
