function openwin(url,target,w,h)
{
	newWin=window.open(url,target,"toolbar=no,menubar=no,status=no,location=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+w+",height="+h);
	newWin.focus();
}

function addtocart(goodz_id)
{
	newWin=window.open("addtocart.asp?goodz_id="+goodz_id,"cart","toolbar=no,menubar=no,status=no,location=no,scrollbars=no,resizable=no,copyhistory=yes,width=300,height=185");
	if(newWin)
	newWin.focus();
	else
	alert("出现错误，可能是因为你的浏览器屏蔽了弹出窗口功能！\r请尝试修改浏览器设置或者在点击时按住Ctrl键。")
}
function addsimcart(card_telno)
{
	newWin=window.open("addsimcart.php?card_telno="+card_telno,"cart","toolbar=no,menubar=no,status=no,location=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=240,height=220");
}

function checklogin(targ){
if(targ.username.value.length<1 ||targ.username.value.length>20){
	alert("请输入正确的会员登录名！");
	targ.username.focus();
	return false;
	}
if(targ.passwd.value.length<1 ||targ.passwd.value.length>20){
	alert("请输入正确的登录密码！");
	targ.passwd.focus();
	return false;
	}	
return true;	
}

function change_page(newpage)
{
targ=document.pageform;
targ.page.value=newpage;

targ.submit();
}
function pic_show(url)
{
	newWin=window.open('picshow.asp?img='+url,'picshow',"left="+(screen.width/2-150)+",top="+(screen.height/2-150)+",width=300,height=300,toolbar=no,menubar=no,status=no,location=no,scrollbars=yes,resizable=yes,copyhistory=yes");
	newWin.focus();
}
function help_show()
{
openwin('/help/howtobuy.htm','howtobuy','830','630');
}
function tuijian()
{
openwin('../tuijian/tuijian.htm','howtobuy','640','640');
}
function xxf()
{
openwin('../xxf/xxf1.htm','howtobuy','780','630');
}
function user_show(targ)
{
	newWin=window.open("reg_detail.asp","user","toolbar=no,menubar=no,status=no,location=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=560,height=580");
}

