/**
 *  function for opening a new window
 *  
 *  @param url		filepath to new page, relative or absolute
 *  @param w			width of the new window
 *  @param h			height of the new window
 *  @param scroll	yes/no, if you want scrollbars on
 *  @param resize	yes/no, if you want window to be resizable
 */
function newWin(url,w,h,scroll,resize,newName) {
	var x = (screen.availWidth - w)/2;
    var y = (screen.availHeight - h)/2;
    var params = "toolbar=no,location=no,scrollbars=" + scroll + ",directories=no,status=no,menubar=no,resizable=" + resize + ",copyhistory=no,left=" + x + ",screenX=" + x + ",top=" + y + ",screenY=" + y + ",width=" + w + ",innerWidth=" + w + ",height=" + h + ",innerHeight=" + h;
    window.open(url,newName,params);
}

if (document.images) {
	var nav01off = new Image(); // for the inactive image
  	nav01off.src = "images/b_home.gif";
  	var nav01on = new Image(); // for the active image
  	nav01on.src = "images/b_home_on.gif";
	
  	var nav02off = new Image(); // for the inactive image
  	nav02off.src = "images/b_about.gif";
  	var nav02on = new Image(); // for the active image
  	nav02on.src = "images/b_about_on.gif";
  	
	var nav03off = new Image(); // for the inactive image
  	nav03off.src = "images/b_salon.gif";
  	var nav03on = new Image(); // for the active image
  	nav03on.src = "images/b_salon_on.gif";
	
	var nav04off = new Image(); // for the inactive image
  	nav04off.src = "images/b_spa.gif";
	var nav04on = new Image(); // for the active image
  	nav04on.src = "images/b_spa_on.gif";
	
	var nav05off = new Image(); // for the inactive image
  	nav05off.src = "images/b_products.gif";
  	var nav05on = new Image(); // for the active image
  	nav05on.src = "images/b_products_on.gif";
	
	var nav06off = new Image(); // for the inactive image
  	nav06off.src = "images/b_contact.gif";
  	var nav06on = new Image(); // for the active image
  	nav06on.src = "images/b_contact_on.gif";
	
	var nav07off = new Image(); // for the inactive image
  	nav07off.src = "images/b_directions.gif";
  	var nav07on = new Image(); // for the active image
  	nav07on.src = "images/b_directions_on.gif";
	
		var nav08off = new Image(); // for the inactive image
  	nav08off.src = "images/b_products.jpg";
  	var nav08on = new Image(); // for the active image
  	nav08on.src = "images/b_products_on.jpg";
}

function act(name) {
	if (document.images)
    	document.images[name].src = eval(name + 'on').src;
}

function inact(name) {
  	if (document.images)
    	document.images[name].src = eval(name + 'off').src;
}
