//输入回车后使指定的对象获得焦点
function MyEnter(obj)
{
	if(event.keyCode == 13)
	{  
		obj.focus();
    }
}

//防止SQL注入
function MyCheckSQL(str)
{
	var mess = "不允许输入的字符：\r\n";
    var mark = "yes";
    
	if(str.indexOf(";") >= 0)
	{
		mark = "no";
		mess += " ; ";
	}
      
	if(str.indexOf("&") >= 0)
	{
		mark = "no";
		mess += " & ";
	}
	
	if(str.indexOf("<") >= 0)
	{
		mark = "no";
		mess += " < ";
	}
      
	if(str.indexOf(">") >= 0)
	{
		mark = "no";
		mess += " > ";
	}
      
	if(str.indexOf("--") >= 0)
	{
		mark = "no";
		mess += " -- ";
	}
      
	if(str.indexOf("/") >= 0)
	{
		mark = "no";
		mess += " / ";
	}
      
	if(str.indexOf("%") >= 0)
	{
		mark = "no";
		mess += " % ";
	}
      
	if(str.indexOf("'") >= 0)
	{
		mark = "no";
		mess += " ' ";
	}
	
	if(mark == "no")
	{
		alert(mess);
		return false;
	}
    else 
    {
		return true; 
	}     
}

function IsDate(dateString)
{
	var dateArray = dateString.split("-");
   
	if(dateArray.length != 3)
	{ 
		return false;
	}
   
	var year = parseInt(dateArray[0], 10);
    var month = parseInt(dateArray[1], 10);
    var day = parseInt(dateArray[2], 10);
   
	if(isNaN(year) || isNaN(month) || isNaN(day)) 
	{
		return false;
	}
   
    if(month > 12 || month < 1) 
    {
		return false;
	}
   
    if((month == 1 
		|| month == 3 
		|| month == 5
		|| month == 7
		|| month == 8
		|| month == 10
		|| month == 12)
		&& (day > 31 || day < 1)) 
	{
		return false;
	}
   
	if((month == 4 
		|| month == 6 
		|| month == 9 
		|| month == 11)
		&& (day > 30 || day < 1))
	{ 
		return false;
	}
   
	if(month == 2)
	{
		if(day < 1) 
		{
			return false;
		}
      
		var leapYear = false;
      
		if((year % 100) == 0)
		{
			if((year % 400) == 0) 
			{
				leapYear = true;
			}
		}
		else
		{
			if((year % 4) == 0) 
			{
				leapYear = true;
			}
		}
      
		if(leapYear == true)
		{
			if(day > 29)
			{
				return false;
			}
		}
		else
		{
			if(day > 28) 
			{
				return false;
			}
		}
	}
   
	return true;
} 

function CheckString(name, data, allowednull)
{
	var datastr = data;
	var lefttrim = datastr.search(/\S/gi);

	if(lefttrim == -1) 
	{
		if(allowednull) 
		{
			return 0;
		} 
		else 
		{
			alert("请输入" + name + "！");
			return -2;
		}
	}
  
	if(datastr.search(/[<>]/gi) != -1) 
	{
		alert("" + name + "中包含非法字符<>");
		return -1;
	}
  
	return 0;
}

function CheckEmail(name, data, allowednull)
{
	var datastr = data;
	var lefttrim = datastr.search(/\S/gi);
  
	if(lefttrim == -1) 
	{
		if(allowednull) 
		{
			return 0;
		} 
		else 
		{
			alert("请输入一个正确的E-mail地址！");
			return -1;
		}
	}
  
	var myRegExp = /[a-z0-9](([a-z0-9]|[_\-\.][a-z0-9])*)@([a-z0-9]([a-z0-9]|[_\-][a-z0-9])*)((\.[a-z0-9]([a-z0-9]|[_\-][a-z0-9])*)*)/gi;
	var answerind = datastr.search(myRegExp);
	var answerarr = datastr.match(myRegExp);
  
	if(answerind == 0 && answerarr[0].length == datastr.length)
	{
		return 0;
	}
  
	alert("请输入一个正确的E-mail地址！");
	return -1;
}

function CheckNumOrLetter(name,data,allowednull)
{
	var datastr = data;
	var lefttrim = datastr.search(/\S/gi);

	if(lefttrim == -1) 
	{
		if(allowednull) 
		{
			return 0;
		} 
		else 
		{
			alert("请输入" + name + "！");
			return -2;
		}
	}
  
	var exp = /^\w+$/gi;
  
	if(!exp.test(datastr)) 
	{
		alert(name + "只能为数字和字母组合!");
		return -3;
	}
	
	return 0;
}

function CheckTelOrFax(name,data,allowednull)
{
	var datastr = data;
	var lefttrim = datastr.search(/\S/gi);

	if(lefttrim == -1) 
	{
		if(allowednull) 
		{
			return 0;
		} 
		else 
		{
			alert("请输入" + name + "！");
			return -2;
		}
	}
  
	var exp = /^\d{3,4}(-)\d+$/gi;
  
	if(!exp.test(datastr)) 
	{
		alert(name + "格式不正确!\r\n\r\n正确格式如：0510-1234567");
		return -3;
	}
	
	return 0;
}

function CheckLength(name, data, len, type)
{
	var datastr = data;
	
	if(type)
	{
		if(datastr.length < len)
		{
			alert(name + "长度不小于" + len);
			return 1;
		}
	}
	else
	{
		if(datastr.length > len)
		{
			alert(name + "长度不大于" + len);
			return 1;
		}
   }
   
   return 0;
}

function CheckUrl(name, data)
{
    var datastr = data;
   	exp = /(http:\/\/)/gi;
	
	if(exp.test(datastr)) 
	{
		alert(name + "不要填http://");
		return 1;
	}
	
	return 0;
}

function CheckMoney(name, data)
{
    var datastr = data;
   	exp = /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/gi;
	
	if(!exp.test(datastr)) 
	{
		alert(name + "格式为(156456681.50)数字形式！");
		return 1;
	}
	
	return 0;
}

function CheckMoneyNoAlert(name, data)
{
    var datastr = data;
	exp = /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/gi;
	
	if(!exp.test(datastr)) 
	{
		return 1;
	}
	
	return 0;
}

function CheckScore(name, data)
{
    var datastr = data;
   	exp = /^[0-1]{1}[.]\d{1,4}$/gi;
	
	if(!exp.test(datastr)) 
	{
		alert(name + "格式不正确！");
		return 1;
	}
	
	return 0;
}

function CheckNumber(name,data,allowednull)
{
	var datastr = data;
	
	if(allowednull)
	{
		if(datastr != "")
		{
   			exp = /^\d+$/gi;
			
			if (!exp.test(datastr)) 
			{
				alert(name + "格式为数字形式！");
				return 1;
			}
		}
		
		return 0;
	}
	else
	{	 
	   	exp = /^\d+$/gi;
		
		if(!exp.test(datastr)) 
		{
			alert(name + "格式为数字形式！");
			return 1;
		}
		
		return 0;  
	}
}

function CheckNumberNoAlert(name,data,allowednull)
{
	var datastr = data;
	
	if(allowednull)
	{
		if(datastr != "")
		{
   			exp = /^\d+$/gi;
			
			if (!exp.test(datastr)) 
			{
				return 1;
			}
		}
		
		return 0;
	}
	else
	{	 
	   	exp = /^\d+$/gi;
		
		if(!exp.test(datastr)) 
		{
			return 1;
		}
		
		return 0;  
	}
}

function DeleteImageFile(txtFilePath, txtImagePath)
{
	var filePath = txtFilePath.value;
				
	if(filePath.indexOf("nopicture.jpg") == -1)
	{
		if(filePath != "")
		{
			var url = "frmAdminFileDelete.aspx?FilePath=" + filePath;
			window.showModalDialog(url,"","dialogWidth:380px;dialogHeight:120px;status:no;help:no;scrolling=no;scrollbars=no");
		}
		
		txtFilePath.value = "../ImageUp/nopicture.jpg";
		txtImagePath.src = "../ImageUp/nopicture.jpg";
	}
}
			
function OpenImageUpload(txtFilePath, fileId, imgId)
{
	var filePath = "";
		
	if(txtFilePath.value == "")
	{
		filePath = "NoFilePath";
	}
	else
	{
		filePath = txtFilePath.value;
	}
				
	win = window.open("frmAdminFileUploadPicture.aspx?FileId=" + fileId + "&ImgId=" + imgId + "&FilePath=" + filePath, "Seltopic", "width=450px, height=380px, left=300, top=150, status=1, help=0, scrollbars=yes, resizable=0");
    win.focus();
}

function OpenImageUpload2(txtFilePath, fileId, imgId)
{
	var filePath = "";
		
	if(txtFilePath.value == "")
	{
		filePath = "NoFilePath";
	}
	else
	{
		filePath = txtFilePath.value;
	}
				
	win = window.open("frmAdminFileUploadPicture2.aspx?FileId=" + fileId + "&ImgId=" + imgId + "&FilePath=" + filePath, "Seltopic", "width=450px, height=380px, left=300, top=150, status=1, help=0, scrollbars=yes, resizable=0");
    win.focus();
}

function OpenImageUpload3(txtFilePath, fileId, imgId)
{
	var filePath = "";
		
	if(txtFilePath.value == "")
	{
		filePath = "NoFilePath";
	}
	else
	{
		filePath = txtFilePath.value;
	}
				
	win = window.open("frmAdminFileUploadPicture3.aspx?FileId=" + fileId + "&ImgId=" + imgId + "&FilePath=" + filePath, "Seltopic", "width=450px, height=380px, left=300, top=150, status=1, help=0, scrollbars=yes, resizable=0");
    win.focus();
}
            
function SetImageUpload(iSrcUrl, fileId, imgId)
{
	document.getElementById(fileId).value = iSrcUrl;
	document.getElementById(imgId).src = iSrcUrl;
}
			
function ShowImage(txtFilePath)
{
	if(txtFilePath.value != "")
	{
		window.open(txtFilePath.value);
	}
}

function ShowType(type)
{
	if(type.style.display == "")
	{
		type.style.display = "none";
	}
	else
	{
		type.style.display = "";
	}
}

function cboQueryTypeChange()
{
	with(document.all.myForm)
	{
		if(cboQueryType.value == "")
		{
			txtQuery.value = "";
			txtQuery.focus();
		}
	}
}

function DeleteFile(txtFilePath)
{
	var filePath = txtFilePath.value;
	
	if(filePath != "")
	{
		var url="frmAdminFileDelete.aspx?FilePath=" + filePath;
		window.showModalDialog(url,"","dialogWidth:380px;dialogHeight:120px;status:no;help:no;scrolling=no;scrollbars=no");
	}
		
	txtFilePath.value = "";
}
			
function OpenFileUpload(txtFilePath, fileId)
{
	var filePath = "";
	
	if(txtFilePath.value == "")
	{
		filePath = "NoFilePath";
	}
	else
	{
		filePath = txtFilePath.value;
	}
				
	win = window.open("frmAdminFileUploadFile.aspx?FileId=" + fileId + "&FilePath=" + filePath, "Seltopic", "width=450px, height=380px, left=300, top=150, status=1, help=0, scrollbars=yes, resizable=0");
    win.focus();
}
            
function SetFileUpload(iSrcUrl, fileId)
{
	document.getElementById(fileId).value = iSrcUrl;
}
			
function ShowFile(txtFilePath)
{
	if(txtFilePath.value != "")
	{
		var url = "frmAdminFileDownload.aspx?File=" + txtFilePath.value;
		window.showModalDialog(url,"","dialogWidth:450px;dialogHeight:120px;status:no;help:no;scrolling=no;scrollbars=no");
	}
}

function ShowDiv(div1, div2, condition)
{
	if(condition == 1)
	{
		div1.style.display = "";
		div2.style.display = "none";
	}
	else
	{
		div1.style.display = "none";
		div2.style.display = "";
	}
}

function ChangeDisplay(obj)
{
	if(obj.style.display == "")
	{
		obj.style.display = "none";
	}
	else
	{
		obj.style.display = "";
	}
}

function ColorChoose(obj1, obj2)
{
	var returnValue = window.showModalDialog("frmAdminColorChoose.htm","","dialogWidth:225px;dialogHeight:170px;status:no;help:no;scrolling=no;scrollbars=no");
   
	if(returnValue != null)
	{
		obj1.style.background = returnValue;
		obj2.value = returnValue;
	}
 		
 	return;
}

//Member
function OpenTopicMember()
{
	var returnValue = window.showModalDialog("frmAdminMemberChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var obj1 = document.getElementById("cboMemberId");
		obj1.value = returnValue;
	}
}

function OpenTopicMember3(obj1, obj2)
{
	var returnValue = window.showModalDialog("frmAdminMemberChoose3.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicMember4(obj1)
{
	var returnValue = window.showModalDialog("frmAdminMemberChoose4.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		obj1.value = returnValue;
	}
}

function cboMemberChange(obj1, obj2)
{
	obj2.value = obj1.value;
}

function ClearMemberChoose(obj1, obj2)
{
	obj1.value = "";
	obj2.value = "";
}

//AreaType
function OpenTopicAreaType()
{
	var returnValue = window.showModalDialog("frmAdminAreaTypeChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtAreaTypeName");
		var obj2 = document.getElementById("txtAreaTypeId");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicAreaType2()
{
	var returnValue = window.showModalDialog("frmAdminAreaTypeChoose2.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtAreaTypeName2");
		var obj2 = document.getElementById("txtAreaTypeId2");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}
			
function ClearAreaTypeChoose()
{
	with(document.all.myForm)
	{
		txtAreaTypeId.value = "";
		txtAreaTypeName.value = "";
	}
}

//IndustryType
function OpenTopicIndustryType() 
{
    var returnValue = window.showModalDialog("frmAdminIndustryTypeChoose.aspx", "", "dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");

    if (returnValue != null) 
    {
        var ss = returnValue.split("|");

        var obj1 = document.getElementById("txtIndustryTypeName");
        var obj2 = document.getElementById("txtIndustryTypeId");

        obj1.value = ss[0];
        obj2.value = ss[1];
    }
}

function OpenTopicIndustryType2() 
{
    var returnValue = window.showModalDialog("frmAdminIndustryTypeChoose2.aspx", "", "dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");

    if (returnValue != null) 
    {
        var ss = returnValue.split("|");

        var obj1 = document.getElementById("txtIndustryTypeName2");
        var obj2 = document.getElementById("txtIndustryTypeId2");

        obj1.value = ss[0];
        obj2.value = ss[1];
    }
}

function ClearIndustryTypeChoose() 
{
    with (document.all.myForm) 
    {
        txtIndustryTypeId.value = "";
        txtIndustryTypeName.value = "";
    }
}

//Position
function OpenTopicPosition()
{
	var returnValue = window.showModalDialog("frmAdminPositionChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtPositionName");
		var obj2 = document.getElementById("txtPositionId");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicPosition2()
{
	var returnValue = window.showModalDialog("frmAdminPositionChoose2.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtPositionName2");
		var obj2 = document.getElementById("txtPositionId2");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}
			
function ClearPositionChoose()
{
	with(document.all.myForm)
	{
		txtPositionId.value = "";
		txtPositionName.value = "";
	}
} 

//Department
function OpenTopicDepartment()
{
	var returnValue = window.showModalDialog("frmAdminDepartmentChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtDepartmentName");
		var obj2 = document.getElementById("txtDepartmentId");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicDepartment2()
{
	var returnValue = window.showModalDialog("frmAdminDepartmentChoose2.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtDepartmentName2");
		var obj2 = document.getElementById("txtDepartmentId2");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function ClearDepartmentChoose()
{
	with(document.all.myForm)
	{
		txtDepartmentId.value = "";
		txtDepartmentName.value = "";
	}
}

//Branch
function OpenTopicBranch()
{
	var returnValue = window.showModalDialog("frmAdminBranchChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtBranchName");
		var obj2 = document.getElementById("txtBranchId");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicBranch2()
{
	var returnValue = window.showModalDialog("frmAdminBranchChoose2.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtBranchName2");
		var obj2 = document.getElementById("txtBranchId2");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}
		
function ClearBranchChoose()
{
	with(document.all.myForm)
	{
		txtBranchId.value = "";
		txtBranchName.value = "";
	}
}

//Role
function txtRoleIdShowChange()
{
	with(document.all.myForm)
	{
		for(i = 0; i < cboRoleId.options.length; i++)
		{
			if(txtRoleIdShow.value == cboRoleId.options[i].value)
			{
				cboRoleId.value = txtRoleIdShow.value;
				return;
			}
		}
					
		cboRoleId.value = "";
	}
}
						
function cboRoleIdChange()
{
	with(document.all.myForm)
	{
		txtRoleIdShow.value = cboRoleId.value;
	}
}

function OpenTopicRole()
{
	var returnValue = window.showModalDialog("frmAdminRoleChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var obj1 = document.getElementById("txtRoleIdShow");
		var obj2 = document.getElementById("cboRoleId");
					
		obj1.value = returnValue;
		obj2.value = returnValue;
	}
}

//Dictionary
function OpenTopicDictionary()
{
	var returnValue = window.showModalDialog("frmAdminDictionaryChoose.aspx","","dialogWidth:500px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var obj1 = document.getElementById("cboDictionaryId");
		obj1.value = returnValue;
	}
}

function OpenTopicDictionary3(obj, type)
{
	var url = "frmAdminDictionaryChoose3.aspx?DictionaryType=" + escape(type);
	var returnValue = window.showModalDialog(url,"","dialogWidth:500px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		obj.value = returnValue;
	}
}

function OpenTopicDictionary4(obj, type)
{
	var url = "frmAdminDictionaryChoose4.aspx?DictionaryType=" + escape(type);
	var returnValue = window.showModalDialog(url,"","dialogWidth:500px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		obj.value = returnValue;
	}
}

function OpenTopicDictionary5(obj1, obj2)
{
	var returnValue = window.showModalDialog("frmAdminDictionaryChoose5.aspx","","dialogWidth:500px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicDictionary6(obj, type)
{
	var url = "frmAdminDictionaryChoose6.aspx?DictionaryType=" + escape(type);
	var returnValue = window.showModalDialog(url,"","dialogWidth:500px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		obj.value = returnValue;
	}
}

function cboDictionaryChange(obj1, obj2)
{
	obj2.value = obj1.value;
}

function ClearDictionaryChoose(obj1, obj2)
{
	obj1.value = "";
	obj2.value = "";
}

function OpenTopicDictionaryType()
{
	var returnValue = window.showModalDialog("frmAdminDictionaryTypeChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtDictionaryTypeName");
		var obj2 = document.getElementById("txtDictionaryTypeId");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicDictionaryType2()
{
	var returnValue = window.showModalDialog("frmAdminDictionaryTypeChoose2.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtDictionaryTypeName2");
		var obj2 = document.getElementById("txtDictionaryTypeId2");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function ClearDictionaryTypeChoose()
{
	with(document.all.myForm)
	{
		txtDictionaryTypeId.value = "";
		txtDictionaryTypeName.value = "";
	}
}

//Information
function OpenTopicInformationType()
{
	var returnValue = window.showModalDialog("frmAdminInformationTypeChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtInformationTypeName");
		var obj2 = document.getElementById("txtInformationTypeId");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicInformationType2()
{
	var returnValue = window.showModalDialog("frmAdminInformationTypeChoose2.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtInformationTypeName2");
		var obj2 = document.getElementById("txtInformationTypeId2");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function ClearInformationTypeChoose()
{
	with(document.all.myForm)
	{
		txtInformationTypeId.value = "";
		txtInformationTypeName.value = "";
	}
}

//Leaguer
function OpenTopicLeaguer()
{
	var returnValue = window.showModalDialog("frmAdminLeaguerChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var obj1 = document.getElementById("cboLeaguerId");
		obj1.value = returnValue;
	}
}

function OpenTopicLeaguer3(obj1, obj2)
{
	var returnValue = window.showModalDialog("frmAdminLeaguerChoose3.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicLeaguer4(obj1, obj2)
{
	var returnValue = window.showModalDialog("frmAdminLeaguerChoose4.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicLeaguerAll()
{
	var returnValue = window.showModalDialog("frmAdminLeaguerChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
				
	if(returnValue != null)
	{
		var obj1 = document.getElementById("cboLeaguerId");
		var obj2 = document.getElementById("cboLeaguerNameHelp");
					
		obj1.value = returnValue;
		obj2.value = returnValue;
	}
}

function ClearLeaguerChoose(obj1, obj2)
{
	obj1.value = "";
	obj2.value = "";
}

function OpenTopicLeaguerType()
{
	var returnValue = window.showModalDialog("frmAdminLeaguerTypeChoose.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtLeaguerTypeName");
		var obj2 = document.getElementById("txtLeaguerTypeId");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}

function OpenTopicLeaguerType2()
{
	var returnValue = window.showModalDialog("frmAdminLeaguerTypeChoose2.aspx","","dialogWidth:450px;dialogHeight:380px;status:no;help:no;scrolling=no;scrollbars=no");
	
	if(returnValue != null)
	{
		var ss = returnValue.split("|");
		
		var obj1 = document.getElementById("txtLeaguerTypeName2");
		var obj2 = document.getElementById("txtLeaguerTypeId2");
		
		obj1.value = ss[0];
		obj2.value = ss[1];
	}
}
			
function ClearLeaguerTypeChoose()
{
	with(document.all.myForm)
	{
		txtLeaguerTypeId.value = "";
		txtLeaguerTypeName.value = "";
	}
}

//Common
function Clear2(obj1, obj2)
{
	obj1.value = "";
	obj2.value = "";
}