function clearText(theText) {
     if (theText.value == theText.defaultValue && theText.value == 'enter any part of the common or scientific name') {
         theText.value = ""
     }
}

function breakFrame() {
	if (top.location != location) {
		top.location.href = document.location.href;
	}
}

function ref_window(zasf) {
	mywin = window.open(zasf,"reference",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=450');
}

function listing_window(z) {
	mywin = window.open(z,"listingw",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=600,height=600');
}

function animal_vid(v) {
	mywin = window.open(v,"video_no_ad",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=510,height=490');
}

function animal_vid_ad(vfasd) {
	mywin = window.open(vfasd,"video_with_ad",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=900,height=490');
}

function videomainwindow(theurl) {
	window.opener.location = theurl;
	window.close();
}

//Function disallows double quotes
function noDblQuotes() {
	if (event.keyCode==34) {
		alert("The use of double quotes is not allowed in this search.");
		event.returnValue = false; }
}
// end double quote function


//Function disallows double and single quotes and semicolon 34=dquote; 39=squote 59=	semicolon
function noSpecChars() {
	if (event.keyCode==34 || event.keyCode==39 || event.keyCode==59) {
		alert("That character is not allowed in this field and will be deleted.");
		event.returnValue = false; }
}
// end disallow special characters function

	//Get the left characters of a string
	function Left(str, num) {
		return str.substring(0, num); }
		
	//Get the right characters of a string
	function Right(str, num) {
		return str.substring(str.length-num);  // pull out right num
	}

function confirmLogoutSite(origPage) {
	var url = "admin-logout.asp?s=1&origpage=" + origPage
	input_box=confirm("Are you sure you want to log out?");
		if (input_box==true) {
			window.location = url; } 
}
