var menu3f=1;
var menu2f=1;
var news=1;
var menu1f=1;
function aa()
{
	
		var hh=document.getElementById('newsout').style.width;
		
		hh=hh.substring(0,hh.length-2);
		var c = parseInt(hh)+50;
		document.getElementById('newsout').style.width=c + "px";
		if(c<250 && news==1)
		setTimeout("aa()",20);
		else
		{
		news=2;
		
		}
}
function aahide()
{
	
		var hh=document.getElementById('newsout').style.width;
		
		hh=hh.substring(0,hh.length-2);
		var c = parseInt(hh)-50;
		document.getElementById('newsout').style.width=c + "px";
		if(c>0 && news==2)
		setTimeout("aahide()",20);
		else
		{
			
		news=1;
		}
}


function newsout()
{
	
	if(news==1)
	{
		
		aa();
		
		
	}
	else if(news==2)
	{
		aahide();
	}
}
function aamenu()
{
	
		var hh=document.getElementById('divmenu1').style.height;
		
		hh=hh.substring(0,hh.length-2);
		var c = parseInt(hh)+25;
		document.getElementById('divmenu1').style.height=c + "px";
		document.getElementById('divmenu1').style.marginTop="-" + c + "px";
		if(c<351 && menu1f==1)
		setTimeout("aamenu()",20);
		else
		{
		menu1f=2;
		
		}
}
function aamenuhide()
{
	
		var hh=document.getElementById('divmenu1').style.height;
		
		hh=hh.substring(0,hh.length-2);
		var c = parseInt(hh)-25;
		document.getElementById('divmenu1').style.height=c + "px";
		document.getElementById('divmenu1').style.marginTop="-" + c + "px";
		if(c>0 && menu1f==2)
		setTimeout("aamenuhide()",20);
		else
		{
		menu1f=1;
		}
}

function menu1()
{
	
	if(menu1f==1)
	{
		if(menu2f==2)
		{
			document.getElementById('divmenu2').style.height="350px";
		document.getElementById('divmenu2').style.marginTop="-350px";
			aamenu2hide()
		}
		
		if(menu3f==2)
		{
			document.getElementById('divmenu3').style.height="350px";
		document.getElementById('divmenu3').style.marginTop="-350px";
			aamenu3hide()
		}
		document.getElementById('divmenu1').style.height="1px";
		document.getElementById('divmenu1').style.marginTop="-1px";
		aamenu();
		
		
	}
	else if(menu1f==2)
	{
		document.getElementById('divmenu1').style.height="350px";
		document.getElementById('divmenu1').style.marginTop="-350px";
		aamenuhide();
	}
}







function aamenu2()
{
	
		var hh=document.getElementById('divmenu2').style.height;
		
		hh=hh.substring(0,hh.length-2);
		var c = parseInt(hh)+25;
		document.getElementById('divmenu2').style.height=c + "px";
		document.getElementById('divmenu2').style.marginTop="-" + c + "px";
		if(c<351 && menu2f==1)
		setTimeout("aamenu2()",20);
		else
		{
		menu2f=2;
		
		}
}
function aamenu2hide()
{
	
		var hh=document.getElementById('divmenu2').style.height;
		
		hh=hh.substring(0,hh.length-2);
		var c = parseInt(hh)-25;
		document.getElementById('divmenu2').style.height=c + "px";
		document.getElementById('divmenu2').style.marginTop="-" + c + "px";
		if(c>0 && menu2f==2)
		setTimeout("aamenu2hide()",20);
		else
		{
		menu2f=1;
		}
}

function menu2()
{
	

	if(menu2f==1)
	{
		if(menu1f==2)
		{
			document.getElementById('divmenu1').style.height="350px";
		document.getElementById('divmenu1').style.marginTop="-350px";
			aamenuhide()
		}
		
		if(menu3f==2)
		{
			document.getElementById('divmenu3').style.height="350px";
		document.getElementById('divmenu3').style.marginTop="-350px";
			aamenu3hide()
		}
		document.getElementById('divmenu2').style.height="1px";
		document.getElementById('divmenu2').style.marginTop="-1px";
		aamenu2();
		
		
	}
	else if(menu2f==2)
	{
		document.getElementById('divmenu2').style.height="350px";
		document.getElementById('divmenu2').style.marginTop="-350px";
		aamenu2hide();
	}
}




function aamenu3()
{
	
		var hh=document.getElementById('divmenu3').style.height;
		
		hh=hh.substring(0,hh.length-2);
		var c = parseInt(hh)+25;
		document.getElementById('divmenu3').style.height=c + "px";
		document.getElementById('divmenu3').style.marginTop="-" + c + "px";
		if(c<351 && menu3f==1)
		setTimeout("aamenu3()",20);
		else
		{
		menu3f=2;
		
		}
}
function aamenu3hide()
{
	
		var hh=document.getElementById('divmenu3').style.height;
		
		hh=hh.substring(0,hh.length-2);
		var c = parseInt(hh)-25;
		document.getElementById('divmenu3').style.height=c + "px";
		document.getElementById('divmenu3').style.marginTop="-" + c + "px";
		if(c>0 && menu3f==2)
		setTimeout("aamenu3hide()",20);
		else
		{
			
		menu3f=1;
		}
}

function menu3()
{
	

	if(menu3f==1)
	{
		if(menu1f==2)
		{
			document.getElementById('divmenu1').style.height="350px";
		document.getElementById('divmenu1').style.marginTop="-350px";
			aamenuhide()
		}
		
		if(menu2f==2)
		{
			document.getElementById('divmenu2').style.height="350px";
		document.getElementById('divmenu2').style.marginTop="-350px";
			aamenu2hide()
		}
		document.getElementById('divmenu3').style.height="1px";
		document.getElementById('divmenu3').style.marginTop="-1px";
		aamenu3();
		
		
		
	}
	else if(menu3f==2)
	{
		document.getElementById('divmenu3').style.height="350px";
		document.getElementById('divmenu3').style.marginTop="-350px";
		aamenu3hide();
	}
}


function tip1(i)
{
	
	if(i==1)
	{
	document.getElementById('toottip').style.display="";
	document.getElementById('toottip').style.marginTop="40px";
	document.getElementById('toottip').style.marginLeft="10px";
	document.getElementById('toottip').innerHTML="Follow us on Twitter";
	}
	if(i==2)
	{
	document.getElementById('toottip').style.display="";
	document.getElementById('toottip').style.marginTop="40px";
	document.getElementById('toottip').style.marginLeft="55px";
	document.getElementById('toottip').innerHTML="Follow us on Facebook";

	}
	if(i==3)
	{
	document.getElementById('toottip').style.display="";
	document.getElementById('toottip').style.marginTop="40px";
	document.getElementById('toottip').style.marginLeft="100px";
	document.getElementById('toottip').innerHTML="Follow us on Orkut";

	}
	if(i==4)
	{
	document.getElementById('toottip').style.display="";
	document.getElementById('toottip').style.marginTop="40px";
	document.getElementById('toottip').style.marginLeft="145px";
	document.getElementById('toottip').innerHTML="Our Blog";
	}
	
}
function tip2(i)
{
	
	if(i==1)
	{
	document.getElementById('toottip').style.display="none";

	}
	if(i==2)
	{
	document.getElementById('toottip').style.display="none";
	}
	if(i==3)
	{
	document.getElementById('toottip').style.display="none";
	}
	if(i==4)
	{
	document.getElementById('toottip').style.display="none";
	}
	
}
