
// MM JumpLink


if(top!= self) top.location.href = self.location.href

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


// Google search

var x="www.sorellanatura.org"
function Googlesearch(Y){
Y.q.value="site:"+x+" "+Y.qfront.value
}


// Window

function newWin(fileName,winWidth,winHeight,winLeft,winTop){
	if (winWidth==null) {winWidth=400}
	if (winHeight==null) {winHeight=400}
	if (winLeft==null) {winLeft=10}
	if (winTop==null) {winTop=10}
	winPop = window.open(fileName,'popUpWin','toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,copyhistory=0,width='+winWidth+',height='+winHeight+',screenX='+winLeft+',screenY='+winTop+',left='+winLeft+',top='+winTop);
	winPop.focus();
}

// Controllo form

function test()
{
        if (document.form.privacy[0].checked == true)
        {
        document.form.action="rivista.php";		
        document.form.submit();
        }
        else alert("Se l'informativa non viene accettata non è possibile inviare il messaggio");
		return false();
}

function Ctrl_form(theForm,j)
{k=0
for (i=j-1;i>=0;i--)
{
  
  st = theForm.elements[i].name.toString();
  if (st.substring(0,1)=="*")
  {
    if (theForm.elements[i].value == "")
      {
        alert("Inserire un valore per il campo \" " + theForm.elements[i].name + " \".");
        theForm.elements[i].focus();
        k=k+1
      }
  }
  }
  if (k>0) return (false);
}