function showdiv(id) {
	var showdiv = $("#show" + id);
	var url = converURL("showdiv.php");
	showdiv.html("数据加载中...<img src=\"images/class_ar.gif\">");
	$
			.get(url,
					{
						id :id,
						action :"show"
					},
					function(data) {
						showdiv.html("");
						var items = data.split("#");

						if (items[0] == 1) {
							// alert(items[0]);
					window.location = "product.php?nameid=cpzs&secondid="
							+ items[1];
				} else {
					for (i = 0; i < items.length; i++) {
						var item = items[i].split("*");
						showdiv
								.append("<div id=\"\" valign=\"top\"><img src=\"images/1_03_06_01.jpg\" width=\"16\" height=\"15\" hspace=\"12\""
										+ "vspace=\"5\" align=\"absmiddle\" /><a href=\"product.php?nameid=cpzs&secondid="
										+ item[1]
										+ "\">"
										+ item[0]
										+ "</a></div>");
					}
				}

			});
	showdiv.toggle();
}

function converURL(url) {
	var timestemp = (new Date()).valueOf();
	if (url.indexOf("?") > 0) {
		url = url + "&timestemp=" + timestemp;
	} else {
		url = url + "?timestemp=" + timestemp;
	}
	return url;
}

function showbig(img) {
	var block = $("#block");
	var bigimg = $("#bigimg");
	var showimg = bigimg.children("#showimg");
	showimg.html("<img src=\"" + img + "\" />");
	block.css( {
		"position" :"absolute",
		"left" :"0",
		"top" :"0",
		"opacity" :"0.8",
		"background-color" :"#000000",
		"width" :"100%",
		"height" :"280%",
		"z-index" :"3"
	});
	var windowW = document.body.clientWidth;
	var windowH = document.body.clientHeight;
//	var proW = bigimg.width();
//	var proH = bigimg.height();
	var proW = 450;
	var proH = 450;
	var x = (windowW - proW) / 2;
	var y = (windowH - proH + document.documentElement.scrollTop) / 2;
	// alert(x+"+"+"-----"+y+"========="+ document.documentElement.scrollTop);
	bigimg.css( {
		"position" :"absolute",
		"opacity" :"100",
		"left" :x,
		"top" :y,
		"border" :"0px solid red",
		"background-color" :"#FFFFFF",
		"z-index" :"4"
	});

	bigimg.fadeIn("slow");
	block.fadeIn("slow");
	bigimg.children("#cc").children("#close").click( function() {
		bigimg.fadeOut("slow");
		block.fadeOut("slow");
	});
}
