﻿// JScript File

function URLEncode(clearString){var output='';var x=0;clearString=clearString.toString();var regex=/(^[a-zA-Z0-9_.]*)/;while(x<clearString.length){var match=regex.exec(clearString.substr(x));if(match!=null&&match.length>1&&match[1]!=''){output+=match[1];x+=match[1].length}else{if(clearString[x]==' ')output+='+';else{var charCode=clearString.charCodeAt(x);var hexVal=charCode.toString(16);output+='%'+(hexVal.length<2?'0':'')+hexVal.toUpperCase()}x++}}return output}
function GoogleSearchKeyPress(e){if(window.event){e=window.event}if(e.keyCode==13){SearchSite();e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();e.preventDefault()}}}
function SearchSite(){window.open('http://www.google.co.uk/cse?cx=partner-pub-4067223672873918:npu3wm-fh3s&ie=ISO-8859-1&q='+URLEncode(document.getElementById('q').value)+'&sa=Search')}


function hidediv(strID) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('div' + strID).style.visibility = 'hidden'; 
document.getElementById('div' + strID).style.height = '0'; 
document.getElementById('div' + strID).style.position="absolute";
document.getElementById('lnk' + strID).style.visibility = 'visible';
} 
else { 
if (document.layers) { // Netscape 4 
document.txt1.visibility = 'hidden';
document.txt1.style.height = '0'; 
} 
else { // IE 4 
document.all.txt1.style.visibility = 'hidden'; 
document.all.txt1.style.height = '0';  
} 
} 
} 

function showdiv(strID) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('div' + strID).style.visibility = 'visible'; 
document.getElementById('div' + strID).style.height = '100%'; 
document.getElementById('div' + strID).style.position="relative";
document.getElementById('lnk' + strID).style.visibility = 'hidden';

} 
else { 
if (document.layers) { // Netscape 4 
document.txt1.visibility = 'visible'; 
document.txt1.style.height = '100%'; 
} 
else { // IE 4 
document.all.txt1.style.visibility = 'visible'; 
document.all.txt1.style.height = '100%';
} 
} 
}  


