function go(){ myWin = window.open( 'main.html','main','status = 0, height = ' + screen.height + ', width = ' + screen.width + ', resizable = 1' ); }
function chiudi(){ Shadowbox.close(); }
function createMailLink(){ return document.write('<a href="mailto:'+e1+'@'+e2+'">'+e1+'@'+e2+'</a>'); }

function noSelect(){
	document.onselectstart = function() {return false;} // ie
	document.onmousedown = function() {return false;} // mozilla
	document.oncontextmenu = function() {return false;}
}

function external(page) { 
	var p = (page == null) ? 'index' : page;
	var e = (page == null) ? '.php' : '.html';
	var h = (page == null) ? 600 : 500;		
		
	Shadowbox.open({
		player: 'iframe',
		content: 'external/' + p + e,
		width: 800, 
		height: h,
		options: { 
			overlayColor : '#000000', 
			overlayOpacity: 0.5, 
		},
	});
	
}

function video(url,title,width,height){	
	Shadowbox.open({
		player: 'flv', 
		content: "../../" + vPATH + url,
		width: width==null ? 720 : width, 
		height: height==null ? 576 : height,
		options: { 
			overlayColor : '#000000', 
			overlayOpacity: 0.8, 
		},
		title:title
	});
}

function gallery(num,path,title){	
	var arr = new Array();
    for(i=0;i!=num;i++){ 
		arr.push({
			player: 'img',
			content: gPATH + path + "/" + (i+1) + '.jpg',
			options: {
				overlayColor : '#000000',
				overlayOpacity: 0.8,
				handleOversize:'resize'
			},
			title: title + "- Servizio Fotografico" 
		}); 
	}		     
	Shadowbox.open(arr);
}

function toggle(id){
	for(i=0;i!=2;i++){
		document.getElementById("b"+(i+1)).className = "";
		document.getElementById("tb"+(i+1)).style.display = "none";
	}
	if(id){
		document.getElementById(id).className = "selected";
		document.getElementById("t"+id).style.display = "block";
	}
}
