
function setInput1(objName,enInput){
	if (objName==""){
		return true
	}
	if (enInput==0){
		myform[objName].disabled=false 
		myform[objName].focus()
	}
	else
	{
		myform[objName].value=""
		myform[objName].disabled = true 
	}
}

function SetInput2(v1,v2,objName2){
	if (objName2==""){
		return true
	}
	if (v1==v2){
		myform[objName2].disabled = false 
		myform[objName2].focus()
	}
	else
	{
		myform[objName2].value=""
		myform[objName2].disabled = true 
	}
}


function setOption(objName1,objName2,indexValue){
	//myform[objName1].disabled=false 
	//myform[objName2][indexValue].checked
	//myform[objName1].focus()	
}

function AdjustSort(obj1,obj2,Direction){
var valueTemp,textTemp,sSortString,i
	if (myform[obj1].selectedIndex == -1){
		return
	}
	sSortString = ""
	valueTemp = myform[obj1].options[myform[obj1].selectedIndex].value
	textTemp = myform[obj1].options[myform[obj1].selectedIndex].text
	if (Direction == 1 ){
		if (myform[obj1].selectedIndex > 0 ){			
			myform[obj1].options[myform[obj1].selectedIndex].value = myform[obj1].options[myform[obj1].selectedIndex-1].value
			myform[obj1].options[myform[obj1].selectedIndex].text = myform[obj1].options[myform[obj1].selectedIndex-1].text
			myform[obj1].options[myform[obj1].selectedIndex-1].value = valueTemp
			myform[obj1].options[myform[obj1].selectedIndex-1].text = textTemp	
			myform[obj1].selectedIndex = myform[obj1].selectedIndex-1			
		}
		
	}
	else
	{
		if (myform[obj1].selectedIndex < myform[obj1].length-1 ){			
			myform[obj1].options[myform[obj1].selectedIndex].value = myform[obj1].options[myform[obj1].selectedIndex+1].value
			myform[obj1].options[myform[obj1].selectedIndex].text = myform[obj1].options[myform[obj1].selectedIndex+1].text
			myform[obj1].options[myform[obj1].selectedIndex+1].value = valueTemp
			myform[obj1].options[myform[obj1].selectedIndex+1].text = textTemp
			myform[obj1].selectedIndex = myform[obj1].selectedIndex+1			
		}
	
	}
	for (i=0 ; i<myform[obj1].length ; i++){
		sSortString = sSortString + (i+1) + ":" + myform[obj1].options[i].value+","
		//sSortString = sSortString  + myform[obj1].options[i].value+","	
	}
	myform[obj2].value = sSortString

}

function clickclick(){
	if(myform.ClickAction[0].checked==true){
		AdjustSort('ItemList','ItemSortString',1)
	}
	else{
		AdjustSort('ItemList','ItemSortString',0)
	}	
}