var bgslides=new Array()
bgslides[0]="/images/background_header_12.gif" //consultation
bgslides[1]="/images/background_header_14.gif" //newbeauty winter-spring 2010
bgslides[2]="/images/background_header_13.gif" //podcast
//bgslides[2]="/images/background_header_11.gif" //newbeauty winter-spring 2010
bgslides[3]="/images/background_header_7.gif" //cool lipo
bgslides[4]="/images/background_header_4.gif" //boomers face
bgslides[5]="/images/background_header_2.gif" //silicone

var speed=10000
var processed=new Array()
for (i=0;i<bgslides.length;i++){ processed[i]=new Image(); processed[i].src=bgslides[i] }
var inc=-1

function slideback() { 
  if (inc<bgslides.length-1) inc++;
    else inc=0;
  headerarea = document.getElementById("homeHeader3");
  headerarea.style.background='url('+bgslides[inc]+')';
  eval("createleadStory" + [inc] + "Map()");
}

if (document.all||document.getElementById) window.onload=new Function('setInterval("slideback()",speed)')

// consultation
function createleadStory0Map () {
  var formTop = document.createElement("AREA")
  formTop.href = "/"
  formTop.onclick = function() { divwin=dhtmlwindow.open('divbox', 'div', 'contactdiv', 'Contact Parungao Plastic Surgery', 'width=229px,height=380px,left=400px,top=50px,resize=0,scrolling=0'); return false; }
  formTop.coords = "3,14,346,77"
  formTop.target = "_blank"
  var formBottom = document.createElement("AREA")
  formBottom.href = "/"
  formBottom.onclick = function() { divwin=dhtmlwindow.open('divbox', 'div', 'contactdiv', 'Contact Parungao Plastic Surgery', 'width=229px,height=380px,left=400px,top=50px,resize=0,scrolling=0'); return false; }
  formBottom.coords = "109,243,337,267"
  formBottom.target = "_blank"
  clearImageMap()
  mapObj = document.getElementById("homeMap0")
  mapObj.appendChild(formTop)
  mapObj.appendChild(formBottom)
}

// newbeauty spring-summer 2010
function createleadStory1Map () {
  docprofileX = document.createElement("AREA")
  docprofileX.href = "/documents/100318-parungao_nb17_v20.pdf"
  docprofileX.coords = "36,226,372,270"
  docprofileX.target = "_blank"
  newbeautyX = document.createElement("AREA")
  newbeautyX.href = "http://www.newbeauty.com/parungao"
  newbeautyX.coords = "374,89,512,297"
  newbeautyX.target = "_blank"
  clearImageMap()
  mapObj = document.getElementById("homeMap0")
  mapObj.appendChild(docprofileX)
  mapObj.appendChild(newbeautyX)
}

function createleadStory2Map () {
  podcast = document.createElement("AREA")
  podcast.href = "/"
  podcast.onclick = function() { divwin=dhtmlwindow.open('divbox', 'div', 'podcastdiv', 'Dr. Parungaos podcast', 'width=430px,height=188px,left=400px,top=50px,resize=0,scrolling=0'); return false; }
  podcast.coords = "180,199,367,227"
  podcast.target = "_self"
  clearImageMap()
  mapObj = document.getElementById("homeMap0")
  mapObj.appendChild(podcast)
}

function createleadStory3Map () {
  coollipo = document.createElement("AREA")
  coollipo.href = "/body-contouring/liposuction#cool"
  coollipo.coords = "185,177,363,197"
  coollipo.target = "_self"
  clearImageMap()
  mapObj = document.getElementById("homeMap0")
  mapObj.appendChild(coollipo)
}

function createleadStory4Map () {
  read = document.createElement("AREA")
  read.href = "/content.cfm?id=34"
  read.coords = "6,101,139,132"
  photogallery = document.createElement("AREA")
  photogallery.href = "content.cfm?id=14"
  photogallery.coords = "240,266,445,291"
  clearImageMap()
  mapObj = document.getElementById("homeMap0")
  mapObj.appendChild(read)
  mapObj.appendChild(photogallery)
}

// 
function createleadStory5Map () {
  getfacts = document.createElement("AREA")
  getfacts.href = "/content.cfm?id=41"
  getfacts.coords = "5,96,134,119"
  photogallery = document.createElement("AREA")
  photogallery.href = "content.cfm?id=14"
  photogallery.coords = "269,264,464,293"
  clearImageMap()
  mapObj = document.getElementById("homeMap0")
  mapObj.appendChild(getfacts)
  mapObj.appendChild(photogallery)
}

function clearImageMap () {
  mapObj = document.getElementById("homeMap0")
  while (mapObj.childNodes.length) {
    mapObj.removeChild(mapObj.firstChild)
  }
}
