<!--
var reNoName =/[^ a-z'àèìòù-]/gi;
var reNoNick =/[^ a-z0-9_@\.'àèìòù-]/gi;
function checkEmail(strMail) {
// non permette caratteri speciali diversi da _ - .
	var re;
	var arrayDummy;
	re = /[a-zA-Z0-9]+(\.?[a-zA-Z0-9\-\_]+)*@[a-zA-Z0-9]+(\.?[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,4}/;
  if ((strMail.length < 8) || (strMail.length > 320)) { return false; }
  if (strMail.search(re) == -1) { return false; }
	arrayDummy = strMail.split("@");
  if (arrayDummy.length != 2) { return false; }
  if (arrayDummy[0].length > 64) { return false; }
  if (arrayDummy[1].length > 255) { return false; }
  return true;
}

var giornoLungo = Array("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato");
var meseLungo = Array("gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre");
var xStep = 0;
var xStepOra = 0;
var rollingText = "                                                                      Altriautori.com: racconti, poesie, incipit, disegni, illustrazioni, multimedia e tanto altro";
function statusText()
{
  var a = new Date();
	var o = a.getHours();
	var m = a.getMinutes();
	var s = a.getSeconds();
	if (xStep<70) {
  	window.defaultStatus=rollingText.substring(xStep,(xStep+95));
  	window.Status=rollingText.substring(xStep,(xStep+95));
		xStep+=1;
  	statusTextID=window.setTimeout("statusText()",50,"JavaScript");
	} else {
		if (xStep==100) {
    	parseInt(o)<10?o="0"+o:null;
    	parseInt(m)<10?m="0"+m:null;
    	parseInt(s)<10?s="0"+s:null;
    	window.defaultStatus=" Altriautori.com \xA9 2008 - "+" "+giornoLungo[a.getDay()]+" "+a.getDate()+" "+meseLungo[a.getMonth()]+" "+a.getFullYear()+" - Ore: "+o+":"+m+":"+s;
    	window.status=" Altriautori.com \xA9 2008 - "+" "+giornoLungo[a.getDay()]+" "+a.getDate()+" "+meseLungo[a.getMonth()]+" "+a.getFullYear()+" - Ore: "+o+":"+m+":"+s;
      if (xStepOra<23) {
        xStepOra+=1;
      } else {
        xStep=0;
        xStepOra=0;
      }
    	statusTextID=window.setTimeout("statusText()",1000,"JavaScript");
		} else {
    	statusTextID=window.setTimeout("statusText()",8500,"JavaScript");
  		xStep=100;
		}
	}
}
var ix = "";
function TrimString(sInString) { sInString = sInString.replace( /^\s+/g, "" ); return sInString.replace( /\s+$/g, "" ); }
function IsITDate(strStringa){
  var DateArray;
	var giorno, mese, anno;
  DateArray = strStringa.split("/");
  if (DateArray.length != 3) {
    DateArray = strStringa.split("-");
    if (DateArray.length != 3) { return false; }
  }
  if (isNaN(DateArray[0]) || isNaN(DateArray[1]) || isNaN(DateArray[2])) {  return false; }
	giorno = parseInt(DateArray[0]); mese = (parseInt(DateArray[1]) - 1); anno = parseInt(DateArray[2]); 
  var tempDate = new Date(anno, mese, giorno);
  if ((anno != tempDate.getFullYear()) || (mese != tempDate.getMonth()) || (giorno != tempDate.getDate())) {  return false; }
	return true;
}
function DiffDate(strStringa1, strStringa2){
  var DateArray1, DateArray2;
  DateArray1 = strStringa1.split("/");
  if (DateArray1.length != 3) { DateArray1 = strStringa1.split("-"); }
  DateArray2 = strStringa2.split("/");
  if (DateArray2.length != 3) { DateArray2 = strStringa2.split("-"); }
  var tempDate1 = new Date(parseInt(DateArray1[2]), (parseInt(DateArray1[1]) - 1), parseInt(DateArray1[0]));
  var tempDate2 = new Date(parseInt(DateArray2[2]), (parseInt(DateArray2[1]) - 1), parseInt(DateArray2[0]));
	return (tempDate2 - tempDate1);
}
function addToFavorite(){ window.external.AddFavorite("http://localhost/altriautori_sito/index.htm", unescape('Altriautori.com')); }
function AA_preloadAll() { AA_preloadImages("img/q_mark_on.gif","img/up_on.gif","img/pul_home_on.jpg","img/pul_new1_off.jpg","img/pul_cerca1_off.jpg","img/pul_info1_off.jpg","img/pul_amici1_off.jpg","img/pul_entra_off.jpg","img/pul_esci_off.jpg") }
function AA_preloadPulop() { AA_preloadImages("img/pul_bio_on.gif","img/pul_comm_on.gif","img/pul_msg_on.gif","img/pul_viola_on.gif","img/mailsi_on.gif","img/mailno_on.gif","img/ico_si_on.gif","img/ico_no_on.gif") }

function AA_openBrWindow(theURL, winName, features) { prova=window.open(theURL,winName,features); }
function AA_openModal (theURL, varArgs, H, W, T, L) {
  var strFeatures, strCenter;
	if (H < 100) { H = 100; }
	if (W < 100) { W = 100; }
	if ((T < 0) || (L < 0)) { strCenter = "Yes"; T = ""; L = ""; } else { strCenter = "No"; }
  strFeatures = "dialogHeight: " + H + "px; dialogWidth: " + W + "px; dialogTop: " + T + "px; dialogLeft: " + L + "px;";
  strFeatures = strFeatures + " edge: Raised; center: " + strCenter + "; help: No; resizable: No; status: No;";;
  return window.showModalDialog(theURL, varArgs, strFeatures);
}

function AA_preloadImages() {
  var d=document;
  if(d.images){
    if(!d.AA_p) d.AA_p=new Array();
    var i,j=d.AA_p.length,a=AA_preloadImages.arguments;
    for(i=0; i<a.length; i++)
      if (a[i].indexOf("#")!=0){
        d.AA_p[j]=new Image; d.AA_p[j++].src=a[i];
      }
  }
}
function AA_swapImage() {
  var i,j=0,x,a=AA_swapImage.arguments;
  document.AA_sr=new Array;
  for(i=0;i<(a.length-2);i+=3)
    if ((x=AA_findObj(a[i]))!=null){
      document.AA_sr[j++]=x;
      if(!x.oSrc) x.oSrc=x.src;
      x.src=a[i+2];
    }
}	
function AA_swapImgRestore() {
  var i,x,a=document.AA_sr;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function AA_findObj(n, d) { //v4.0
  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n];
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=AA_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n);
  return x;
}
function AA_click(SndObj) { eval("document." + SndObj + ".play()"); }	
function check_for_link(strVariable){
  strVariable = strVariable.toLowerCase( );
  if (strVariable.indexOf("href") >= 0){
    alert("Nel testo è stato riscontrato un collegamento esterno.\nSi prega di eliminarlo perchè contrario al regolamento\ndel sito. Grazie.");
		return true;
  }
  return false;
}
function cancella_opera(opera_id, opera_titolo, pag_num, pag_ini) {
  if (confirm("Conferma la cancellazione dell'opera:\n>>>   " + opera_titolo + "   <<< ?")) {
    document.location = "op_del.asp?ido=" + opera_id + "&pgn=" + pag_num + "&pgi=" + pag_ini;
    return;
  }
  return;
}
function AA_commuta(obj1, obj2){
  if (obj1 != undefined) { obj1.style.display='none'; }
  if (obj2 != undefined) { obj2.style.display='block'; }
}
//-->

