function setSort(frm, Col, AscDsc)
{
	
	if(frm.SortCol.value == Col)
	{
		if(frm.AscDsc.value == 'Asc')
		{
			frm.AscDsc.value = 'Desc' ;
		//	eval('img' + Col).src = 'images/asc.gif';		
		}
		else
		{
			frm.AscDsc.value = 'Asc' ;
		//	eval('img' + Col).src = 'images/desc.gif';
		}
	}
	else
	{
		frm.SortCol.value = Col ;
		frm.AscDsc.value = 'Asc' ;
	}
	frm.submit();
}

function setSortImage()
{
	var sortCol = document.frmResult.SortCol.value;
	var ascDesc = document.frmResult.AscDsc.value;
	if ((sortCol != '') && (ascDesc != ''))
	{
		if ( ascDesc.toUpperCase() == 'ASC')
		{
				ascDesc = 'Desc'
		}
		else
		{
				ascDesc = 'Asc'
		}		
	}
}

function mySubmit(frm)
{
	//alert("frm.ProductID.value = " + frm.ProductID.value )
	var bValid=true;
	if(frm.ProductID.value == ""){
		bValid = false;
		alert("Please select the product from the list");
		frm.ProductID.selectedIndex=1;
	}	
	
	if(bValid) frm.submit();
}

function setNames(frm)
{
	frm.StateName.value = frm.StateID.item(frm.StateID.selectedIndex).text;
	frm.FICOTierName.value = frm.FICOTierID.item(frm.FICOTierID.selectedIndex).text;
	
	/*
	//alert(frm.FICOTierName)
	if(frm.FICOTierName != undefined)
	{
		frm.FICOTierName.value = frm.FICOTierID.item(frm.FICOTierID.selectedIndex).text;
	}
	*/
}

function OpenWindow(){
	window.open( 'Data_Details.asp','DataDetails', 'width=400, height=600, top=50, left=50');
}
