<!--
var pid=0,sid=0
var bluu="#009DDC"
var bbluu="#009DFC"
var tdhg='#b0affe',tdbg='#cacAf0'
//var trx=0,sbg=tdhg, mbg='#E0E0E9', mbg2='#f0f0ff',cbg='#FFFFFF' //tdbg;
var xdbg='#30cfff',xdhg='#aaafff' //'#306fef'
var trx=0,sbg=tdhg, mbg='#E0E0E9', mbg2='#f0f0ff',cbg='#FFFFFF' //bluu //tdbg;
xdbg='#a9bfff'
tdhg=xdbg
function mo(c) {c.style.backgroundColor=pid==c.id.substr(1)?bbluu:tdhg}
function mu(c) {c.style.backgroundColor=pid==c.id.substr(1)?bluu:tdbg}
function init(p,s,c,b) {
	pid=p;sid=s;context=c;subject=b
	if (p!=0) {
	    ByIdBg('t'+p,bluu)
	    ByIdFont('ta'+p,'#FFFFFF')
	}
	if (s!=0) {
	    ByIdBg('r'+s,'#FFFFFF') //bluu)
//	    ByIdFont('m'+s,'#FFFFFF')
//	    ByIdFont('i'+s,'#FFFFFF')
	}
}

var sm=new Array(),pj=new Array()
sm[1]='design'
sm[2]='office_fitout'
sm[3]='fittings'
sm[4]='networks'
sm[5]='relocation'
sm[6]='cleaning'
sm[7]='computers'
pj[1]='lowe_lintas'
pj[2]='unite'
pj[3]='southern_housing_group'
pj[4]='learning_skills_council'
pj[5]='merril_corp'
pj[6]='prudential'
pj[7]='zurich'
function xp(x) {self.location.href='projects_'+pj[x]+'.html';xu(x)}
function xc(x) {self.location.href='services_'+sm[x]+'.html';xu(x)}
function xo(x) {ByIdBg('r'+x,sid==x?xdhg:xdbg)}
function xu(x) {ByIdBg('r'+x,sid==x?cbg:altbg(x))}//;if (x==sid) ByIdFont('m'+x,'#FFFFFF')}
function altbg(x) {return (x%2==0?mbg:mbg2)}
var this_url=self.location.href

// new utils
function gId(n) {return ById(n).id.substr(1)}
function ById(n) {return document.getElementById(n)}
function ByIdBg(n,v) {return ById(n).style.backgroundColor=v}
function ByIdFont(n,v) {if (ById(n).innerHTML.indexOf('color='+v)<0) {ById(n).innerHTML='<font color='+v+'>'+ById(n).innerHTML+'</font>'}}
function ByIdBg(n,v) {ById(n).style.backgroundColor=v}
function ByIdChk(x) {var i=ById('ichk'+x);i.checked=!i.checked}

// stdio.js
var gf_mode='|'
function gxf(data,j,item) { if (data=='') return item==-1?0:'';var d=(data+' '),x,y=-1,z=-1,L=d.length;for (x=0;x<L;x++) { if (gf_mode==d.charAt(x)||x==L-1) { if (++z>=j&&j!=-1) return d.substring(y,x); else { x=d.indexOf(gf_mode,x);if (x<0) break;y=x+1; }}}; return j!=-1?'':z+1}
function gf(d,i) {gf_mode='|';return gxf(d,i)}
function gcf(d,i) {gf_mode=',';return gxf(d,i);gf_mode='|'}
function gsf(d,i) {gf_mode=';';return gxf(d,i);gf_mode='|'}
function lcase(a) {return trim(a).toLowerCase()}
function ucase(a) {return trim(a+' ').toUpperCase();}
function tcase(a) {a=trim(a);return (ucase(a)==a||lcase(a)==a)?ucase(a.charAt(0))+lcase(a.substr(1)):a}
function trim(t) {var s=t+' ';if (s==' ') return ''; else { while(s.charAt(0)==' '||s.charAt(0)=='\t') s=s.substring(1);while(s.charAt(s.length-1)==' '||s.charAt(s.length-1)=='\t') s=s.substring(0,s.length-1);return s}}
function get_param() {var u=this_url,x=u.lastIndexOf('?');if(x<0) x=u.lastIndexOf('#');return x<0?'':unescape(u.substr(x+1))}
//
// form functions
function chk_send() {frm_chk_send(ById('frm'))}
function chk_reset() {ById('frm').reset()}
function write_ref(r) {document.writeln(r==''?'':'<br><br><img class=ln alt="" width="100%" height=1 src="./images/blank.gif"><br><font size=1 color=blue><b>Please make a note of your<br>Reference Number: <font color="#aa2000"><b><u>'+r+'</u></b></font></font><br>')}
function isEmail(e) {return !(e==''||e.indexOf(' ')>-1||e.indexOf('@')<0||e.indexOf('.')<0||e.lastIndexOf('.')>e.length-2)}
function frm_chk_sendable() {return (ById('namx').value!=''&&isEmail(ById('emx').value))}
function frm_chk_send(f) {
	if (frm_chk_sendable())
		f.submit();
	else {
		var e=ById('emx').value,m;
		m='C o n t a c t     I n f o r m a t i o n'
		m+='\n______________________________'
		m+='\n\nPLEASE FILL IN ENOUGH DETAILS\nFOR US TO CONTACT YOU'
		m+='\n\ne.g. Your Name and Telephone number'
		m+=(e!=''&&isEmail(e)?'':'\n\nNOTE: your email address must\nbe in the correct format')
		alert(m)
	}
}
// silly functions
function poptel() {
	alert('OfficeFitout.co.uk\n-----------------------------------\n\nPlease feel free to call us:\n\n     (0) 207 734 4239    \n\n-----------------------------------')
}

function load_enquiry(n) { self.location.href="enquiry.html?"+n}
function write_em(e) { write_ems(e,'s'); }
function write_ems(e,s) { var em=e+unescape("%40")+dom; document.writeln('<a class='+s+' href=mailto:'+em+'>'+em+'</a>') }

// ////////////////////////////////////////////////////////////////////////////////////////////

var int_url='interoffice.html',home_url='index.html',enq_url='enquiry.html',enq_subj='Fitout'
var subject='',newWindow=null,cid='',dom='officefitout.co.uk',url=self.location.href
function auto_load(n) {	setTimeout("self.location='"+n+".html'",2000); }
function show_window(v,w,h) { if (newWindow) newWindow.close(); newWindow=window.open('','displayWindow','menubar=no,height='+h+',width='+w+',resizable=0'); newWindow.document.close(); if (v.indexOf('<html>')==0) newWindow.document.writeln(v); else newWindow.location.href=v;newWindow.focus();}
function show_home() { parent.location=home_url; }
function show_furniture() { show_window(int_url,300,435); }
function xcfg(c,fg) { c.style.color=fg;c.fgcolor=fg;c.color=fg; }
function xcbg(c,bg) { c.style.backgroundColor=bg;c.bgColor=bg;c.backgroundColor=bg; }
function handleErr() { arAccessErrors = ["permission","access"]; mess=arguments[0].toLowerCase(); found = false; for (i=0;i<arAccessErrors.length;i++) { errStr = arAccessErrors[i]; if (mess.indexOf(errStr)!=-1) found=true; } return found; }
window.onerror = handleErr;
//-->

