function bookmark() {
window.external.AddFavorite("http://www.fantasyreaders.com","fantasyREADERS.com");
var url="http://www.fantasyreaders.com";
var title="fantasyREADERS.com";
}

function validate() {
if (document.cu.First.value=="") {
	alert("Please enter your first name.");	
	return false
} 
else if (document.cu.Last.value=="") {
	alert("Please enter your last name.");	
	return false
} 
else if (document.cu.FromEmail.value.search("@") == -1 || document.cu.FromEmail.value.search("[.*]") == -1) 				
	{ 
	alert("Please enter a valid e-mail address");	
	return false
	} 
	cu.submit()
}

function validate2() {
if (document.cu.First.value=="") {
	alert("Please enter your first name.");	
	return false
} 
else if (document.cu.Last.value=="") {
	alert("Please enter your last name.");	
	return false
} 
else if (document.cu.Question.value=="") {
	alert("Please enter your last name.");	
	return false
} 
else if (document.cu.Email.value=="") {
	alert("Please enter your last name.");	
	return false
} 
else if (document.cu.Email.value.search("@") == -1 || document.cu.Email.value.search("[.*]") == -1) 				
	{ 
	alert("Please enter a valid e-mail address");	
	return false
	} 
	cu.submit()
}


// Launch window
function popup(mypage) {
var ht = 450
var wd = 600
var wint = (screen.height - ht) / 2;
var winl = (screen.width - wd) / 2;
wina = window.open(mypage, 'main', 'height=450,width=600,top='+wint+',left='+winl+'')
if (parseInt(navigator.appVersion) >= 4) { wina.window.focus(); }
}

function popup2(mypage) {
var ht = 480
var wd = 650
var wint = (screen.height - ht) / 2;
var winl = (screen.width - wd) / 2;
wina = window.open(mypage, 'main', 'height=480,width=650,top='+wint+',left='+winl+',resizable=1,scrollbars=1')
if (parseInt(navigator.appVersion) >= 4) { wina.window.focus(); }
}

function showdiv(season) {
	document.all.spring.style.display='none'; 
	document.all.summer.style.display='none'; 
	document.all.fall.style.display='none'; 
	document.all.winter.style.display='none';

	if (season=="spring") {
	document.all.spring.style.display=''; 
	}
	else if (season=="summer") {
	document.all.summer.style.display=''; 
	}
	else if (season=="fall") {
	document.all.fall.style.display=''; 
	}
	else if (season=="winter") {
	document.all.winter.style.display=''; 
	}
}	
function showdate() {
	var nowDate = new Date();
	var currMonth = nowDate.getMonth();
	if (currMonth > 1 && currMonth < 5) {
	showdiv('spring');
	}	
	else if (currMonth > 4 && currMonth < 8) {
		showdiv('summer');
	}	
	else if (currMonth > 7 && currMonth < 11) {
		showdiv('fall');
	}	
	else  {
		showdiv('winter');
	}	
}


// email validation
function emailCheck() {
txt=document.isn.email.value;
if (txt.indexOf("@")<3){
alert("Please enter a valid e-mail address. Ex. info@adoptinfo.net");
return false;
}
if ((txt.indexOf(".com")<5)&&(txt.indexOf(".org")<5)
&&(txt.indexOf(".gov")<5)&&(txt.indexOf(".net")<5)
&&(txt.indexOf(".cc")<5)&&(txt.indexOf(".info")<5)
&&(txt.indexOf(".mil")<5)&&(txt.indexOf(".edu")<5)){
alert("I'm sorry. This email address seems wrong. Please"
+" check the suffix for accuracy. (It should include a "
+".com, .edu, .net, .org, .gov or .mil)");
return false;
	}
return true;
}

// email address
function isEmailAddr(email)
{
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

// valid required
function validRequired(formField,fieldLabel)
{
	var result = true;
	
	if (formField.value == "")
	{
		alert('Please enter a value for the "' + fieldLabel +'" field.');
		formField.focus();
		result = false;
	}
	return result;
}

// validate digits
function allDigits(str)
{
	return inValidCharSet(str,"0123456789");
}

// validate email
function validEmail(formField,fieldLabel,required)
{
	var result = true;
	if (required && !validRequired(formField,fieldLabel))
		result = false;
	if (result && ((formField.value.length < 3) || !isEmailAddr(formField.value)) )
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		formField.focus();
		result = false;
	}
  return result;
}

// valid number field
function validNum(formField,fieldLabel,required)
{
	var result = true;
	if (required && !validRequired(formField,fieldLabel))
		result = false;
 	if (result)
 	{
 		if (!allDigits(formField.value))
 		{
 			alert('Please enter a number for the "' + fieldLabel +'" field.');
			formField.focus();		
			result = false;
		}
	} 
	return result;
}

// validate integer
function validInt(formField,fieldLabel,required)
{
	var result = true;
	if (required && !validRequired(formField,fieldLabel))
		result = false;
 	if (result)
 	{
 		var num = parseInt(formField.value);
 		if (isNaN(num))
 		{
 			alert('Please enter a number for the "' + fieldLabel +'" field.');
			formField.focus();		
			result = false;
		}
	} 
	return result;
}


window.onerror = handleErrors; // or null to suppress error message
function handleErrors(msg, url, line)
 { return true; }

if (document.all) {
}
else if (document.getElementById) {
    document.captureEvents(Event.MOUSEDOWN)
}
else if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN)
}

document.onmousedown = mousedown_handler

function mousedown_handler(mouse_event) {

    // This is the message that will appear
    var no_right_click = "© 2003 Author's Publishing, LLC"

    if (document.all) {

        //Probably Internet Explorer 4 and later
        if (event.button == 2 || event.button == 3) {
            alert(no_right_click)
            return false
        }
    }
    else if (document.getElementById) {

        // Probably Netscape 6 and later
        if (mouse_event.which == 3) {
            alert(no_right_click)
            return false
        }
    }
    else if (document.layers) {

        // Probably Netscape 4
        if (mouse_event.which == 3) {
            alert(no_right_click)
            return false
        }
    }
}
