<!--
//activate a search
var searchWindow;
function submitKeyword(vform)
{
	var searchWord = vform;
		
//this function checks that a search keyword has been entered and alerts the 
//user if the field has been left empty. If there is a keyword then the search form
//is submitted.
	if (searchWord == "")
	{
		alert("please enter a keyword");
		return;
	}
	
	//if (searchWindow) //checks if window is already open and then closes it
	//{	
	//	if (!searchWindow.closed()) {
	//		searchWindow.close();
	//		return;
	//	}
	//}
		 
	var aURL ="search.asp?Keyword=" + escape(searchWord);
	//open window and pass ArticleID
	searchWindow = window.open(aURL,'Search','toolbar=no,scrollbars=yes,width=200,height=500,top=0,left=0,status=yes');
	searchWindow.focus(); //brings window to top

}

//activate a search from wihtin the shop
var searchWindow;
function submitKeywordFromSHop(vform)
{
	var searchWord = vform;
		
//this function checks that a search keyword has been entered and alerts the 
//user if the field has been left empty. If there is a keyword then the search form
//is submitted.
	if (searchWord == "")
	{
		alert("please enter a keyword");
		return;
	}
	
	//if (searchWindow) //checks if window is already open and then closes it
	//{	
	//	if (!searchWindow.closed()) {
	//		searchWindow.close();
	//		return;
	//	}
	//}
		 
	var aURL ="../online/search.asp?Keyword=" + escape(searchWord);
	//open window and pass ArticleID
	searchWindow = window.open(aURL,'Search','toolbar=no,scrollbars=yes,width=200,height=500,top=0,left=0,status=yes');
	searchWindow.focus(); //brings window to top

}
//open new window

function OpenNew(aURL)
{
	var changeWindow
	if (changeWindow && !changeWindow.closed())
	{//checks if window is already open and then closes it
		changeWindow.close();
	}	
		//open window 
		changeWindow = window.open(aURL,'ABALink','toolbar=yes,scrollbars=yes,resizable=yes,width=600,height=400');
		changeWindow.focus()
}
//restore the original image
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
//pre load images
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];}}
}
//find object
function MM_findObj(n, d) { //v3.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); return x;
}
//swap image
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//change background colours for menu items
function changeBg(layername) 
 {     
	if (document.all) document.all(layername).style.backgroundColor="#5A83B7";
	else if (document.layers) document.layers[layername].bgColor='#5A83B7' 
 }  
 //revert to original background colours
 function revertBg(layername)
 {
	if (document.all) document.all(layername).style.backgroundColor="#154575";
	else if (document.layers) document.layers[layername].bgColor='#154575' 
 }
 //revert to original background images
 function revertBgImg(layername)
 {
	 if (document.all) document.all(layername).style.background='url(../images/blank_btn.jpg)';
   else if (document.layers) document.layers[layername].background.src='../images/blank_btn.jpg'; 
 }
 //change background image
  function changeBgImg(layername)
 {    
   if (document.all) document.all(layername).style.background='url(../images/blank_btn_over.jpg)';
   else if (document.layers) document.layers[layername].background.src='../images/blank_btn_over.jpg'; 
 }  
 //change when clicked
 function clickedBg(layername)
 {
	if (document.all) document.all(layername).style.backgroundColor="#ffffff";
	else if (document.layers) document.layers[layername].bgColor='black' 
 }
//-->
