<!-- Begin

function CheckMailwd() {
  var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
  if(filter.test(document.forms.email.value))
    return true;
  alert("Please enter a valid email address.");
  return false;
}

function CheckMail(formname,fldname) {
  if(!fldname)
    fldname = 'email';
  var form;
  if(formname)
    form = document.forms[formname];
  else
    for(var i in document.forms)
      if(document.forms[i][fldname])
        form = document.forms[i];
  if(!form)
    return true;
  var fld = form[fldname];
  if(!fld)
    return true;
  var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
  if(filter.test(fld.value))
    return true;
  alert("Please enter a valid email address.");
  return false;
}
 


function GetCookie(name)
{
	// cookies:  name=value; name=value;
	var pairlist = document.cookie.split("; ");
	for(var i = 0; i < pairlist.length; ++i)
	{
		var nvpair = pairlist[i].split("=");
		if(name == nvpair[0]) 
			return unescape(nvpair[1]);
	}
	return null;
}

function AutoPopup(exphours,page,props)
{
	if(!page) return;
	if(!props)
		props = 'width=450,height=260,location=no,toolbar=no,'
			'menubar=no,status=yes,scrollbars=no,resizable=yes';
	if(GetCookie('count') == null)
	{
		var exp = new Date(); 
		exp.setTime(exp.getTime() + (exphours*60*60*1000));
		document.cookie = "count=1; path=/; expires=" + exp.toGMTString();
		if(GetCookie('count') == '1')
              {
		     var popUnder = window.open(page, "autopop",props);
		     popUnder.blur();
		     window.focus();
              } 
	}
}


function Homepage() {
  var address = "NULL"
  var browserName
  if (navigator.userAgent.indexOf("Opera") > 0){browserName = "Opera"}
  else {browserName=navigator.appName} 
  if (browserName=="Microsoft Internet Explorer") {address = "href='" + location.href + "#'"}
  else {address = "href='/arcapub/browser'"}
  dw("<a style='color:#111; font-weight:bold; text-decoration:none;  font-size:11px' " + address + " ><img src='http://www.arcamax.com/ard/345329' style='width:0px; height:0px; border-width:0px;' alt='' />Make ArcaMax your homepage</a>")
}

function openPage(url) {
 window.location=url;
}

function dw(txt){
 document.write(txt)
}

function sortByName(chan) {
  for (i = 65; i < 91; i++) {
   dw("<a class='alphabet' href='/"+chan+"?booklist=&#"+i+"'><u>&#"+i+";</u></a> ");
  } 
 dw("<a class='alphabet' href='/"+chan+"?booklist=ALL'><u>Show all...</u></a> ");
}


function sortAllByName(disChan,sortType) {
  for (i = 65; i < 91; i++) {
   dw("<a class='alphabet' href='/books/book_list?sort="+sortType+"&booklist=&#"+i+"&displayChan="+disChan+"#list'><u>&#"+i+";</u></a> ");
  } 
 dw("<a class='alphabet' href='/books/book_list?sort="+sortType+"&booklist=ALL&displayChan="+disChan+"#list'><u>Show all...</u></a> ");
}

function sortAllByName2(sortType) {
  for (i = 65; i < 91; i++) {
   dw("<a class='alphabet' href='/books/book_list_all?sort="+sortType+"&booklist=&#"+i+"#list'><u>&#"+i+";</u></a> ");
  } 
 dw("<a class='alphabet' href='/books/book_list_all?sort="+sortType+"&booklist=ALL#list'><u>Show all...</u></a> ");
}

function onFeat(j) {
for (var i = 1; i < 4; i++)
 {
  if (i != j) {
   document.getElementById('feat_'+i).style.color="#ddd";
   document.getElementById('feat_'+i).style.background="#000";
   document.getElementById('ft_shell_'+i).style.visibility="hidden";
  }
  else {
   document.getElementById('feat_'+i).style.color="#fff";
   document.getElementById('feat_'+i).style.background="#888";
   document.getElementById('ft_shell_'+i).style.visibility="visible";
  }
 }
}

function titleImgs(loc, img, w)
{
 image_tag = "<img src='/images/pub/"+img+".gif' class='title-pic' width='"+w+"px; height='38px' alt='' />";
 if (loc == 0) {dw(image_tag);}
 else {dw("<a href='"+loc+"'>"+image_tag+"</a>");}
}

function headImgs(loc, img, w)
{
 image_tag = "<img src='/images/pub/"+img+".gif' class='cat_hd' width='"+w+"px' height='28px' alt='' />";
 if (loc == 0) {dw(image_tag);}
 else {dw("<a href='"+loc+"'>"+image_tag+"</a>");}
}

function adFree(){

	window.open("http://www.arcamax.com/images/pub/main/adfree_popup.htm","adfree",
	"width=730,height=600,menubar=no,toolbar=no,scrollbars=yes,resizable=no,left=275,top=225");
	
	}
	
function handleChange () {
  var selopt = document.getElementById('step2');
  var altopt = document.getElementById('step2_alt');
  var show = ((/ALT/.test(selopt.value))? '':'none');
  document.getElementById('alt-amount').style.display = show;
  if (show!="") altopt.value = "";
  else altopt.focus();
}

	


//-->


