function zoomin(path, description){
	if(path.indexOf(',') > -1){
		path = path.substr(0,path.indexOf(','));
	}
	
    if(document.all){
		pathname = document.location.pathname;
		//alert(pathname);
		if(pathname.indexOf('index.php/') > -1)
		{
			var asd = window.open('foto,'+path+',800,600', 'zoom', 'width=800, height=600, resizable=no, scrollbars=1, statusbar=no, left=0, top=0');
		} else {
			var asd = window.open('index.php/foto,'+path+',800,600', 'zoom', 'width=800, height=600, resizable=no, scrollbars=1, statusbar=no, left=0, top=0');
		}
    }
    else{
        var asd = window.open('index.php/foto,'+path+',800,600', 'zoom', 'width=800, height=600, resizable=no, scrollbars=1, statusbar=no, left=0, top=0');
    }
    asd.focus();
}
function zoomnomini(path, description){
    if(document.all){
        var asd = window.open('zoomnomini,'+path+','+description, 'zoom', 'width=10, height=10, resizable=no, statusbar=no, left=10, top=10');
    }
    else{
        var asd = window.open('index.php/zoomnomini,'+path+','+description, 'zoom', 'width=10, height=10, resizable=no, statusbar=no, left=10, top=10');
    }
    asd.focus();
}
function findpopup()
{
	var d = document.getElementsByTagName('img');
	
	for(var i=0;i<d.length;i++)
	{
		if(d.item(i).className.indexOf('popup') > -1)
		{
			d.item(i).parentNode.onclick = function(){
				getimg(this.getElementsByTagName('img'));
			}
			d.item(i).parentNode.href = 'javascript:void(0)';
		}
	}
}
function getimg(o)
{
	url = o.item(0).src;
	url = encodeURI(url.substr(url.indexOf('uploaded_files/')));
	zoomin(url,o.item(0).alt);
}