function buildQueryString(theFormName){
theForm=document.forms[theFormName]
var qs=''
for(e=0;e<theForm.elements.length;e++){
if(theForm.elements[e].name!=''){
qs+=(qs=='')?'?':'&'
qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value)}}
return qs}
var start=new Date()
start=Date.parse(start)/1000
var counts=20
function countdown(){
var now=new Date()
now=Date.parse(now)/1000
var x=parseInt(counts-(now-start),10)
if(document.form1){document.form1.clock.value=x;}
if(x>0){timerID=setTimeout("countdown()",100)}}
function textCounter(field,cntfield,maxlimit){
if(field.value.length>maxlimit)
field.value=field.value.substring(0,maxlimit)
else
cntfield.value=maxlimit-field.value.length}
sfHover=function(){
var sfEls=document.getElementById("nav").getElementsByTagName("li")
for(var i=0;i<sfEls.length;i++){
sfEls[i].onmouseover=function(){
this.className+=" sfhover";}
sfEls[i].onmouseout=function(){
this.className=this.className.replace(new RegExp(" sfhover\\b"),"")
}}}
if(window.attachEvent)window.attachEvent("onload",sfHover)
function askMe(){
if(confirm("Sei sicuro di voler eseguire il logout?"))
window.location="http://www.brainstormingit.net/logout.php"}