<!--

  var closeCallback = null ;

  function ShowModal(innerHTML,title,button,callback)
  {
  	var cnt = $('modalContent') ;
    cnt.innerHTML = innerHTML ;
    
  	$('modalWindow').style.display = $('modalBackground').style.display = 'block';

    if ( callback )
      closeCallback = callback ;
    else
      closeCallback = null ;

    if ( title && (title.length > 0) )
      $('modalCaption').innerHTML = title ;

    if ( button && (button.length > 2) )
      $('modalButton').value = button ;
    else
      $('modalButton').value = 'Close' ;
      
  	// special < IE7 -only processing for windowed elements, like select	
  	if (window.XMLHttpRequest == null)
  		$('modalIframe').style.display = 'block';
  
  	// call once to center everything
  	OnWindowResize();
  	
  	if (window.attachEvent)
  		window.attachEvent('onresize', OnWindowResize);
  	else if (window.addEventListener)
  		window.addEventListener('resize', OnWindowResize, false);
  	else
  		window.onresize = OnWindowResize;
  	
  	// we won't bother with using javascript in CSS to take care
  	// keeping the window centered
  	if (document.all)
  		document.documentElement.onscroll = OnWindowResize;
  }
  
  function OnWindowResize()
  {
  	// we only need to move the dialog based on scroll position if
  	// we're using a browser that doesn't support position: fixed, like < IE 7
  	var left = window.XMLHttpRequest == null ? document.documentElement.scrollLeft : 0;
  	var top = window.XMLHttpRequest == null ? document.documentElement.scrollTop : 0;
  	var div = $('modalWindow');
  	
  	div.style.left = Math.max((left + (GetWindowWidth() - div.offsetWidth) / 2), 0) + 'px';
  	div.style.top = Math.max((top + (GetWindowHeight() - div.offsetHeight) / 2), 0) + 'px';
  }
  
  function HideModal()
  {
  	$('modalWindow').style.display = $('modalBackground').style.display = 'none';
  	
  	// special IE-only processing for windowed elements, like select	
  	if (window.XMLHttpRequest == null)
  		$('modalIframe').style.display = 'none';
  	
  	if (window.detachEvent)
  		window.detachEvent('onresize', OnWindowResize);
  	else if (window.removeEventListener)
  		window.removeEventListener('resize', OnWindowResize, false);
  	else
  		window.onresize = null;
  		
  	if ( closeCallback )
  	  closeCallback();
  }
  
  /* utiltiy functions */
  
  function GetWindowWidth()
  {
  	var width =
  		document.documentElement && document.documentElement.clientWidth ||
  		document.body && document.body.clientWidth ||
  		document.body && document.body.parentNode && document.body.parentNode.clientWidth ||
  		0;
  		
  	return width;
  }
  
  function GetWindowHeight()
  {
    var height =
  		document.documentElement && document.documentElement.clientHeight ||
  		document.body && document.body.clientHeight ||
    	document.body && document.body.parentNode && document.body.parentNode.clientHeight ||
    	0;
    		
    return height;
  }
  
  function $(id)
  {
  	return document.getElementById(id);
  }

-->