//linkHighLight="#ff9966";
//linkGlow="#FF9933";
//linkNormal="#FFCC99";
linkGlow="#FFcc88";
linkNormal="#FF9966";
linkHighLight="#cccccc";
resizeBannerImages();
url1="http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2F";

url2=window.location.host + window.location.pathname;

url3="&lp=en_";

url4="zh";

url5="&btnTrUrl=Translate&vm=r";

translationDisclaimer="The page will be translated by the Yahoo - Babel Fish Translation Service which is powered by the Systran Machine Translation Engine.  Translations from English may not always be accurate or precise or allow for human interpretation. \n\nA1 Housing does not warrant such translations and disclaims any responsibility, including all alleged direct and consequential damages, for inaccurate translations.";

function mediumFont()
{
document.body.style.fontSize="70%";

}

function largeFont()
{
document.body.style.fontSize="90%";

}

function largerFont()
{
document.body.style.fontSize="100%";

}

function largestFont()
{
document.body.style.fontSize="110%";

}

function stretchLogo()
{

var banner=document.getElementById("logo").children[0];
var s=screen.width * .875;

if (s> banner.width) 
{banner.width=s;}

}

function bw(fc,bgc)
{
	for (x=0;x<document.getElementsByTagName("H1").length;x++)
	{document.getElementsByTagName("h1")[x].style.color=fc;}
	for (x=0;x<document.getElementsByTagName("H2").length;x++)
	{document.getElementsByTagName("h2")[x].style.color=fc;}
	for (x=0;x<document.getElementsByTagName("H3").length;x++)
	{document.getElementsByTagName("h3")[x].style.color=fc;}
	for (x=0;x<document.getElementsByTagName("a").length;x++)
	{document.getElementsByTagName("a")[x].style.color=fc;}
	for (x=0;x<document.getElementsByTagName("caption").length;x++)
	{document.getElementsByTagName("caption")[x].style.color=fc;}

	for (x=0;x<document.getElementsByTagName("dt").length;x++)
	{document.getElementsByTagName("dt")[x].style.color=fc;}

document.body.style.backgroundColor=bgc;
document.body.style.color=fc;
document.getElementById("footercontent").style.backgroundColor="#f3f3f3";
}

function setHref(obj, langCode)
{

url4=langCode;
var u=url1 + url2 + url3 + url4 + url5;
obj.href=(u);

}

function showBanner()
{
var s=screen.availwidth * .85;
document.write("<img src='Images/web a1 13.jpg' alt='Images of A1' title = ''");
document.write(" width=" +s + "/>");
}

function showDisclaimer()
{
alert(translationDisclaimer);
}

function checkBackButton()
{
if (!document.referrer)
{
document.getElementById("cmdPrint").disabled=true;
}
}


function resizeBannerImages()
{
widthImage=((((screen.width * .93) )*.70)-10)/4;
logoWidth=(screen.width *.95) * .15;
logoHeight=(widthImage* .81) + 20;
strX="<style>td img.BassetlawImage{";
strX +="width:";
strX += widthImage;
strX +="px;";
//strX +="height:";
//strX += widthImage;
//strX +="px;";
strX +="}";
strX +="td #image{height:";
strX +=logoHeight;
strX +="px;}";
strX +="</style>";

document.write(strX);

}

function kw()
{

	for(x=0;x<document.getElementsByTagName("input").length;x++)
		{
			if(document.getElementsByTagName("input")[x].value=="Search Keywords")
				{
				document.getElementsByTagName("input")[x].value="";
				}
		}

	for(x=0;x<document.getElementsByTagName("img").length;x++)
		{
		if(document.getElementsByTagName("img")[x].src=="http://www.a1housing.co.uk/plugins/FAQ/images/categorylink.gif")
				{
				document.getElementsByTagName("img")[x].style.display="none";
				}
if(document.getElementsByTagName("img")[x].src=="http://www.a1housing.co.uk/plugins/FAQ/images/qmark.gif")
				{
				document.getElementsByTagName("img")[x].src=="http://www.a1housing.co.uk/images/qmark.gif";
				}
		}

	for(x=0;x<document.getElementsByTagName("td").length;x++)
		{
//alert(document.getElementsByTagName("td")[x].innerHTML);
			if(document.getElementsByTagName("td")[x].innerHTML.indexOf("Categories &amp; Sub-Categories")>-1)
				{
				document.getElementsByTagName("td")[x].innerHTML="Categories";

				}
		}


}

function illuminateSubMenu()
{

var level2MenuTable=document.getElementById("level2MenuTable");

for (x=0;x<level2MenuTable.rows.length;x++)
	{
	var cell=level2MenuTable.rows[x].children[0];

	if (cell.children[0].href.indexOf(window.location.pathname) >-1)
		{
		cell.style.backgroundColor=linkHighLight;
		}
	}

}

function glow(menuCell)
{
	if(menuCell.style.backgroundColor!==linkHighLight)
		{
		if(menuCell.children[0].href !== window.location.href)
			{
			menuCell.style.backgroundColor=linkGlow;
			}	
		}
}

function stopGlowing(menuCell)
{
	if(menuCell.style.backgroundColor!==linkHighLight)
		{
		if(menuCell.children[0].href !== window.location.href)
			{
			menuCell.style.backgroundColor=linkNormal;
			}	
		}
}


