// JavaScript Document
var hh=60;
var pp=0;
var inter;

//we show the box by setting the visibility of the element and incrementing the height smoothly
function ShowBox1()
{

  obj = document.getElementById("coverlogin");
	obj1 = document.getElementById("loging");
	obj2 = document.getElementById("basket");
	obj3 = document.getElementById("search");
	
  obj.style.visibility = 'visible';
  obj1.style.visibility = 'visible';
  obj2.style.visibility = 'hidden';
  obj3.style.visibility = 'hidden';

//Depending on the amount of text, set the maximum height here in pixels
	if(hh==234)
	{
	clearInterval(inter);
	return;
	}

	hh+=6;
	pp-=2
	obj.style.width = hh + 'px';
	//obj.style.left = pp + 'px';
}
function ShowBox2()
{
  obj = document.getElementById("coverlogin");
	obj1 = document.getElementById("loging");
	obj2 = document.getElementById("basket");
	obj3 = document.getElementById("search");
	
  obj.style.visibility = 'visible';
  obj1.style.visibility = 'hidden';
  obj2.style.visibility = 'visible';
  obj3.style.visibility = 'hidden';
    
//Depending on the amount of text, set the maximum height here in pixels
	if(hh==234)
	{
	clearInterval(inter);
	return;
	}
  
	hh+=6;
	pp-=2
	obj.style.width = hh + 'px';
	//obj.style.left = pp + 'px';
}
function ShowBox3()
{
  
  obj = document.getElementById("coverlogin");
	obj1 = document.getElementById("loging");
	obj2 = document.getElementById("basket");
	obj3 = document.getElementById("search");
	
  obj.style.visibility = 'visible';
  obj1.style.visibility = 'hidden';
  obj2.style.visibility = 'hidden';
  obj3.style.visibility = 'visible';
  
//Depending on the amount of text, set the maximum height here in pixels
	if(hh==234)
	{
	clearInterval(inter);
	return;
	}

	hh+=6;
	pp-=2
	obj.style.width = hh + 'px';
	//obj.style.left = pp + 'px';
}

//same way as above but reversed
function HideBox()
{
	obj = document.getElementById("coverlogin");

	if(hh==60)
	{
	obj.style.width = '60px';
	clearInterval(inter);
	return;
	}
	hh-=6;
	pp+=2;
	obj.style.width = hh + 'px';
	//obj.style.left = pp + 'px';
}
