/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
********************************************************************************/
function checkBrowser(){
 this.ver=navigator.appVersion
 this.dom=document.getElementById?1:0
 this.ie5=(this.ver.indexOf("MSIE")>-1 && this.dom)?1:0;
 this.ie4=(document.all && !this.dom)?1:0;
 this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
 this.ns4=(document.layers && !this.dom)?1:0;
 //added
 this.ie4mac=this.ie4 && navigator.userAgent.indexOf("Mac")>-1
 this.ie5mac=this.ie5 && navigator.userAgent.indexOf("Mac")>-1
 this.ie55=(this.ver.indexOf("MSIE 5.5")>-1 && this.dom)?1:0;
 this.ns=this.ns4 || this.ns5 
 this.bw=this.ns || this.ie4 || this.ie5 || this.ie55
 return this
 }
bw=new checkBrowser()

numItems	=5 //How many menuitems do you want?
circleXstart=610 //Where should the circle start and end, x position
circleYstart=25 //Where should the circle start and end, y position
circleXoffset=120 //The offset between the buttons X position and the circles X position on mouseover
circleYoffset=0 //The offset between the buttons Y position and the circles Y position on mouseover
circlePXspeed=8 //How many pixels the circle will move per timeout
circleTspeed=10 //Timeout speed in milliseconds
circleStay=1 //Set this to 0 if you don't want the circle to stay on the active link when a link is clicked.
//NOTE: To set the placement of the buttons, see the slideball_init() function!

function preload(){
 for (i=0;i<arguments.length;i++){this[i]=new Image();this[i].src=arguments[i]}
 return this
 }

//Cross-browser object part...You should not need to edit anything this part.
function makeObj(obj,nest){
 nest=(!nest)?'':'document.'+nest+'.'  
 this.css=bw.dom?document.getElementById(obj).style:(!bw.ns)?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
 this.ref=bw.ns4?this.css.document:document;
 this.evnt=bw.dom?document.getElementById(obj):(!bw.ns)?document.all[obj]:bw.ns4?this.css:0;
 this.showIt=b_showIt; 
 this.moveIt=b_moveIt; 
 this.slide=b_slide; 
 this.slideIt=b_slideIt;   
 this.obj=obj+"Object";  
 eval(this.obj+"=this"); 
 return this
 }
function b_showIt(){this.css.visibility="visible"}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x;this.css.top=this.y}
function b_slideIt(endx,endy,inc,speed,fn,wh) {
 if (!this.slideactive) {
  var distx=endx-this.x;
  var disty=endy-this.y
  var num=Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc
  var dx =distx/num;
  var dy =disty/num; 
  this.slideactive=1; 
  this.slide(dx,dy,endx,endy,speed,fn,wh)
  }
 }
function b_slide(dx,dy,endx,endy,speed,fn,wh) {
 if (!fn) fn=null;
 if (!wh) wh=null;
 if (this.slideactive && (Math.floor(Math.abs(dx))<Math.floor(Math.abs(endx-this.x)) || 
Math.floor(Math.abs(dy))<Math.floor(Math.abs(endy-this.y)))) {
  this.moveIt(this.x+dx,this.y+dy); 
  eval(wh)
  slidTim=setTimeout(this.obj+".slide("+dx+","+dy+","+endx+","+endy+","+speed+",'"+fn+"','"+wh+"')",speed)
  }
 else {
  this.slideactive=0;
  this.moveIt(endx,endy);eval(fn)
  }
 }

//The init function. This is where you set the placement of the Buttons.
function Ball_init(){
 oBut=new Array()
 for(i=0;i<=numItems;i++) oBut[i]=new makeObj('dButt'+i)
 oCircle=new makeObj('ball')
 //Set the placement of each individual button below.
 //Syntax: oBut[num].moveIt(xplacement,yplacement)
 xx=bw.ns?-10:-4
 oBut[0].moveIt(xx,150) 
 oBut[1].moveIt(xx,170)
 oBut[2].moveIt(xx,200)
 oBut[3].moveIt(xx,220)
 oBut[4].moveIt(xx,250)
 oBut[5].moveIt(xx,270)
 oCircle.moveIt(circleXstart,circleYstart)
 //Showing the buttons
 for(i=0;i<=numItems;i++) {oBut[i].showIt()}
 }

//Mouseover and mouseout functions.
var slidTim=100;
var active=-1
function movr(num){
 clearTimeout(slidTim)
 oBut[num].ref["pic"+num].src=aPic1[num].src
 oCircle.slideactive=false
 oCircle.slideIt(oBut[num].x+circleXoffset,oBut[num].y+circleYoffset,circlePXspeed,circleTspeed)
 }
function mout(num){
 clearTimeout(slidTim);
 oCircle.slideactive=false;
 if(active>-1 && circleStay) 
  oCircle.slideIt(oBut[active].x+circleXoffset,oBut[active].y+circleYoffset,circlePXspeed,circleTspeed)
 else oCircle.slideIt(circleXstart,circleYstart,circlePXspeed,circleTspeed);
 oBut[num].ref["pic"+num].src=aPic[num].src
 }
function mclk(num){active=num}

//Starting the script when the balls load.
if(bw.bw) onload=Ball_init;
document.write('<meta name="title" content="Zenith Label Printing Specialist">\n');
document.write('<meta name="review" content="Uses HTML, Javascript & ASP, DIV tag for animation">\n');
document.write('<META NAME="keywords" CONTENT="printing,silk screening,labels,barcode,stamping of precision insulators,special materials,ISO 9001,UL Underwriter Laboratories Inc,CSA Canadian Standards Association,supplier,zenith">\n');
document.write('<meta name="description" content="Specialist in printing, silk-screening and stamping of precision insulators and special materials. ISO 9001 certified. Qualified to print UL (Underwriter Laboratories Inc) and CSA (Canadian Standards Association) approval labels.">\n');
document.write('<META NAME="author" CONTENT="Zenith Label Printing Company">\n');

