/**------------ FILE WiccJS.js  ------------------- ------------ THE NAVIGATION BAR  ----------------**/function barActOn( bar_num) {   document [barArray[bar_num].imgBarName].src = barArray[bar_num].onImgSrc;}function barActOff(num) {   var bar_num=num;   document [barArray[bar_num].imgBarName].src = barArray[bar_num].offImgSrc;}	//----------------  Bar Class -------------------------------------	function BarClass(num,offSrc,onSrc,liveSrc,refFile,altTag) {  // parameters:  // following lines are of use - if we would want to build ourselves  x3 image source file names   this.barNum=num;   this.offImgSrc= offSrc;  this.onImgSrc=onSrc;  this.liveImgSrc=liveSrc;   this.ref= refFile;   this.alt = altTag;			  	   	   		    this.imgBarName="bar"+ num; 	//e.g. "bar2"	   //methods:  this.setLive = setLive;						    this.display= display;  }function setLive()  { // Method of BarClass     // set img-src for the entered categoryNum  this.offImgSrc= this.liveImgSrc;  this.onImgSrc=this.liveImgSrc;}function setNormal() { //Method of BarClass (not in use!) opposite of set live   this.offImgSrc= this.srcBaseName + "1" + imgExt;  this.onImgSrc = this.srcBaseName + "2" + imgExt; }/** Method of BarClass - display the bar with all its features   the bar-instance  is displayed with it's according link and according  ActOn/Off function (e.g. mouse on/out) in the future may extend  to support alt-status. assumes being displayed within table-td already**/function display() { // have to create act On/off call with the actual barNum var actOnCall="barActOn("+ this.barNum + ")" ;   // = barActOn(j) var actOffCall="barActOff("+ this.barNum + ")" ; // = barActOff(j)	  document.write('<a href='); 	  document.write(this.ref); 	  document.write(' OnMouseOver='); 	  document.write(actOnCall); 	  document.write(' OnMouseOut='); 	  document.write(actOffCall);  	  document.write('>');  	  document.write('<img src="');	  document.write(this.offImgSrc);        	  document.write('" border="0" name=');	  document.write(this.imgBarName);	  document.write(' alt="');          document.write(this.alt);          document.write('">');	  document.write("</a>");}//--------------- Nav Class ---------------------------------------function NavClass(len) { // NavClass Class declaration	 this.navLen=len;	 //methods:	 this.setBarArray=setBarArray; // bar: barArray[j]=new BarClass(); 	 this.displayNav=displayNav;   //puts the navagation table frame 		 		    //and loops over all bar display each}function displayNav(categoryNum) { // NavClass Method - display navigator in a table// activate display method for each bar  document.write('<table cellpadding="15">');  document.write('<tr>');  document.write('<td valign="top">');  	  var k;	  barArray[categoryNum].setLive();	  for (k=1 ; k <= this.navLen  ; k++)	  {	   barArray[k].display();	   document.write('<br>');	 }document.write('</td>');   document.write('<td valign="top" align="left">');}//Closes the table for the navigation barfunction closeAll() {  document.write('</td>');  document.write('</tr>');  document.write('</TABLE>');}	//Function to open a popup windowfunction openPopWin(winDocFile) {     var winInst=null;     if((!winInst)||(winInst.closed==true)) {        features = 'toolbar,location,menubar=yes,scrollbars,resizable,status=no,directories=no';        features += ',width=' + xlen + ',height=' + ylen ; 	features += ',top=' + y + ',left=' + x ; 	winInst = window.open(winDocFile,"name1",features); //"menubar,scrollbars,resizable,width=420,height=400,top=20, left=300"        winInst.focus();    }	      else  {	if(winInst.document!=winDocFile) {           winInst = window.open(winDocFile,"name1")           winInst.focus();	 }    } // cover all remaining cases	     winInst.focus();}//Function to open a popup window without location and toolbarfunction openPlainWin(winDocFile) {     var alen,blen;     var winInst=null;     var agt=navigator.userAgent.toLowerCase();                 var is_ie=(agt.indexOf("msie") != -1);     if((!winInst)||(winInst.closed==true)) {        features = 'menubar=yes,scrollbars,resizable,status=no,directories=no';        features += ',width=' + xlen + ',height=' + ylen ; 	features += ',top=' + y + ',left=' + x ; 	winInst = window.open(winDocFile,"name1",features);        if (is_ie) {              alen = xlen * 1.05;             blen = ylen * 1.5;                 winInst.moveTo(x,y);             winInst.resizeTo(alen,blen);  }        winInst.focus();    }	      else  {	if(winInst.document!=winDocFile) {           winInst = window.open(winDocFile,"name1")           winInst.focus();	 }    } // cover all remaining cases    winInst.focus();}
