// JavaScript Document
 var  content = 'content';
 
 //Scritto e ideato da Michele Fazio 
//Semplice e funzionale!
//www.michelefazio.it
//Accessibile (Passa la validazione del W3C)

function FlashAccess(movie, larghezza, altezza, allinea, wmode) 
{ 
  var accessStandard = '<object type="application/x-shockwave-flash" data="';
  var loadmovienum = movie + '.swf" '
  var misure = 'width="' + larghezza + '" ' + 'height="' + altezza + '" align="' + allinea + '" />';
  var parametriBase = "<param name=\"movie\"" + "value=\"" + movie + ".swf\" /><param name=\"quality\" value=\"high\" />";
  var parametriVar = '<param name="wmode" value="' + wmode + '" />';
  
  var closeStandard = '</object>';
  
  var FlashStampa = accessStandard + loadmovienum + misure + parametriBase + parametriVar + closeStandard;
  
  document.write(FlashStampa);
  
}
 
  url_inserted = 0;
   function url(){
	var txt = document.getElementById(content);
	var btn = document.getElementById('u');
	if(url_inserted == 0){
		txt.value = txt.value + unescape('<img src="INSERIRE PERCORSO IMG" alt="INSERIRE TITOLO IMG"/>');
		txt.focus();
		btn.value = 'Foto';
		url_inserted = 1;
	}else{
		txt.value = txt.value + unescape('<img src="INSERIRE PERCORSO IMG" alt="INSERIRE TITOLO IMG"/>');
		txt.focus();
		btn.value = 'Foto';
		url_inserted = 0;
	}
   }
   
 mailto_inserted = 0;
   function mailto(){
	var txt = document.getElementById(content);
	var btn = document.getElementById('m');
	if(mailto_inserted == 0){
		txt.value = txt.value + unescape('<a href="mailto:SCRIVI QUI LA MAIL">TESTO o IMG CLICCABILE COLLEGATO</a>');
		txt.focus();
		btn.value = '@';
		mailto_inserted = 1;
	}else{
		txt.value = txt.value + unescape('<a href="mailto:SCRIVI QUI LA MAIL">TESTO o IMG CLICCABILE COLLEGATO</a>');
		txt.focus();
		btn.value = '@';
		mailto_inserted = 0;
	}
   }   

 
  subtitle_inserted = 0;
   function subtitle(){
	var txt = document.getElementById(content);
	var btn = document.getElementById('h');
	if(subtitle_inserted == 0){
		txt.value = txt.value + unescape('[h3]');
		txt.focus();
		btn.value = '/Fine Sottotitolo';
		subtitle_inserted = 1;
	}else{
		txt.value = txt.value + unescape('[/h3]');
		txt.focus();
		btn.value = 'Sottotitolo';
		subtitle_inserted = 0;
	}
   }
 
  bold_inserted = 0;
   function bold(){
	var txt = document.getElementById(content);
	var btn = document.getElementById('b');
	if(bold_inserted == 0){
		txt.value = txt.value + unescape('[b]');
		txt.focus();
		btn.value = '/b';
		bold_inserted = 1;
	}else{
		txt.value = txt.value + unescape('[/b]');
		txt.focus();
		btn.value = 'b';
		bold_inserted = 0;
	}
   }
   
ngm_inserted = 0;
   function ngm(){
	var txt = document.getElementById(content);
	var btn = document.getElementById('g');
	if(ngm_inserted == 0){
		txt.value = txt.value + unescape('[g]');
		txt.focus();
		btn.value = '/Ngm';
		ngm_inserted = 1;
	}else{
		txt.value = txt.value + unescape('[/g]');
		txt.focus();
		btn.value = 'Ngm';
		ngm_inserted = 0;
	}
   }
   
   par_inserted = 0;
   function par(){
	var txt = document.getElementById(content);
	var btn = document.getElementById('p');
	if(par_inserted == 0){
		txt.value = txt.value + unescape('[p]');
		txt.focus();
		btn.value = '/Chiudi Paragrafo';
		par_inserted = 1;
	}else{
		txt.value = txt.value + unescape('[/p]');
		txt.focus();
		btn.value = 'Paragrafo';
		par_inserted = 0;
	}
   }
   

  