
// JavaScript Document
function countDown() {
	var i;
var objArray =document.getElementsByTagName("label");
//alert(objArray.length);
for (i=0;i<(objArray.length);i++)
{
	

if (objArray[i].id.indexOf("article_")>-1) 
{

objHid = document.getElementById("hid_article_" + objArray[i].id.substring(objArray[i].id.indexOf("_")+1)); 

//objHid.value就是对应的时间值，然后改下面就行了
//alert(objHid.value);
var d=Date.parse(objHid.value);
var today=new Date();
//alert(today);
var today1 = Date.parse(today);
var time=d-today;
var 时间=objArray[i];
//alert(Math.floor(time));
if(Math.floor(time)<=0){
时间.innerHTML='抢购时间已过，谢谢您的关注!';
}
else
{
var 天=Math.floor(time/(1000*60*60*24));
var 小时=Math.floor(time/(1000*60*60))%24;
var 分=Math.floor(time/(1000*60))%60;
var 秒=Math.floor(time/1000)%60;
时间.innerHTML=天+'    天'+小时+'小时'+分+'分'+秒+'秒';
时间.style.fontSize='18px';
时间.style.color='black';
} 

}
}
setTimeout('countDown()',1000);
}

function openXing() {
	$("#ceng2")
			.css(
					{
						//大图的位置根据窗口来判断
						"left" : ($(window).width() / 2 - 350 > 20 ? $(window)
								.width() / 2 - 250 : 20),
						//"top":($(window).height()/2-270>30?$(window).height()/2-150:30)
						"top" : 160
					});
	$("#ceng2").show();
}
function dieXing() {
	$("#ceng2").hide();
}
function putXing(cool) {
	document.getElementById('xing').value = cool.innerHTML;
	dieXing();
}
function Aclick(text) {
	var id = $(text).attr("name");
	$("input#locationID").val(id);
	var tex = $(text).text();
	$("#addr").text(tex);
	$("#ceng2").hide();

}
function openXing2() {
	$("#ceng")
			.css(
					{
						//大图的位置根据窗口来判断
						"left" : ($(window).width() / 2 - 350 > 20 ? $(window)
								.width() / 2 - 250 : 20),
						"top" : ($(window).height() / 2 - 270 > 30 ? $(window)
								.height() / 2 - 270 : 30)
					});
	$("#ceng").show();
}
function dieXing2() {
	$("#ceng").hide();
	// document.getElementById("xingdiv").style.display ='';
}
function putXing2(cool) {
	document.getElementById('xing').value = cool.innerHTML;
	dieXing();
}
function Aclick2(text) {
	var id = $(text).attr("name");
	$("input#locationID").val(id);
	var tex = $(text).text();
	$("#now_addr").text(tex);
	$("#ceng").hide();
}
function SearchValue(value) {
	if (value == 1) {
		$("#key").val("");
	}
}

