var dir= "http://www.hellastory.net";
// apri finestra pop-up centrale per le pagine vecchie
function Old(url) {
	windowB = window.open(url, "Hellastory", "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=yes,width=790,height=500");
	windowB.moveTo(((screen.width/2)-(790/2)),((screen.height/2)-(500/2)));
}
// apri finestra pop-up centrale
function CenterWindow(title, url, larghezza, altezza) {
	windowB = window.open(url, title, "toolbar=no,location=no,directories=no,status=no,scrollbars=auto,resizable=no,copyhistory=yes,width="+larghezza+",height="+altezza+"");
	windowB.moveTo(((screen.width/2)-(larghezza/2)),((screen.height/2)-(altezza/2)));
}
function ImageLoader(campo,valore){
	var title= 'ImageLoader';
	var url= 'pop-up/image.cfm?field='+campo+'&value='+valore;
	var larghezza= 400;
	var altezza= 400;
	windowI = window.open(url, title, "toolbar=no,location=no,directories=no,status=no,scrollbars=auto,resizable=no,copyhistory=yes,width="+larghezza+",height="+altezza+"");
	windowI.moveTo(((screen.width/2)-(larghezza/2)),((screen.height/2)-(altezza/2)));
}
// apri finestra pop-up centrale predisposta per una Scheda
function Scheda(id) {
	windowB = window.open(dir+"/popups/scheda.cfm?id="+id, "scheda", "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=yes,width=450,height=450");
	windowB.moveTo(((screen.width/2)-(650/2)),((screen.height/2)-(450/2)));	
}
// apri finestra pop-up centrale predisposta per un Tabellino
function Tabellino(id) {
	windowB = window.open(dir+"/popups/tabellino.cfm?id="+id, "tabellino", "toolbar=no,location=no,directories=no,status=no,scrollbars=auto,resizable=no,copyhistory=yes,width=620,height=350");
	windowB.moveTo(((screen.width/2)-(620/2)),((screen.height/2)-(350/2)));	
}
// apri finestra pop-up centrale predisposta per figurHELLAS
function figurHellas() {
	windowB = window.open(dir+"/popups/figurhellas.cfm", "figure", "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=yes,width=450,height=450");
	windowB.moveTo(((screen.width/2)-(450/2)),((screen.height/2)-(450/2)));	
}
// apri finestra pop-up centrale predisposta per i risultati del Protagonista (ADMIN)
function Risultati(id) {
	windowB = window.open(dir+"/popups/risultati.cfm?id="+id, "protagonista", "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=yes,width=450,height=180");
	windowB.moveTo(((screen.width/2)-(450/2)),((screen.height/2)-(180/2)));	
}
// apri finestra pop-up centrale per vedere l'immagine dell'annuncio grande (3 funzioni)
function ImgFull(img) {
	foto1= new Image();
	foto1.src=(img);
	Controlla(img);
} function Controlla(img) {
	if((foto1.width!=0)&&(foto1.height!=0)){
		viewFoto(img);
	}else{
		funzione="Controlla('"+img+"')";
		intervallo=setTimeout(funzione,20);
	}
} function viewFoto(img) {
	stringa="width="+foto1.width+",height="+foto1.height;
	windowImg=window.open(img,"",stringa);
	windowImg.document.write("<html><title>Immagine Ingrandita</title><body leftMargin='0' rightMargin='0' topMargin='0' bottomMargin='0'><img src='"+img+"' alt='clicca per chiudere' border='0' style='cursor:hand' onClick='self.close();'></body></html>");
	windowImg.moveTo(((screen.width/2)-(foto1.width/2)),((screen.height/2)-(foto1.height/2)));
	windowImg.focus();
}
// popup Stampa
function stampa(){
	if (confirm('Vuoi stampare questo articolo?'))	{
		window.print();
		self.close();
	}
}
// bottom - AggiungiAiPreferiti
function addToFavorite(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
	window.external.AddFavorite(location.href, unescape(favTitle));
  }
}