
/*Apertura della pagina generica contenente la galleria fotografica.*/
function openGallery(indexGal) {
	document.location.href='gallery.html?' + indexGal;
}
/*Cambia dinamicamente il cursore di default nella manina.*/
function setCursorHand(obj){
	//Try per IE 5.1
	try {
		obj.style.cursor='pointer';
	}
	catch(ex){obj.style.cursor='hand';}
}
/*Cambia dinamicamente il cursore in default.*/
function setCursorDefault(obj){
	try {
		obj.style.cursor='default';
	}
	catch(ex){}
}

/*Cambia dinamicamente il colore dell'elemento.*/
function setColor(obj, clr){
	obj.style.color = clr;
}

function filling( str ) {
	var strFill = '';
  // Alineamento a destra
	for(var i=str.length; i<2; i++) strFill+='0';

	strFill+=str;
  return strFill;
}

function popUp(url) {
	newwindow=window.open(url,'credits','height=200,width=270,left=250,top=320,toolbar=0,location=0,directories=0,status=no,menubar=0,scrollbars=0,resizable=no,titlebar=no,dialog=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}

function popUp2(url,h,w,l,t) {
	//newwindow=window.open(url,'news','height=300,width=199,left=250,top=320,toolbar=0,location=0,directories=0,status=no,menubar=0,scrollbars=0,resizable=no,titlebar=no,dialog=yes');
	newwindow=window.open(url,'news','height='+h+',width='+w+',left='+l+',top='+t+',toolbar=0,location=0,directories=0,status=no,menubar=0,scrollbars=0,resizable=no,titlebar=no,dialog=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openPageOnOpener(page) {
	window.opener.location.href = page;
	window.opener.focus();
	return false;
}