/* Author: Priya Ranjan [ranjandd2002@yahoo.com]*/
/* Simple Text Animation */
var mq="";
var cur=0,k=0,delay=0;
var mk="",max=0,mpmpt=0;
var c1=150,c2=150,c3=150,bc1=150,bc2=150,bc3=150;
var colBack1="255,255,255",colBack2="0,0,255";
var sPrompt="Aryaman Babu" 
var itm=0;
var iq=0;
var quotes="";

function LogoApp(whichPage){
	
	if (whichPage=="MAIN" )
	{
	iq=parseInt(Math.random()*10);
	quotes=new Array("This 'telephone' has too many shortcomings to be seriously considered as a means of communication.",
		"The dreams is not what you see while asleep, Dream is the thing which does not let you sleep."
		,"Not everything that can be counted counts, and not everything that counts can be counted.-Albert Einstein",
		"The real problem is not whether machines think but whether men do.",
		"Man is still the most extraordinary computer of all.",
		"Beware of computer programmers that carry screwdrivers.",
		"To err is human, but to really foul things up you need a computer.",
		"Computers are like bikinis. They save people a lot of guesswork.",
		"Never trust a computer you can't throw out a window.",
		"The perfect computer has been developed. You just feed in your problems and they never come out again",
		"The most important thing in science is not so much to obtain new facts as to discover new ways of thinking about them.",
		"This 'telephone' has too many shortcomings to be seriously considered as a means of communication.");
	setTimeout("activeAPP()",3000);
	}
}
function activeAPP(){
	var sTag='info'+itm.toString();
	if (itm==0)
		{
		itm++;
		sTag='info'+itm.toString();
		setTimeout("activeAPP()",3000);
		document.getElementById('HDIV').backgroundImage='url(http://www.download.com/AM-Messenger/3000-2150_4-10861353.html?part=dl-10861353&subj=dl&tag=button)';
		}
	else if(itm>0 && itm <=8)
		{
		document.getElementById(sTag).style.color='navy';
		if (itm==1)
		{
		document.getElementById('HDIV').backgroundImage='url(http://www.download.com/AM-Server/3000-2150_4-10861351.html?part=dl-10861351&subj=dl&tag=button)';	
		} 
		if (itm==8) itm=1; else itm++;
		sTag='info'+itm.toString();
		if(itm==8){
			document.getElementById(sTag).style.color='red';
		}else{
			document.getElementById(sTag).style.color='blue';
		}
		setTimeout("activeAPP()",3000);
		}
		if (itm==8){
		    iq++;
		    if (iq >=9) iq=0;
		    document.getElementById('qoutebox').innerHTML=quotes[iq];
		}

}
function LogoAppX(whichPage){
	switch(whichPage)
		{   case "MAINx":
				mk=new Array("Visual Basic","ASP","PHP","Java","Perl","C/C++","HTML");
				mq=new Array("Which one you are looking for..?","Tell me your choice..","Innovative touch");
				max=6;mpmpt=2;
				startAnim();
				break;
			case "DEMOx":
				mk=new Array("Inventory","E-Commerce","ActiveX","Applets", "Networking","Client Server","Web Pages","Java Programs", "Perl Scripts");
				mq=new Array("Which one you are looking for..?","Tell me your choice..","Innovative touch");
				max=8;mpmpt=2;
				startAnim();
				break;
			case "DNLDx":
				mk=new Array("Custom Softwares","Web Site Designing", "Database Administration","Client Server Support");
				new Array("Which one you are looking for..?","Tell me your choice..","Innovative touch");
				max=3;mpmpt=2;
				startAnim();
				break;
			case "RESUMEx":
				mk=new Array("Commitment","Labor","Achievement","Solution","Innovative touch","Goals","Objectives","Professonalism");
				mq=new Array("Am I fit for the job..?","Contact me","Try me..");
				max=7;mpmpt=2;
				startAnim();
				break;
			case "PRJx":
				mk=new Array("Custom Softwares","Web Site Designing", "Database Administration","Client Server Support");
				mq=new Array("Which one you are looking for..?","Tell me your choice..","Innovative touch");
				max=3;mpmpt=2;
				startAnim();
				break;
			default:
				break;
		}

}

function activeAPPX(){
	
	if (cur>max){
		if(k>mpmpt){
			k=0;cur=0;
			colBack1=randomColor();
			colBack2=randomColor();
			document.LG.prepareImage(sPrompt,randomColor(),colBack1,colBack2,0,0,"Arial",28,1,1);
			var i=parseInt(Math.random()*8);
			if(i>5) i=5;
			if(i<0) i=0;
			if (i==0)
			   document.LG.combFade(0,70,8,15);
			else if(i==1)
			    document.LG.combFade(1,150,40,5);
			else if(i==2)
			    document.LG.randomPeck(60,250,2,50,2);
			else if(i==3)
			    document.LG.centerEmerge(150,12,1);
			else if(i==4)
			    document.LG.centerEmerge(150,2,0);
			else if(i==5)
				{
				k=parseInt(Math.random()*8)
				document.LG.CheckerBoard(250,20,20,1,1,k);
				}
			delay=12000;
			document.LG.setGradient(colBack1,colBack2,2,0);
			
		}else{
			colBack1=randomColor();
			colBack2=randomColor();
			document.LG.setGradient(colBack1,colBack2,2,0);
			document.LG.wooBoo(mq[k],150,10,30,1,0,randomColor(),5);
			k++;
			delay=9000;		
      }
	}else{
		document.LG.wooBoo(mk[cur],150,10,30,1,0,colBack1,5);
		cur++;
		delay=4000;
	}
	setTimeout("activeAPP()",delay);	
}
function startAnim(){
	try{	
		document.LG.setGradient(randomColor(),randomColor(),2,0);
		activeAPP();	
	}catch(errVar){return;};
}
function randomColor(){
	bc1=parseInt(Math.random()*255);
	bc2=parseInt(Math.random()*255);
	bc3=parseInt(Math.random()*255);
	return(bc1+","+bc2+","+bc3);
	try{
		}catch(errorvar){alert("Unablwe to load applet..");return;}
}
function SelectTab(TabIndex, MaxTabs, TabPreFix,TabDataPrefix,TabLink)
{
    var i =0;
    for (i=1; i<= MaxTabs ;i++)
    {
        if(i==TabIndex)
        {
            document.getElementById( TabLink + i.toString()).className="SEL_TAB_LINK";
            var dObj=document.getElementById(TabDataPrefix + i.toString());
            dObj.className="SelTab";
            dObj.style.display="block"; 
            
        }else
        {
            document.getElementById( TabLink + i.toString()).className="";
            document.getElementById( TabPreFix + i.toString()).className="NormalTab";
            document.getElementById( TabDataPrefix + i.toString()).style.display="none"; 
            
        }
    }
}