function OnlyHeb(obj)
{
	var str = obj.value;
	for(i=0; i<str.length; i++)
		if((str.charCodeAt(i)<1488 || str.charCodeAt(i)>1514) && str.charAt(i) != " " && str.charAt(i) != "-")
			obj.value =  str.replace(str.charAt(i),"");
}
function OnlyNoHeb(obj)
{
	var str = obj.value;
	for(i=0; i<str.length; i++)
		if(str.charCodeAt(i)>=1488 && str.charCodeAt(i)<=1514)
			obj.value =  str.replace(str.charAt(i),"");
}
function OnlyNumAndEng(obj)
{
	var str = obj.value;
	var reg = /[^a-zA-Z0-9]/g
	if (reg.test(str))
		obj.value = str.replace(reg,'')
}
function OnlyNum(obj)
{
	var str = obj.value;
	var reg = /[^\d]/g
	if (reg.test(str))
		obj.value = str.replace(reg,'')
}
function OnlyNumText(obj)
{
	var str = obj.value;
	var reg = /[\\\/'"<>*\?|]/g
	if (reg.test(str))
		obj.value = str.replace(reg,'')
}
function OnlyTel(obj)
{
	var str = obj.value;
	var reg = /[^\d ]/g
	if (reg.test(str))
		obj.value = str.replace(reg,'')
}
function EnterMouseSearch(obj)
{
	if(obj.className == "ButtonOpen")
		obj.className = "ButtonOpenSel";
	else
		obj.className = "ButtonCloseSel";
}
function OutMouseSearch(obj)
{
	if(obj.className == "ButtonOpenSel")
		obj.className = "ButtonOpen";
	else
		obj.className = "ButtonClose";

}
function ClickMouseSearch(obj)
{//alert(obj.className)
	if(obj.className == "ButtonOpenSel")
	{
		obj.className = "ButtonCloseSel";
		switch(obj.com)
		{
			case "1":
				tr_1_1.style.display = "block";
				tr_1_2.style.display = "block";
				tr_1_3.style.display = "block";
				tr_1_4.style.display = "block";
				tr_1_5.style.display = "block";
				break;
			case "2":
				tr_2_1.style.display = "block";
				tr_2_2.style.display = "block";
				tr_2_3.style.display = "block";
				break;
			case "3":
				tr_3_1.style.display = "block";
				tr_3_2.style.display = "block";
				tr_3_3.style.display = "block";
				break;
			case "4":
				tr_4_1.style.display = "block";
				tr_4_2.style.display = "block";
				tr_4_3.style.display = "block";
				tr_4_4.style.display = "block";
				tr_4_5.style.display = "block";
				tr_4_6.style.display = "block";
				break;
			case "5":
				tr_5_1.style.display = "block";
				tr_5_2.style.display = "block";
				tr_5_3.style.display = "block";
				tr_5_4.style.display = "block";
				break;
		}
	}
	else
	{
		obj.className = "ButtonOpenSel";
		switch(obj.com)
		{
			case "1":
				tr_1_1.style.display = "none";
				tr_1_2.style.display = "none";
				tr_1_3.style.display = "none";
				tr_1_4.style.display = "none";
				tr_1_5.style.display = "none";
				break;
			case "2":
				tr_2_1.style.display = "none";
				tr_2_2.style.display = "none";
				tr_2_3.style.display = "none";
				break;
			case "3":
				tr_3_1.style.display = "none";
				tr_3_2.style.display = "none";
				tr_3_3.style.display = "none";
				break;
			case "4":
				tr_4_1.style.display = "none";
				tr_4_2.style.display = "none";
				tr_4_3.style.display = "none";
				tr_4_4.style.display = "none";
				tr_4_5.style.display = "none";
				tr_4_6.style.display = "none";
				break;
			case "5":
				tr_5_1.style.display = "none";
				tr_5_2.style.display = "none";
				tr_5_3.style.display = "none";
				tr_5_4.style.display = "none";
				break;
		}
	}
}
function OpenAdmin(windowName)
{
	window.open("admin/" + windowName+".aspx",windowName,"height=400,width=510,status=no,toolbar=no,menubar=no,location=no,resizable=no");
}
function OpenWinModeless(url, widthM, heightM, res)
{
	window.showModelessDialog(url,window,"dialogHeight:" + heightM + "px; dialogWidth:" + widthM + "px;edge:Raised;center:Yes;help:No;resizable:" + res + ";status:No;");
}
function OpenCloseExpir(str,flag)
{
	try
	{
		var arr = str.split(",");
		for(i=0; i<arr.length; i++)
			document.getElementById(arr[i]).style.display	=	((flag)?("block"):("none"));
	}
	catch(d)
	{}
}
