
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function preloadImages() {
	if (document.images) {
		img1 = newImage("images/home.gif");
		img1_on = newImage("images/home_on.gif");
		img2 = newImage("images/procedures.gif");
		img2_on = newImage("images/procedures_on.gif");
		img3 = newImage("images/experience.gif");
		img3_on = newImage("images/experience_on.gif");
		img4 = newImage("images/contact.gif");
		img4_on = newImage("images/contact_on.gif");
		img5 = newImage("images/botox.jpg");
		img5_on = newImage("images/botox_on.jpg");
		img6 = newImage("images/restylane.jpg");
		img6_on = newImage("images/restylane_on.jpg");
		img7 = newImage("images/sculptra.jpg");
		img7_on = newImage("images/sculptra_on.jpg");	
		img8 = newImage("images/radiesse.jpg");
		img8_on = newImage("images/radiesse_on.jpg");
		img9 = newImage("images/artefill.jpg");
		img9_on = newImage("images/artefill_on.jpg");	
		img10 = newImage("images/juvedermu.jpg");
		img10_on = newImage("images/juvedermu_on.jpg");	
		img11 = newImage("images/juvedermp.jpg");
		img11_on = newImage("images/juvedermp_on.jpg");
		img12 = newImage("images/perlane.jpg");
		img12_on = newImage("images/perlane_on.jpg");
		img13 = newImage("images/news.gif");
		img13_on = newImage("images/news_on.gif");
		img14 = newImage("images/skincare.gif");
		img14_on = newImage("images/skincare_on.gif");
		
		preloadFlag = true;
  }
}


function WM_netscapeCssFix() {
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  // This function checks to make sure the version of Netscape 
  // in use contains the bug; if so, it records the window's 
  // width and height and sets all resize events to be handled 
  // by the WM_netscapeCssFix() function.
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn()

function showItem(item){
  if (document.getElementById && document.body.style) {
    theLast = document.getElementById(lastItem);
    theItem = document.getElementById(item);
    theLast.style.visibility = "hidden";
    theItem.style.visibility = "visible";
  }
  else if (document.all) {
    theLast = document.all(lastItem).style;
    theItem = document.all(item).style;
    theLast.visibility = "hidden";
    theItem.visibility = "visible";
    } 
  else if (document.layers) {
    theLast = document.layers[lastItem];
    theItem = document.layers[item];
    theLast.visibility = "hide";
    theItem.visibility = "show";
    } 
  lastItem = item;  
}




/*
			<a href="index.html" 
			onmouseover="changeImages('home', img1_on.src); return true;"
			onmouseout="changeImages('home', img1.src); return true;">
			<img name="home" src="images/home.gif" width=112 height=27 border=0></a>
			<a href="procedures.html"
			onmouseover="changeImages('procedures', img2_on.src); return true;"
			onmouseout="changeImages('procedures', img2.src); return true;">
			<img name="procedures" src="images/procedures.gif" width=112 height=27 border=0></a>
			<a href="experience.html"
			onmouseover="changeImages('experience', img3_on.src); return true;"
			onmouseout="changeImages('experience', img3.src); return true;">
			<img name="experience" src="images/experience.gif" width=112 height=27 border=0></a>
			<a href="contact.html"
			onmouseover="changeImages('contact', img4_on.src); return true;"
			onmouseout="changeImages('contact', img4.src); return true;">
			<img name="contact" src="images/contact.gif" width=112 height=27 border=0></a>      
*/