// PUT ALL GLOBAL FUNCTIONS HERE!


function newsPop(whatNews) {
	return window.open('newsPop.asp?news='+whatNews,'Image','width=640,height=580,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,resizable=no');
}

function newPopother(whatImage) {
	return window.open('popUpother.asp?image='+whatImage,'Image','width=326,height=400,status=no,scrollbars=no,toolbar=no,location=no,menubar=no,resizable=no');
}


// browObj()
// heavily modified version of the lib_bwcheck() from dhtmlcentral.com
// usage: var b = new browObj(); if(b.ie5)
function browObj() { 
	// break up the vital info about the browser into usable chunks
	this.ver	= navigator.appVersion.toLowerCase();
	this.agent	= navigator.userAgent.toLowerCase();
	this.plat	= navigator.platform.toLowerCase();
	this.mac	= (this.agent.indexOf("mac")>-1);
			
	// start specific browser testing
	this.dom	= document.getElementById ? true:false;
	this.opera5	= (this.agent.indexOf("opera")>-1 && document.getElementById) ? true:false;
	this.ie5	= (this.ver.indexOf("msie 5")>-1 && this.dom && !this.opera5) ? true:false; 
	this.ie6	= (this.ver.indexOf("msie 6")>-1 && this.dom && !this.opera5) ? true:false;
	this.ie4	= (document.all && !this.dom && !this.opera5) ? true:false;
	this.ie		= (this.ie5 || this.ie6);
	this.ns6	= (this.dom && parseInt(this.ver) >= 5) ? true:false; 
	this.ns4	= (document.layers && !this.dom) ? true:false;
	this.ieMac	= (this.ie5 && this.mac);
	this.nMac	= (this.ns4 && this.mac);

	// define what is an acceptable browser
	// for our case it must be ie5+ ns6
	this.isAcceptable = (this.ie6 || this.ie5 || this.ns6 || this.ieMac);
	return this;
} // end browObj()

// instatiate a new browser object
var b = new browObj()

// flashObj()
// builds the code to write out a flash movie based on the 
// width,height and source passed to it
function flashObj(w,h,s) {
	this.width 	= w;
	this.height	= h;
	this.source = s;
	
	// build the output string
	this.output  =  "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" id=\"fla\" width=\""+this.width+"\" height=\""+this.height+"\">";
	this.output += "		<param name=\"movie\" value=\""+this.source+"\">";
	this.output += "		<param name=\"quality\" value=\"high\">";
	this.output += "		<param name=\"menu\" value=\"false\">";
	this.output += "		<embed src=\""+this.source+"\" quality=\"high\" menu=\"false\" width=\""+this.width+"\" height=\""+this.height+"\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>";
	this.output += "</object>";	
	
	return this;	
} // end flashObj()
