
<!-- 
/* 		One More Text Display - an Alternator
This script alternates a series of messages.  

You may use the JavaScript source code on your own personal web page 
provided that the copyright information remains in the source code. 

To use the script:

    1. Put the script where you want the text to appear in the document. 

    2. Change the DisplayLine values as described below.

    3. Add onLoad="Alternate()" to the BODY tag.

Copyright (c) by: Robert N Bovara All Rights Reserved.
*/
var agnt=navigator.userAgent.toLowerCase()
var opera=(agnt.indexOf("opera") != -1)
var webTV=(agnt.indexOf("webtv") != -1)
var hotjava=(agnt.indexOf("hotjava") != -1)
var layersok=(document.layers&&!hotjava)
var doc_all=(document.all&&!webTV)
var itsa5=(document.getElementById&&parseInt(navigator.appVersion)>=5) ? true : false;
var Lvl=(opera?0:(doc_all?2:(itsa5?3:(layersok?1:0))));

function araVob() { }
var DisplayLine = new araVob();
DisplayLine[1] = "Engineering the Highest Quality Machined Parts.";
DisplayLine[2] = "Fabricating Parts to Meet Your Specifications";
DisplayLine[3] = "Our goal is to exceed your expectations . . .";
DisplayLine[4] = "Innovation...Efficiency...Competitive Prices.";
DisplayLine[5] = "You need parts - SPS is your source.";
DisplayLine[6] = "On-site Service - On-time Delivery.";
var msgCnt = 6;			// set to number of last message to display.
/*
 to change or add messages, just replace values of or add to DisplayLine[n] 
 above.  Set msgCnt to number of lines.
*/
var DisplayTime = 3000;		// time message is displayed (in milliseconds)
var classfntsize="12"		// font-size for scripted text	
var classfntfam="arial,helvetica,sans-serif"	//font-family
var classfntwgt=700		// font-weight

var id4css="jsid4Alternator"
var id4layer="AlternatId"
var id4class="Alternat"
var sTag="<DIV id='"+id4layer+"'>"
var eTag="<\/DIV>"
var msgNum = 1;
var DispMsg=""
var msg = DisplayLine[1];
var Lth=msg.length

function DisplayMsg() {
 DispMsg="<p class='"+id4class+"'><nobr>"+msg+"<\/nobr><\/p>"
 if (Lvl>2){
  layur.firstChild.replaceData(0,Lth,msg)  
 }
 else if (Lvl==2) {
   layur.innerHTML=DispMsg
 }
 else if (Lvl==0){
   self.document.forms[0].elements[0].value=msg;
 }
 else {	// Lvl==1
  if (self.innerWidth != strtWidth) {
   window.location.reload()
  }
  else {
   layur.document.write(DispMsg)
   layur.document.close()
  }
 }
 setTimeout("ChangeMsg()",DisplayTime);
}

function ChangeMsg() {
 msgNum++;
 if (msgCnt < msgNum) {
  msgNum = 1;}
 msg = DisplayLine[msgNum];
 DisplayMsg();
}

function NNlode(){
 if (self.innerWidth!= strtWidth||self.innerHeight!=strtHeight) {
  window.location.reload()
 }
}

for (var x=1; x<=msgCnt; x++){
 if (DisplayLine[x].length>Lth) Lth=DisplayLine[x].length
}
if (Lvl>0) {
 //if (screen.width < 700) {classfntsize="8";}
 //if (screen.width > 800) {classfntsize="14";}
 //if (classfntsize>10) classfntwgt=500
 var Wdth=classfntsize*Lth
 classfntsize+="pt"
 document.writeln("<STYLE ID='"+id4css+"' TYPE='text\/css'><\/style>")
 if (Lvl==1) {
  sTag="<ilayer id='"+id4layer+"'><layer id='"+id4class+"' left=0 top=0 width="+Wdth+">"
  eTag="<\/layer><\/ilayer>"
  eval("document.classes."+id4class+".all.fontFamily=classfntfam;")
  eval("document.classes."+id4class+".all.fontSize=classfntsize;")
  eval("document.classes."+id4class+".all.fontWeight=classfntwgt;")
 }
 else if (Lvl==2) {
  eval("document.styleSheets['"+id4css+"'].addRule ('body', 'overflow:scroll;')")
  eval("document.styleSheets['"+id4css+"'].addRule ('#'+id4layer, 'position:absolute;')")
  eval("document.styleSheets['"+id4css+"'].addRule ('.'+id4class, 'font-family:'+classfntfam)")
  eval("document.styleSheets['"+id4css+"'].addRule ('.'+id4class, 'font-size:'+classfntsize)")
  eval("document.styleSheets['"+id4css+"'].addRule ('.'+id4class, 'font-weight:'+classfntwgt)")
 }
 document.writeln(sTag+eTag)
 document.write("<span class='"+id4class+"' id='"+id4class+"'> <br><\/span>")
 eval("layur =(Lvl==2?document.all."+id4layer+":(Lvl==3?document.getElementById('"+id4class+"'):(Lvl==1?document."+id4layer+".document."+id4class+":'')));")
}
else{
document.write(" <p><form name= 'msgform' action=' '>"
 +"<input class='form' type='text' name='message'"
 +" size=70 value=' Powered by JavaScript (or JScript).'"
 +" usestyle bgcolor='#fffff0' readonly><\/form><\/p><\/center>")
}

function Alternate(){
 if (Lvl==1){
  strtWidth = innerWidth;
  strtHeight = innerHeight;
  self.onresize=NNlode
 }  
 if (Lvl>2){
  layur.style.fontFamily=classfntfam
  layur.style.fontSize=classfntsize
  layur.style.fontWeight=classfntwgt
 }
 DisplayMsg()
}

// -->
