function openwin(link,height,width){
	win = window.open(link,'','height='+height+',width='+width+',top=0,left=0,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes');
	return false;
		
}

function openwin_choujiang(link,height,width){
	win = window.open(link,'window','height='+height+',width='+width+',top=300,left=250,alwaysRaised=yes,depended=yes,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');
	//window.showModelessDialog(link,window,"help:no;dialogWidth:400px;dialogHeight:160px");
	return false;
}



function Select_goods_address(flag) {
		if(flag=="0"){
			document.convertible_userinfo.user_name.value="";
			document.convertible_userinfo.user_address.value="";
			document.convertible_userinfo.user_phone.value="";
			
			document.convertible_userinfo.user_name.value=document.convertible_userinfo.user_name1.value;
			document.convertible_userinfo.user_address.value=document.convertible_userinfo.user_address1.value;
			document.convertible_userinfo.user_phone.value=document.convertible_userinfo.user_phone1.value;
			document.convertible_userinfo.user_name.disabled="true";
			document.convertible_userinfo.user_address.disabled="true";
			document.convertible_userinfo.user_phone.disabled="true";
			document.getElementById("address").style.display="block";
		}
		if(flag=="1"){
			document.convertible_userinfo.user_name.value="";
			document.convertible_userinfo.user_address.value="";
			document.convertible_userinfo.user_phone.value="";
			document.convertible_userinfo.user_name.value=document.convertible_userinfo.user_name2.value;
			document.convertible_userinfo.user_address.value=document.convertible_userinfo.user_address2.value;
			document.convertible_userinfo.user_phone.value=document.convertible_userinfo.user_phone2.value;
			document.convertible_userinfo.user_name.disabled="";
			document.convertible_userinfo.user_address.disabled="";
			document.convertible_userinfo.user_phone.disabled="";
			document.getElementById("address").style.display="block";
		}
		
						
	
	
}
function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


function createtime(){
	var end_time=document.getElementById("auction_end_time").value;
	var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	xmlhttp.open("GET", "nul.txt", false);
	xmlhttp.setRequestHeader("Range", "bytes=-1");
	xmlhttp.send();
	
	var tts =new Date(xmlhttp.getResponseHeader("Date"));//系统时间
	
	var grt= new Date(end_time);
	tts.setTime(tts.getTime()+250);
	days = (grt - tts) / 1000 / 60 / 60 / 24;
	dnum = Math.floor(days);
	hours = (grt - tts) / 1000 / 60 / 60 - (24 * dnum);
	hnum = Math.floor(hours);
	H = (grt - tts) / 1000 / 60 / 60;
	h = Math.floor(H);
	if(String(hnum).length ==1 ){hnum = "0" + hnum;}
	minutes = (grt - tts) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
	mnum = Math.floor(minutes);
	if(String(mnum).length ==1 ){mnum = "0" + mnum;}
	seconds = (grt - tts) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
	snum = Math.round(seconds);
	if(String(snum).length ==1 ){snum = "0" + snum;}
	if(h >= 0){
		document.getElementById("times").innerHTML = h + "小时" + mnum + "分" + snum + "秒";
	}else{
		document.getElementById("times").innerHTML = "00小时00分00秒";
	}

}

function frameResize() 
{ 
	document.getElementById("demo").style.height=monthframe.document.body.scrollHeight+"px"; 
} 

function frameResize_package_tuijian() 
{ 
	document.getElementById("demo_tuijian").style.height=demo_tuijian.document.body.scrollHeight+"px"; 
}

function frameResize_date() 
{ 
	document.getElementById("demo_date").style.height=demo_date.document.body.scrollHeight+"px"; 
}
function selectAll(ckboxname,event){
   event = (!event) ? window.event : event;
   obj = event.srcElement ? event.srcElement : event.target;
   o=document.getElementsByName(ckboxname); 
   for(i=0;i<o.length;i++)
   	if(!o[i].disabled) o[i].checked=obj.checked
}
  function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function show_left_info() {
	document.getElementById("more").innerHTML = "<img src='http://www.manmanzou.com/user/images/qxgjss.gif' width='82' height='14'  onclick='hidden_left_info()'>";
	document.getElementById("search_more").style.display = "block";
}
function hidden_left_info() {
	document.getElementById("more").innerHTML = "<img src='http://www.manmanzou.com/user/images/gdgjss.gif' width='82' height='14'  onclick='show_left_info()'>";
	document.getElementById("search_more").style.display = "none";
   	
	var el = document.getElementsByTagName('input');
	var len = el.length;     
	for(var i=0; i<len; i++) { 
		if((el[i].type=="checkbox") ){ 
			el[i].checked = false; 
		}
     } 
}
//新搜索js使用

function changeSearchshow() 
{
	document.getElementById("specialSearch").style.display = "none";
	document.getElementById("searchDiv").style.display = "block";
	document.getElementById("simpleSearch").style.display = "block";
}
function changeSearchhidden() 
{
	document.getElementById("specialSearch").style.display = "block";
	document.getElementById("searchDiv").style.display = "none";
	document.getElementById("simpleSearch").style.display = "none";

	var el = document.getElementsByTagName('input');
	var len = el.length;     
	for(var i=0; i<len; i++) { 
		if((el[i].type=="checkbox") ){ 
			el[i].checked = false; 
		}
     } 
}
function showCity(num)
{
	var num = num;
	if(num  == 1)
	{
		document.getElementById("moreDiv").style.display = "none";
		document.getElementById("cityDiv").style.height = "100%";
	}
	else if(num == 2){
		document.getElementById("cityDiv").style.height = "66px";
		document.getElementById("moreDiv").style.display = "block";
	}
	return;
}

