HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-86-generic #87-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 18:03:36 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //home/mykensington.co.uk/public_html/kensington/validate.js
function ValidateQuery()
{	
	// Not allowed to be all blank.
	
	if(document.SearchForm.ty.value=="" && document.SearchForm.na.value=="") 
	{
		alert("Please enter something in Business Type and Business Name fields.")		
		return false
	}
	

	// Check they have more than one character each
	if(document.SearchForm.ty.value.length < 2 && document.SearchForm.ty.value.length!=0) {
	
		alert("Please enter at least three letters for Business Type")
		return false
	} 
	
	// If only name search, check its more than 3 chars
	if(document.SearchForm.ty.value.length==0 && document.SearchForm.na.value.length<3) {
	
		alert("Please enter at least three letters for Business Name")
		return false
	} 

	if(document.SearchForm.pc.value!="" && document.SearchForm.di.value!="all_dir")
	{
		document.SearchForm.di.value="all_dir"		
	}
	return true
}


//-------------------------------------------------------------//
// JumpBrowse : Jumps to browser page with state info          //
//-------------------------------------------------------------//
function JumpBrowse()
{
	SetLocation();
	if (document.SearchForm.di.value != "")
		window.location="http://www.colourpages.co.uk/search/azclass.asp?di="+document.SearchForm.di.value
						+"&ty="+document.SearchForm.ty.value
						+"&na="+document.SearchForm.na.value;
	else
		window.location="http://www.colourpages.co.uk/search/azclass.asp?pc="+document.SearchForm.pc.value
						+"&ty="+document.SearchForm.ty.value
						+"&na="+document.SearchForm.na.value;
}

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT
linkset[0]='<div class="menuitems"><select name="select" size="10" onChange="MM_copyArea(this)">'
linkset[0]+='<option value="" selected>(Choose an Area)</option>'
linkset[0]+='<option value="All Areas">All Areas</option>'
linkset[0]+='<option value="Camden & Islington" >Camden & Islington</option>'
linkset[0]+='<option value="Clapham, Lambeth & Streatham" >Clapham, Lambeth & Streatham</option>'
linkset[0]+='<option value="City & Docklands" >City & Docklands</option>'
linkset[0]+='<option value="East London" >East London</option>'
linkset[0]+='<option value="Finchley, Hendon incorporating Mill Hill & Colindale">Finchley, Hendon incorporating Mill Hill & Colindale</option>'
linkset[0]+='<option value="Greenwich & Lewisham" >Greenwich & Lewisham</option>'
linkset[0]+='<option value="Hampstead & Highgate" >Hampstead & Highgate</option>'
linkset[0]+='<option value="Kensington Chelsea & Fulham" >Kensington Chelsea & Fulham</option>'
linkset[0]+='<option value="North London" >North London</option>'
linkset[0]+='<option value="Southwark, Peckham & Sydenham" >Southwark, Peckham & Sydenham</option>'
linkset[0]+='<option value="Wandsworth, Wimbledon & Barnes" >Wandsworth, Wimbledon & Barnes</option>'
linkset[0]+='<option value="West End" >West End</option>'
linkset[0]+='<option value="West London" >West London</option>'
linkset[0]+='</select></div>'
////No need to edit beyond here

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

function showmenu(e,which){
PutFocus();
if (!document.all&&!document.getElementById&&!document.layers)
return

clearhidemenu()

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj
if (ie4||ns6)
menuobj.innerHTML=which
else{
menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
menuobj.document.close()
}

menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
menuobj.thestyle.visibility="visible"

return false
}

function hidemenu(){
if (window.menuobj)
menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
}

function dynamichide(e){
if (ie4&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
if (ie4||ns6||ns4)
delayhide=setTimeout("hidemenu()",1000)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}