﻿    // JScript File
// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3000;
// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;
var Picture = new Array();
Picture[1] = 'images/homepage/Image1.jpg';
Picture[2] = 'images/homepage/Image2.jpg';
Picture[3] = 'images/homepage/Image3.jpg';
Picture[4] = 'images/homepage/Image4.jpg';
Picture[5] = 'images/homepage/Image5.jpg';
Picture[6] = 'images/homepage/Image6.jpg';
Picture[7] = 'images/homepage/Image7.jpg';
Picture[8] = 'images/homepage/Image8.jpg';
Picture[9] = 'images/homepage/Image9.JPG';
Picture[10] = 'images/homepage/Image10.jpg';
Picture[11] = 'images/homepage/Image11.jpg';
Picture[12] = 'images/homepage/Image12.jpg';
Picture[13] = 'images/homepage/Image13.jpg';
Picture[14] = 'images/homepage/Image14.jpg';
Picture[15] = 'images/homepage/Image15.jpg';
Picture[16] = 'images/homepage/Image16.jpg';
Picture[17] = 'images/homepage/Image17.jpg';
Picture[18] = 'images/homepage/Image18.jpg';
Picture[19] = 'images/homepage/Image19.jpg';
Picture[20] = 'images/homepage/Image20.jpg';

var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;
var preLoad = new Array();

for (iss = 1; iss < pss+1; iss++) {
    preLoad[iss] = new Image();
    preLoad[iss].src = Picture[iss];
}

function runSlideShow() {
    if (document.all) {
        document.images.slide_show.style.filter="blendTrans(duration=2)";
        document.images.slide_show.style.filter="blendTrans(duration=CrossFadeDuration)";
        document.images.slide_show.filters.blendTrans.Apply();
    }
    document.images.slide_show.src = preLoad[jss].src;
    if (document.all) document.images.slide_show.filters.blendTrans.Play();
    jss = jss + 1;
    if (jss > (pss)) jss=1;
    tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

function open_win(url, width, height)
{
    window.open(url, '', 'width=' + width + ', height=' + height + ', toolbar=0, status=0, menubar=0, resizable=1, scrollbars=1');
}

function button_click(btn, event) {
    if (document.all) {
        if (event.keyCode == 13) {
            event.returnValue=false;
            event.cancel = true;
            btn.click();
        }
    }
    else if (document.getElementById) {
        if (event.which == 13) {
            event.returnValue=false;
            event.cancel = true;
            btn.click();
        }
    }
    else if(document.layers) {
        if(event.which == 13) {
            event.returnValue=false;
            event.cancel = true;
            btn.click();
        }
    }
}

function please_wait()
{
    document.all.please_wait.style.visibility="visible";
    document.all.video.style.visibility="hidden"; 
    window.setTimeout('wait()',1);
}

function wait()
{
    lengthy_calculation();
    document.all.please_wait.style.visibility="hidden";
    document.all.video.style.visibility="visible";
}

function lengthy_calculation()
{
    var x,y
    for(x=0;x<1000000;x++)
    {
        y += (x * y) / (y - x); 
    }
}