﻿// JScript File
var theForm = document.forms['aspnetForm'];
if (!theForm) {
    theForm = document.aspnetForm;
}
function ResetForm()
{
    theForm.reset();
}

function ShowEventDetail(strEvent)
{
    var strUrl;
    
    strUrl = "PrintEventDetails.aspx?eid=" + strEvent;
    window.open(strUrl,'PrintEventDetails', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=650, height=720');
    
}

//function ShowFormResponse(strResponse, strShowComments)
//{
//    var strUrl;
//    
//    strUrl = "PrintFormResponse.aspx?rid=" + strResponse + "&scs=" + strShowComments;
//    window.open(strUrl,'PrintFormResponse', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=710, height=720');        
//}

function ShowFormResponse()
{
    var strUrl;
    
    strUrl = "PrintOnlineForm.aspx";
    window.open(strUrl,'PrintFormResponse', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=710, height=720');        
}

function ShowAllFormResponse()
{
    var strUrl;
    
    strUrl = "PrintAllOnlineFormResponses.aspx";
    window.open(strUrl,'PrintAllResponses', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=740, height=720');        
}

function ShowUserAccount()
{
    var strUrl;
    
    strUrl = "PrintUserAccount.aspx";
    window.open(strUrl,'PrintUserAccount', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=850, height=720');        
}

function ShowTeamAccounts()
{
    var strUrl;
    
    strUrl = "PrintTeamAccounts.aspx";
    window.open(strUrl,'PrintTeamAccounts', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=850, height=720');        
}


function ExportFormResponse()
{
    var strUrl;
    
    strUrl = "ExportFormResponses.aspx";
    window.open(strUrl,'ExportFormResponse', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=710, height=720');        
}


function ShowTeamContact(strClub,strTeam)
{
    var strUrl;
    
    strUrl = "TeamContacts.aspx?CID=" + strClub + "&TID=" + strTeam;
    window.open(strUrl,'TeamContact', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=700, height=400');
    
}

function ShowTeamRoster(strClub,strTeam)
{
    var strUrl;
    
    strUrl = "TeamRoster.aspx?CID=" + strClub + "&TID=" + strTeam;
    window.open(strUrl,'TeamRoster', 'location=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=1, width=700, height=400');
    
}

function LoadWindow()
{
    window.focus();
}

function CloseWindow()
{
    window.close();
}

function PrintWindow()
{
    window.print();
}
    
function ConfirmDelete()
{      
    if (confirm("Do you want to delete the selected record?")) return true; 
    if (document.all && window.event) event.returnValue = false; 
    return false; 
 }

function ShowTime(strList)
{
    objList = window.document.getElementById(strList);
    objList.style.visibility = "visible";
}

function ChangeTime(strText,strList)
{
    var objText;
    var objList;
    objText = window.document.getElementById(strText);
    
    objList = window.document.getElementById(strList);
    objText.value = objList.options[objList.selectedIndex].text; 
    objList.style.visibility = "hidden";                      
}

function ShowPrintCalendar()
{
    var objClndrView;
    var objStrtDt;
    var strUrl;    
    
    objClndrView = window.document.getElementById("ctl00_cphBody_hdnClndrView");
    objStrtDt = window.document.getElementById("ctl00_cphBody_hdnStartDate");    
    
    strUrl = "PrintClubCalendar.aspx?cview=" + objClndrView.value + "&strdt=" + objStrtDt.value;
    window.open(strUrl,'PrintClubCalendar', 'location=no, menubar=1, scrollbars=yes, status=no, toolbar=0, resizable=1');
}

function GetGCalendar(strUrl)
{
    var objFrame;
    
    objFrame = window.document.getElementById('fraCalendar');
    //alert(objFrame);    
    objFrame.src = strUrl;
}


function GetQuoteChart(strUrl)
{
    var objFrame;
    
    objFrame = window.document.getElementById('fraChart');
    //alert(objFrame);    
    objFrame.src = strUrl;
}

function ShowTranNotes(objDiv)
{
    var objChildDiv;
    
    objChildDiv = objDiv.firstChild;
    objChildDiv.style.visibility = "visible";
}

function HideTranNotes(objDiv)
{
    objDiv.style.visibility = "hidden";
}
