﻿// JScript File

function fnApplyLanguage(url,ddllanguageid)
{

	var selectedlocale = document.getElementById(ddllanguageid).value;
    fnSetLocaleInSession(selectedlocale,url)
    document.location.href= document.location.href;
}

function fnSetLocaleInSession(LocaleVal,AjaxUrl)
{
   var result;
	result= RSExecute(AjaxUrl,"SetLocaleInSessionAndCookie",LocaleVal);
	if(result==null || result.status == -1)
	{
		alert(result.message);
		return;
	}
	return result.return_value;
}
function fnLanguageHome(url,language)
{

   fnSetLocaleInSession(language,url)
	
}
function fnLegislativeContent(url,ddlCategoryid)
{
var selectedcategory = document.getElementById(ddlCategoryid).value;
document.location.href= url + "/" + "Pages/LegislativeList.aspx?CATID="+selectedcategory;
}
function fnGeoContent(url,ddlLocationid)
{
var selectedlocation = document.getElementById(ddlLocationid).value;
document.location.href= url + "/" + "Pages/GeoAreaList.aspx?CATID="+selectedlocation;
}

