/**
-------------------------------------------------------------------------------
* @Author	Francesco Rabottini <youthzu@email.it>
* @Version	1.0.0
* @Copyright	2005 (c) Webzone.it srl Pescara Italy
-------------------------------------------------------------------------------
*/
function selectOption(form_name,select_name,myvalue)
{
	var options = document.forms[form_name].elements[select_name].options;
	for(i=0;i< options.length;i++)
		if(options[i].value == myvalue) {
			options[i].selected = true;
			break;
		}
}

function openpopup(url,W,H)
{
	_top  = (screen.height - H) / 2
	_left = (screen.width  - W) / 2;
	option = "top="+_top+",left="+_left+",width="+W+",height="+H+",status=no,toolbar=no,menubar=no,location=no";"";
	win = window.open(url,'',option);
	win.focus();
}

function del( uri )	{
	if(confirm('ATTENZIONE!!\nSei sicuro di voler eliminare questo elemento?\n\n'))
		document.location.href= uri;
}

function conf(uri)	{
        if(confirm('ATTENZIONE!!\nSei sicuro di voler eliminare questo elemento?\n\n'))
                document.location.href= uri;
}

function help(id, show)	{
	document.getElementById( id ).style.display = show ? 'block':'none';
}


/**
-------------------------------------------------------------------------------
* @Author	Francesco Rabottini <youthzu@email.it>
* @Version	1.0.0
* @Copyright	2005 (c) Webzone.it srl Pescara Italy
* @Date		lun ago  1 09:30:36 CEST 2005
* @name		JS Slide Show
-------------------------------------------------------------------------------
*/
var _images = new Array();
var _titles = new Array();
var _count = 0;
var i = 0;
function image_next()	{
	_count++;
	if(_count >= _images.length) _count = 0;
	document.getElementById('image_title').value = _titles[ _count ];
	document.getElementById('image_counter').value = (_count+1)+' of '+_images.length;
	document.images['details_image'].src = _images[ _count ].src;
}

function image_prev()	{
	_count--;
	if(_count < 0) _count = _images.length -1;
	document.getElementById('image_title').value = _titles[ _count ];
	document.getElementById('image_counter').value = (_count+1)+' of '+_images.length;
	document.images['details_image'].src = _images[ _count ].src;
}

initSlide = function() {
	if(document.images['details_image']) {
		document.images["details_image"].src = _images[ _count ].src;
		if(_images.length > 1)	{
			document.getElementById('image_title').value = _titles[ _count ];
			document.getElementById('image_counter').value = (_count+1)+" of "+_images.length;
		} else
			if( blk = document.getElementById('image_nav') )
				blk.style.display = 'none';
	}
}
window.onload = initSlide;
