function upDownSlide(obj,num,showid,classid,classstr,classstr2)
{
   var show_con = document.getElementById(obj+'_'+showid);
   for(var i=1;i<=num;i++){
	   document.getElementById(obj+'_'+i).style.display = "none";
	   if (classid!='')
	   {
	        document.getElementById(classid+'_'+i).className=classstr2;
	   }
   }
   show_con.style.display = "block";
  if (classid!='')
   {
      document.getElementById(classid+'_'+showid).className=classstr;
   }
}

function addstyle(evobj,allid,id)
{
   for(var i=1;i<=allid;i++)
   {
       document.getElementById(evobj+i).className="ma";
   }
	document.getElementById(evobj+id).className="mhover";
}

function delstyle(evobj,showid)
{
	document.getElementById(evobj).className="ma";
    document.getElementById(showid).className="mhover";
}

function OpenUrlFunction(url,typestr)
{
    if (typestr=="blank")
    {
        window.open (url,"newwindow","height=600, width=800, toolbar=yes,menubar=yes, scrollbars=yes, resizable=yes, location=yes,status=yes,top=0,left=0");
    }
    else
    {
        window.location.href=url;
    }
}

function TypeMouseOver(evobj,allid,id,css1,css2)
{
   for(var i=1;i<=allid;i++)
   {
       document.getElementById(evobj+i).className=css1;
   }
	document.getElementById(evobj+id).className=css2;
}

function TypeMouseOut(evobj,allid,id,css1,css2)
{
   for(var i=1;i<=allid;i++)
   {
       document.getElementById(evobj+i).className=css1;
   }
	var url=window.location.href.toLowerCase();
	if(url.indexOf("?")>-1)
	{
		url=url.substring(0,url.indexOf("?"));
	}
    if(url.indexOf("allgroupbuy-wuhan-1.html")>-1)
	{
		obj=document.getElementById(evobj+"1");
	}				
	else if(url.indexOf("allgroupbuy-wuhan-2.html")>-1)
	{
		obj=document.getElementById(evobj+"2");
	}
	else if(url.indexOf("allgroupbuy-wuhan-3.html")>-1)
	{
		obj=document.getElementById(evobj+"3");
	}
	else if(url.indexOf("searchlist.aspx?s=0")>-1)
	{
		obj=document.getElementById(evobj+"1");
	}
	else if(url.indexOf("searchlist.aspx?s=2")>-1)
	{
		obj=document.getElementById(evobj+"2");
	}
	else if(url.indexOf("searchlist.aspx?s=3")>-1)
	{
		obj=document.getElementById(evobj+"3");
	}
	else if(url.indexOf("searchlist.aspx?s=4")>-1)
	{
		obj=document.getElementById(evobj+"4");
	}
	else if(url.indexOf("searchlist.aspx?p=4")>-1)
	{
		obj=document.getElementById(evobj+"5");
	}					
	else
	{
		obj=null;
	}
	if(obj!=null)
	{
		obj.className=css2;
	}	   
	//document.getElementById(evobj+id).className=css2;
}
