
//单选按扭(单击事件,含复选框)
function RadioClick(Listid,ListCN,ListEN)
{
	var dom = document.all;
	var el = event.srcElement;
	
	if(el.tagName=="INPUT"&&el.type.toLowerCase()=="radio")
	{
		for(i=0;i<dom.length;i++)
		{
			if(dom[i].tagName=="INPUT" && dom[i].type.toLowerCase()=="radio")
			{
				dom[i].checked=false;
			}
		}
	}
	el.checked=true;
	
	//初始化复选框
	for(var i=0;i<document.all.length;i++)
	{
		if(document.all[i].name!=null)	
		{
			if(document.all[i].name.indexOf("chk_CnResume") > 0)	
			{	
				document.all[i].disabled = true;
				document.all[i].checked  = false;
			}
			
			if(document.all[i].name.indexOf("chk_EnResume") > 0)	
			{	
				document.all[i].disabled = true;
				document.all[i].checked  = false;
			}
		}
	}
	
	//设置选择的复选框
	if(ListCN == "1")
	{
		document.all["lit_ResumeList__ctl"+ Listid +"_chk_CnResume"].checked  = true;
		document.all["lit_ResumeList__ctl"+ Listid +"_chk_CnResume"].disabled = false;
	}
	if(ListEN == "1")
	{
		document.all["lit_ResumeList__ctl"+ Listid +"_chk_EnResume"].checked  = true;
		document.all["lit_ResumeList__ctl"+ Listid +"_chk_EnResume"].disabled = false;
	}
	
}

//页面复选框初始化
function PageChkLoad()
{
	for(var i=0;i<document.all.length;i++)
	{
		if(document.all[i].name!=null)	
		{
			if(document.all[i].name.indexOf("chk_CnResume") > 0)	
			{	
				document.all[i].disabled = true;
			}
			
			if(document.all[i].name.indexOf("chk_EnResume") > 0)	
			{	
				document.all[i].disabled = true;
			}
		}
	}
}

function PageCutChkLoad(Listid,ListCN,ListEN)
{
	if(ListCN == "1")
	{
		document.all["lit_ResumeList__ctl"+ Listid +"_chk_CnResume"].disabled = false;
	}
	if(ListEN == "1")
	{
		document.all["lit_ResumeList__ctl"+ Listid +"_chk_EnResume"].disabled = false;
	}
}


//改变附求职信
function LetterChanged()
{
	    var obj = document.all["chk_Letter"];
	    
	    if (obj != null)
	    {
			if(document.all["chk_Letter"].checked == false)
			{
			    //document.all['txt_Letter'].value = "";
				document.all['ddl_Letter'].disabled = true;
				document.all['txt_Letter'].disabled = true;
			}
			else
			{
				document.all['ddl_Letter'].disabled = false;
				document.all['txt_Letter'].disabled = false;
			}
		}
		
}
	
//选择求职信
function ChangeLetter(LetterCount)
{
		var letterID= "";
		var title ="";
		var selectedIndex = "";
		
		letterID = document.all['ddl_Letter'].value;
		
		selectedIndex = document.all['ddl_Letter'].selectedIndex;
		
		title = document.all['ddl_Letter'].options[ selectedIndex ].text;
		    
		for (var i=1;i<=LetterCount;i++)
		{
			if(document.all["Hidden" + letterID] != null) 
			{
				document.all.txt_Letter.value = document.all["Hidden"+letterID].value.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,"\"").replace(/&amp;/g,"&");
			}
			else
			{
				document.all.txt_Letter.value="";
			}
		}	
}


//单选按扭(单击事件,不含复选框)
function RadioClick2(Listid)
{
	var dom = document.all;
	var el = event.srcElement;
	
	if(el.tagName=="INPUT"&&el.type.toLowerCase()=="radio")
	{
		for(i=0;i<dom.length;i++)
		{
			if(dom[i].tagName=="INPUT" && dom[i].type.toLowerCase()=="radio")
			{
				dom[i].checked=false;
			}
		}
	}
	el.checked=true;
}