
function show_image_preview(url, title) {
	Lightbox.show(url, title);
}

function show_image_array_preview(images, titles, current_index) {
	var count = images.length > titles.length ? titles.length : images.length;  
	var all_images = new Array(count);
	
	for (var i = 0; i < count; ++i) {
		all_images[i] = new Array(images[i], titles[i]);
	}
	
	Lightbox.open(all_images, current_index);
}

function select_product_at_index(index) {
	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
	var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
	
	var flash;
	if (isIE) {
		flash = window["ParketCityViewer"];
	} else {
		flash = document["ParketCityViewer"];
	}
	flash.selectProductAtIndex(index);
}
