/* 最后更新 2010-2-18 by 56770.Kingdge
'* Copyright www.56770.com */            
function ConfirmDel()
{
        if(confirm("确定要删除吗？删除将不能恢复！"))
                return true;
        else
                return false;
        
}
function u_Size(num,objname)
{
	var obj=document.getElementById(objname)
	if (parseInt(obj.rows)+num>=3) {
		obj.rows = parseInt(obj.rows) + num;	
	}
	if (num>0)
	{
		obj.width="90%";
	}
}
function runscript(n){
	txtRun=n;window.open("../../templates_view.asp","templates_view")
}
function DoTags(addTags){
	document.addproduct.p_tags.value=addTags+document.addproduct.p_tags.value;
	document.addproduct.p_tags.focus();

}
var n=1;
 function switchSysBar(){
	if (n==1){
	    n=2
 		document.all("frmTitle").style.display="none";
		document.getElementById("arrow").src="images/Btn_open.gif";
		document.getElementById("arrow").alt="伸展";
	}
	else{
		n=1;
		document.all("frmTitle").style.display="";
		document.getElementById("arrow").src="images/Btn_close.gif";
		document.getElementById("arrow").alt="收缩";
	}
}
function cleanDefault(id) {	
		document.getElementById(id).value = "";
		document.getElementById(id).style.color="#000000";
}
	
var i = 1;
function searchselect () {
	if (i % 2 == 0) {
		hiddenmenu();
	} else {
		showmenu();
	}
	i=i+1;
}
function choose(items) {
	switch (items) {
		case 1:
			document.getElementById("searchall").value="请输入商品名称搜索";
			document.all.SearchType.value="Commodity_List.aspx?cname=";
			document.all.SearchTitle.value="商品管理";
			break;
		case 2:
			document.getElementById("searchall").value="请输入订单编号搜索";
			document.all.SearchType.value="Orderlist.aspx?state=&cont=";
			document.all.SearchTitle.value="订单管理";
			break;
		case 3:
			document.getElementById("searchall").value="请输入会员名称搜索";
			document.all.SearchType.value="Userlist.aspx?usernames=";
			document.all.SearchTitle.value="注册会员管理";
			break;
		case 4:
			document.getElementById("searchall").value="请输入店铺名称搜索";
			document.all.SearchType.value="ShopList.aspx?strkey=";
			document.all.SearchTitle.value="店铺管理";
			break;
	}
	hiddenmenu();
	i = i+1;
}
function showmenu() {
		document.getElementById("searchmenu").style.display="block";
}
function hiddenmenu() {
		document.getElementById("searchmenu").style.display="none";
}
function Indexsearch() {
		right.location.href=''+document.all.SearchType.value+document.all.SearchName.value+'';
		top.document.getElementById('topTitle').innerHTML=''+document.all.SearchTitle.value+'';
}	

function tdshow(obj,arr)
{
	var cArr = arr||["#fff","#FAFAFA","#EBEBEB"];
	var trArr=document.getElementById(obj).getElementsByTagName("tr");
	for(var i=0,j=trArr.length;i<j;i++)
	{
		var o=trArr[i];
		o.style.backgroundColor=cArr[i%2];
		o.onmouseover=function(){this.style.backgroundColor=cArr[2];}
		o.onmouseout=function(){this.style.backgroundColor=cArr[this.sectionRowIndex%2];}
	}
}

function resizeEditor(name,size) {   
	var newheight = parseInt(document.getElementById(name +"___Frame").style.height, 10) + size;   
	if(newheight >= 150) {   
		document.getElementById(name +"___Frame").style.height = newheight + 'px';   
	}   
}  