/*
	ingrandisci_col.js - funzioni per pop-up immagine in pagine collaborazioni
	codice derivato da JS (OverLib) in uso nella pagina gallery (imgsez2.inc)
	
	20081210 - inizio sviluppo
*/

function OLiframeContent(src, width, height, name, frameborder, scrolling)
{
	return ('<iframe src="img_frame.php?nome_img='+src+'" width="'+width+'" height="'+height+'"'
	+(name!=null?' name="'+name+'" id="'+name+'"':'')
	+(frameborder!=null?' frameborder="'+frameborder+'"':'')
	+' scrolling="'+(scrolling!=null?scrolling:'auto')+'">'
	+'<div>[iframe not supported]</div></iframe>');
}

function ingrandisci(imgsrc,tipo,msg_chiudi)
{
	img_frame = '/gfx/col/'
	switch(tipo)
	{
		case 1:
		img_frame = img_frame + 'scheda';
		break;
		
		case 2:
		img_frame = img_frame + 'pd_scheda';
		break;
		
		case 3:
		img_frame = img_frame + 'dagad_scheda';
		break;
		
		case 4:
		img_frame = img_frame + 'pd2_scheda';
		break;
		
		case 5:
		img_frame = img_frame + 'pt_scheda';
		break;
	}
	img_frame = img_frame + imgsrc + 'xbig.jpg';
	return overlib(OLiframeContent(img_frame,735,400,'fr_img',1),
		CAPTION,' ',MIDX,0,RELY,300,WIDTH,735,HEIGHT,400,STICKY,DRAGGABLE,
		BORDER,4,BGCOLOR,'#969696',FGCOLOR,'#FFFFFF',
		CLOSECLICK,CLOSESIZE,5,CLOSETEXT,msg_chiudi,CGCLASS,msg_chiudi);
}

