function BusOppsForm() {
	var browser = navigator.appName;     
	var version = navigator.appVersion;
	var version = parseFloat(version);
	if(version < 4) {
		document.write("If you are ready to embark on an exciting and rewarding career please call us at 540-547-9000 M-F 9-5pm EDT.");
	} else {
		document.write("If you are ready to embark on an exciting and rewarding career please contact us by completing the form below or call us at 540-547-9000 M-F 9-5pm EDT.<p>");
		document.write("<blockquote><form method=POST action='/busopps.htm'>");
		document.write("<table border=0 cellpadding=0 cellspacing=0 style='padding-right:7px'>");
		document.write("<tr><td>Your Name:      </td><td><input style='width:250px' type=text name=name></td></tr>");
		document.write("<tr><td>City & State:   </td><td><input style='width:250px' type=text name=city></td></tr>"); 
		document.write("<tr><td>Phone Numbers:  </td><td><input style='width:250px' type=text name=phone></td></tr>");
		document.write("<tr><td colspan=2> &nbsp; </td></tr>");
		document.write("<tr><td valign=top nowrap>Employment History<br>(you may copy and<br>paste your resume)</td><td><textarea name=bio style='width:250px; height:100px'></textarea></td></tr>");
		document.write("<tr><td colspan=2> &nbsp; </td></tr>");
		document.write("<tr><td valign=top>Questions or<br>Comments:</td><td><textarea name=com style='width:250px; height:100px'></textarea></td></tr>");
		document.write("<tr><td colspan=2> &nbsp; </td></tr>");
		document.write("<tr><td></td><td><input type=image src=/pics/submit.gif width=98 height=22 alt='Submit'></td></tr>");
		document.write("</table></form></blockquote><p>");
	}
}

function ShowOrdersInIssue() {
	obj = document.getElementById('orders');
	obj.style.visibility='visible';
}

function GetRate() {
	size = form.size.selectedIndex;
	if(size) {
	inserts = form.inserts.value;

	orig = eval("form.price"+size+"1.value");
	cost = eval("form.price"+size+inserts+".value");
	save = ((orig-cost)*inserts);
	totl = (cost * inserts);

	document.getElementById('div2').innerHTML = "<font color=#FF0000>&lt;"+save+".00&gt;</font>";
	document.getElementById('div3').innerHTML = totl+".00";
	form.total.value = totl+".00";
	} else {
		document.getElementById('div2').innerHTML = "";
		document.getElementById('div3').innerHTML = "";
		form.total.value = "";
	}
}

function SearchClients(qry) {
	var http = false;
	if(navigator.appName == "Microsoft Internet Explorer") {
		http = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		http = new XMLHttpRequest();
	}
	div = document.getElementById('search');
	http.abort();
	http.open("GET","/admin/search.htm?qry="+qry,true);
	http.onreadystatechange=function() {
		if(http.readyState == 4) {
			div.innerHTML = http.responseText;
		}
	}
	http.send(null);
}

function IssueOptions(book) {
	// remove all the previous options first...
	for(i=(form.issue.options.length-1); i>=0; i--) {
		form.issue.remove(i);
	}       
	var optn = document.createElement("OPTION");
	optn.value= '';
	optn.text = 'please select...';
	form.issue.options.add(optn);

	var http = false;
	if(navigator.appName == "Microsoft Internet Explorer") {
		http = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		http = new XMLHttpRequest();
	}
	div = document.getElementById('search');
	http.abort();
	http.open("GET","/admin/get_issue_options.htm?book="+book,true);
	http.onreadystatechange=function() {
		if(http.readyState == 4) {
			pairs = http.responseText.split(':');
			for(i=0; i < pairs.length; i++) {
				if(pairs[i].length) {
					kv = pairs[i].split('=');
					var optn = document.createElement("OPTION");
					optn.value = kv[0];
					optn.text  = kv[1];
					form.issue.options.add(optn);
				}
			}
		}
	}
	http.send(null);
}


myArray	   =  new Array();
myArray[1] = 'Culpeper County';
myArray[2] = 'Fauquier & Rappahannock';
myArray[3] = 'Fredericksburg, VA';
myArray[4] = 'Gainesville & Haymarket';
myArray[5] = 'Harrisonburg, VA';
myArray[6] = 'Spotsylvania County';
myArray[7] = 'Stafford County';
var i = 1;
var t;
                
function Books(key) {
        if((key*1) > 0) { i=key; }
        t = setTimeout("Books()",3000);
        document.getElementById('county').innerHTML = myArray[i].toUpperCase();
        i = i+1;
        if(i == myArray.length) { i=1; }
}
