/*
Copyright(c) 2000,2001,2002,2003,2004,2005 Daniel Lear all Rights Reserved
lear@ephinity.com.au
*/

/*    test for reasonable javascript DOM compliance and images turned on, ie: Mozilla, IE5+ PC & MAC, NS6+, Opera 7+ and probably 6*/
RUNSCRIPT = false
if(document.getElementById)
	if( document.getElementsByTagName('head')[0].tagName=='HEAD' || document.getElementsByTagName('head')[0].tagName=='head' )
		RUNSCRIPT = true

if(RUNSCRIPT)
{
	// anonimous object self referances
	Object.prototype.instances = []
	Object.prototype.addInstance = function()
	{
		if(!this.instanceIndex)
		{
			this.instanceIndex=this.instances.length
			this.instances[this.instanceIndex]=this
		}
	}
	Object.prototype.getInstanceName = function()
		{return 'Object.instances['+this.instanceIndex+']'}

	// frame kicker
	if(self!=top)(document.images)? top.location.replace(document.location.href) : top.location.href = document.location.href

	// onloader
	REGISTER_ONLOAD = function()
	{
		this.load_scripts = []
		window.onload = function(){OBJ_REGISTER_ONLOAD._onload()}
	}
	REGISTER_ONLOAD.prototype.add = function(script)		{this.load_scripts[this.load_scripts.length] = script}
	REGISTER_ONLOAD.prototype._onload = function()		{for(var i=0;i<this.load_scripts.length;i++)eval(this.load_scripts[i])}

	OBJ_REGISTER_ONLOAD = new REGISTER_ONLOAD()

}