function switchtab(tabid)
{
    var obj;
    var obj2;
	for(i=1; i <8; i++)
	{
		obj=document.getElementById("navtab_"+i);
		obj2=document.getElementById("tabcontent"+i);
		if (obj!=null)
		{
   		   if (i==tabid)
		   {
		     obj.className="carstylesele";
		     if (obj2!=null)
		        obj2.style.display='block';
		   }
		   else
		   {
   		     obj.className="carstyleunsele";
		     if (obj2!=null)
		        obj2.style.display='none';
		   }
		}
    } 
}

function switchtabTwo(tabid)
{
    var obj;
    var obj2;
	for(i=1; i <3; i++)
	{
		obj=document.getElementById("TwoNavtab_"+i);
		obj2=document.getElementById("Twotabcontent"+i);
		if (obj!=null)
		{
   		   if (i==tabid)
		   {
		     obj.className="select_btn";
		     if (obj2!=null)
		        obj2.style.display='block';
		   }
		   else
		   {
   		     obj.className="unselect_btn";
		     if (obj2!=null)
		        obj2.style.display='none';
		   }
		}
    } 
}

function switchdigtab(tabid)
{
    var obj;
    var obj2;
	for(j=1; j <4; j++)
	{
		obj=document.getElementById("thdnavtab_"+j);
		obj2=document.getElementById("Thdtabcontent"+j);
		if (obj!=null)
		{
   		   if (j==tabid)
		   {
		     obj.className="newcarsele";
		     if (obj2!=null)
		        obj2.style.display='block';
		   }
		   else
		   {
   		     obj.className="newcarunsele";
		     if (obj2!=null)
		        obj2.style.display='none';
		   }
		}
    } 
}
var i=1;	
var autotimea;
function updateauto2008()
{
	autotimea = setInterval("updatefor()",6000);
}
function updatefor()
{
	clearInterval(autotimea);
	switchdigtab(i);
	i++;
	if(i>3)
	{
		i=1;	
	}
	autotimea = setInterval("updatefor()",6000);
	document.getElementById('Thdtabcontent'+i).onmouseover = function() {clearInterval(autotimea);}
	document.getElementById('Thdtabcontent'+i).onmouseout = function() {clearInterval(autotimea);autotimea = setInterval("updatefor()",6000);}
}
function updateclear(tabid){
	switchdigtab(tabid);
	i=tabid;
}


function switchdigtabFour(tabid)
{
    var obj;
    var obj2;
	for(i=1; i <4; i++)
	{
		obj=document.getElementById("Fournavtab_"+i);
		obj2=document.getElementById("Fourtabcontent"+i);
		if (obj!=null)
		{
   		   if (i==tabid)
		   {
		     obj.className="navBtnList";
		     if (obj2!=null)
		        obj2.style.display='block';
		   }
		   else
		   {
   		     obj.className="navBtnListB";
		     if (obj2!=null)
		        obj2.style.display='none';
		   }
		}
    } 
}

function switchdigtabFive(tabid)
{
    var obj;
    var obj2;
	for(i=1; i <3; i++)
	{
		obj=document.getElementById("Fivenavtab_"+i);
		obj2=document.getElementById("Fivetabcontent"+i);
		if (obj!=null)
		{
   		   if (i==tabid)
		   {
		     obj.className="carsele";
		     if (obj2!=null)
		        obj2.style.display='block';
		   }
		   else
		   {
   		     obj.className="carunsele";
		     if (obj2!=null)
		        obj2.style.display='none';
		   }
		}
    } 
}
function show(){
	document.getElementById("userInfo").style.display="block";
}


var attachnum = 1;
function addattachment() {
	attachnum < 5 ? attachnum++ : findobj("addattachlink").disabled=true;
	findobj("attach_"+attachnum).style.display = "";
}
