function begin(){	var allforms = document.getElementsByTagName('form');	for(x=0;x<allforms.length;x++) allforms[x].setAttribute('autocomplete', 'off');	ev(document.getElementById('campaign_a'), 'mouseover', c_swap);	ev(document.getElementById('campaign_b'), 'mouseover', c_swap);	ev(document.getElementById('campaign_c'), 'mouseover', c_swap);}function gt(e){	var targ;	if (!e) var e = window.event;	if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement;	if (targ.nodeType == 3) targ = targ.parentNode;	return targ;}function c_hide(e){	document.getElementById('campaign_ai').style.display = 'none';	document.getElementById('campaign_bi').style.display = 'none';	document.getElementById('campaign_ci').style.display = 'none';}function c_swap(e){	c_hide();	document.getElementById(gt(e).id + 'i').style.display = 'block';}function ev(t,en,h){	if (t.addEventListener )		t.addEventListener(en, h, false);	else if ( t.attachEvent )		t.attachEvent('on' + en, h);	else		t['on' + en] = h;}function tab_show(o){	var d = document.getElementById('brent_searchZone').getElementsByTagName('div');	var t = document.getElementById('brent_searchTab').getElementsByTagName('a');	for(var x in t){		if(t[x].className == 'lf bc_tab_on') {			t[x].className = 'lf bc_tab';			document.getElementById(t[x].id + '_tabs').style.display = 'none';		}		if(t[x].id == o) t[x].className = 'lf bc_tab_on';	}	document.getElementById(o + '_tabs').style.display = 'block';	return false;}function b_search(sf){	if(sa == false){		var m=(sf?document.getElementById(sf):document.getElementById('b_search_main'));		var st = m.value.replace(/&/g, '%26');		if(m.value=='' || m.value.indexOf('Search our') > -1){			alert('Please enter a search query ...');		}else{ 			sa = true;			m.className = m.className + ' searching';			var w= window.location.toString();			var t = new ax(w.substring(0, w.indexOf('.gov')) + '.gov.uk/home.nsf/pages/search+unavailable?opendocument&rnd='+Math.random(),				function(o, s, id){					if(s==200)						window.location = 'http://www.google.co.uk/search?hl=en&q=site%3Abrent.gov.uk+' +st;					else{                            switch(id){                            	  case 'b_formssearch':	     					  window.location = 'http://search.brent.gov.uk/search?q=' +st+'&entqr=0&ud=1&sort=date%3AD%3AL%3Ad1&output=xml_no_dtd&oe=UTF-8&ie=UTF-8&filter=0&client=default_frontend&proxystylesheet=default_frontend&site=formslinks';	     					  break;	     				  case 'b_servicessearch':	     					  window.location = 'http://search.brent.gov.uk/search?q=' +st +'&entqr=0&ud=1&sort=date%3AD%3AL%3Ad1&output=xml_no_dtd&oe=UTF-8&ie=UTF-8&filter=0&client=default_frontend&proxystylesheet=default_frontend&site=servicepages';	     					  break;	     				  default:		     				  window.location = 'http://search.brent.gov.uk/search?q=' +st +'&entqr=0&ud=1&sort=date%3AD%3AL%3Ad1&output=xml_no_dtd&oe=UTF-8&ie=UTF-8&client=default_frontend&proxystylesheet=default_frontend&site=default_collection';     				  		 break;                            }					}				}, m.id);			t.dG();		}	}}function jumpMap(u){	var p = $('b_search_f').value;			if(p.indexOf('postcode')==-1){		location.replace(u + '&p='+p.replace(/ /g, ''));	}else		location.replace(u);			return false;}
