<!-- //hide from old browsers

n  = (document.layers) ? 1:0
ie = (document.all)    ? 1:0
ff = (!n && !ie && document.getElementById) ? 1:0


var menu1;
var menu2;
var menu3;
var menu4;
var menu5;
var menu6;


function init()
    {
		if (n)
    	{
		menu1 = document.home
		menu2 = document.bestbuys
		menu3 = document.application
		menu4 = document.calculator
		menu5 = document.advice
		menu6 = document.info

		}
		if (ie)
    	{
		menu1 = home.style
		menu2 = bestbuys.style
		menu3 = application.style
		menu4 = calculator.style
		menu5 = advice.style
		menu6 = info.style

		}
		if (ff)
		{
		    menu1 = document.getElementById('home')   
		    menu2 = document.getElementById('bestbuys') 
		    menu3 = document.getElementById('application')  
		    menu4 = document.getElementById('calculator') 
		    menu5 = document.getElementById('advice')
		    menu6 = document.getElementById('info')
		}
	}

function show(showobj)
{
    if (n) 
    {
    	showobj.visibility = "show"
    }
    
    if (ie) 
    {
    	showobj.visibility = "visible"
    }	

    if (ff) 
    {
    	showobj.style.visibility = "visible"
    }	
}

function showAll()
{
	if ((n) || (ie) || (ff)) 
	{
		show(menu1);show(menu2);show(menu3);show(menu4);show(menu5);show(menu6);
	}
}

function hide(hideobj)
{
	if (n) hideobj.visibility = "hide"
	if (ie) hideobj.visibility = "hidden"
	if (ff)
	{
		hideobj.style.visibility = "hidden"
	}
}


function hideAll()
{
	if ((n) || (ie) || (ff)) 
	{
		if (bMenuUp)
		{
			hide(menu1);hide(menu2);hide(menu3);hide(menu4);hide(menu5);hide(menu6);
		}	
	}
}


var TimeOutNum = 0;

var loaded = 0;


function SetTimer()
{
	if (bMenuUp)
	{
		TimeOutNum = setTimeout("hideAll();",600);
	}	
}

function mOvr(src,clrOver)
{ 
	src.style.cursor = 'pointer'; 
	src.bgColor = clrOver; 
}

function mOut(src,clrIn)
{ 
	src.style.cursor = 'default'; 
	src.bgColor = clrIn; 
}

function menu1()
{
	if (version=="N4"||version=="IE4")
	{
		document.write ("<table width='90' cellpadding=0 cellspacing=0>");
		document.write ("<tr><td onMouseOver='clearTimeout(TimeOutNum);' onMouseOut='{SetTimer();}'>");
		document.write ("<table class='menuTable' width='90' cellpadding=0 cellspacing=1>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='index.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='index.shtml'>Home</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='newsletter.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='newsletter.shtml'>Newsletter</a></td></tr>");
		document.write ("</table>")
		document.write ("</td></tr>")
		document.write ("</table>")
	}	
}

function menu2()
{
	if (version=="N4"||version=="IE4")
	{
		document.write ("<table width='90' cellpadding=0 cellspacing=0>");
		document.write ("<tr><td onMouseOver='clearTimeout(TimeOutNum);' onMouseOut='{SetTimer();}'>");
		document.write ("<table class='menuTable' width='90' cellpadding=0 cellspacing=1>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='bestbuys.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='bestbuys.shtml'>All</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='bestbuysbr.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='bestbuysbr.shtml'>Base Rate Track</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='bestbuysc.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='bestbuysc.shtml'>Capped</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='bestbuysd.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='bestbuysd.shtml'>Discount</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='bestbuysfr.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='bestbuysfr.shtml'>Fixed Rate</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='bestbuysf.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='bestbuysf.shtml'>Flexible</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='bestbuyssv.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='bestbuyssv.shtml'>Variable Rate</a></td></tr>");
		document.write ("</table>")
		document.write ("</td></tr>")
		document.write ("</table>")
	}	
}

function menu3()
{
	if (version=="N4"||version=="IE4")
	{
		document.write ("<table width='90' cellpadding=0 cellspacing=0>");
		document.write ("<tr><td onMouseOver='clearTimeout(TimeOutNum);' onMouseOut='{SetTimer();}'>");
		document.write ("<table class='menuTable' width='90' cellpadding=0 cellspacing=1>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='application.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='application.shtml'>Mortgage Application</a></td></tr>");
		document.write ("</table>")
		document.write ("</td></tr>")
		document.write ("</table>")
	}	
}

function menu4()
{
	if (version=="N4"||version=="IE4")
	{
		document.write ("<table width='90' cellpadding=0 cellspacing=0>");
		document.write ("<tr><td onMouseOver='clearTimeout(TimeOutNum);' onMouseOut='{SetTimer();}'>");
		document.write ("<table class='menuTable' width='90' cellpadding=0 cellspacing=1>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='calculator.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='calculator.shtml'>Payment Calculator</a></td></tr>");
		document.write ("</table>")
		document.write ("</td></tr>")
		document.write ("</table>")
	}	
}

function menu5()
{
	if (version=="N4"||version=="IE4")
	{
		document.write ("<table width='90' cellpadding=0 cellspacing=0>");
		document.write ("<tr><td onMouseOver='clearTimeout(TimeOutNum);' onMouseOut='{SetTimer();}'>");
		document.write ("<table class='menuTable' width='90' cellpadding=0 cellspacing=1>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='askrob.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='askrob.shtml'>Ask Rob</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='advice.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='advice.shtml'>Buying a House</td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='firsttimebuyers.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='firsttimebuyers.shtml'>First Time Buyers</td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='homemovers.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='homemovers.shtml'>Home Movers</td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='mortgagetypes.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='mortgagetypes.shtml'>Mortgage Types</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='paymenttypes.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='paymenttypes.shtml'>Payment Types</a></td></tr>");
		document.write ("</table>")
		document.write ("</td></tr>")
		document.write ("</table>")
	}	
}

function menu6()
{
	if (version=="N4"||version=="IE4")
	{
		document.write ("<table width='90' cellpadding=0 cellspacing=0>");
		document.write ("<tr><td onMouseOver='clearTimeout(TimeOutNum);' onMouseOut='{SetTimer();}'>");
		document.write ("<table class='menuTable' width='90' cellpadding=0 cellspacing=1>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='aboutus.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='aboutus.shtml'>AboutUs</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='links.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='links.shtml'>Useful Links</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=document.location='contact.shtml'; onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');><a href='contact.shtml'>Contact Us</a></td></tr>");
		document.write ("<tr><td bgcolor='#355F87' onclick=openmortgagecodewindow(); onmouseover=mOvr(this,'#2E2F6C'); onmouseout=mOut(this,'#355F87');>Mortgage Code</td></tr>");
		document.write ("</table>")
		document.write ("</td></tr>")
		document.write ("</table>")
	}	
}

function toggleMenus() 
{
	if (loaded)
	{
		if (bMenuUp)
		{
			bMenuUp = false;
			showAll();
			document['toggleMenuBtn'].src = "images/navpopup.gif";
		}
		else
		{
			bMenuUp = true;	
			hideAll();
			document['toggleMenuBtn'].src = "images/navpopdown.gif";
		}
	}		
}

function openmortgagecodewindow()
{
	window.open('http://www.mortgagecode.org.uk', 'mortgagecode');
}

function moveTo()
{
	document.location = 'index.shtml';
}

function setFontColorIn(obj)
{
	obj.fontColor='#000000';
}

function setFontColorOut(obj)
{
	obj.fontColor='#000000';
}
-->
