



if (!document.layers && !document.all) { event = "No" }
function ShowLinkTextL(evnt,TheText) {
var table = '<TABLE BGCOLOR="#000080" WIDTH="280" CELLSPACING="0" CELLPADDING="1" BORDER="0"><TR><TD><TABLE BGCOLOR="#FFFFFF" WIDTH="100%" CELLSPACING="0" CELLPADDING="4" BORDER="0"><TR><TD CLASS="table">' + TheText  + '</TD></TR></TABLE></TD></TR></TABLE>'
if (document.layers) {  // NS
	document.linktext.document.write(table)
	document.linktext.document.close()
	document.linktext.left = evnt.pageX + 150
	document.linktext.top = evnt.pageY - 90
	document.linktext.visibility = "show"
}
if (document.all) {  // IE
 	document.all.linktext.innerHTML = table
 	document.all.linktext.style.pixelLeft = evnt.offsetX + 50
 	document.all.linktext.style.pixelTop = evnt.offsetY + 130
 	document.all.linktext.style.visibility = "visible"
 }
} // End function

function hideTip() {
if (document.layers) { document.linktext.visibility = "hide" }
if (document.all) { document.all.linktext.style.visibility = "hidden" }
} // End Function

// Javascript Code Copyright Ranson's Scripts 2002
function ValidateEmail() {
var format=/^[^@]+@([-\w]+\.)+[A-Za-z]{2,4}$/;
var Value = document.Catalog.emailadd.value;
if(Value.search(format) == -1){
alert("Your Email Address " +Value+ " is not formatted correctly.");
badEmail = "1";
return false;
  }
 }
function RespondNote(TF) {
window.open('/cgi-bin/catalog/catalog.cgi/catalog.cgi?RespondNote&'+TF,  'window', 'toolbar=no,scrollbars=yes,resizable=yes,width=650,height=600,left=10,top=10')
}
function orderinst() {
window.open('/cgi-bin/catalog/catalog.cgi/catalog.cgi?R&split_charge&TF=<!TF>',  'window', 'toolbar=no,scrollbars=yes,resizable=yes,width=800,height=600,left=10,top=10')
}
function SearchHelp() {
window.open('/cgi-bin/catalog/catalog.cgi/catalog.cgi?R&search_help',  'window', 'toolbar=no,scrollbars=yes,resizable=yes,width=800,height=600,left=10,top=10')
}
function ContactUs() {
window.open('/cgi-bin/catalog/catalog.cgi/catalog.cgi?p&contactus',  'window', 'toolbar=no,scrollbars=yes,resizable=yes,width=800,height=600,left=10,top=10')
}
function LinkWindow(page) {
window.open('/cgi-bin/catalog/catalog.cgi/catalog.cgi?I&'+page,  'window', 'location=no,directories=no,status=no,scrollbars=yes,resize=yes,menubar=no toolbar=no,width=600,height=400,left=10,top=10')
}
function PopLinkWindow(page) {
window.open('/cgi-bin/catalog/catalog.cgi/catalog.cgi?I&'+page,  'window', 'location=no,directories=no,status=no,scrollbars=yes,resize=yes,menubar=no toolbar=no,width=600,height=400,left=60,top=150')
}
function activeinst(TF) {
window.open('/cgi-bin/catalog/catalog.cgi/catalog.cgi?R&case_splits&TF=<!TF>',  'window', 'toolbar=no,scrollbars=yes,resizable=yes,width=800,height=600,left=10,top=10')
}
function ContactMail(pagename){
window.open("http://morningsidefarm.com/mail/mail.html" ,  'window', 'toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400,left=10,top=10')
}
function CreateWindow(pagename){
window.open(pagename ,  'window', 'toolbar=no,scrollbars=yes,resizable=yes,width=800,height=600,left=10,top=10')
}
function CheckOrder(FLD) {
var Field = FLD.value;
var MyExp = /[a-z A-Z #]/;
var found = MyExp.test(Field);
if(found) {
alert("You can only use numbers in this field.\\n\\nThe number you enter is the quantity of Units you are ordering. ");
FLD.value = "";
 }
}

var WM_acceptsCookies = false;
if(document.cookie == '') {
    document.cookie = 'WM_acceptsCookies=yes'; // Try to set a cookie.
    if(document.cookie.indexOf('WM_acceptsCookies=yes') != -1) {
        WM_acceptsCookies = true;
    }// If it succeeds, set variable
} else { // there was already a cookie
  WM_acceptsCookies = true;
}

if (WM_acceptsCookies) {
   document.write("");
   }
   else {
   document.write("<b><Font Size='+2'>Your browser currently does not accept cookies.<BR><BR>You need to enable cookies before the catalog will add to the cart.<BR><BR>");
   document.write("To enable cookies, For IE, use TOOLS -> INTERNET OPTIONS -> SECURITY -> CUSTOM LEVEL and make sure cookies are enabled.</font></B><BR><BR><BR><BR><BR><BR>");
   }
