/*
function writeFlash(path, width, height){
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+width+'" height="'+height+'">');
document.write('<param name="movie" value="'+path+'">');
document.write('<param name="quality" value="High">');
document.write('<embed src="'+path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" quality="High"></object>');
}

function writeInnerFlash(id,path, width, height){
newhtml='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+width+'" height="'+height+'">';
newhtml+='<param name="movie" value="'+path+'">';
newhtml+='<param name="quality" value="High">';
newhtml+='<embed src="'+path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" quality="High"></object>';
document.getElementById(id).innerHTML=newhtml;
}
*/

function writeFlash(path, width, height){
document.write('<object type="application/x-shockwave-flash" data="'+path+'" width="'+width+'" height="'+height+'">');
document.write('<param name="movie" value="'+path+'" /><param name="wmode" value="transparent" /><param name="quality" value="high" /></object>');
}

function writeTransFlash(path, width, height){
document.write('<object type="application/x-shockwave-flash" data="'+path+'" wmode="transparent" width="'+width+'" height="'+height+'">');
document.write('<param name="movie" value="'+path+'" /><param name="wmode" value="transparent" /><param name="quality" value="high" /></object>');
}

function writeInnerFlash(obj,path, width, height){
newhtml='<object type="application/x-shockwave-flash" data="'+path+'" width="'+width+'" height="'+height+'">';
newhtml+='<param name="movie" value="'+path+'" /><param name="quality" value="high" /></object>';
obj.innerHTML=newhtml;
}


oggetti = new Object();

function illumina(imm){
 oggetti[imm.src]=imm;
 if(imm.filters){//se è IE
  imm.filters.alpha.opacity-=100;
  if (imm.filters.alpha.opacity>=10) {window.setTimeout("illumina(oggetti['"+imm.src+"'])", 0);}
  else {rabbuia(imm);}
 } else if (imm.style.MozOpacity){//se non è IE ma è Firefox
  imm.style.MozOpacity-=1;
  if (imm.style.MozOpacity>=0.1) {window.setTimeout("illumina(oggetti['"+imm.src+"'])", 0);}
  else {rabbuia(imm);}
 }
}
 

function rabbuia(imm){
 if(imm.filters){// se è IE
  oggetti[imm.src]=imm;
  imm.filters.alpha.opacity+=10;
  if (imm.filters.alpha.opacity<100) {window.setTimeout("rabbuia(oggetti['"+imm.src+"'])", 0);}
 } else if (imm.style.MozOpacity){//se non è IE ma è Firefox
  oggetti[imm.src]=imm;
  imm.style.MozOpacity=Math.min(parseFloat(imm.style.MozOpacity)+0.05, 0.99)
  if (imm.style.MozOpacity<0.99) {window.setTimeout("rabbuia(oggetti['"+imm.src+"'])", 0);}
 }
}

function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}