function startLytebox(href, title, rel) {
	var el   = document.getElementById('lytebox_misc');
	el.href  = href;
	el.title = title;
	el.rel	 = rel;
	
	myLytebox.start(el);
}

var theme = '';
var slide = false;
var nav = 1;
var border = false;

function changeTheme(arg) {
	theme = arg;
	restartLytebox('Lytebox is now using the "' + theme + '" theme!');
}

function changeNav(arg) {
	nav = (arg == "1" ? 1 : 2);
	restartLytebox('Lytebox is now using the "' + (nav == 1 ? 'top' : 'bottom') + '" navigation!');
}

function changeSlide(arg) {
	slide = (arg == "true" ? true : false);
	restartLytebox('Lytebox "Prev/Next" navigation ' + (slide ? 'enabled' : 'disabled') + ' for the slideshow!');
}

function showBorder(arg) {
	border = arg;
	restartLytebox('Lytebox is now using a border: "' + border + '"!');
}

function restartLytebox(sWhat) {				
	// Update configuration in the parent window Lytebox object			
	myLytebox = null;
	myLytebox = new LyteBox(theme, nav, slide, border);
	
	// Update configuration in the iframe window Lytebox object.
	frames['DisplayFrame'].myLytebox = null;
	frames['DisplayFrame'].myLytebox = new frames['DisplayFrame'].LyteBox(theme, nav, slide, border);
}
