/* functions to open a new window and center it also not a function to close the window */



//global variable to store a reference to the window

var newWin;

//style sheet change add a class file = to equipment to allow the change to take place
function menuon(name,cssref) {
	document.getElementById(name).className=cssref;
	}
function menuoff(name) {
	//document.getElementById(name).className='highlightoff';
	}

function childwindow(url,winname,w,h,bar)
{
windowleft = (screen.width -w)/2;
windowtop = (screen.height -h)/2;

settings = '"toolbar=no,directories=no,menubar=no,scrollbars='+bar+',resizable=no,status=no,width='+w+',height='+h+',left='+windowleft+',top='+windowtop+'"';
closeWindow();
newWin = window.open(url,winname,settings);
newWin.focus();

}

/* function closes the window */
function closeWindow() {
	if (newWin && !newWin.closed) {
		newWin.close();
	}
}
function childwindow2(url,winname,w,h)
{
windowleft = (screen.width -w)/2;
windowtop = (screen.height -h)/2;

settings = '"toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=no,status=no,width='+w+',height='+h+',left='+windowleft+',top='+windowtop+'"';
closeWindow();
newWin = window.open(url,winname,settings);
newWin.focus();

}

/* function closes the window */
function closeWindow() {
	if (newWin && !newWin.closed) {
		newWin.close();
	}
}

/*function to display text in the status toolbar */

function navstatus(msg) {

window.status=msg;
return true;
}

//main interior preview rollovers
 var pics = new Array("images/popup/rollover/image1.jpg","images/popup/rollover/image2.jpg");
 
 // create an empty array
 var preload = new Array();
 
 // create the preload with a new image object
 for(var i =0; i <pics.length; i++)
 {	
 	preload[i] = new Image();
	preload[i].src = pics[i];
 }
 
 
function swap(n)
 {
	 
switch(n)
	 {
	case 1 : document.images.image1.src="images/popup/rollover/image2.jpg";
	break;
	case 2 : document.images.image2.src="images/popup/rollover/image2.jpg";
	break;
	case 3 : document.images.image3.src="images/popup/rollover/image2.jpg";
	break; 
	
	 }
 }
 