// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;

// Duration of crossfade (seconds)
var crossFadeDuration = 3;

// Specify the image files

var Pic = new Array(); // don't touch this
var PicUrl = new Array(); // don't touch this

var PicCaption = new Array(); // don't touch this

Pic[0] = 'images/img1.jpg';
Pic[1] = 'images/img2.jpg';
Pic[2] = 'images/img6.jpg';
Pic[3] = 'images/img4.jpg';
Pic[4] = 'images/img7.jpg';
Pic[5] = 'images/img3.jpg';
Pic[6] = 'images/img8.jpg';
Pic[7] = 'images/img5.jpg';

PicUrl[0] = '#';
PicUrl[1] = '#';

var PageNav='#';

// =======================================
// do not edit anything below this line
// =======================================

var m_intTimeOut;
var j = 0;
var m_intArrayLen = Pic.length;

var preLoad = new Array();
for (i = 0; i < m_intArrayLen; i++)
{
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();      
   }
   document.images.SlideShow.src = preLoad[j].src;
	PageNav=PicUrl[j];

   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (m_intArrayLen-1)) j=0
   m_intTimeOut = setTimeout('runSlideShow()', slideShowSpeed);
}


function ConfirmChoice(msg)
{
answer = confirm(msg)
if (answer !='0')
{
return true;
}
return false;
}



 function ConfirmExit()
    {
        var msg = 'Are you sure you want to navigate away from this page? \nIf so, the changes you have made on this page will be lost. If you have not scheduled the appointment, you will loose the data that you have entered into the application. \n\n Click "Ok" to navigate away, or "Cancel" to stay on the current page. ';
        if(ConfirmChoice(msg))
        {
            window.location='Thankyou.aspx';
               return false; 
        }
        else
        {
        return false;
        }
//        if(confirm(msg))
//        {
//            window.location.href='Thankyou.aspx';
//        }
//        else
//        {
//            return false;
//        }
    }
    function ConfirmHome()
    {
        var msg = 'Are you sure you want to navigate away from this page? ';
        if(ConfirmChoice(msg))
        {
            window.location='Thankyou.aspx';
            return false;
        }
        else
        {
        return false;
        }
    }

function pg_nav()
{
	window.location.href=PageNav;
}
