surname = ""
spousename = ""

var batch_number, QueryWindow

function openIGIMulti(BatchNo) {
oIM(BatchNo)
}
function openIGI(BatchNo) {
oI(BatchNo)
}

function oIM(BatchNo) {

alert("WARNING - You have selected a batch that has entries for more than one location. If there are many different locations in this batch you might have difficulty finding entries pertaining to the location you are searching for. In this case it will simply be a matter of searching visually through the results presented by the LDS IGI site.\n\n" +
      "If you enter a surname at the next prompt, the results returned may not include any from the location you are searching for. To obtain the results for the entire batch remember to leave the surname blank.")

oI(BatchNo)

}
function setSurname(n) {

surname = n

}

function setSpousename(n) {

spousename = n

}
function oI(BatchNo) {


batch_number = BatchNo
if (BatchNo.substring(0,1) == "M" || BatchNo.substring(0,1) == "E") {
	ff = "IGIBatchQueryM"
}
else {
	ff = "IGIBatchQuery"
}

QueryWindow = window.open("Query/" + ff + ".htm#PageTitle", "Query")



}

function setfocusI() {

IGIwindow.focus()

}
function setfocusQ() {

if (QueryWindow.document.forms.length < 1 ) {
	setTimeout('setfocusQ()',500)
	return
}

if (QueryWindow.document.forms[0].length < 20) {
	setTimeout('setfocusQ()',500)
	return
}


QueryWindow.document.forms["query"].elements["batch_number"].value = batch_number
QueryWindow.document.forms["query"].elements["last_name"].value = surname
if (batch_number.substring(0,1) == "M" || batch_number.substring(0,1) == "E") {
	QueryWindow.document.forms["query"].elements["spouses_last_name"].value = spousename
QueryWindow.document.forms[0].elements["last_name"].focus()
}
}

/*


function p(a){

desc = "<table cellpadding=3 border=1 bgcolor=yellow><td>Date Coverage: " + a + "</td></table>";

if(thisbrowser=="NN4") {
document.object1.document.write(desc);
document.object1.document.close();
document.object1.left=x+25;
document.object1.top=y;
}
else if (thisbrowser=="ie") {
object1.innerHTML=desc;
object1.style.pixelLeft = x + document.body.scrollLeft + 25;
object1.style.pixelTop = y + document.body.scrollTop - 10;
}
else if (thisbrowser=="NN6"){
dive1=document.getElementById('object1');
dive1.innerHTML= desc;
dive1.style.left = x + 25;
dive1.style.top = y-10;
}
}
function hd(){
if(thisbrowser=="NN4") {
document.object1.top = -100;
}
else if(thisbrowser=="ie") {
object1.innerHTML="";
}
else if (thisbrowser=="NN6"){
document.getElementById('object1').innerHTML = "";
}
}
function handlerMM(e){
x = (thisbrowser=="NN4" || thisbrowser=="NN6") ? e.pageX : event.clientX;
y = (thisbrowser=="NN4" || thisbrowser=="NN6") ? e.pageY : event.clientY;
}

var x,y;

var thisbrowser;

if(document.layers){
    thisbrowser="NN4";
}
if(document.all){
    thisbrowser="ie";
}
if(!document.all && document.getElementById){
    thisbrowser="NN6";
}

if (thisbrowser=="NN4"){
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = handlerMM;
}
if (thisbrowser=="NN6"){
document.addEventListener("mousemove", handlerMM, true);
}
if (thisbrowser=="ie"){
document.onmousemove = handlerMM;
}

*/