// Dynamic rollover script
function init(){
	//var item = document.getElementById("img1").className;
	//alert(item);
	var imgArray = new Array();
	var imgcount = document.getElementsByTagName('img');
	for (var i = 0; i < imgcount.length; i++){
// if the class is img, build rollover
		if (imgcount[i].className == "img") {
			var n = imgcount[i].getAttribute('id');
		//set, in array, name of the original src
			imgArray[n] = imgcount[i].getAttribute('src');
		// this sets original source and onmouseover events
			imgcount[i].src = imgArray[n];
			imgcount[i].style.visibility = "visible";
			imgcount[i].onmouseover = function(){
				imgOriginSrc = this.getAttribute('src');
				imgNewSrc = imgOriginSrc.slice(0, -8)+"_on.gif";
				this.setAttribute('src', imgNewSrc);
			}
			imgcount[i].onmouseout = function() {
				this.setAttribute('src',imgOriginSrc);
	        }
		}

// if the imgon is set, then make the image static, w/o rollover states
		if (imgcount[i].className == "imgon"){
			var n = imgcount[i].getAttribute('id');
			imgArray[n] = imgcount[i].getAttribute('src');
		// this sets original source 
			imgcount[i].src = imgArray[n].slice(0, -8)+"_on.gif";
			imgcount[i].style.visibility = "visible";
		}
	}
}

/* visibility function */
function setVisibility(objId, sVisibility) {
var obj = document.getElementById(objId);
obj.style.visibility = sVisibility;
}


// window open script
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
/* <a href="ny_menu3.html" onclick="NewWindow(this.href,'mywinname','640','400','no','center');return false" onfocus="this.blur()">view menu</a> */
