<!--
<!-- Beginning of JavaScript -->


/* 
Questo script permette di scrivere due messaggi in posizione definita: al termine del 
1° messaggio, parte la scrittura del secondo. E' vincolato a due messaggi, estendibile 
a un numero qualsiasi (1° messaggio parte al caricamento della pagina).
NOTE: per ogni singolo messaggio ci sono f.ni diverse (showmessage,showmessage1,....) che
      vengono tutte chiamate con i seguenti parametri:
      showmessageX('messaggio da visualizzare',distanza asse x,distanza asse y)  
*/

var tickerwidth=258   <!-- Modifica dimensioni della cornice -->

var tickerheight=100

var tickerpadding=0   <!-- Distanza della scritta dalla cornice -->

var borderwidth=0     // dimensione del bordo

var fnt="Verdana"

var fntsize=8

var fntsizelastletter=8

var fntcolor="cc0000"              // Colore delle lettere della scritta 

var fntcolorlastletter="cc0000"

var fntweight=3

var backgroundcolor="000000"          //"ffcc00" sfondo della cornice

var standstill=2000

var speed=0   // prima 5
/*
var xdistance=300   <!-- C'era "-40": è la distanza della Win in orizzontale -->

var ydistance=100   <!-- C'era "5": è la distanza della Win in verticale -->
*/
var timer
var timer1
var timer2
var timer3

var topposition=0
var leftposition=0
var x,y
var i_substring=0
var i_presubstring=0
var i_message=0
var message
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""

var Xdisplay1 = 35;
var Ydisplay1 = 178;
var Xdisplay2 = 35;
var Ydisplay2 = 270;
var Xdisplay3 = 35;
var Ydisplay3 = 362;

fntweight=fntweight*100

DiplayStringa1 = "The specialization that has stayed reached in these years and the Know How acquired through experiences of the technical personnel, there has allowed of satisfy the demands of numerous firms on all the national territory, above all in terms of relationship quality/price/delivery.";

DiplayStringa2 = "The JOINT STAMPI srl is a firm also from the point of view of the technology uses, both in phase of planning and planning of the dice and in the productive phases and of workmanship, besides in those of pressing, having disposition the good that the market could offer.";

DiplayStringa3 = "Other fundamental characteristics are our acquaintances of particular coverings for the materials used for our mould besides adopt of the particular systems of Injection extremely to the vanguard. Our curriculum gets rich with the seriousness in the management of the terms of delivery, technical assistance, tried and tested products with different sampling homage, the efficiency and the effectiveness in the production, without neglect the clarity and the precision.";

function getmessagebackground() {
		messagebackground="<table border="+borderwidth+" width="+tickerwidth+" height="+tickerheight+" cellspacing=0 cellpadding=0><tr><td valign=top bgcolor='"+backgroundcolor+"'>"
		messagebackground+="&nbsp;</td></tr></table>"
}

function getmessagecontent() {	
		messagecontent="<table border=0 cellspacing=0 cellpadding="+tickerpadding+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top>"
		messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+"'>"	
		messagecontent+="<font color='"+fntcolor+"'>"
		messagecontent+=messagepresubstring
		messagecontent+="</font>"
		messagecontent+="</span>"
		messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:"+fntweight+"'>"	// al posto di "+fntweight+" posso mettere 900 per grassetto
		messagecontent+="<font color='"+fntcolorlastletter+"'>"
		messagecontent+=messageaftersubstring
		messagecontent+="</font>"
		messagecontent+="</span>"
		messagecontent+="</td></tr></table>"
}

function showticker() {
	if (i_substring<=message.length-1) {
			i_substring++
			i_presubstring=i_substring-1
			if (i_presubstring<0) {i_presubstring=0}
            messagepresubstring=message.substring(0,i_presubstring)
	        messageaftersubstring=message.substring(i_presubstring,i_substring)
			getmessagecontent()
		if (document.all) {
			ticker.innerHTML=messagecontent
			timer=setTimeout("showticker()", speed)
			}
		if (document.layers) {
			document.ticker.document.write(messagecontent)
			document.ticker.document.close()
			timer=setTimeout("showticker()", speed)
		}
	}
	else {
		clearTimeout(timer);
		showmessage1(DiplayStringa1,Xdisplay1,Ydisplay1);   /* senza scrive un solo messaggio, altrimenti due */
		
	}
}

function showticker1() {
	if (i_substring<=message.length-1) {
			i_substring++
			i_presubstring=i_substring-1
			if (i_presubstring<0) {i_presubstring=0}
    	    messagepresubstring=message.substring(0,i_presubstring)
		    messageaftersubstring=message.substring(i_presubstring,i_substring)
			getmessagecontent()
		if (document.all) {
			ticker1.innerHTML=messagecontent
			timer1=setTimeout("showticker1()", speed)
		}
		if (document.layers) {
			document.ticker1.document.write(messagecontent)
			document.ticker1.document.close()
			timer1=setTimeout("showticker1()", speed)
		}
		
	}
	else {
		clearTimeout(timer1);
		showmessage2(DiplayStringa2,Xdisplay2,Ydisplay2); 
	}
	
}

function showticker2() {
	if (i_substring<=message.length-1) {
			i_substring++
			i_presubstring=i_substring-1
			if (i_presubstring<0) {i_presubstring=0}
    	    messagepresubstring=message.substring(0,i_presubstring)
		    messageaftersubstring=message.substring(i_presubstring,i_substring)
			getmessagecontent()
		if (document.all) {
			ticker2.innerHTML=messagecontent
			timer2=setTimeout("showticker2()", speed)
		}
		if (document.layers) {
			document.ticker2.document.write(messagecontent)
			document.ticker2.document.close()
			timer2=setTimeout("showticker2()", speed)
		}
		
	}
	else {
		clearTimeout(timer2);
		showmessage3(DiplayStringa3,Xdisplay3,Ydisplay3);
	}
	
}

function showticker3() {
	if (i_substring<=message.length-1) {
			i_substring++
			i_presubstring=i_substring-1
			if (i_presubstring<0) {i_presubstring=0}
    	    messagepresubstring=message.substring(0,i_presubstring)
		    messageaftersubstring=message.substring(i_presubstring,i_substring)
			getmessagecontent()
		if (document.all) {
			ticker3.innerHTML=messagecontent
			timer3=setTimeout("showticker3()", speed)
		}
		if (document.layers) {
			document.ticker3.document.write(messagecontent)
			document.ticker3.document.close()
			timer3=setTimeout("showticker3()", speed)
		}
		
	}
	else {
		clearTimeout(timer3);
	}
	
}

function showmessage(linkmessage,xdistance,ydistance) {
    getmessagebackground()
    message=linkmessage
   
	i_substring=0
	i_presubstring=0
    leftposition=xdistance  <!-- x+xdistance per spostamento in base pos. mouse -->
    topposition=ydistance   <!-- y+xdistance per spostamento in base pos. mouse -->	
	if (document.all) {	
		document.all.ticker.style.posLeft=leftposition
		document.all.ticker.style.posTop=topposition
		document.all.tickerbg.style.posLeft=leftposition
		document.all.tickerbg.style.posTop=topposition
		tickerbg.innerHTML=messagebackground
        document.all.ticker.style.visibility="visible"
        document.all.tickerbg.style.visibility="visible"
		showticker()
	}
	if (document.layers) {
        document.ticker.left=leftposition
		document.ticker.top=topposition
		document.tickerbg.left=leftposition
		document.tickerbg.top=topposition
		document.tickerbg.document.write(messagebackground)
		document.tickerbg.document.close()
        document.ticker.visibility="visible"
        document.tickerbg.visibility="visible"
		showticker()
	}
}


function showmessage1(linkmessage,xdistance,ydistance) {
    getmessagebackground()
    message=linkmessage
   
	i_substring=0
	i_presubstring=0
    leftposition=xdistance  <!-- x+xdistance per spostamento in base pos. mouse -->
    topposition=ydistance   <!-- y+xdistance per spostamento in base pos. mouse -->	
	if (document.all) {	
		document.all.ticker1.style.posLeft=leftposition
		document.all.ticker1.style.posTop=topposition
		document.all.tickerbg1.style.posLeft=leftposition
		document.all.tickerbg1.style.posTop=topposition
		tickerbg1.innerHTML=messagebackground
        document.all.ticker1.style.visibility="visible"
        document.all.tickerbg1.style.visibility="visible"
		showticker1()
	}
	if (document.layers) {
        document.ticker1.left=leftposition
		document.ticker1.top=topposition
		document.tickerbg1.left=leftposition
		document.tickerbg1.top=topposition
		document.tickerbg1.document.write(messagebackground)
		document.tickerbg1.document.close()
        document.ticker1.visibility="visible"
        document.tickerbg1.visibility="visible"
		showticker1()
	}
}

function showmessage2(linkmessage,xdistance,ydistance) {
    getmessagebackground()
    message=linkmessage
   
	i_substring=0
	i_presubstring=0
    leftposition=xdistance  <!-- x+xdistance per spostamento in base pos. mouse -->
    topposition=ydistance   <!-- y+xdistance per spostamento in base pos. mouse -->	
	if (document.all) {	
		document.all.ticker2.style.posLeft=leftposition
		document.all.ticker2.style.posTop=topposition
		document.all.tickerbg2.style.posLeft=leftposition
		document.all.tickerbg2.style.posTop=topposition
		tickerbg2.innerHTML=messagebackground
        document.all.ticker2.style.visibility="visible"
        document.all.tickerbg2.style.visibility="visible"
		showticker2()
	}
	if (document.layers) {
        document.ticker2.left=leftposition
		document.ticker2.top=topposition
		document.tickerbg2.left=leftposition
		document.tickerbg2.top=topposition
		document.tickerbg2.document.write(messagebackground)
		document.tickerbg2.document.close()
        document.ticker2.visibility="visible"
        document.tickerbg2.visibility="visible"
		showticker2()
	}
}

function showmessage3(linkmessage,xdistance,ydistance) {
    getmessagebackground()
    message=linkmessage
   
	i_substring=0
	i_presubstring=0
    leftposition=xdistance  <!-- x+xdistance per spostamento in base pos. mouse -->
    topposition=ydistance   <!-- y+xdistance per spostamento in base pos. mouse -->	
	if (document.all) {	
		document.all.ticker3.style.posLeft=leftposition
		document.all.ticker3.style.posTop=topposition
		document.all.tickerbg3.style.posLeft=leftposition
		document.all.tickerbg3.style.posTop=topposition
		tickerbg3.innerHTML=messagebackground
        document.all.ticker3.style.visibility="visible"
        document.all.tickerbg3.style.visibility="visible"
		showticker3()
	}
	if (document.layers) {
        document.ticker3.left=leftposition
		document.ticker3.top=topposition
		document.tickerbg3.left=leftposition
		document.tickerbg3.top=topposition
		document.tickerbg3.document.write(messagebackground)
		document.tickerbg3.document.close()
        document.ticker3.visibility="visible"
        document.tickerbg3.visibility="visible"
		showticker3()
	}
}

function handlerMM(e){
	x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX 
	y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY 
}

if (document.layers){
	document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

// - End of JavaScript - -->

//-->


