<!----------------Global Variable Declarations----------->
var sColor1="white";
var sColor2="gray";
var iColorLoop=0;
var iCurrentCELL=0;
var iTextLoop=0;
var iTextchange=0;
var bAscending=true;
var max_ads=2;
<!------------------------------------------------------->

celColorChange = new Array(iCurrentCELL)

function cycleColors()
{
if (bAscending)
    {
	if(document.all.celColorChange==null)
		return;
	with(document.all)
	celColorChange[iCurrentCELL].style.color=sColor2;
	iCurrentCELL++;

	if (iCurrentCELL>2)
       {
	    bAscending=false;
	    iCurrentCELL=1;
       }
    }
else
    {
		if(document.all.celColorChange==null)
		return;
	with(document.all)
	celColorChange[iCurrentCELL].style.color=sColor1;
   	iCurrentCELL--;
   	if (iCurrentCELL==0)
       {
	    bAscending=true;
	    changeColors();
       }
    }		
}

function rotateNoticeTexts()
{

  max_ads = 2;
  switch (iTextLoop)
   {
   case 0:
	document.all.txtid1.innerHTML="<b>CLASS ROOM</b>";
	document.all.txtid2.innerHTML=" <b>REGULAR COURSE </b>";
	break;
   case 1:
	document.all.txtid1.innerHTML="<b>CRASH COURSE</b>";
	document.all.txtid2.innerHTML="<b>REVISION TEST SERIES(RTS)</b>";
	break;
   case 2:
	document.all.txtid1.innerHTML="<b>PRACTICE TEST SERIES(PTS)</b></b>";
	document.all.txtid2.innerHTML="(for X & XIISc Board <br/>& <br/>Entrance Exam '09)";
	break;
   case 3:
	document.all.txtid1.innerHTML="<b>PRACTICE TEST SERIES(PTS)</b>";
	document.all.txtid2.innerHTML="(for XII COMMERCE Board + CPT Exam '09)";
   case 4:
	document.all.txtid1.innerHTML="<b>PTS & CRASH COURSE</b>";
	document.all.txtid2.innerHTML=" BOOST YOUR SCORE BY ABOUT 30%";
	break;
   }
}

function changeColors()
{
  if(iColorLoop==0)
  {
	if(iTextchange==0)
	{

		rotateNoticeTexts();

		iTextLoop++;

		if(iTextLoop>(max_ads-1))
			iTextLoop=0;
	}
	iTextchange++;
	if(iTextchange==3) {iTextchange=0;}
  }

switch (iColorLoop)
   {
   case 0:
	sColor1="yellow";
	sColor2="orange";
	break;
   case 1:
	sColor1="white";
	sColor2="white";
	break;
   case 2:
	sColor1="aqua";
	sColor2="lightblue";
	break;
   case 3:
	sColor1="lightgreen";
	sColor2="lightgreen";
   }
 iColorLoop++;
 if (iColorLoop>3)
     iColorLoop=0;
}
