<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0
  popwin = window.open(theURL,winName,features);
  window.popwin.focus();
}

function imageSwap(daImage, daSrc){
  var objStr,obj;
  if(document.images){
    if (typeof(daImage) == 'string') {
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}

//-->
/*
The ultimate DHTML drop-down code
Nick Nettleton | www.fluid7.co.uk
--
You can adapt, use and distribute this code under GNU public licence, as long as:
(1) You leave all the comment and credit lines in, including these ones
(2) You don't sell it for profit
--
Enjoy!!!
*/

f7_droplayer=new Array()

f7_droplayer[0]="drop0"
f7_droplayer[1]="drop1"
f7_droplayer[2]="drop2"
f7_droplayer[3]="drop3"











//Other Browser Check
//var ns6 = document.getElementById?1:0;
//var isNS4 = document.layers?1:0;
//var ie = document.all?1:0;

//Current browser check
f7_v4=(parseInt(navigator.appVersion)>=4 && parseInt(navigator.appVersion)<=5)?1:0
isNS4=(document.layers && f7_v4)?1:0
//isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;

//code for drops
function f7_showdrop(thelayer){
  f7_keep=thelayer; 
  f7_hideall(); 
  f7_showitnow=1;
  f7_showit(thelayer);
}

function f7_showit(thelayer){
  if(isIE4){ 
  	eval(f7_droplayer[thelayer]+'.style.visibility="visible"') 
  }
  if(isNS4){ 
  	eval('document.'+f7_droplayer[thelayer]+'.visibility="show"') 
  }
  if(isNS6 || isIE5){ 
  	document.getElementById(f7_droplayer[thelayer]).style.visibility="visible" 
  }
}

function f7_hidedrop(){
	f7_keep=-1; setTimeout('f7_hideall()',250)
	}

//f7_keep=-1

function f7_hideall(){
	for(i=0;i<f7_droplayer.length;i++){  
		f7_hideit=0; f7_checkmousepos(i)
		if(isIE4 && f7_keep!=i){ 
			if(f7_hideit){ 
			eval(f7_droplayer[i]+'.style.visibility="hidden"') } 
		}
		if(isNS4 && f7_keep!=i){ 
			if(f7_hideit){ 
			eval('document.'+f7_droplayer[i]+'.visibility="hide"') }
		}
		if(isNS6 || isIE5 && f7_keep!=i){ 
			if(f7_hideit){
			currentLayer = document.getElementById(f7_droplayer[i]);
			currentLayer.style.visibility = "hidden" }
		}
	}
}

//deal with cursor over layer
document.onmousemove = f7_getmousepos
if (isNS4) document.captureEvents(Event.MOUSEMOVE)

function f7_getmousepos(e){
	if(isNS4){
		f7_mousex=e.pageX; 
		f7_mousey=e.pageY;
	}
	if(isIE4 || isIE5){
		f7_mousex=event.clientX; 
		f7_mousey=event.clientY;
	}
	if(isNS6){
		f7_mousex=e.pageX; 
		f7_mousey=e.pageY;
	}
}

function f7_checkmousepos(i){          
	if(isNS4){     
		f7_x_min=eval('document.'+f7_droplayer[i]+'.left')
		f7_x_max=f7_x_min+eval('document.'+f7_droplayer[i]+'.clip.width')
		f7_y_min=eval('document.'+f7_droplayer[i]+'.top')
		f7_y_max=f7_y_min+eval('document.'+f7_droplayer[i]+'.clip.height')
	}    
	if(isIE4){     
		f7_x_min=eval(f7_droplayer[i]+'.style.pixelLeft')
		f7_x_max=f7_x_min+eval(f7_droplayer[i]+'.style.pixelWidth')
		f7_y_min=eval(f7_droplayer[i]+'.style.pixelTop')
		f7_y_max=f7_y_min+eval(f7_droplayer[i]+'.style.pixelHeight')
	}
	if(isNS6 || isIE5){
		mouseLayer = document.getElementById(f7_droplayer[i]);
		f7_x_min=mouseLayer.style.left;
		f7_x_max=f7_x_min + mouseLayer.style.width;
		f7_y_min=mouseLayer.style.top;
		f7_y_max=f7_y_min + mouseLayer.style.height;
	}
	if (f7_mousex>=f7_x_min && f7_mousex<=f7_x_max && f7_mousey>=f7_y_min && f7_mousey<=f7_y_max){
		f7_hideit=0; setTimeout('f7_hideall()',250)
	}
	else { f7_hideit=1 }
	return f7_hideit
}

// Extra functionality below added by Stephen Pocklington, STA Travel UK
// Places the drop box underneath the button it is called from no matter
// what screen resolution or window size the site is being viewed through

function setLayerPos(imgID, layerID, rightOffset, topOffset) {
	//alert(imgID + layerID + rightOffset + topOffset)
	if (isIE4) {
		xPos = eval(imgID).offsetLeft;
		tempEl = eval(imgID).offsetParent;
  		while (tempEl != null) {
  				xPos += tempEl.offsetLeft;
  				tempEl = tempEl.offsetParent;
  			}
		eval(layerID).style.posLeft = xPos - rightOffset;
		yPos = eval(imgID).offsetTop;
		tempEl = eval(imgID).offsetParent;
			while (tempEl != null) {
  			yPos += tempEl.offsetTop;
  			tempEl = tempEl.offsetParent;
  			}
		eval(layerID).style.posTop = yPos + topOffset;
	} else if (isNS4) {
		xPos = eval(imgID).x;
		eval(layerID).left = xPos - rightOffset;
		yPos = eval(imgID).y;
		eval(layerID).top = yPos + topOffset;
	} else { //code for IE5+ (IE4 code does work for IE5 but this is more compliant) and NS6+
		xPos = document.getElementById(imgID).offsetLeft;
		tempEl = document.getElementById(imgID).offsetParent;
		while (tempEl != null) {
				xPos += tempEl.offsetLeft;
				tempEl = tempEl.offsetParent;
			}
		theImage = document.getElementById(imgID);
		theLayer = document.getElementById(layerID);
		theLayer.style.left = xPos - rightOffset + "px";
		yPos = document.getElementById(imgID).offsetTop;
		tempEl = document.getElementById(imgID).offsetParent;
		while (tempEl != null) {
				yPos += tempEl.offsetTop;
				tempEl = tempEl.offsetParent;
			}
		theLayer.style.top = yPos + topOffset + "px";
		}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
// -->

//Form Validator
   function validator(value)
   {
   //Name-start
     var NameVal
     NameVal=value;
      if (NameVal.value == "")
      {
      	alert("Please enter a topic to search for.");
      	document.form1.sp-q.focus();
      	return false;
      }
	//Name-end
	//Name-start
     var NameVal
     NameVal=value;
      if (NameVal.value == "|-|search|-|" || NameVal.value == "search")
      {
      	alert("Please enter a valid topic to search for.");
      	document.form1.sp-q.focus();
      	return false;
	  }
	  //Name-end
	}
//Form Validator-end
 function winopen(url)                    
     {                    
        window.open(url,"search","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=620,height=330,top=200,left=300");                    
      }