
var secs;
var timerID = null;
var timerRunning = false;
var delay = 25;

function toggleInputElementsDisabledStatus(id)
{
    // client-side script that toggles the specified
    // input control's disabled status
    var elem = document.getElementById(id);
    if (elem != null)
    {
        // toggle the disabled status
        if (elem.onfocus != null)
        {
            // there is a client-side focus event handler
            // assumption: this element is disabled, so enable it!                    
            elem.onfocus = null;
            //elem.style.backgroundColor = 'white';
        }
        else
        {
            // assumption: this element is enabled, so disable it!
            elem.onfocus = function preventFocus(e) { this.blur(); };
            //elem.style.backgroundColor = 'white';
        }
    }
}


function findclubs()
{
testwindow= window.open ("WebForm0.aspx", "mywindow",
    "location=0,status=0,scrollbars=0,width=625,height=275");
testwindow.moveTo(250,200);
}

function hide(id) {
	document.getElementById(id).style.display = "none";
}
function show(id) {
	document.getElementById(id).style.display = "";
}

function SendSiteID(SiteID,SiteName,OrganizationGlobalID,OrganizationName){
opener.document.myform2.site_id.value = SiteID;
opener.document.myform2.sitename.value = SiteName;
opener.document.myform2.txtOrgGlobalID.value = OrganizationGlobalID;
opener.document.myform2.txtOrgName.value = OrganizationName;
opener.document.myform2.txtSiteGlobalID.value = SiteID;
opener.document.myform2.submit();
window.close();
}

function Cancel(){
window.close();
}

function InitializeTimer()
{

    secs = 10;
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID);
    timerRunning = false;
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock();
    
        //hide layers name the layer the same thing on everypage
        //show layers name the layer the same thing
        hide('ajax');
        show('myform');
    }
    else
    {
       
        secs = secs - 1;
        timerRunning = true;
        timerID = self.setTimeout("StartTheTimer()", delay);
    }
}

