
//*************************************************
//函数名：show
//作  用：类似QQ菜单的上下划动
//参  数：x   ----显示层的序列  第几个
//       shozs   总层数
//返回值：显示下属层
//*************************************************
//function shows(x,shozs)
//{
//  for (i=1; i<=shozs;i++)
//    {
//       if (i==parseInt(x))
//           {  
//		      if (document.getElementById("smallclass" + x).style.display=="none")
//		          {
//					  document.getElementById("smallclass" + x).style.display="block";
//					  }
//		      else
//			      {
//					  document.getElementById("smallclass" + x).style.display="none";
//					  }
//			   
//           }
//       else
//          {document.getElementById("smallclass" + i).style.display="none";}
//
//    }
//}

function shows(x,shozs)
{

list = document.getElementById("smallclass" + x);
biglist = document.getElementById("biglist" + x);
if (list.style.display == "none")
{
	list.style.display = "block";
	biglist.src="images/bots.gif";

}else
{
	list.style.display = "none";
	biglist.src="images/1bots.gif";
}
}

function showd(t)
{

list = document.getElementById("minclass" + t);
list.style.display = "block";
}
function showo(t)
{

list = document.getElementById("minclass" + t);
list.style.display = "none";
}


function shopadd(id,act,j){
	if (j=="0")
	{sl="3";}
	else
	{sl=$('#sl'+j).val();}
	$.ajax(
		   {
			   type:'GET',
			   beforeSend:function(){},
			   url:'shopadd.asp',
			   data:{'id':id,'action':act,'sl':sl},
			   dataType:'html',
			   error:function(XMLHttpRequest, textStatus, errorThrown){alert(XMLHttpRequest.status);},
			   success:function(html){
					
					
					if(html=='Please sign in to use this function!')
					    {alert(html);
						window.location.href='login.asp?formpage='+window.location.href;}
					if(html=='Sorry, your account is locked, please contact customer service related issues!')
					{alert(html);
						window.location.href='/';
					}
					if (act=="shop")
					{$("#xian"+id).html("<img src='images/dagou2.jpg' style='width:60px; height:21px; border:0; padding:0; margin:5px 0 0 0;'  />");
					}
					if (act=="book")
					{$("#xian"+id).html("<img src='images/dagou1.jpg' style='width:60px; height:21px; border:0; padding:0; margin:5px 0 0 0;'  />");
					}
					if (act=="collect")
					{$("#hou"+id).html("<img src='images/dagou.jpg' style='width:60px; height:21px; border:0; padding:0; margin:5px 0 0 0;' />");
					}
					
					
					}});
	return false;
	}
	
function sEval(id,sx){
	$.ajax(
		   {
			   type:'GET',
			   beforeSend:function(){},
			   url:'dc.asp',
			   data:{'id':id,'sx':sx},
			   dataType:'html',
			   error:function(XMLHttpRequest, textStatus, errorThrown){alert(XMLHttpRequest.status);},
			   success:function(html){
			   $("#ding").html(html)
					}});
	return false;
	}
function sEval1(id,sx){
	$.ajax(
		   {
			   type:'GET',
			   beforeSend:function(){},
			   url:'dc.asp',
			   data:{'id':id,'sx':sx},
			   dataType:'html',
			   error:function(XMLHttpRequest, textStatus, errorThrown){alert(XMLHttpRequest.status);},
			   success:function(html){
					$("#kcun").html(html)
					}});
	return false;
	}

function changelocation(anclassid)
    {
    var anclassid=anclassid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][0] == anclassid)
            {
			 document.getElementById("tel1").value=subcat[i][1];
            }       
        }
       
    }   

function show(ids)
{   
		  
   for (i=1; i<=3;i++)
   {
      if (i==ids)
	    {
	      document.getElementById("sm"+i).style.display="block";
		  document.getElementById("title"+i).style.color="#000000";
	    }
	  else
	    {
	        document.getElementById("sm"+i).style.display="none";
			document.getElementById("title"+i).style.color="#666666";
			
	    }
   }
	
}

function checkpinglun()
{
var pinglun=document.getElementById("pinglunform");

if (pinglun.username.value=='')
{alert("Please enter the User Name");
pinglun.username.focus();
return false;}

if (pinglun.code.value=='')
{alert("Please enter the Code");
pinglun.code.focus();
return false;}


return true;
}
//*************************************************
//*************************************************
function checkall(all)
{
  var a = document.getElementsByName("id");
  document.getElementById("box1").checked=all.checked;
  document.getElementById("box2").checked=all.checked;
  for (var i=0; i<a.length; i++) a[i].checked = all.checked;
  
}
//*************************************************
//*************************************************
function checkalll(all)
{
  var a = document.getElementsByName("id");
  document.getElementById("box1").checked=all.checked;
  for (var i=0; i<a.length; i++) a[i].checked = all.checked;
  
}
//*************************************************
//*************************************************
function change_zc(bp)
{
	document.getElementById("bigPic").src=bp;
}
//*************************************************
//*************************************************

function checkbuyform()
{if (buyform.sl.value=='')
{alert("Please enter Order Quantity!");
buyform.sl.focus();
return false;}


return true;
}





