function SetFocus()
{
	if(window.location.href.indexOf('Login.aspx') > -1)
		Element = document.getElementById('IMS_Login1_UserNameTB');
	else if(window.location.href.indexOf('mainpage.aspx') > -1)
		Element = document.getElementById('SearchBox');
	else if(window.location.href.indexOf('Registration.aspx') > -1)
		Element = document.getElementById('NameTB1');
    else if(window.location.href.indexOf('IMSAdvancedSearch.aspx') > -1)
            Element = document.getElementById('SearchBox');
	else if(window.location.href.indexOf('ManageAccount_EditBilling.aspx') > -1)
		Element = document.getElementById('CompanyNameTextBox');
	else if(window.location.href.indexOf('CheckOutProcess_EditBilling.aspx') > -1)
		Element = document.getElementById('CompanyNameTextBox');
	else if(window.location.href.indexOf('ManageAccount_EditShipping.aspx') > -1 &&
			document.getElementById('ShippingAddressTextboxesTableCell').style.display != 'none')
		Element = document.getElementById('CompanyNameTextBox');
	else if(window.location.href.indexOf('CheckOutProcess_EditShipping.aspx') > -1)
		Element = document.getElementById('CompanyNameTextBox');
  	else
		Element = document.getElementById('IMS_Header1_input');
	if(Element)
	{
		Element.focus();
		document.getElementById('IMS_Header1_SearchButton').tabIndex = -1;
	}

	CheckIfElementExists = document.getElementById('IMS_Header1_CatalogDataSearchSelection');
	if (CheckIfElementExists)
		CheckIfElementExists.checked = true;	
}