//global_funcs.js

var error_shown = false;

/***************************/

function errorbox (msg) {
	if (error_shown == true) return;
	alert ("ERROR: " + msg);
	error_shown = true;
	}

function apush (target, item) {
	target[target.length] = item;
	}

function do_nothing() {
	}

function imageRoll (img_out, img_over) {
	this.isImageRoll = true;
	this.iout = img_out;
	if (img_over) this.iover = img_over;
	else this.iover = this.iout;
	}

/***************************/

// use this class as prototype for buffering
// document writes (fixes ns4 bug)

function docBuffer_write (s) {
	this.docbuf += s;
	}

function docBuffer_writeln (s) {
	this.write (s + '\n');
	}

function docBuffer_writeBuffer (docptr) {
	var doc = docptr || document;
	doc.write (this.docbuf);
	}

function docBuffer() {
	this.docbuf = "";
	this.write = docBuffer_write;
	this.writeln = docBuffer_writeln;
	this.writeBuffer = docBuffer_writeBuffer;
	}

/***************************/