<!--
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;
}

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];}}
}

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

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];}
}



// PickList II script (aka Menu Swapper)- By Phil Webb (http://www.philwebb.com)
// Visit JavaScript Kit (http://www.javascriptkit.com) for this JavaScript and 100s more
// Please keep this notice intact

function move(fbox, tbox) {
     var arrFbox = new Array();
     var arrTbox = new Array();
     var arrLookup = new Array();
     var i;
     for(i=0; i<tbox.options.length; i++) {
          arrLookup[tbox.options[i].text] = tbox.options[i].value;
          arrTbox[i] = tbox.options[i].text;
     }
     var fLength = 0;
     var tLength = arrTbox.length
     for(i=0; i<fbox.options.length; i++) {
          arrLookup[fbox.options[i].text] = fbox.options[i].value;
          if(fbox.options[i].selected && fbox.options[i].value != "") {
               arrTbox[tLength] = fbox.options[i].text;
			   fbox.options[i] = null
			   i=i-1
               tLength++;
          }
     }
     arrFbox.sort();
	
//     arrTbox.sort();
//     fbox.length = 0;
 //    tbox.length = 0;
     var c;

	 
     for(c=0; c<arrTbox.length; c++) {
     	var no = new Option();
     	no.value = arrLookup[arrTbox[c]];
     	no.text = arrTbox[c];
     	tbox[c] = no;
     }
}

function selectAll(box) {
     for(var i=0; i<box.length; i++) {
     box[i].selected = true;
     }
}



// New function to show arrays in list1 and list2
function showLists()
{
	var comboBoxObj = document.combo_box;
	if(comboBoxObj) {
		for(var i=0; i <array1txt.length; i++)
		{
			if(array1txt[i] != "")
			{
				if(comboBoxObj.list1) {
					var opt = new Option(array1txt[i],array1val[i]);
					document.combo_box.list1.options[i] = opt;
				}
			}
		}
		for(var i=0; i <array2txt.length; i++)
		{
			if(array2txt[i] != "")
			{
				if(comboBoxObj.list2) {
					var opt = new Option(array2txt[i],array2val[i]);
					document.combo_box.list2.options[i] = opt;
				}
			}
		}
	}
}

// New functions to add element to array and show array
//var arrList = new Array();

function addElement() {
	var newItem = document.form.list1.value;
	var l = arrList.length;
	arrList[l] = newItem;
	showArray(arrList);
	document.form.list1.value = ""
	}

function showArray(arr) {
	arraytext = "";
	for (var i=0; i<arr.length; i++) {
	arraytext += arr[i] + "\n";
	}
	document.form.list2.value = arraytext;
	}
	

// function to make Next button active
function activeButton(page,lang)	
{
	if (page==1)
		{
			if (document.combo_box.list2.options[0])	// if there is something in box2, show button
				{
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
			else if (array2val[0] != "")				// if array2 exists
				{
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
			else										// if box2 is empty, show grayed out button and disable it
				{
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next_down.gif";
					document.all.Image9.disabled = true;
				}
		}
	else if (page==0)
		{
			if (document.all.booklist.innerHTML != "")	// if there is something in box2, show button
				{
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
//			else if (array2val[0] != "")				// if array2 exists
//				{
//					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
//					document.all.Image9.disabled = false;
//				}
			else										// if box2 is empty, show grayed out button and disable it
				{
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next_down.gif";
					document.all.Image9.disabled = true;
				}
		}
	else if (page==2) 
		{
			if (document.combo_box.list2.options[0])	// if there is something in box2, show button
				{
					//alert('this is a test of box2');
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
			else if (array2val[0] != "")				// if array2 exists
				{
					//alert('this is a test of array2');
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
			else										// if box2 is empty, show grayed out button and disable it
				{
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next_down.gif";
					document.all.Image9.disabled = true;
				}
		}
	else if (page==3) 
		{
			if (document.combo_box.list2.options[0])	// if there is something in box2, show button
				{
					//alert('this is a test of box2');
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
//			else if (array2val[0] != undefined)				// if array2 exists	- commented this out 10/7/05; seems to be letting Next button be active when nothing is selected
			else if (array2val[0] != "")
				{
					//alert('this is a test of array2');
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
			else										// if box2 is empty, show grayed out button and disable it
				{
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next_down.gif";
					document.all.Image9.disabled = true;
				}
		}
	else if (page==4)
		{
		//	alert('this is a test');
		
			if (document.forms[0].list2.value != "")	// if there is something in box2, show button
				{
		//			alert('list2 is not empty');
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
			else if (arrList[0] != "")	// if array2 exists
				{
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next.gif";
					document.all.Image9.disabled = false;
				}
			else										// if box2 is empty, show grayed out button and disable it
				{
		//			alert('list2 is empty');
					document.all.Image9.src = "imagesTPOD_" + lang + "/btn_next_down.gif";
					document.all.Image9.disabled = true;
				}
		}
}



function changeInput()
	{
		if(document.search) {
			if (document.search.cover.checked == true)
			{
				document.combo_box.cover.value = "yes";
			}
			else
			{
				document.combo_box.cover.value = "no";
			}

			if (document.search.entireheading[1].checked == true)
			{
				document.combo_box.entireheading.value = 1;
			}
			else
			{
				document.combo_box.entireheading.value = 0;
			}
		}
	}

//-->
