function OpenMap()
{
    var url = 'Map.htm';
    window.open(url,'map','width=460,height=440,top=90, right=20, toolbar=no, location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes, resizable=yes');
}    

function PopupCalWindow(url)
{
    window.open(url,'map','width=400,height=400,top=90, right=20, toolbar=no, location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes, resizable=yes');
} 

function PopupCalWindowView(url)
{
    window.open(url,'map','width=500,height=380,top=90, right=20, toolbar=no, location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes, resizable=yes');
} 
function OpenMedForm(url)
{
    url = 'Forms/' + url;
    window.open(url,'map','width=700,height=600,top=30, right=10, toolbar=no, location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes, resizable=yes');
} 
function OpenExternalUrl(url)
{
    window.open(url,'map','width=600,height=600,top=10, right=10, toolbar=yes, location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes');
} 
function OpenExternalUrlHideMenu(url)
{
    window.open(url,'map','width=500,height=400,top=10, right=10, toolbar=no, location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no, resizable=yes');
}

function Openoralcancer() {
    window.open('http://www.oralcancer.org', 'oralcancer', 'width=750,height=600,top=10, right=10, toolbar=yes, location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes');
}

function OpenVideo() {
    var url = 'images/flash/fs_aux.html';
    window.open(url, 'map', 'width=510,height=410,top=40, right=40, toolbar=no, location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=no, resizable=yes');
} 
/* -- MENUS -- */
function showSubMenu(oCaller, subMenuId) {
    GetScrollTop();
  var oSubMenu = document.getElementById(subMenuId); 
  if(oSubMenu == null) return;	
  var left = oCaller.getBoundingClientRect().left - 2; // - 5;
  var top = oCaller.getBoundingClientRect().top + 17 + GetScrollTop();
  oSubMenu.style.position = "absolute";
  oSubMenu.style.left = left + "px";
  oSubMenu.style.top = top + "px"; 
  oSubMenu.style.display = "block";
}
function hideSubMenu(subMenuId) {
  var oSubMenu = document.getElementById(subMenuId); 
  if(oSubMenu == null) return;
  oSubMenu.style.display = "none";
}
function GetScrollTop(){    
  var scrollY = document.documentElement.scrollTop;
  if(!scrollY)scrollY = document.body.scrollTop;            
  if(!scrollY)scrollY = window.pageYOffset;               
  if(!scrollY)scrollY = 0;
  return scrollY;
}

function HideButtonShowLabel(buttonID, labelId) 
{
    var btn = document.getElementById(buttonID); 
  if(btn != null) 
      btn.style.display = "none";
	    
  var lbl = document.getElementById(labelId); 
  if(lbl != null) 
      lbl.style.display = "block";
}
