<!--
function addbookmark(bookmarkurl,bookmarktitle){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function ApriSito(sito,titolo,features) {
	var newwindow=window.open(sito,titolo,features);
	//newwindow.creator=self
}

function ApriSitoExt(sito,titolo,features,myCreator,posLeft,posTop) {
	var newwindow=window.open(sito,titolo,features);
	if (myCreator=="self")
		newwindow.creator=self;
	if (myCreator=="parent")
		newwindow.creator=parent;
	if (myCreator=="top")
		newwindow.creator=top;
	newwindow.moveTo(posLeft,posTop);
}


function apriPagina(targ,pagina) {
	alert(targ+" "+pagina)
	if (targ == "self")
		self.location = pagina;
	if (targ == "parent")
		parent.location = pagina;
	if (targ == "top")
		top.location = pagina;
}

function adv(sito) {
	var newwindow=window.open(sito,'avvisi','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=400');
	//newwindow.creator=self
}

function imageChange(imageID,imageName,imageID2,imageName2) {
if (imageID != 0)
	document.images[imageID].src = imageName;
if (imageID2 != 0)
	document.images[imageID2].src = imageName2;
}


function replaceStr(stringa, strDa, strA) {
 var a = 1;
 var oldIdx = 0;
 var exit = false;
 var refine = false;
 var start = 0;
 //if (strDa.indexOf(strA) > 0) {
 	
 
 //}
 	 
 	 
 
 while (stringa.indexOf(strDa,start) > 0) {
 	 	//if (oldIdx < stringa.indexOf(strDa)) {
 			//alert('"'+strDa+'" found at pos: ' + stringa.indexOf(strDa));
 			oldIdx = stringa.indexOf(strDa,start);
			a = (oldIdx+strDa.length)
			stringa=stringa.substring( oldIdx, 0) + strA + stringa.substring( stringa.length,a)
 			start = oldIdx + 1;
		//} else {
		//	exit = true;
		//}
	}
return stringa;
}


function leggiArgomento(num, arg) {
 var argomento = arg;
 var stringa = 0;
 var numero = num;
 var cont = 2;
 
 if (num <= 0)
 	numero = 1
 else
 	numero = num
 if (argomento.indexOf("&")>0 ) {
 	if (numero == 1) {
		stringa=argomento.substring(argomento.indexOf("&"),1)
	}
	else {
		a = argomento.indexOf("?")+1
		argomento=argomento.substring( argomento.indexOf("?"), 0) + " " + argomento.substring( argomento.length,a)

		cont = 2
		while (argomento.indexOf("&") > 0 && cont <= numero) {
			a = argomento.indexOf("&")+1
			argomento = argomento.substring( argomento.indexOf("&"), 0) + " " + argomento.substring( argomento.length,a)
			cont=cont+1
		}
		if (cont > numero) {
			if (argomento.indexOf("&")>0) 
				stringa = argomento.substring( (argomento.indexOf("&")), a) 
			else 
				stringa = argomento.substring( (argomento.length), a) 
		}
	}
 }
 else {
	if (argomento.length>0) 
		 stringa=argomento.substring(1)
 }
 return stringa; 		 
}

function protect() {
 alert(bloccaImmaginiTxt);
 return false;
}

var bloccaImmaginiTxt = "***"
function bloccaImmagini(txt) {
 bloccaImmaginiTxt = txt
 if(document.images)
	for(i=0;i<document.images.length;i++)
		document.images[i].onmousedown = protect;
}

//-->
