

function newTab(fileUrl)
{

window.top.openTabWindow('tabView',"加载中...",fileUrl);
	
}


function goUrl(filePath)
{
window.top.AlertWin.OnAlertWindowChange=function(){window.location=window.location};
window.top.AlertWin.AlertUrlWindow(document.title,filePath,720,560);
}

function goAdd(para)
 {
var xmls=getParameter("xmls");
var url="?xmls="+getParameter("xmls")+"&method=add";
if(para!=null)
{
var ar=para.split(",");
for(var i=0;i<ar.length;i++)
{
if(getParameter(ar[i])!=null)
url=url+"&"+ar[i]+"="+getParameter(ar[i]);
}
}
goUrl(url);
 }
 
 function goEdit(para)
 {
var xmls=getParameter("xmls");
var url="?xmls="+getParameter("xmls")+"&method=edit";
if(para!=null)
{
url=url+"&"+para;
}
goUrl(url);
 }
 
 
function goDelete(Key,ID)
 {
 var str;
 if(ID==null)
 {
 str=getChecks();
 }else
 {
 str=ID;
 }
if(str=="")
{
alert("请先选择要删除的项目!");
return;
}

  if(confirm('真的要删除选中记录？'))
 {
 var xmls=getParameter("xmls");
var url="?xmls="+getParameter("xmls")+"&method=delete&"+Key+"="+str+"&from="+escape(window.location);
window.location=url;

 }
 }

 function goSearch()
 {


window.location=encodeURI("list.aspx?submit=search"+getResponseString()+getRequestString());
 }
  
function goCheck()
{
var elm=document.getElementsByName("ids");
for (var i=0;i<elm.length;i++)
	{
			var e = elm[i];
		if(e.name=="ids")
		{
			if (e.checked==false)
			{
				e.checked = true;
			}
			else
			{
				e.checked = false;
			}
		}
	}
}
function getChecks()
{
var str="";
var elm=document.getElementsByName("ids");
for (var i=0;i<elm.length;i++)
	{
			var e = elm[i];
			if (e.name=="ids"&&e.checked==true)
			{
			str=str+e.value+",";
				
			}

	}
	
	return str;
}


function Init()
{
anole('tablelist',1,'#f5f5f5','#FFFFFF','#FCF7DF','#F7EFD6');
}
