/*
	site.js - Generic web site support for cgolve

Updates:
05/22/02 - Name change. Use "exhibition".
05/28/01 - Cloned modernca version for use with cgolve.
05/20/01 - Added welcomeLink and framedWelcomeLink.
05/10/01 - Creation.
*/


function cgolvesite_openBODY(writerObject) {
	writerObject.writeln('<BODY bgcolor="#000000" text="#FFFFFF" vlink="#FF00FF" link="#00FF00" leftmargin="3" rightmargin="3">')
}


function cgolvesite_writeH1H2(writerObject, H2String) {
	writerObject.writeln(
		'<CENTER><H1>' +
		'<FONT COLOR="00FFFF">Color</FONT> ' +
		'<FONT COLOR="FF00FF">Game</FONT> ' +
		'<FONT COLOR="FFFF00">Of</FONT> ' +
		'<FONT COLOR="00FF00">Life</FONT> ' +
		'<FONT COLOR="FF4040">Visual</FONT> ' +
		'<FONT COLOR="8080FF">Exhibition</FONT>' +
		'</H1></CENTER>')
	if (H2String != null) {
		writerObject.writeln('<CENTER><H2>' + H2String + '</H2></CENTER>')
	}
}

function cgolvesite_setupSignatureCa(ca)
{
	ca.rule = '3/23'
	ca.resetInterval = '15-25'
	ca.resetFormation = 'GG0X10J.0U1C0C10E.0L10F1C0D10E.0K1010E10010H110.0J10B110C1C0H110.110H10B110D1C0J.110H10B110GG10J.0K1010U.0L10V.0ZJ.'
	ca.zoom = 4
	ca.universeSize = '60,60'
	ca.maximumRate = '8-12'
}


function cgolvesite_getFramedBackLink()
{
	if (window.parent.history.length == 0) {
		return ''
	}

	if (navigator.appName.indexOf('Microsoft') < 0) {
		return 'Back'.link('javascript: window.parent.history.go(-1)')
	}
	else {
		return 'Back'.link('javascript: window.parent.history.go(-1)')
	}
}

function cgolvesite_getNavigationLinks()
// Provides a link to the entrance and a back link
{
	var result = 'CGOLVE Entrance'.link('./welcome.html')
	var backlink = history.length == 0 ? '' : 'Back'.link('javascript: window.history.go(-1)')
	if (backlink.length) {
		result += ' / ' + backlink
	}
	return result
}

function cgolvesite_getFramedNavigationLinks()
// For a framed window, provides a link to the entrance and a back link
{
	var result = '<A HREF="./welcome.html" TARGET="_parent">CGOLVE Entrance</A>'
	var backlink = cgolvesite_getFramedBackLink()
	if (backlink.length) {
		result += ' / ' + backlink
	}
	return result
}

function Site() {
// public:
	this.openBODY = cgolvesite_openBODY
	this.writeH1H2 = cgolvesite_writeH1H2
	this.setupSignatureCa = cgolvesite_setupSignatureCa
	this.getNavigationLinks = cgolvesite_getNavigationLinks
	this.getFramedNavigationLinks = cgolvesite_getFramedNavigationLinks
}

var site = new Site()


var kRate = 'Rate'
var kZoom = 'Zoom'
var zooms = new Array(1, 2, 3, 4, 5, 6, 7, 8)
var rates = new Array('fast', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 40, 50, 60, 75, 100)

