// Handle Text removal

var nlpq;

function clearText(){
 if (nlpq.value == queryPrompt){
	nlpq.value = "";
  }
 }
 
 function clearTextQueryBox(){
   var 	queryBox = document.getElementById('query');
 if (queryBox.value == queryPrompt){
	queryBox.value = "";
  }
 }

function initEvents(){
	nlpq = document.getElementById('nlpq');
	nlpq.onfocus = clearText;
}

// Change non-metafaq links to open in a new window
function changeLinks(){
	for(var e=0; e<document.links.length; e++){
		var linkRef = document.links[e];
		if (linkRef.href.indexOf("mailto") == -1 && linkRef.hostname.indexOf("metafaq.com") == -1 && linkRef.hostname.indexOf("ask.barclaycard.co.uk") == -1){
			linkRef.target = "_blank";
		}
	}
}

ie = document.all;
if(ie)
{
try {
document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
}