var http = getHTTPObject();  // Liveshot Bookings
var storyList = new Object();

// CREATE HTTP OBJECT
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}

function ViewPhoto(xw,xh,photo,title) {
w = xw+20;
h = xh+30;
d = window.open('','mywindow','width='+w+',height='+h+',left=200,top=200,resizable,scrollbars')
d.document.write('<html><body><head><meta http-equiv="imagetoolbar" content="no"><title>La Bella Donna '+title+'</title></head><div align="center"><img src = "../images/services/photos/'+photo+'.jpg" width="'+xw+'" height='+xh+'"/></div></body></html>');
d.window.focus();
d.window.document.close();
}

function copyright() {
	var mydate=new Date();
	var year=mydate.getYear();
	if (year < 1000)
	{year+=1900}
 document.write("&copy;"+year+" La Bella Donna Med-Spas of America &middot; Hickory, North Carolina &middot; 828-26SPA-MD"); 
}
function goServices(page) {
window.location.href = 'LaBellaDonnaServices.php?page='+page;
}
function switchBio(photo,show,hide1,hide2,hide3) {
document.getElementById(hide1).style.display='none';
document.getElementById(hide2).style.display='none';
document.getElementById(hide3).style.display='none';
document.getElementById(show).style.display='block';	
document.getElementById('photos').src='images/'+photo+'.jpg';
}




function getService(page) {
	
	var normal = '#FFFFFF';
	var highlight = '#C5D0FE';
	
	for(var i in showArray) {
	if (document.getElementById(showArray[i])) {
		document.getElementById(showArray[i]).style.backgroundColor = normal;
	}
	}
	
	if (document.getElementById(page)) {
		document.getElementById(page).style.backgroundColor = highlight;
	}

		
  var url = "load.php";
  http.open("POST", url);
  http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  sndvariables = "page="+page;
  http.send(sndvariables);
  http.onreadystatechange = HTTPloadPage;


}

function HTTPloadPage() {
		

  if ((http.readyState == 4) && (http.status == 200)) {
	  
	  document.getElementById('service').innerHTML = http.responseText;


}
}


