 function handleSetActiveField(evnt)
	{   
	    alert("gjhglj");
		var elt=document.getElementById(evnt);
		elt.className="activeInput";
		return true;
		    
	}
 function handleSingleSetActiveField(evnt)
	{   
		var elt=document.getElementById(evnt);
		elt.className="activeInput";
		return true;
		    
	}

function handleSingleOutActiveField(evnt)
	{
		var elt=document.getElementById(evnt);
		elt.className="NoBackgroudColor";
		return true;
	}

function closediv(statusid_error)
{
	if (eval("document.getElementById('"+statusid_error+"')")){
		var obstatusid_error=document.getElementById(statusid_error);
		obstatusid_error.style.display='none';
	}
	
}
function Deleteclosediv(statusid_error,str)
{
	var obstatusid_error=document.getElementById(statusid_error);
	obstatusid_error.style.display='none';
	window.location.href=str;
}

/*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*/

function addmultiNew(ChangeTypeID,displayID,CurrentRowList)
{
	var RowList;
	document.getElementById(ChangeTypeID).innerHTML='<img src="images/tick.png" alt="added" width="16" height="14" />';
	var RowList=document.getElementById(CurrentRowList).value;
	if(RowList.length>0)
		RowList+=",";			
		RowList+=displayID;	
	document.getElementById(CurrentRowList).value=RowList;
}

function addtypeidNew(typid,businesstypeid)
{	
	var  bstypeid=document.getElementById(businesstypeid).value;
	if(bstypeid.length>0)
	bstypeid+=",";			
	bstypeid+=typid;	
	document.getElementById(businesstypeid).value=bstypeid;
}

function doChooseDisplay(DisplayOb,CurrentRowListOb,preStr)
{
	document.getElementById(DisplayOb).innerHTML=displaysallstr;
	var CurrentRowList=document.getElementById(CurrentRowListOb).value;
	if(CurrentRowList!="")
	{
		var curArr=new Array();
		curArr= CurrentRowList.split(",");
		for(i=0;i<curArr.length;i++)	
		document.getElementById(preStr+curArr[i]).style.display="none";
		document.getElementById(CurrentRowListOb).value="";
	}
}


function DeleteAllType(DeleteType,AllTypeID)
{
	var RowList2="";
	var RowList=document.getElementById(AllTypeID).value;	
	var curArr=new Array();
	curArr= RowList.split(",");
	
	for(i=0;i<curArr.length;i++)	
	if(curArr[i]==DeleteType)
	{
		var curArr2=new Array();
		curArr2=RemoveAt(curArr,i);
		
		for(i=0;i<curArr2.length;i++)	
		{	
			if(RowList2.length>0)
			RowList2+=",";			
			RowList2+=curArr2[i];	
		}
		document.getElementById(AllTypeID).value=RowList2;
	}
	if(AllTypeID=="stockiststypeid")	
	{
		LRW.manager.FineChooseEntity();
		document.getElementById("stockist"+DeleteType).style.display="";}
		
	if(AllTypeID=="businesstypeid")
	{
		LRW.manager.FineChooseBusinessType();
		document.getElementById("businesstype"+DeleteType).style.display="";	
		
	}
	if(AllTypeID=="saveFeatureid")
	{
		LRW.manager.FineChoosePageType();
		document.getElementById("Feature"+DeleteType).style.display="";
	}
	
}

function CloseAllDo(DisplayOb,CurrentRowListOb,SaveTempStockist)
{
	document.getElementById(DisplayOb).innerHTML=displaysallstr;
	document.getElementById(CurrentRowListOb).value="";
	document.getElementById(SaveTempStockist).value=tempStockistStr;
}

function SaveTypeInfo(SaveAllStockist,SaveTempStockist)
{
	displaysallstr=document.getElementById(SaveAllStockist).innerHTML;
	tempStockistStr=document.getElementById(SaveTempStockist).value;
}

function RemoveAt(arr, position)
{
	var items = new Array();
	if (position >= arr.length)
		alert("out off the array's max length");
	items = arr.slice(0, position).concat(arr.slice(position + 1, arr.length));
	return items;
}