var slideshow, slide_int_id, slide_current, slide_total;

slide_total = 10;
slide_current = 1;
var imageList = [
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/contracttrainersinc.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/contracttrainersinc.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/getpeoqoutes.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/getpeoqoutes.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/goedlaw.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/goedlaw.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/hdsa.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/hdsa.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/mcc.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/mcc.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/metrolinareia.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/metrolinareia.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/mhcomputertraining.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/mhcomputertraining.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/pa-services.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/pa-services.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/tgrv.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/tgrv.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27678/thumb/nvacs.jpg',
        link: 'http://www.nvacs.com/minigallery_27678/nvacs.jpg'
    },
];

var captionList = [
    {
        num: '0',
        cap: '&nbsp;'
    },
    {
        num: '1',
        cap: '&nbsp;'
    },
    {
        num: '2',
        cap: '&nbsp;'
    },
    {
        num: '3',
        cap: '&nbsp;'
    },
    {
        num: '4',
        cap: '&nbsp;'
    },
    {
        num: '5',
        cap: '&nbsp;'
    },
    {
        num: '6',
        cap: '&nbsp;'
    },
    {
        num: '7',
        cap: '&nbsp;'
    },
    {
        num: '8',
        cap: '&nbsp;'
    },
    {
        num: '9',
        cap: '&nbsp;'
    },
];

function startLytebox(title, url) {
      var anchor = this.document.createElement('a');
      anchor.setAttribute('title', title);
      anchor.setAttribute('href', url);
      anchor.setAttribute('rel', 'lytebox');
      myLytebox.start(anchor, false, false);
      return false;
}

function SlideShow_event(e, arg){
	e = e || window.event;
	switch(e){
		case 'ready':
			for(var i = 0, l = imageList.length; i < l; i++){
				slideshow.addImage(imageList[i].img, imageList[i].link);
			}
			break;

		case 'image_change':
			var imagenumber = arg+1;
			document.getElementById('mininav').innerHTML='Picture '+imagenumber+' of '+slide_total
			document.getElementById('minicap').innerHTML = captionList[arg].cap;
			break;

		case 'image_click':
			startLytebox(captionList[arg].cap,imageList[arg].link);			break;

		default:
			alert(e);
    }
}

