function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw = new lib_bwcheck();


function SetHomePage() {
	if(document.all)
		document.body.style.behavior='url(#default#homepage)';

	document.body.setHomePage('http://www.altola.it');
	
}

function AddToBookmark()
{
	if (bw.ie)
	{
		var bookmarkurl="http://www.altola.it/"
		var bookmarktitle="Altola.it - il motore di ricerca definitivo!"
		
		if (document.all)
			window.external.AddFavorite(bookmarkurl,bookmarktitle)
	}
	else
		alert("Funzione non implementata con questo browser; se utilizzi Netscape, usa Ctrl+D")
}



function showAdv(pos) {
	
	document.write("&nbsp;");return;
	
	soggetto = new Array(6);
	
	soggetto[0] = 'Suonerie';
	soggetto[1] = 'Suonerie Polifoniche';
	soggetto[2] = 'Giochi per Cellulari';
	soggetto[3] = 'Sfondi per Cellulari';
	soggetto[4] = 'Loghi per Cellulari';
	soggetto[5] = 'Loghi Colorati';
	
	soggetto[6] = 'Suonerie Polifoniche';
	soggetto[7] = 'Suonerie';
	
	var rndSoggetto = soggetto[(parseInt(Math.random() * 8))];

	document.write('<table width=400 cellspacing=0 cellpadding=2 align=center bgcolor=ffffff style="border:1px;border-style:solid;border-color:0099ff"><tr><td><div align="center"><a href="http://www.sms-allegri.com/new/" target="_blank" style="font-weight:bold;color:333333">..: Scarica '+rndSoggetto+' con 1 SMS! :..</a><br>');
    document.write('<font class="descrizione_spot" onClick="window.open(\'http://www.sms-allegri.com/new/\',\'newwin\',\'scrollbars=yes,resizable=yes,toolbar=no,menubar=no,status=yes,location=no,left=85,top=20,height=600,width=800\')" onMouseOver="style.cursor=\'hand\'">Da oggi puoi inviare le Nuove Suonerie richiedendole con un SMS,<br> senza utilizzare pi&ugrave; dialer e spendendo pochissimo!!!<br>');
    document.write('Trovi anche Suonerie Polifoniche, Picture SMS e Giochi!!</font></div></td></tr></table>'); 
}

function goThere(where) {
	
	nW = unescape (where);		
	document.write('<sc'+'rip'+'t>doc'+'ume'+'nt.loc'+'atio'+'n = nW;</sc'+'ri'+'pt>');

}

function showLa(cx,cy) {
	document.write(unescape('%3Cdiv%20style%3D%22position%3Aabsolute%3B%20width%3A'+cx+'px%3B%20height%3A'+cy+'px%3B%20z-index%3A1%3B%20background-color%3A%20%23ffffff%3B%20layer-background-color%3A%20%23ffffff%3B%20border%3A%200px%20none%3B%22%3E%3C/div%3E'));
}

function menuUpPagina() {
	document.write('<a href="http://www.altola.it/" class="rosa"><b>Home Page</b></a> | <a href="#" class="rosa" onClick="AddToBookmark();return false;"><b>Aggiungi ai Preferiti</b></a> ');
    document.write(' | <a href="#" class="rosa" onClick="SetHomePage();return false;"><b>Imposta come Home Page</b></a><a href="#" class="rosa" onClick="AddToBookmark();return false;"><b></b></a> | <a href="http://www.altola.it/contatti.php" class="rosa"><b>Contatti</b></a>');
}

function menuDownPagina() {
	document.write('<a href="http://www.altola.it/contatti.php" >Contatti</a> ');
    document.write(' | La riproduzione anche parziale di questo sito è Vietata | <a href="http://www.altola.it/informativaLegale.php">Informativa Legale </a>');
}

function newPage(destUrl) {
	window.open(destUrl);
}

function decifra(testo) {
	document.write(unescape(testo));	
}