
function centerDivs()
{
   var i = 0;
    while( true )
    {
    try
      {
            var div = document.getElementById( "div" + i );
            var subdiv = document.getElementById( "subdiv" + i );
            var divHeight = div.offsetHeight;
            var subdivHeight = subdiv.offsetHeight;
            if( divHeight > subdivHeight )
            {
               divHeight = divHeight - subdivHeight;
               divHeight = divHeight / 2;
                
               subdiv.style.paddingTop = divHeight + "px";
            }
            else
            {
               subdivHeight = subdivHeight - divHeight;
               subdivHeight = subdivHeight / 2;
               div.style.paddingTop = subdivHeight + "px";
            }
            i++;
      }
       catch(ex)
       {
           break;
       }
  }
    
}
//////////////////////////////////////////////////////////////////////////////////////

var apWin  = null;
function PrivacyPolicyPopup() 
{ 
    var width   = 850; 
    var height  = 600; 
    var leftPos = ( screen.width - width ) / 2; 
    var topPos  = ( screen.height - height ) / 2; 
    if( apWin != null ) 
    { 
        try 
        { 
            apWin.focus(); 
            apWin.close(); 
        } 
        catch( exception ) 
        {}
    } 
    apWin = window.open( "../company/popupprivacy.aspx", "privacy_policy", "left="+leftPos+",top="+topPos+",toolbar=no,location=no,directories=no,"+ "status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height);
}

////////////////////////////////////////////////////////////////////////////////////////

var appWin  = null;
function TermsOfServicePopup() 
{ 
    var width   = 850; 
    var height  = 600; 
    var leftPos = ( screen.width - width ) / 2; 
    var topPos  = ( screen.height - height ) / 2; 
    if( appWin != null ) 
    { 
        try 
        { 
            appWin.focus(); 
            appWin.close(); 
        } 
        catch( exception ) 
        {}
    }
    appWin = window.open( "../company/popupterms.aspx", "terms_of_service", "left="+leftPos+",top="+topPos+",toolbar=no,location=no,directories=no,"+ "status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height); 
}

//////////////////////////////////////////////////////////////////////////////////////////

