// Copyright 2001 Idocs.com      
// Distribute this script freely, but keep this notice in place

// backlink object initializer
function backlink() {
	this.text = 'Go Back';
	this.type = 'link';
	_proxy_jslib_assign('', this, 'write', '=', ( backlink_write));
	this.form = true;
}


// write method
function backlink_write() {
	if (! window.history) return;
	if (window.history.length == 0)return;

	this.type = this.type.toLowerCase();
	if (this.type == 'button') {
		if (this.form)
			_proxy_jslib_handle(document, 'write', '')('<FORM>');
		_proxy_jslib_handle(document, 'write', '')('<INPUT TYPE=BUTTON onClick="history.back(-1)" VALUE="', this.text, '"');
		if (this.otheratts) _proxy_jslib_handle(document, 'write', '')(' ', this.otheratts);
		_proxy_jslib_handle(document, 'write', '')('>');
		if (this.form)_proxy_jslib_handle(document, 'write', '')('<\/FORM>');
	} else {
		_proxy_jslib_handle(document, 'write', '')('<A HREF="javascript:history.back(-1)"');
		if (this.otheratts)
			_proxy_jslib_handle(document, 'write', '')(' ', this.otheratts);
		_proxy_jslib_handle(document, 'write', '')('>');
		if (this.type == 'image' || this.type == 'img') {
			_proxy_jslib_handle(document, 'write', '')('<IMG SRC="', _proxy_jslib_handle(this, 'src', ''), '" ALT="', this.text, '"');
			if (this.width) _proxy_jslib_handle(document, 'write', '')(' WIDTH=', this.width);
			if (this.height) _proxy_jslib_handle(document, 'write', '')(' HEIGHT=', this.height);
			if (this.otherimgatts) _proxy_jslib_handle(document, 'write', '')(' ', this.otherimgatts);
			_proxy_jslib_handle(document, 'write', '')(' BORDER=0>');
		}
		else
			_proxy_jslib_handle(document, 'write', '')(this.text);
		_proxy_jslib_handle(document, 'write', '')('<\/A>');
	}
}
 ;
_proxy_jslib_flush_write_buffers() ;