// JavaScript Document
	function sethome(a){
  document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage('http://www.51q5.com');
	}
	function addfav(){
	window.external.addFavorite('http://www.51q5.com','义乌市木马日用品百货批发网') ;	
		}
		

function checkformxx(a){
$("input,select,textarea",$("#"+a)).each(function(){
$(this).replaceWith("<"+"%="+$(this).attr("id")+"%"+">")
})
$("#abc").val($("#"+a).html())
}


function bl(a){
var c=a.split("|")
for(i=0;i<c.length;i++){
var d=c[i].split("=")
document.write(d[1]+"="+d[0]+"<br>")
}}

function um(a){
	$("#um_"+a).addClass("umact")
	}
	function setmu(a){
		 $("#TOP_"+a).addClass("act")
		 
		}
		
		function removeOptions(selectObj)
{
    if (typeof selectObj != 'object')
    {
        selectObj = document.getElementById(selectObj);
    }

    // ԭѡ
    var len = selectObj.options.length;

    for (var i=0; i < len; i++)
    {
        // Ƴǰѡ
        selectObj.options[0] = null;
    }
}
 
	
	function classbig(a,b){
		$("#"+a+" a[@ct='big']").each(function(i){
$("#"+b)[0].options[i+1] = new Option($(this).text(), $(this).attr("value"));
})
}
function selectc(a,b){
			$("option[@value='"+b+"']",a)[0].selected="selected";
			}
function takeselect(a,b){
return $("option[@value='"+b+"']",a).html();
			}
			function getsmall(c,a,b){
				$("option",a).remove();
				$("#"+c+" div[@value='"+b+"'] a[@ct=small]").each(function(i){
			 $(a)[0].options[i] = new Option($(this).text(), $(this).attr("value"));											      })
				}
				
				

		function img(a,b,c){
var d=new Image();
d.src=a.src
var e=d.width
var f=d.height
if (e>b || f>c){
	
if (e/f>b/c){
f=f*b/e;
e=b;}else{
e=e*c/f;
f=c;
}
a.width=e;
a.height=f;
}
}
	function login(){
	document.location='login.asp'
	}
	function addtofav(a){
		$.facebox("<img src='img/loading.gif'/>");
		facejz(20)
		$.post('buy.asp?proid='+a+"&addname=fav",function(date){
										$.facebox(date)				  
																facejz(20)  })


		}
		function selectg(a,b){
			$("#bigclassid").val(a)
			$("#bigclassid3").val(b)
			$("#xz_5").hide();
			}

		$(function(){
				     if($("#newsgd").length>0){
				   $("#xz_4").click(function(){$("#xz_5").show()})
				   $("#xz_5").hover(function(){},function(){
											   $("#xz_5").hide()
											   })
				   $("div.btn5").hover(function(){$(this).addClass("btnact");},function(){$(this).removeClass("btnact")})
		  
				   }  
				
				   }
				
				   )

				
