﻿// JScript File

function OpenTimeZoneWindow()
{
   
    win = window.open('TimeZone.aspx', 'TimeZoneWindow_OSI', 'resizable=0,width=445,height=460');
    win.focus();
    return false;
}

function UpdateTimeZone()
{
   
    __doPostBack('TimeZoneLink','');
}

function OpenHelpWindow()
{
    
    win = window.open('EphemerisHelp.htm', 'MainHelpWindow_OSI', 'resizable=1,scrollbars=1,width=450,height=400');
    win.focus();    
    return false;
}

function OpenTermsOfUseWindow()
{
   
    win = window.open('TermsOfUse.htm', 'TermsOfUseWindow_OSI', 'resizable=1,scrollbars=1,width=450,height=425');
    win.focus();
    return false;
}

var DHTML = (document.getElementById || document.all || document.layers);
function getObj(name)
{
      
    if (document.getElementById)
    {
        this.obj = document.getElementById(name);
        this.style = document.getElementById(name).style;
    }
    else if (document.all)
    {
        this.obj = document.all[name];
        this.style = document.all[name].style;
    }
    else if (document.layers)
    {
        this.obj = document.layers[name];
        this.style = document.layers[name];
    }
}




function validate()
{
    //force the user to select at least one report
   
    var daterange = document.Form1.ddlDateRanges;
    var isValid = true;
  
    var dateValidator = new getObj('DateValidator');
     if(daterange.selectedIndex <= 0)
     {
        dateValidator.obj.innerHTML = '(Select a date range)';
        dateValidator.style.visibility = 'visible';
        isValid = false;
     }
     else
     {
         dateValidator.style.visibility = 'hidden';
     }
  
    return isValid;
}


