
// ------------------ begin a class - standard js additions --------------------------//
// -------------- this must come first in the first js include -----------------------//
function a(){
	this.onloadList = new Array();
	this.onloadRun = function(){
		for(iArgs=0;iArgs < arguments.length;iArgs++){
			this.onloadList[this.onloadList.length] = arguments[iArgs];
		}
		
	}
	this.runOnloadList = function(){
		for(iRun=0;iRun < this.onloadList.length;iRun++){
			if(typeof(this.onloadList[iRun])=='string'){
				eval(this.onloadList[iRun]);
			}else{
				this.onloadList[iRun]();
			}
		}
	}

	this.getTagsByClassName = function( sTagName, sClassName ) {
		var tags = document.getElementsByTagName( sTagName );
		var tagsReturn = new Array();
		var regExp = new RegExp( '\\b' + sClassName + '\\b' );
		for( var iTag = tags.length - 1; iTag >= 0; iTag-- ) {
			var tag = tags[ iTag ];
			if( regExp.test( tag.className ) ) {
				tagsReturn.push( tag );
			}
		}
		return tagsReturn;
	}
	
	this.popWindow = function(popURL, height, width){
		theWindow=window.open( popURL, "theWindow", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + width + ",height=" + height + "");
		theWindow.opener=self;
		setTimeout("theWindow.focus();",200);
	}
	
	this.navTo = function(theLocation){
		window.location = theLocation;
	}
}
a = new a();
// ------------------ end a class - standard js additions --------------------------//


function flash(path, width, height, bgcolor){
	this.defaultFilePath = path;
	this.defaultBgcolor = bgcolor;
	this.defaultWidth = width;
	this.defaultHeight = height;
	this.insert = function(swfFileName, swfWidth, swfHeight, bgcolor, alternatePath){
		alternatePath? usePath = alternatePath: usePath = this.defaultFilePath;
		bgcolor? useColor = bgcolor: useColor = this.defaultBgcolor;
		swfWidth? useWidth = swfWidth: useWidth = this.defaultWidth;
		swfHeight? useHeight = swfHeight: useHeight = this.defaultHeight;
		var objectHtml = ''
		+ '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
		+ 'WIDTH="' + useWidth + '" HEIGHT="' + useHeight + '"'
		+ 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
		+ '<PARAM NAME="MOVIE" VALUE="' + usePath + swfFileName + '"/>'
		+ '<PARAM NAME="PLAY" VALUE="true"/>'
		+ '<PARAM NAME="LOOP" VALUE="false"/>'
		+ '<PARAM NAME="QUALITY" VALUE="high"/>'
		+ '<PARAM NAME="MENU" VALUE="false"/>'
		+ '<param name="bgcolor" value="' +  useColor + '"/>'
		+ '<EMBED SRC="' + usePath + swfFileName + '"'
		+ 'WIDTH="' + useWidth + '" HEIGHT="' + useHeight + '"'
		+ 'PLAY="true"'
		+ 'LOOP="false"'
		+ 'QUALITY="high"'
		+ 'MENU="false"'
		+ 'BGCOLOR="'+ useColor + '"'
		+ 'TYPE="application/x-shockwave-flash"'
		+ 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
		+ '</EMBED>'
		+ '</OBJECT>';
		document.write(objectHtml);
	}
}
