function Openwinlist(Url)
	{
		window.open(Url,"其它信息","toolbar=no,scrollbars=yes,width=675,height=500,left=120,top=100");
	}
	
function Check_All_ID()
	{
		var Leng=document.Form1.Check_ID.length;
		
		if(Leng==undefined)
		{
			alert("请选择要处理的选项!");
		}
		else
		{
			if(document.Form1.Check_All.checked)
			{
				for(var j=0;j<Leng;j++)
				{
					document.Form1.Check_ID[j].checked=true;
				}
			}
			else
			{
				for(var j=0;j<Leng;j++)
				{
					document.Form1.Check_ID[j].checked=false;
				}
			}
		}
	}
	
function SaveFile(FileName,FileNewName)
{
	document.all.save.src = "DonloadFile.aspx?FileName=" + FileName + "&FileNewName=" + escape(FileNewName) + "&rnd=" +  Math.random();
}

function SaveMaileFile(FileName,FileNewName)
{
	document.all.save.src = "../Comm/MailFile.aspx?FileName=" + FileName + "&FileNewName=" + escape(FileNewName) + "&rnd=" +  Math.random();
}

function SaveDutyFile(FileName,FileNewName)
{
	document.all.save.src = "../Comm/DutyFile.aspx?FileName=" + FileName + "&FileNewName=" + escape(FileNewName) + "&rnd=" +  Math.random();
}

function SaveNQFile(FileName,FileNewName)
{
	document.all.save.src = "../Comm/NQFile.aspx?FileName=" + FileName + "&FileNewName=" + escape(FileNewName) + "&rnd=" +  Math.random();
}

function SaveSCFile(FileName,FileNewName)
{
	document.all.save.src = "../Comm/SCFile.aspx?FileName=" + FileName + "&FileNewName=" + escape(FileNewName) + "&rnd=" +  Math.random();
}

function SelectName()
{
	window.open("../Comm/SelectName.aspx","选择对象","toolbar=no,scrollbars=yes,width=675,height=500,left=120,top=100");
}

function ReaderMail(ID)
{
	window.open("ReaderMail.aspx?ID="+ID,"查看邮件","toolbar=no,scrollbars=yes,width=675,height=500,left=120,top=100");
}

function GoToUrl(Url)
{
	if(Url!="")
	window.location.href=Url;
}

function CommOpen(Url)
{
	window.open(Url,"详细内容","toolbar=no,scrollbars=yes,width=675,height=500,left=120,top=100");
}

//判断选择内容select
function checklistnew(loc,valuess)
{
	for(var x=0;x<loc.length;x++)
  	{
  	 	var opt = loc.options[x];
		if(opt.value==valuess)
		{
			opt.selected=true;
		}
	}
}

//判断选择内容radio
function checkradionew(loc,valuess)
{
	var LocList=loc;
	
	for(i=0;i<LocList.length;i++)
	{
		if(LocList[i].value==valuess)
		{
			LocList[i].checked=true;
		}
	}

}

//判断选择内容radio
function checkradionew(loc,valuess)
{
	var LocList=loc;
	
	for(i=0;i<LocList.length;i++)
	{
		if(LocList[i].value==valuess)
		{
			LocList[i].checked=true;
		}
	}

}

function ShowCheckList(ListValues,loc)
 {
	//alert(ListValues);
	var Model_3V=ListValues.split(",");
	var LocList=loc;
	for(var i=0;i<Model_3V.length-1;i++)
	{
		//alert(Model_3V[i]);
		if(Model_3V[i]!="")
		{
			//alert(LocList.length);
			for(j=0;j<LocList.length;j++)
			{
				//alert(Model_3V[i]);
				if(LocList[j].value==Model_3V[i])
				{
					LocList[j].checked=true;
				}
			}
		}
	}
 }
 
 //textarea
 function ShowTextarea(ListValues,loc)
 {
	 var LocList=loc;
	 LocList.value=ListValues;
}

//判断邮箱
function check_email(myint)
 {
 var checkstr=myint;
 
 if (checkstr.charAt(0)=="@") {return false;}
 if (checkstr.charAt(checkstr.length-1)=="@") {return false;}
 if (checkstr.charAt(checkstr.length-1)==".") {return false;}
 a_valid=0;
 a_count=0;
 d_valid=0;
 for(i=0; i<checkstr.length; i++)
  {
  
  ch=checkstr.charAt(i);
  if (ch=='@') {a_valid=1;a_count++;}
  if (ch=='.') {d_valid=1;}
  
  }
  if (a_count>1) {return false;}
  if (a_valid==1 && d_valid==1) {return true;}

  else

   {return false;}
 }
 
 //分站链接
 function Gotosite(value,type)
{
	if(type=="Index")
	{
		window.location.href='Site/Index.aspx?Site=' + escape(value); 
	}
	else
	{
		window.location.href='Index.aspx?Site=' + escape(value); 
	}
}

//Url
 function GotoUrlList(type,value)
	{
		window.location.href=type + '&Site=' + escape(value); 
	}

	