
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()


//Here are the variables you have to set:                                                                 
// 0 = WriteText
// 1 = RemoveText
wWorks = 0

var wText = "\<p>&nbsp;\<p><b>Ask not for Victory\<br>Ask for Courage\<br>For if you Endure,\<br>you bring honor\<br>to us all,\<br>but even more,\<br>you bring honor\<br>to yourself.\<br>&nbsp;<br>&nbsp;<br>&nbsp;&nbsp;" //text
var wFontsize = 13           
var wColor = "#ffffff"       
var wAlign = "center"       
var wSpeed = 40             //speed you want it to write in (ms between each letter)
var wFont = 'lucida calligraphy,lucida handwriting,Trebuchet MS,arial,helvetica,sans-serif'
var wHide = false             //do you want it to hide when its done? (true or false)
var wHidewait = 0         //Set the time you want it to wait before it hides
        
/*You can remove this if you don't wan't it to start right away.
You can have it start if someone clicks a link (make a link like this:
<a href="#" onclick="writeInit()">Click to writetext</a>)*/
	onload = writeInit;

//Object functions
function makeWriteObj(obj,text,size,color,align,speed,font,hide,hidewait,works){
   	this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
   	this.writeref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;	
	this.text=text; this.size=size; this.color=color; this.align=align; this.speed=speed;
	this.font=font; this.hide=hide; this.hidewait=hidewait; this.writeWrite=b_writeWrite;
	this.writeText=b_writeText; this.removeText=b_removeText; this.works=works; this.write=b_write
	if(bw.dom || bw.ie4){ //Setting the style properties
		this.css.fontFamily=this.font; this.css.fontSize=this.size+"px"; this.css.color=this.color;
		this.css.textAlign=this.align
	}
	this.obj = obj + "Object"; 	eval(this.obj + "=this"); return this
}
function b_write(num,fn){
	if(!fn) fn=""
	if(!this.works) this.writeText(num,fn) 
	else this.removeText(fn)
}
function b_writeWrite(text){
	if(bw.ns4){
		this.writeref.write('<p style="text-align:'+this.align+'; font-size:' +this.size+'px; font-family:'+this.font+'; color:'+this.color+';</p>')
		this.writeref.close()
	}else this.writeref.innerHTML = text
}
function b_writeText(num,fn){
	if (num<=this.text.length){
		wtext = this.text.substr(0,num)
		this.writeWrite(wtext)
		num ++
		setTimeout(this.obj+".writeText("+num+",'"+fn+"')",this.speed)
	}else{
		if(this.hide) setTimeout(this.obj+".css.visibility='hidden'",this.hidewait);
		eval(fn)
	}
}
function b_removeText(fn){
	if (this.text.length>0){
		this.text = this.text.slice(0,this.text.length-1)
		this.writeWrite(this.text)
		setTimeout(this.obj+".removeText('"+fn+"')",this.speed)
	}else{
		if(this.hide) setTimeout(this.obj+".css.visibility='hidden'",this.hidewait);
		eval(fn)
	}
}
/*Initiates the object, shows it and starts the zoom
****************************************************************************/
function writeInit(){
	if(bw.bw){
		oWrite = new makeWriteObj('divWrite',wText,wFontsize,wColor,wAlign,wSpeed,wFont,wHide,wHidewait,wWorks)
		//Change the line below to: oWrite.write(0) if you only have one object.
		oWrite.write(0,'oWrite2.css.visibility="visible";oWrite2.write(0)')
		oWrite.css.visibility = "visible"

		//Another object, just remove this line if you only want one object.
		oWrite2 = new makeWriteObj('divWrite2',"\<a href=\"comcenter_news.html\" target=\"_self\"><p>&nbsp\<br>Click here\<br>if you would like to read\<br>the latest news and raves\<br>about Field Armor.<\/a>",12,"#FFFFFF","center",40,"arial, helvertica, sans-serif",0,5500,0)
	}
}

	onload = writeInit;


