function msfShow(q)
{
document.getElementById(q).style.display="";
}

function msfHide(q)
{
document.getElementById(q).style.display="none";
}

function msfToggle(q)
{
if (document.getElementById(q).style.display=="none") document.getElementById(q).style.display="";
else document.getElementById(q).style.display="none";
}

function CM (f)
{



      s2=s1+1; if (s2==col) s2=0;  f1=f+""+s1; f2=f+""+s2;

      if ((s2>=0)&&(s2<r2)) msfSwitchPoint(1);
      if ((s2>=r2)&&(s2<r3))  msfSwitchPoint(2);
      if ((s2>=r3)&&(s2<col)) msfSwitchPoint(3);

      bgColor = new Fx.Tween(f1, {duration:2000});
      bgColor.start('opacity','1', '0');
      $(f1).style.display='none';
      $(f2).style.display='';
      bgColor = new Fx.Tween(f2, {duration:2000})
      bgColor.start('opacity','0', '1');
      s1=s2;

}

function CN (f)
{



      s2=s1-1; if (s2==-1) s2=col-1;  f1=f+""+s1; f2=f+""+s2;

      if ((s2>=0)&&(s2<r2)) msfSwitchPoint(1);
      if ((s2>=r2)&&(s2<r3))  msfSwitchPoint(2);
      if ((s2>=r3)&&(s2<col)) msfSwitchPoint(3);

      //alert(s1+"-"+s2);

      bgColor = new Fx.Tween(f1, {duration:2000});
      bgColor.start('opacity','1', '0');
      $(f1).style.display='none';
      $(f2).style.display='';
      bgColor = new Fx.Tween(f2, {duration:2000})
      bgColor.start('opacity','0', '1');
      s1=s2;

}

function CC (f,c)
{



      s2=c; f1=f+""+s1; f2=f+""+s2;

      if ((s2>=0)&&(s2<r2)) msfSwitchPoint(1);
      if ((s2>=r2)&&(s2<r3))  msfSwitchPoint(2);
      if ((s2>=r3)&&(s2<col)) msfSwitchPoint(3);

      //alert(s1+"-"+s2);

      bgColor = new Fx.Tween(f1, {duration:2000});
      bgColor.start('opacity','1', '0');
      $(f1).style.display='none';
      $(f2).style.display='';
      bgColor = new Fx.Tween(f2, {duration:2000})
      bgColor.start('opacity','0', '1');
      s1=s2;
}

function timedDes(){ CM('des'); setTimeout("timedDes()",8000);}

function Gasim (col1)
{
for (var i=1;i<col1;i++)
{
var des="des"+i;
$(des).style.display='none';
$(des).style.opacity='0';
}
}

function bgout(t,t1,t2)
  {
        bgColor = new Fx.Tween(t, {duration:1000});
        bgColor.start('color',t1,t2);
  }

// ------------------SWITSH MENU ITEMS ---------------
function msfSwitchPoint(p)
{


for (i=1;i<=3;i++)
{
me="im"+i;
sr="images/q_1"+i+".gif";
sw="images/q2_1"+i+".gif";

if (i==p) document.getElementById(me).src=sw;
else document.getElementById(me).src=sr;
}

}