<!--

if (document.images) {

nav_homeRO = new Image
nav_home = new Image
nav_aboutUsRO = new Image
nav_aboutUs = new Image
nav_contactUsRO = new Image
nav_contactUs = new Image
nav_findADentistRO = new Image
nav_findADentist = new Image
nav_sleepResourcesRO = new Image
nav_sleepResources = new Image
nav_latestNewsRO = new Image
nav_latestNews = new Image
nav_otherProductsRO = new Image
nav_otherProducts = new Image
nav_viewAppRO = new Image
nav_viewApp = new Image
nav_patientsAndFamilyRO = new Image
nav_patientsAndFamily = new Image
nav_dentalProfessionalsRO = new Image
nav_dentalProfessionals = new Image
nav_medicalProfessionalsRO = new Image
nav_medicalProfessionals = new Image

nav_homeRO.src = "images/nav_homeRO.gif"
nav_home.src = "images/nav_home.gif"
nav_aboutUsRO.src = "images/nav_aboutUsRO.gif"
nav_aboutUs.src = "images/nav_aboutUs.gif"
nav_contactUsRO.src = "images/nav_contactUsRO.gif"
nav_contactUs.src = "images/nav_contactUs.gif"
nav_findADentistRO.src = "images/nav_findADentistRO.gif"
nav_findADentist.src = "images/nav_findADentist.gif"
nav_sleepResourcesRO.src = "images/nav_sleepResourcesRO.gif"
nav_sleepResources.src = "images/nav_sleepResources.gif"
nav_latestNewsRO.src = "images/nav_latestNewsRO.gif"
nav_latestNews.src = "images/nav_latestNews.gif"
nav_otherProductsRO.src = "images/nav_otherProductsRO.gif"
nav_otherProducts.src = "images/nav_otherProducts.gif"
nav_viewAppRO.src = "images/nav_viewAppRO.gif"
nav_viewApp.src = "images/nav_viewApp.gif"
nav_patientsAndFamilyRO.src = "images/nav_patientsAndFamilyRO.gif"
nav_patientsAndFamily.src = "images/nav_patientsAndFamily.gif"
nav_dentalProfessionalsRO.src = "images/nav_dentalProfessionalsRO.gif"
nav_dentalProfessionals.src = "images/nav_dentalProfessionals.gif"
nav_medicalProfessionalsRO.src = "images/nav_medicalProfessionalsRO.gif"
nav_medicalProfessionals.src = "images/nav_medicalProfessionals.gif"

}

else {

nav_homeRO.src = ""
nav_home.src = ""
document.homes.src = ""
nav_aboutUsRO.src = ""
nav_aboutUs.src = ""
document.bio.src = ""
nav_contactUsRO.src = ""
nav_contactUs.src = ""
document.contactUs.src = ""
nav_findADentistRO.src = ""
nav_findADentist.src = ""
document.findADentist.src = ""
nav_sleepResourcesRO.src = ""
nav_sleepResources.src = ""
document.sleepResources.src = ""
nav_latestNewsRO.src = ""
nav_latestNews.src = ""
document.latestNews.src = ""
nav_otherProductsRO.src = ""
nav_otherProducts.src = ""
document.otherProducts.src = ""
nav_viewAppRO.src = ""
nav_viewApp.src = ""
document.viewApp.src = ""
nav_patientsAndFamilyRO.src = ""
nav_patientsAndFamily.src = ""
document.patientsAndFamily.src = ""
nav_dentalProfessionalsRO.src = ""
nav_dentalProfessionals.src = ""
document.dentalProfessionals.src = ""
nav_medicalProfessionalsRO.src = ""
nav_medicalProfessionals.src = ""
document.medicalProfessionals.src = ""

}

// -->
 

 //display or hide container
 function fnVisible(objContainer) {
	var obj = document.getElementById(objContainer);
	if (obj.style.display == "block") {
		obj.style.display = "none";
	} else {
		obj.style.display = "block";
	}
 }

 function setVisible(objContainer,status) {
	var obj = document.getElementById(objContainer);
	obj.style.display = status;
 }
 
  function setVisible3(objContainer,status) {
	var obj = document.getElementById(objContainer);
	opacity('tools', 83, 0, 500);
	// alert("test");
	obj.style.display = status;

 }
 
 function setVisible2(objContainer,status) {
	var obj = document.getElementById(objContainer);
	// alert(obj.style.display);
	if (obj.style.display == "none") {
	 obj.style.display = status;
	 mytime=setTimeout("setVisible3('tools','none')",3000);
     opacity('tools', 0, 83, 500);
	}
 }
 
 function setVisible4(objContainer,status) {
	var obj = document.getElementById(objContainer);
	// alert(obj.style.display);
	if (obj.style.display == "none") {
	 obj.style.display = status;
	 mytime=setTimeout("setVisible5()",12000);
     opacity('popup', 0, 98, 1000);
	}
 }
 
 function setVisible5(){
 	opacity("popup",98,0,1000);
 	mytime=setTimeout("fnVisible('popup')",1000);
  }
 
function test1() {
	mytime=setTimeout("test2()",5000);
    opacity('tools', 0, 83, 500);
}

function test2() {
    opacity('tools', 83, 0, 500);
}




function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 