<!--

var dom='McbeathPatmore.co.uk'
var imgs='./images/'
var max_links=10
var hov='#4b477F'
var hi='#8080b0'
var lo='' //'#f0f0f0'
var this_url=self.location.href
function get_param(url) {var u=url,x=u.lastIndexOf('#');if(x<0) x=u.lastIndexOf('?');return x<0?'':unescape(u.substr(x+1))}
function mover(c) {
  hi_link()
  var i=parseInt(c.id.substr(1)),v=document.getElementById('r'+i);
  if (v.tag!='1') v.style.backgroundColor=hov;
}
function mout(c) {var i=parseInt(c.id.substr(1)),v=document.getElementById('r'+i);hi_link();v.style.backgroundColor=v.tag=='1'?hi:lo}
function lcase(v) {return v.toLowerCase()}
function put_em(n) {var e=n+'@'+dom;document.writeln('<a href="mailto:'+e+'">'+e+'</a>')}
function write_em(n) {var e=n+'@'+dom;document.writeln('<a href="mailto:'+e+'">'+n+'</a>')}
var newWindow=null
var newWindow1=null
function pop_map(url) {
	var r=''
	newWindow=window.open('','displayWindow','menubar=no,height=371,width=427,resizable=yes')
	newWindow.document.close()
	r='<body style="margin-bottom:0px;margin-right:0px;margin-top:0px;margin-left:0px">' 
	r+='<iframe id=google width="425" height="350" frameborder="0"'
	r+=' scrolling="no" marginheight="0" marginwidth="0"'
	r+=' src="http://maps.google.co.uk/maps?f=q&amp;hl=en&amp;geocode=&amp;q=leeds&amp;ie=UTF8&amp;z=10&amp;'
	r+='iwloc=addr&amp;'
	r+='om=1&amp;'
	r+='ll=53.892201,-1.481781&amp;output=embed&amp;s=AARTsJpSULCI6rMWpxTH0PPxetS91u0AJg">'
	r+='</iframe><br><small><a  target=_google href="http://maps.google.co.uk/maps?f=q&amp;hl=en&amp;geocode=&amp;q=leeds&amp;ie=UTF8&amp;z=10&amp;iwloc=addr&amp;om=1&amp;ll=53.892201,-1.481781&amp;source=embed" style="color:#0000FF;text-align:left"><font face=arial>View Larger Map</a></small>'
	newWindow.document.writeln(r)
	newWindow.zorder
	newWindow.focus()
}

var cmap=0
function click_map() {
	if (++cmap>2) cmap=0
	if (cmap<=1) map_img.src=imgs+'leeds-map'+cmap+'.gif'
	map_img.style.visibility=cmap==2?'hidden':'visible'
	google.style.visibility=cmap==2?'visible':'hidden'
	google.style.height=cmap==2?350:5
}
function pop_it(r,h,w) {
	newWindow=window.open('','displayWindow','menubar=no,height='+h+',width='+w+',resizable='+(r==''?'no':'yes'))
	newWindow.document.close()
	newWindow.document.writeln(r)
	newWindow.zorder
	newWindow.focus()
}
function open_callback() {
	var h=320,w=450
	newWindow1=window.open('','displayWindow1','menubar=no,height='+h+',width='+w+',resizable=no')
	newWindow1.document.close()
	newWindow1.location.href="callback.html"
	newWindow1.zorder
	newWindow1.focus()
}
function do_enquiry_heading() {
	var u='',h='',x,y=0,e,r='',h,t,m='',c,phd,phf
	u=get_param(this_url)
	phf=document.getElementById('frm')
	phd=document.getElementById('page_heading')
	h=phd.innerHTML
	if (u=='') {u=this_url.substr(this_url.lastIndexOf('/')+1); }
	if (u=='virtual') 	{y=3;h='Virtual Office Enquiry';m='I am interested in Virtual Offices, please contact me immediately.'}
	if (u=='prospect') 	{y=4;h='Prospect House Enquiry';m='I am interested in Serviced Offices at PROSPECT HOUSE, please contact me as soon as possible'}
	if (u=='westone') 	{y=5;h='West One Enquiry';m='I am interested in Serviced Offices in the WEST ONE FACILITY, please contact me as soon as possible'}
	if (u=='general') 	{y=1;h='General Enquiry'}
	if (u=='enquiry.html')  {y=1;h='General Enquiry'}
	if (u=='office_space.html')  {y=2;h='Office Space Enquiry'}
	document.forms[0].subject.value=h;
	if (y>0) {
		if (m!='') phf.Message.value=m
		phd.innerHTML=h
		for (x=1;x<=5;x++) {
			e=document.getElementById('fa'+x)
			h=e.href;h=h==''?'enquiry.html':h
			t=e.innerHTML;
			if (y==x) {
				e.href='#'
				e.innerHTML='<font class=sma>'+t+'</font>'
			}
		}
		r=phf.subject.value+';;;Virtual Office Enquiry;Prospect House Enquiry;West One Enquiry'
		r=gsf(r,y)
		if (r!='') phf.subject.value=r
	}
}

function hi_link() {
	var ch1=imgs+'mpbula.gif', ch0=imgs+'mpbul.gif'
	var r='',a=false,u=self.location.href,ua,c,x,i='@ ',f,ci,cr
	u=lcase(u.substr(u.lastIndexOf('/')+1))
	x=u.indexOf('?'); if (x>0) u=u.substr(0,x-1)
	x=u.indexOf('#'); if (x>0) u=u.substr(0,x-1)
	
	if (u=='') u='index.html'
	for (x=1;x<=max_links;x++) {
		ac=document.getElementById('a'+x) 
		ci=document.getElementById('c'+x)
		cr=document.getElementById('r'+x)
		ua=ac.href;
		ua=lcase(ua.substr(ua.lastIndexOf('/')+1))
		a=u!=''&&(ua.indexOf(u)>-1||ua=='#')
		if (a) {
		  	ci.src=ch1
			ac.style.cursor='default'
			ac.href='#'
			cr.tag='1'
			cr.style.backgroundColor=hi
		} else {
			if (lcase(ci.src).indexOf(lcase(ch0.substr(1)))<0) {ci.src=ch0}
			cr.tag='0'
			cr.style.backgroundColor=lo
    	}
	}
	status=i+u
}


//-->
