﻿function popup(sPicURL) {
link=window.open( "popup.htm?"+sPicURL, "Image","resizable=1,left=0,top=0,HEIGHT=600,WIDTH=800"); 
link.focus();
}

function video_window(url)  {link=window.open(url,"Video",  "location=no,directories=no,scrollbars=yes,menubar=no,statusbar=no,resize=yes,alwaysRaised=no, width=388, height=280, left=50, top=50");
link.focus();}

function note_window(url)  {link=window.open(url,"Note",  "location=no,directories=no,scrollbars=yes,menubar=no,statusbar=no,resize=yes,alwaysRaised=no, width=350, height=520, left=50, top=50");
link.focus();}

function showAlert(msg){
	alert (msg);	
}

function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";
	//questo serve per compatibilità con SWFObject e IE (in Mozilla e SWFObject funziona anche senza):
	document.getElementById('SWGCawi').style.height = newH+"px";
}

function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}