
	function obre(myUrl,am,al,nom){
	  var ampla = am;
	  var altura = al;
	  strURL = myUrl;
	  poshoritz = (screen.width) ? (screen.width-ampla)/2 : 0;
	  posvert = (screen.height) ? (screen.height-altura)/2 : 0;
	  strW = 'toolbar=0,directories=0,location=0,status=no,menubar=0,resizable=0,copyhistory=0,scrollbars=1,width='+ ampla + ',height='+ altura + ',top='+ posvert + ',left='+ poshoritz;
	  eval("window.open('" + strURL + "',nom,'" + strW + "')");
	}

	




function escriu_flash(archivo,ancho,alto) // tutorial by IVI CONCEPT - www.ivi-concept.com
  {
  var version="7,0,0,0"; // version del flash player
  var quality="high"; // calidad de visualización de la peli
  var bgcolor="#ffffff"; // color de fondo de la peli
  // --fin parametros--------------------------------------------------
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+'" width='+ancho+' height='+alto+'>\n');
document.write('<param name="movie" value='+archivo+' />\n');
document.write('<param name="quality" value='+quality+'>\n');
document.write('<param name="bgcolor" value='+bgcolor+'>\n');
document.write('<embed src='+archivo+' bgcolor='+bgcolor+' quality='+quality+' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width='+ancho+' height='+alto+'></embed>');
document.write('</object>\n');
}




function getObject(objname)
{    
    var obj = null ;
    if (document.getElementById) {
        obj = document.getElementById(objname) ;
    } else {
        if (document.all) {
            obj = document.all[objname] ;
            }
        }

    return obj ;
}
 function ShowBlock(nom) {
 	var capa ;
	capa = getObject(nom) ;
	if (capa) {
		if (arguments.length==2) {
			//explicit mode
			if (arguments[1]) capa.style.display="block" ;
			else capa.style.display="yes" ;
		} else {
			//toggle mode
			if (capa.style.display!="block") capa.style.display="block";
			else capa.style.display="yes";
			}
		}
	}
 function HideBlock(nom) {
 	var capa ;
	capa = getObject(nom) ;
	if (capa) {
		if (arguments.length==2) {
			//explicit mode
			if (arguments[1]) capa.style.display="none" ;
			else capa.style.display="none" ;
		} else {
			//toggle mode
			if (capa.style.display!="none") capa.style.display="none";
			else capa.style.display="none";
			}
		}
	}	
	
	
			

function mostrarPop(num){
 	var e=window.event || arguments.callee.caller.arguments[0];//captura esdeveniment
	  if (e.pageY) { /* MOS */
	    posy = e.pageY;
	  } else if (e.clientY) { /* Explorer */
	    posy = e.clientY + document.documentElement.scrollTop + document.body.scrollTop;
	  }
	var pop="pop"+num; 
	p = document.getElementById(pop);
	posy= posy-100;
	p.style.top = posy + 'px';
	p.style.display='block';
}

function closePop(obj){
obj.parentNode.style.display='none'
}

function amagaFitg(qf){
	var qf = qf;
	document.getElementById("fitg"+qf).style.visibility = "hidden";
}


$(function() {

 $('#logo a img').hover(
            function() {
                this.src = this.src.replace( /\.gif$/, '_on.gif' );
            },
            function() {
                this.src = this.src.replace( /_on\.gif$/, '.gif' );
            }
        );

        $('#menu a img').hover(
            function() {
                this.src = this.src.replace( /\.gif$/, '_on.gif' );
            },
            function() {
                this.src = this.src.replace( /_on\.gif$/, '.gif' );
            }
        );
});
	
function marcahover(){
	document.getElementById('titolfoto').style.background="#000";
   $("#titolfoto").css({'color':'#fff'});
}

function init_fotos(){
   $('#fotos').innerfade({ speed: 'normal', timeout: 4000, type: 'sequence', containerheight: '379px' });
}
		
