function contrCat() {
if(document.cat.nit.value == "")
{
alert("Campo obbligatorio: Nome italiano");
document.cat.nit.focus();
document.cat.nit.select();
return false;
}
if(document.cat.nen.value == "")
{
alert("Campo obbligatorio: Nome inglese");
document.cat.nen.focus();
document.cat.nen.select();
return false;
}
}

function contrMac() {
if(document.mac.cat.value == "")
{
alert("Campo obbligatorio: Categoria");
return false;
}
if(document.mac.mod.value == "")
{
alert("Campo obbligatorio: Modello");
document.mac.mod.focus();
document.mac.mod.select();
return false;
}
if(document.mac.anno.value == "")
{
alert("Campo obbligatorio: Anno");
document.mac.anno.focus();
document.mac.anno.select();
return false;
}
if(document.mac.compit.value == "")
{
alert("Campo obbligatorio: Composizione (italiano)");
document.mac.compit.focus();
document.mac.compit.select();
return false;
}
if(document.mac.compen.value == "")
{
alert("Campo obbligatorio: Composizione (inglese)");
document.mac.compen.focus();
document.mac.compen.select();
return false;
}
}

function contrMac2() {
if(document.mac.mod.value == "")
{
alert("Campo obbligatorio: Modello");
document.mac.mod.focus();
document.mac.mod.select();
return false;
}
if(document.mac.anno.value == "")
{
alert("Campo obbligatorio: Anno");
document.mac.anno.focus();
document.mac.anno.select();
return false;
}
if(document.mac.compit.value == "")
{
alert("Campo obbligatorio: Composizione (italiano)");
document.mac.compit.focus();
document.mac.compit.select();
return false;
}
if(document.mac.compen.value == "")
{
alert("Campo obbligatorio: Composizione (inglese)");
document.mac.compen.focus();
document.mac.compen.select();
return false;
}
}

function contrNews() {
if(document.news.title.value == "")
{
alert("Campo obbligatorio: Titolo");
document.news.title.focus();
document.news.title.select();
return false;
}
}

function playSound(audioURL) {
  if (document.all) document.all['BGSOUND_ID'].src=audioURL;
  else self.iplayer.location.replace('jsplayer.htm?'+audioURL);
  document.getElementById("equa").src = 'images/equa.gif';
  document.getElementById("play").src = 'images/play1.png';
  document.getElementById("stop").src = 'images/stop.png';
  timeOutId = setTimeout("playSound('CENTRAL6.mid')", 70000);
}

function stopSound() {
  if (document.all) document.all['BGSOUND_ID'].src='jsilence.mid';
  else self.iplayer.location.replace('jsplayer.htm?stop');
  document.getElementById("equa").src = 'images/equa1.gif';
  document.getElementById("play").src = 'images/play.png';
  document.getElementById("stop").src = 'images/stop1.png';
  clearTimeout(timeOutId);
}
