//footer file
//Copyright 2002
//The Solar Stop Internet Connection
//All Rights Reserved

document.write('<STYLE TYPE="text/css">A { text-decoration: underline; } A:link { color: #333399; } A:visited { color: #7777dd; } A:active { color: red; } A:hover { color: red; }</STYLE>');

var emailalias='xrayhomestudies.com';

var messagefooter='Carolyn J. Frigmanski, M.A., B.S.R.T. ® * S.T.A.R.S. * P.O. Box 2931 * Toledo, Ohio 43606';
var bar='images/barblue.gif';
var neonbasecolor="#0000ff";
var neontextcolor="#993333";
var flashspeed=65;  //in milliseconds
var n=0, m, tempref;

function showfooter()
{
document.write('<center><img src="' + bar + '"><br><div style="font-family:arial, helvetica, sans-serif; font-size:11px; font-weight:normal; color:#333399; text-decoration:none"><b>');
if (document.all)
  {
  document.write('<font color="'+neonbasecolor+'">');
  for (m=0;m<messagefooter.length;m++)
    document.write('<span id="neonlight">'+messagefooter.charAt(m)+'</span>');
  document.write('</font>');

  //cache reference to neonlight array
  tempref=document.all.neonlight;
  }
else
  document.write(messagefooter);

beginneon();

document.write('<br>(419) 471-1973</b><br>E-mail: <a href="mailto:info@' + emailalias + '" onMouseOver="window.status=\'Send mail to S.T.A.R.S..\'; return true" onMouseOut="window.status=\'\'; return true">info@' + emailalias + '</a><br>');
document.write('Copyright © 2002 <font color=red><b>S.T.A.R.S.</b></font> All rights reserved.</div></center>');
}

function neon()
{

//Change all letters to base color
if (n==0)
  {
  for (m=0;m<messagefooter.length;m++)
    tempref[m].style.color=neonbasecolor;
  }

//cycle through and change individual letters to neon color
tempref[n].style.color=neontextcolor;

if (n<tempref.length-1)
  n++;
else
  {
  n=0;
  clearInterval(flashing);
  setTimeout("beginneon()",1500);
  return;
  }
}

function beginneon()
{
if (document.all)
  flashing=setInterval("neon()",flashspeed)
}

showfooter();

function formatdollar(onevalue)
{
var newvalue=Math.ceil(onevalue * 100);
return (newvalue / 100);
}


function calctotal()
{
//var shipping=document.orderform.shipping.value;
 var oneradio=document.orderform.shipping;
 var shipping = 0;
 var shidx = -1;
 for (var oi=0;oi<oneradio.length;oi++)
  {
   if (oneradio[oi].checked == true) shidx = oi;
  }
 shipping = document.orderform.shipping[shidx].value;

if (shipping==0)
  {
  alert('You must choose a shipping method');
  return;
  }

var boxes=document.orderform.elements, numitems=0, total=0;

for (var bi=0;bi<boxes.length;bi++)
  {
  var onebox=boxes[bi];
  if(onebox.name.indexOf('set')>-1)
    {
    if (onebox.value.length > 0)
      {
      var oneqty=onebox.value
      if (isNaN(oneqty) || oneqty.indexOf('.') > -1)
        {
        alert('Must use only 0-9');
        onebox.select();
        onebox.focus();
        return;
        }
      numitems+=(oneqty * 1);
      var itemcost = (oneqty * 1) * (onebox.cost * 1);
      if (oneqty > 5) itemcost *= .9;
      else if (oneqty > 1) itemcost *= .95;
      total += itemcost;
      }
    }
  }
var shippingcost=Math.ceil(numitems / 2) * shipping;
document.orderform.total.value='$' + formatdollar(total + shippingcost);
if (total==0) document.orderform.total.value='';
}

function changeopener(url)
{
window.opener.location.href=url;
window.opener.focus();
}

var popwin;
function popup(photoname, unitname)
{
 if (unitname=="") return;

 if (popwin != null) {if (!popwin.closed) popwin.close();}

 popwin = window.open("","","height=550,width=590,scrollbars=yes,resizable=no");

 popwin.document.write('<html><title>' + unitname + '</title>');
 popwin.document.write('<body bgcolor=#dddddd><center><img src="images/' + photoname + '.jpg" border=0 alt="' + unitname + '">');
 popwin.document.write('<br><br><b>' + unitname + '</b><br><br>');
 popwin.document.write('<form><input type="button" value="  Close  " onclick="javascript:window.close();"></form>');
 popwin.document.write('</center><br></body></html>');
 popwin.document.close();
}

function switchpic(imgname, imgsrc)
{
document.images[imgname].src=imgsrc;
}

var popwin;
function popupwin(url)
{
//if (popwin != null) {if (!popwin.closed) popwin.close();}

popwin = window.open(url,"popwin","height=480,width=640,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,location=yes,menubar=yes,titlebar=yes");
popwin.focus();
}

var popwin2;
function popupwin2(url)
{
//if (popwin2 != null) {if (!popwin2.closed) popwin2.close();}

popwin2 = window.open(url,"popwin2","scrollbars=yes,resizable=yes,toolbar=yes,status=yes,location=yes,menubar=yes,titlebar=yes");
popwin2.focus();
}

