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)
{

      if (f=='des') { s2=s1+1; if (s2==col) s2=0;  f1=f+""+s1; f2=f+""+s2;}
               else { p2=p1+1; if (p2==cop) p2=0;  f1=f+""+p1; f2=f+""+p2;}
      bgColor = new Fx.Tween(f1, {duration:2500});
      bgColor.start('opacity','1', '0');
      $(f1).style.display='none';
      $(f2).style.display='';
      bgColor = new Fx.Tween(f2, {duration:2500})
      bgColor.start('opacity','0', '1');
      if (f=='des'){ s1++; if (s1==col) s1=0;}
               else{ p1++; if (p1==cop) p1=0;}
}

function timedDes(){ CM('des'); setTimeout("timedDes()",8000);}
function timedDem(){ CM('dem'); setTimeout("timedDem()",8000);}

function Gasim (col1,col2)
{
for (var i=1;i<col1;i++)
{
var des="des"+i;
$(des).style.display='none';
$(des).style.opacity='0';
}

for (var i=1;i<col2;i++)
{
var dem="dem"+i;
$(dem).style.display='none';
$(dem).style.opacity='0';
}
}


function bgout(t,t1,t2)
  {
        bgColor = new Fx.Tween(t, {duration:1000});
        bgColor.start('color',t1,t2);
  }
