function openCentered(theURL,winName,winWidth,winHeight,features) {
	var w = (screen.width - winWidth)/2;
	var h = (screen.height - winHeight)/2 - 30;
	features = features+',width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
	exitstat = window.open(theURL,winName,features);
}

function ChangeLocation(loc) {
	switch (loc) {
		case 1: location.href = '/corporate.asp'; break;
		case 2: location.href = '/medical.asp'; break;
		case 3: location.href = '/government.asp'; break;
		case 4: location.href = '/schools.asp'; break;
		case 5: location.href = '/associations.asp'; break;
		case 6: location.href = '/international_lists.asp'; break;
	}
	return false;
}

function ChangeWebsite(loc) {
	switch (loc) {
		case 1: location.href = 'http://www.mdselect.com'; break;
		case 2: location.href = 'http://www.canadiandentaselect.com'; break;
		case 3: location.href = 'http://www.canadianhealthfacilities.com'; break;
	}
	return false;
}


activateMenu = function(nav) {

    /* currentStyle restricts the Javascript to IE only */
	if (document.all && document.getElementById(nav).currentStyle) {  
        var navroot = document.getElementById(nav);
        
        /* Get all the list items within the menu */
        var lis=navroot.getElementsByTagName("LI");  
        for (i=0; i<lis.length; i++) {
        
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
            
                /* assign the function to the LI */
             	lis[i].onmouseover=function() {	
                
                   /* display the inner menu */
                   this.lastChild.style.display="block";
                }
                lis[i].onmouseout=function() {                       
                   this.lastChild.style.display="none";
                }
            }
        }
    }
}
window.onload = function(){
    /* pass the function the id of the top level UL */
    activateMenu('nav'); 
}

function showhide(aId) {
	var x;
	x = document.getElementById(aId);
	if(x.style.display == 'block') {
		x.style.display = 'none';
	} else {
		x.style.display = 'block';
	}
	return;
}	
