﻿// JScript File


window.onload=pageLoad;

function pageLoad()
{
showImage();
if (document.getElementById('lnkPipeline') != null)
{ startpipelinenav();}
if (document.getElementById('h6LogoutA') != null)
{document.getElementById('h6LogoutA').onclick = logout;}

}

//*********************************Pipeline Nav Change**************************



   var pipelineNavIndex = 0;
   var piplineNavText = new Array()
   piplineNavText[0] = 'Broker Pipeline'
   piplineNavText[1] = 'Online Locking'
   piplineNavText[2] = '1003 Upload'

function startpipelinenav() 
{setTimeout('changepipelinenav()', 2000); }

function changepipelinenav() 
{
   if (pipelineNavIndex >= piplineNavText.length)
   {    pipelineNavIndex = 0 }
   document.getElementById('lnkPipeline').innerHTML = piplineNavText[pipelineNavIndex] ;
   setTimeout('changepipelinenav()', 2000); 
   pipelineNavIndex ++;
}


function $ (id) {return document.getElementById(id);}

//*****************************End Pipeline Nav Change**************************


         
        function showImage()
        {
           var theImages = new Array()
             
            //Random-loading images
            theImages[0] = imgURL + 'family1.jpg'
            theImages[1] = imgURL + 'family2.jpg'
            theImages[2] = imgURL + 'family3.jpg'
            theImages[3] = imgURL + 'family4.jpg'
             
            var j = 0
            var p = theImages.length;
            var preBuffer = new Array()
             
            for (i = 0; i < p; i++){
            preBuffer[i] = new Image()
            preBuffer[i].src = theImages[i]
            }
            var whichImage = Math.round(Math.random()*(p-1));
            
            document.getElementById('imgRandomFamily').src = theImages[whichImage];
         
        }


        function openIt(name) 
        {
            var mystuff = document.getElementById(name);
            if( !mystuff.style.display || mystuff.style.display == "none" )
            {
                mystuff.style.display = "block";
                document.getElementById('txtLoginEmail').focus();
            }
            else
            {
                mystuff.style.display = "none";
            }
        }

        function logout()
        {
            document.getElementById('hdnLogout').value = "Yes";
            document.forms[0].submit();
        }
        
        
        
        
