/*************************************************************************************/
/*************************************************************************************/
//										FUNZIONI COMUNI
/*************************************************************************************/
/*************************************************************************************/

//funzione per inserire un SWF all'interno dell'AREA CENTRALE
//ver 0.1
function setSWF(swfname) {
	a=("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='678' height='300'>");
	a=a+("<param name='movie' value='swf/"+swfname+"'>");
	a=a+("<param name='quality' value='high'>"); 
	a=a+("<embed src='swf/"+swfname+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer'  type='application/x-shockwave-flash' width='678' height='300'></embed></object>");
	document.getElementById('cella_quadrata').innerHTML = a;	
}

function setSWFTesta(swfname) {
	a=("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='700' height='92'>");
	a=a+("<param name='movie' value='swf/"+swfname+"'>");
	a=a+("<param name='quality' value='high'>"); 
	a=a+("<embed src='swf/"+swfname+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer'  type='application/x-shockwave-flash' width='700' height='92'></embed></object>");
	document.getElementById('cella_testa').innerHTML =  a;	
}

//per aggirare l'update di IE (Aprile 2006)
//ver 0.1
function printFlashMenu() {
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="255" height="900" id="menu_rossano" align="middle">');
			        document.write('<param name="allowScriptAccess" value="sameDomain" />');
			        document.write('<param name="movie" value="swf/menu_rossano_02.swf" />');
			        document.write('<param name="quality" value="high" />');
			        document.write('<param name="swLiveConnect" value="true" />');			        
			        document.write('<param name="bgcolor" value="#ffffff" />');
			        document.write('<embed 	src="swf/menu_rossano_02.swf" quality="high" bgcolor="#ffffff" width="255" height="900" swLiveConnect="true" name="menu_rossano" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
			document.write('</object>'); 	
}


//ver 0.2
function setTitle(titolo) {
	document.getElementById('cella_titolo').innerHTML = titolo;		
}	

//ver 0.1
function setCenterInfo(result) {
	document.getElementById('cella_contenuti').innerHTML	= result;
}

//ver 0.1
function setScriptData(result) {
	document.getElementById('scrollerini').innerHTML	= result;
}

function loadImageOnBox(imageName) {
	img_text = "<img src='"+imageName+"' width='678' height='300'>";	
	document.getElementById('cella_quadrata').innerHTML = img_text;
}

function loadVideo(videoName) {	
	videoCode = "<iframe scrolling='no' frameborder='0' src='http://www.dirottasucuba.com/_loadvideo.htm?video="+videoName+"' width='320' height='254'></iframe>";	
	document.getElementById('cella_quadrata').innerHTML = videoCode;
}


//usata per la sezione download
function downloadImageOnBox(fileName) {	
	window.open(fileName, "txt", "width=528,height=420");	
}


/*************************************************************************************/
/*************************************************************************************/
//										NEWSLETTER
/*************************************************************************************/
/*************************************************************************************/    

    function clearFormNewsLetter() {
    		//this.value='';
    		a=document.forms['abc'].elements['nome'].value;
    		if (a=='write here') {
	    		document.forms['abc'].elements['nome'].value='';
					document.forms['abc'].elements['cognome'].value='';
					document.forms['abc'].elements['eta'].value='';		
	    		document.forms['abc'].elements['citta'].value='';
					document.forms['abc'].elements['provincia'].value='';
					document.forms['abc'].elements['email'].value='';						
				}
    }	    
    
		function emptyFormNewsletter() {
	    		document.forms['abc'].elements['nome'].value='';
					document.forms['abc'].elements['cognome'].value='';
					document.forms['abc'].elements['eta'].value='';		
	    		document.forms['abc'].elements['citta'].value='';
					document.forms['abc'].elements['provincia'].value='';
					document.forms['abc'].elements['email'].value='';	
		} 	
    
		function addUser(){		
			nome	= document.forms['abc'].elements['nome'].value;	
			cognome	= document.forms['abc'].elements['cognome'].value;			
			eta	= document.forms['abc'].elements['eta'].value;	
			citta	= document.forms['abc'].elements['citta'].value;	
			provincia	= document.forms['abc'].elements['provincia'].value;										
	    email =	document.forms['abc'].elements['email'].value;	
	    obj = nome +"#"+cognome+"#"+eta+"#"+citta+"#"+provincia+"#"+email;		
      cp.call('_newsletteruser.php', 'addUser', setResultSubmitNewsletter, obj );		    
		}   
		
		function removeUser(){	
	    email =	document.forms['abc'].elements['email'].value;							
      cp.call('_newsletteruser.php', 'removeUser', setResultSubmitNewsletter, email );		    
		}    		 
		
		function setResultSubmitNewsletter(result) {
				emptyFormNewsletter();			
				document.getElementById('resultContatti').innerHTML=result;	
		}
		
	
  

/*************************************************************************************/
/*************************************************************************************/
//										FORM CONTATTI
/*************************************************************************************/
/*************************************************************************************/    
    
    
    function clearForm() {
			startCommonFunction();
    		//this.value='';
    		a=document.forms['formContact'].elements['nameContact'].value;
    		if (a=='write here') {
	    		document.forms['formContact'].elements['nameContact'].value='';
					document.forms['formContact'].elements['emailContact'].value='';
					document.forms['formContact'].elements['textContact'].value='';		
				}
    }		
		
		function emptyForm() {
	    		document.forms['formContact'].elements['nameContact'].value='write here';
					document.forms['formContact'].elements['emailContact'].value='write here';
					document.forms['formContact'].elements['textContact'].value='write here';		
		}
		
		function contactSubmit(){		
			testomail = "Messaggio ricevuto da : "+(document.forms['formContact'].elements['nameContact']).value+"<br>";
			testomail = testomail + "Email : "+ (document.forms['formContact'].elements['emailContact']).value +"<br>";
			testomail = testomail + "Messaggio : "+(document.forms['formContact'].elements['textContact']).value +"<br>";			
      cp.call('_contact2.php', 'contact', setResultSubmit, testomail );		    
		}    
		
		function setResultSubmit(result) {
				emptyForm();			
				document.getElementById('resultContatti').innerHTML=result;	
		}
    

	
/*************************************************************************************/
/*************************************************************************************/
//										ROSSANO GENTILI
/*************************************************************************************/
/*************************************************************************************/

// MENU SETTA TITOLO COLORI DI SFONDO
// ver 0.4
function setBackgroundColor() {	
	document.getElementById('uso_interno').innerHTML = "";
	document.title ="Rossano Gentili";
	/*
	document.getElementById('sub').className="testo_rossano";		
	document.getElementById('unsub').className="testo_rossano";				
	document.getElementById('email_news').className="testo_rossano";		
	document.getElementById('titlenewsletter').className="testo_rossano_titolo_disco_piccolo";		
	document.getElementById('email_news').value = "";			
	*/
	document.getElementById('cella_testa').innerHTML =  "";	
	document.getElementById('cella_testa').className="td_BGimage_testa";
	document.getElementById('cella_titolo').className="bgcolor_rossano_cellaTitolo";		
	document.getElementById('cella_chiusura').className="bgcolor_rossano_cellaChiusura";		
}



// MENU BIOGRAFIA ROSSANO GENTILI
// ver 0.2
function rossano_home() {
	setBackgroundColor();
	setTitle("&nbsp;&nbsp;&nbsp;HOME");	
	a ="<img src='images/homer.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').className="testo_rossano";		
  cp.call('_proxy.php', 'getData', responseText, 'rossano/home_rossano.htm' );   	
}

// MENU BIOGRAFIA ROSSANO GENTILI
// ver 0.2
function rossano_bio() {
	setBackgroundColor();
	setTitle("&nbsp;&nbsp;&nbsp;BIOGRAFIA");	
	a ="<img src='images/bio.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').className="testo_rossano";		
  cp.call('_proxy.php', 'getData', responseText, 'rossano/biografia_rossano.htm' );   	
}


// MENU CONTATTI ROSSANO GENTILI
// ver 0.3
function rossano_contatti() {
	setBackgroundColor();
		setTitle("&nbsp;&nbsp;&nbsp;CONTATTI");
	a ="<img src='images/contattir.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;			
	document.getElementById('cella_contenuti').className="testo_rossano";		
  cp.call('_proxy.php', 'getData', responseText, 'rossano/contatti_rossano.htm' );   		
}


/*************************************************************************************/
/*************************************************************************************/
//										DIROTTA SU CUBA
/*************************************************************************************/
/*************************************************************************************/


// MENU music promo DSC
// ver 0.1

// MENU SETTA TITOLO COLORI DI SFONDO
// ver 0.4
function setBackgroundColorDSC() {
	document.getElementById('uso_interno').innerHTML = "";
	document.title ="Dirotta su Cuba";	
	/*
	document.getElementById('sub').className="testo_dsc";		
	document.getElementById('unsub').className="testo_dsc";	
	document.getElementById('email_news').className="testo_dsc";						
	document.getElementById('titlenewsletter').className="testo_dsc_titolo_disco_piccolo";	
	document.getElementById('email_news').value = "";		
	*/
	document.getElementById('cella_titolo').className="bgcolor_dsc_cellaTitolo";		
	document.getElementById('cella_chiusura').className="bgcolor_dsc_cellaChiusura";		
}

// MENU HOME DSC
// ver 0.1
//carica funzione file form.html
function dsc_form_newsletterGame() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;NEWSLETTER");
	document.getElementById('cella_contenuti').className="testo_dsc";		
}

// MENU HOME DSC
// ver 0.1
function dsc_home() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;HOME");
	a ="<img src='images/homed.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;	
	setSWFTesta("news.swf");
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/home_dsc.htm' ); 	
}


// MENU BIOGRAFIA DSC
// ver 0.2
function dsc_bio() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;BIOGRAFIA");
	a ="<img src='images/homed.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/biografia_dsc.htm' ); 	
}

// MENU NEWSLETTER DSC
// ver 0.2
function dsc_newsletter() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;NEWSLETTER");
	a ="<img src='images/n_letter.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/newsletter_dsc.htm' ); 	
}



// MENU NEWS DSC
// ver 0.2
function dsc_news() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;NEWS");	
	a ="<img src='images/news.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;			
	cp.call('_news.php', 'getNewsList', setCenterInfo);//responseText);	
}


// MENU BIOGRAFIA ENG DSC
// ver 0.2
function dsc_eng_bio() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;BIOGRAFIA");
	a ="<img src='images/homed.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/biografia_eng_dsc.htm' ); 	
}

// MENU discografia DSC
// ver 0.2
function dsc_discografia() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;DISCOGRAFIA");
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/discografia_dsc.htm' ); 	
	disco_jaz();
}

// MENU gallery DSC
// ver 0.3
function dsc_gallery() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;GALLERY");	
	a ="<img src='images/gallery.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;			
	cp.call('_gallery.php', 'getGalleryList', setCenterInfo);//responseText);	
}

//ver 0.1
function dsc__gallery_squeeze(id) {
	//cp.call('_gallery.php', 'getScroller', setScriptData,id);//responseText);			
	cp.call('_gallery.php', 'getGalleryByIdFull', setCenterInfo,id);//responseText);	

}

// MENU music promo DSC
// ver 0.2
function dsc_musicpromo() {
	setBackgroundColorDSC();
	setTitle("&nbsp;&nbsp;&nbsp;MUSIC PROMO");
	document.getElementById('cella_quadrata').innerHTML = "";		
	document.getElementById('cella_quadrata').className = "td_BGimage_musicpromo";		
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/musicpromo_dsc.htm' ); 		
}

// MENU download DSC
// ver 0.2
function dsc_download() {
	setBackgroundColorDSC();
	setTitle("&nbsp;&nbsp;&nbsp;DOWNLOAD");
	a ="<img src='images/download.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	cp.call('_download.php', 'getDownloadList', setCenterInfo);//responseText);		
}

// MENU game DSC
// ver 0.2
function dsc_game() {
	setBackgroundColorDSC();	
	setTitle("&nbsp;&nbsp;&nbsp;GAMES");
	a ="<img src='images/game_dsc.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/game_dsc.htm' ); 	
}

// MENU concerti DSC
// ver 0.2
function dsc_concerti() {
	setBackgroundColorDSC();
	setTitle("&nbsp;&nbsp;&nbsp;CONCERTI/DATE");	
	a ="<img src='images/concedate.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;
	//start modifica per superfunky... ma temporanea 17/7/2008
	tab_start ="<p><p><center><table width='550' border='0' cellpadding='0' cellspacing='0'><tr style='vertical-align:bottom;'>";
	tab_end ="</tr></table></center></p><p>";
	
	
	//ced = "<img src='images/manifesto_small.jpg' />";
	testo  ="<p>Cari amici, a maggio i Dirotta torneranno a suonare dal vivo, quest'anno con una bellissima novit&agrave;: il ritorno di <strong>Simona Bencini</strong> alla voce e di <strong>Stefano De Donato</strong> al basso.</p> ";
	testo = testo + "<p>Per Simona, Stefano e per me sar&agrave; un ritorno alle origini, ed &egrave; per questo che il Tour 2009 si chiamer&agrave; <strong>''BACK TO THE ROOTS''</strong>, che porter&agrave; sul palco<br />i pi&ugrave;; grandi successi della band.</p>";
	testo = testo + "<p>I Dirotta su Cuba tornano cos&igrave; alla formazione originaria, pronti a trasformare le funky performance dal vivo in vere e proprie feste alle quali<br />sarebbe imperdonabile mancare...</p>";
	testo = testo + "<p>Sul sito www.dirottasucuba.com troverete presto tutte le<br />date aggiornate del Tour.</p>";
	testo = testo + "<p>Un caro saluto, Rossano</p>";
	
	
	//td1 = "<td class='testo_dsc' width='210'>"+ced+"</td>";
	td2 = "<td class='testo_dsc' width='550'>"+testo+"</td>";
	fine = tab_start + td2 + tab_end;
	//fine = tab_start + td1 +td2 + tab_end;
	document.getElementById('uso_interno').innerHTML = fine;	
	//end modifica
	cp.call('_concert.php', 'getConcertList', setCenterInfo);//responseText);			
	
}

// MENU shop DSC
// ver 0.2
function dsc_shop() {
	setBackgroundColorDSC();
	setTitle("&nbsp;&nbsp;&nbsp;SHOP");	
	a ="<img src='images/shop.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').innerHTML = "";	
	
}

// MENU contatti DSC
// ver 0.2
function dsc_contatti() {
	setBackgroundColorDSC();
	setTitle("&nbsp;&nbsp;&nbsp;CONTATTI");	
	a ="<img src='images/contattid.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/contatti_dsc.htm' ); 		
	
}

// MENU scrivici DSC
// ver 0.2
function dsc_scrivici() {
	setBackgroundColorDSC();
	setTitle("&nbsp;&nbsp;&nbsp;SCRIVICI");	
	a ="<img src='images/contattid.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;		
	document.getElementById('cella_contenuti').className="testo_dsc";		
  cp.call('_proxy.php', 'getData', responseText, 'dsc/scrivici_dsc.htm' ); 		
	
}

// MENU press releases DSC
// ver 0.2
function dsc_pressreleases() {
	setBackgroundColorDSC();
	setTitle("&nbsp;&nbsp;&nbsp;PRESS REALESES");	
	a ="<img src='images/press.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;	
	document.getElementById('cella_contenuti').className="testo_dsc";			
	cp.call('_proxy.php', 'getData', responseText, 'dsc/press_dsc.htm' );
	
}

/*************************************************************************************/
/*************************************************************************************/
//										DIROTTA SU CUBA - SOTTOMENU
/*************************************************************************************/
/*************************************************************************************/



/*************************************************************************************/
//										DIROTTA SU CUBA - DISCOGRAFIA
/*************************************************************************************/

//ver 0.1
function disco_jaz() {
	setSWF("disco_jaz.swf");
}

//ver 0.1
function disco_fly() {
	setSWF("disco_fly.swf");
}

//ver 0.1
function disco_daoa() {
	setSWF("disco_daoa.swf");
}

//ver 0.1
function disco_eac() {
	setSWF("disco_eac.swf");
}

//ver 0.1
function disco_nt() {
	setSWF("disco_nt.swf");
}

//ver 0.1
function disco_dsc() {
	setSWF("disco_dsc.swf");
}



/*************************************************************************************/
/*************************************************************************************/
//										JAZZET
/*************************************************************************************/
/*************************************************************************************/


// MENU SETTA TITOLO COLORI DI SFONDO
// ver 0.3
function setBackgroundColorJZZ() {
	document.getElementById('uso_interno').innerHTML = "";
	document.title ="Jazzet";	
	
	//newsletter
	/*
	document.getElementById('sub').className="testo_jzz";		
	document.getElementById('unsub').className="testo_jzz";	
	document.getElementById('email_news').className="testo_jzz";						
	document.getElementById('titlenewsletter').className="testo_jzz_titolo_disco_piccolo";
	document.getElementById('email_news').value = "";
	*/
	document.getElementById('cella_testa').innerHTML =  "";		
	document.getElementById('cella_testa').className="td_BGimage_testa";			
	document.getElementById('cella_titolo').className="bgcolor_jzz_cellaTitolo";		
	document.getElementById('cella_chiusura').className="bgcolor_jzz_cellaChiusura";		
}

function setTitleStyleJZZ() {
	document.getElementById('TITOLO').className = "testoTitolo";		
}

// MENU HOME JAZZET
// ver 0.1
function jzz_home() {	
	setBackgroundColorJZZ();	
	setTitle("&nbsp;&nbsp;&nbsp;HOME");	
	a ="<img src='images/homej.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;			
	document.getElementById('cella_contenuti').className="testo_jzz";		
  cp.call('_proxy.php', 'getData', responseText, 'jazzet/home_jzz.htm' ); 			
}


// MENU BIOGRAFIA JAZZET
// ver 0.2
function jzz_about() {	
	setBackgroundColorJZZ();	
	setTitle("&nbsp;&nbsp;&nbsp;ABOUT JAZZET");	
	a ="<img src='images/homej.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;
	document.getElementById('cella_contenuti').className="testo_jzz";		
  cp.call('_proxy.php', 'getData', responseText, 'jazzet/about_jzz.htm' ); 			
}

// MENU discografia JAZZET
// ver 0.2
function jzz_discografia() {
	setBackgroundColorJZZ();	
	setTitle("&nbsp;&nbsp;&nbsp;DISCOGRAFIA");	
	document.getElementById('cella_contenuti').className="testo_jzz";		
  cp.call('_proxy.php', 'getData', responseText, 'jazzet/discografia_jzz.htm' ); 	
}

// MENU gallery JAZZET
// ver 0.2
function jzz_shop() {
	setBackgroundColorJZZ();	
	setTitle("&nbsp;&nbsp;&nbsp;SHOP");	
}

// MENU gallery JAZZET
// ver 0.2
function jzz_edizioni() {
	setBackgroundColorJZZ();	
	setTitle("&nbsp;&nbsp;&nbsp;SEND YOUR SOUND");	
	a ="<img src='images/homej.jpg'>";
	document.getElementById('cella_quadrata').innerHTML = a;
	document.getElementById('cella_contenuti').className="testo_jzz";		
  cp.call('_proxy.php', 'getData', responseText, 'jazzet/edizioni_jzz.htm' ); 	
}
