﻿function GetStates(sLang, oCountries)
{
//debugger;

  var strRequest=sLang + 'GetStates_' + oCountries.options[oCountries.selectedIndex].value;
  MBForm_DoCallback(
      '__Page',
      strRequest,
      ProcessAjah,
      null,
      CallbackError,
      true
    ) ;		        	
  
  document.getElementById("divCities").innerHTML = "<select style='width:140px;'></select>";
  return true;
}

function GetCitiesFromState(sLang, iCountryId, oStates)
{
//debugger;
  var strRequest=sLang + 'GetCitiesFromState_' + iCountryId + '#' + oStates.options[oStates.selectedIndex].value;
  MBForm_DoCallback(
      '__Page',
      strRequest,
      ProcessAjah,
      null,
      CallbackError,
      true
    ) ;		    
    
  return true;
}
function CallbackError(responseText,context)
{
  alert(responseText);
}

function resize_iframe()
{

	var height=window.innerWidth;//Firefox
	if (document.body.clientHeight)
	{
		height=document.body.clientHeight;//IE
	}
	//resize the iframe according to the size of the
	//window (all these should be on the same line)
	document.getElementById("glu").style.height=parseInt(height-document.getElementById("glu").offsetTop-8)+"px";
}
