/*
Copyright(c) 2000 to 2007 Daniel Lear all Rights Reserved
lear@flamingpoodle.com.au
*/


RUNSCRIPT = false
if(document.getElementById)
	if( document.getElementsByTagName('head')[0].tagName=='HEAD' || document.getElementsByTagName('head')[0].tagName=='head' )
		RUNSCRIPT = true

if(RUNSCRIPT)
{
	// frame kicker
	if(self!=top)(document.images)? top.location.replace(document.location.href) : top.location.href = document.location.href

	IE = 
	{
		version : -1,// version == -1 assumes a better browser
		major_version : -1,
		set : function()
		{
			if(window.opera) return;//alert('Opera')
			if(navigator.appName == 'Microsoft Internet Explorer')
			{
				var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})")
				if(re.exec(navigator.userAgent) != null) this.version = parseFloat( RegExp.$1 )
				this.major_version = Math.floor(this.version)
			}
		}
	}
	IE.set()
/*
	if(IE.ver == -1) alert("You're not using Internet Explorer.")
	else alert("You're using Internet Explorer Version = "+IE.ver)
*/

	// onload manager
	ONLOAD_MANAGER = 
	{
		_scripts : [],
		_init : window.onload = function(){ONLOAD_MANAGER._onload()},
		register : function(script)
			{this._scripts[this._scripts.length] = script},
		_onload : function()
			{for(var i=0;i<this._scripts.length;i++)eval(this._scripts[i])}
	}


	// anonimous object self referances: - thanks to Alexander J. Vincent for this code base
	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+']'}
}
