
	var sSearchURL = "www.dowagro.com/webapps/search/basicSearch.aspx" ;
	var path=location.pathname;
	var sFolderName;
	var sRegion;
	var sCountry;
	var iIndexReg;
	var iIndex;
	var iIndexCoun;
	
	if (path != "")
	{
		iIndex = path.indexOf("/",1);
		sFolderName = path.substring(path.indexOf("/")+1,iIndex);
		iIndexReg = path.indexOf("/",iIndex+1);
		
		if (iIndexReg != -1)
		{
			sRegion = path.substring(iIndex+1,iIndexReg);
			iIndexCoun = path.indexOf("/",iIndexReg+1);
			
			if (iIndexCoun != -1)
			{
				sCountry = path.substring(iIndexReg+1,iIndexCoun);
			}
			else
			{
				sCountry = "";
			}
		}
		else
		{
			sRegion = "";
			sCountry = "";
		}
	}
	else
	{
		sFolderName = "corporate";
		sRegion = "";
		sCountry = "";
	}

function PerformSearch(SearchTextValue)
	{
	if (SearchTextValue != "")
		{
		SearchTextValue = RemoveBad(SearchTextValue);
		}

	CurLocation = ''+location;
	if(sFolderName == '/' || CurLocation.indexOf("omepage") > -1)
		{
		if(CurLocation.indexOf("//dowagro.com") == -1)
			{
			sFolderName = 'Homepage';
			}
		}
	document.location = 'http://'+sSearchURL+'?folderName='+sFolderName+'&region='+sRegion+'&country='+sCountry+'&txtSearch='+SearchTextValue;
	}