
	
function rotate(vtype,init)
{
  if (vtype=='morph')
  {
  	if (init)
  	{
  		document.getElementById('morph_demo1').style.marginTop='-130px';
  		document.getElementById('morph_demo2').style.marginTop='0px';
  		document.getElementById('morph_demo3').style.marginTop='130px';
  	}
	  setTimeout ( "$('morph_demo3').morph('margin-top:0px;');$('morph_demo2').morph('margin-top:-130px;');document.getElementById('morph_demo1').style.marginTop='130px';document.getElementById('morph_demo1').style.zIndex+=3;", 3000 );
	  setTimeout ( "$('morph_demo1').morph('margin-top:0px;');$('morph_demo3').morph('margin-top:-130px;');document.getElementById('morph_demo2').style.marginTop='130px';document.getElementById('morph_demo2').style.zIndex+=3;", 7000 );
	  setTimeout ( "$('morph_demo2').morph('margin-top:0px;');$('morph_demo1').morph('margin-top:-130px;');document.getElementById('morph_demo3').style.marginTop='130px';document.getElementById('morph_demo3').style.zIndex+=3;", 11000 );
	  setTimeout ( "rotate('"+vtype+"')", 12000 );
  }
  else if (vtype=='morph_horizontal')
  {
  	if (init)
  	{
  		document.getElementById('morph_demo1').style.marginLeft='-957px';
  		document.getElementById('morph_demo2').style.marginLeft='0px';
  		document.getElementById('morph_demo3').style.marginLeft='957px';
  	}
	  setTimeout ( "$('morph_demo3').morph('margin-left:0px;');$('morph_demo2').morph('margin-left:-957px;');document.getElementById('morph_demo1').style.marginLeft='957px';document.getElementById('morph_demo1').style.zIndex+=3;", 3000 );
	  setTimeout ( "$('morph_demo1').morph('margin-left:0px;');$('morph_demo3').morph('margin-left:-957px;');document.getElementById('morph_demo2').style.marginLeft='957px';document.getElementById('morph_demo2').style.zIndex+=3;", 7000 );
	  setTimeout ( "$('morph_demo2').morph('margin-left:0px;');$('morph_demo1').morph('margin-left:-957px;');document.getElementById('morph_demo3').style.marginLeft='957px';document.getElementById('morph_demo3').style.zIndex+=3;", 11000 );
	  setTimeout ( "rotate('"+vtype+"')", 12000 );
  }
  else if (vtype=='opacity')
  {
  	if (init)
  	{
  	}
	  setTimeout ( "document.getElementById('morph_demo1').style.zIndex-=3;new Effect.Opacity('morph_demo3', { from: 1, to: 0, duration: 2 });new Effect.Opacity('morph_demo2', { from: 0, to: 1 });", 3000 );
	  setTimeout ( "document.getElementById('morph_demo3').style.zIndex-=3;new Effect.Opacity('morph_demo2', { from: 1, to: 0, duration: 2 });new Effect.Opacity('morph_demo1', { from: 0, to: 1 });", 7000 );
	  setTimeout ( "document.getElementById('morph_demo2').style.zIndex-=3;new Effect.Opacity('morph_demo1', { from: 1, to: 0, duration: 2 });new Effect.Opacity('morph_demo3', { from: 0, to: 1 });", 11000 );
	  setTimeout ( "rotate('"+vtype+"')", 12000 );
  }
}

