//ratios
//var groups = {0:0, 1:0, 2:1, 3:1};	


// ==================================================
 //XmlHttpRequest object to get the refreshedData
 var getRatioDescrReq = getXmlHttpRequestObject();
 var ratioDescr = "";
 //Starts the AJAX request.
 function getRatioDescr(ratio, periodTypeID)
 { 	  		 
   if (getRatioDescrReq.readyState == 4 || getRatioDescrReq.readyState == 0) {
     getRatioDescrReq.open("GET", '/infostock/control/getRatioDescr?ratio=' + ratio + (periodTypeID ? '&period=' + periodTypeID : '') , false);
     //getRatioDescrReq.onreadystatechange = showdescr;
     getRatioDescrReq.send(null);
     if(getRatioDescrReq.status == 200)
     return getRatioDescrReq.responseText;

   }
	 return '-';
 }

//functions used on ratios group screen
// --------------------------------------------------------------------------------
function changeRatioGroup(groupType) {
  document.ratiosGroup.group.value = groupType;
	document.ratiosGroup.submit();
}
// --------------------------------------------------------------------------------
function changeConsolidatedType(consType) {
  document.ratiosGroup.consolidated.value = consType;
	document.ratiosGroup.submit();
}
// --------------------------------------------------------------------------------

function changePeriodType(periodType) {
  document.ratiosGroup.period.value = '';
  document.ratiosGroup.periodType.value = periodType;
	document.ratiosGroup.submit();
}

// --------------------------------------------------------------------------------
function setPeriod(value) {	
	document.ratiosGroup.period.value = value;	
	var suggestDiv = document.getElementById('period_suggest');
  if( suggestDiv )
  {
    suggestDiv.style.display = 'none';
    suggestDiv.innerHTML = '';
  }
  //document.ratiosGroup.action = '/infostock/control/navPeriod';
  document.ratiosGroup.submit();
}

// --------------------------------------------------------------------------------
function removeIssue(issue) {
    document.compare.ticker.value= issue;
    document.compare.act.value='del';
    document.compare.submit();
}