// JavaScript Document

function prepToSearch() {
//	document.getElementById("q").select();
	document.getElementById("q").value = "";
}

//DJ - START SuppFacts popup code (From Peter Curtis)
var newwindow = "";

function suppFactsPopUp(url,w,h) {
	//DJ - Make sure you have added 20px to height and width in the call (due to scrollbar dimensions).
	//DJ - Ah... which it looks like I DID NOT do on SMR for example!!!
	
	if (newwindow.location && !newwindow.closed) {
		newwindow.location.href = url;
		newwindow.focus();
	}
	else {
		newwindow=(window.open(url, "_blank", "height="+h+"px, left=200px, location=0, menubar=0, resizable=0, scrollbars=0, status=0, titlebar=0, toolbar=0, width="+w+"px"));
	}
}

function tidy() {
	//DJ - Don't forget to call this on "unload" in the "body" tag!!!
	if (newwindow.location && !newwindow.closed) {
		newwindow.close();
	}
}

//DJ - IE8 "window.open" issue. Per thread at "http://stackoverflow.com/questions/710756/ie8-var-w-window-open-message-invalid-argument" it could be:
// 1. Need to wrap var assignments in parentheses - NOPE
// 2. Do not use spaces after commas in attribute assignments - NOPE
// 3. May not be able to use "/" or "+" in the attribute assignments - (I hope not!)
// 4. Must use a TARGET assignment for 2nd attribute - YEP
// 5. IE is an annoying nuisance - YEP

//DJ - END SuppFacts popup code

