<!-- 
/*
 Pleas leave this notice.
 DHTML tip message version 1.2 copyright Essam Gamal 2003 (http://migoicons.tripod.com, migoicons@hotmail.com)
 All modifications are done in the style.js you should not modify this file.  Created on : 06/03/2003
 Script featured on and can be found at Dynamic Drive (http://www.dynamicdrive.com)
*/ 

var ua = navigator.userAgent
var ps = navigator.productSub 
var dom = (document.getElementById)? 1:0
var ie4 = (document.all&&!dom)? 1:0
var ie5 = (document.all&&dom)? 1:0
var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4)
var nn6 = (dom&&!ie5)? 1:0
var sNav = (nn4||nn6||ie4||ie5)? 1:0
var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0
var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
var PX = (nn6)? "px" :"" 

if(sNav) {
  window.onresize = ReloadTip
  document.onmousemove = MoveTip
  if(nn4) document.captureEvents(Event.MOUSEMOVE) 
} 
if(nn4||nn6) {
  mx = "e.pageX"
  my = "e.pageY"
  scl = "window.pageXOffset"
  sct = "window.pageYOffset"  
  if(nn4) {
      obj = "document.TipLayer."
      sl = "left"
      st = "top"
      ih = "clip.height"
      iw = "clip.width"
      vl = "'show'"
      hl = "'hide'"
      sv = "visibility="
  }
  else obj = "document.getElementById('TipLayer')."
} 
if(ie4||ie5) {
  obj = "TipLayer."
  mx = "event.x"
  my = "event.y"
  scl = "eval(doc_root).scrollLeft"
  sct = "eval(doc_root).scrollTop"
  if(ie5) {
      mx = mx+"+"+scl 
      my = my+"+"+sct
  }
}
if(ie4||dom){
  sl = "style.left"
  st = "style.top"
  ih = "offsetHeight"
  iw = "offsetWidth"
  vl = "'visible'"
  hl = "'hidden'"
  sv = "style.visibility="
}
if(ie4||ie5||ps>=20020823) {
  ww = "eval(doc_root).clientWidth"
  wh = "eval(doc_root).clientHeight"
}  
else { 
  ww = "window.innerWidth"
  wh = "window.innerHeight"
  evlh = eval(wh)
  evlw = eval(ww)
  sbw=15
} 

function applyCssFilter(){
  if(cssFilters&&FiltersEnabled) { 
      var dx = " progid:DXImageTransform.Microsoft."
      TipLayer.style.filter = "revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+
      "Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+
      "RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+
      "Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+
      "GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+
      "GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"
  }
}

function stm(t,s) {
  if(sNav) {
      if(t.length<2||s.length<25) {
      var ErrorNotice = "DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n"
      if(t.length<2&&s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors")
      else if(t.length<2) alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
      else if(s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")
  }
      else {
      var ab = "" ;var ap = ""
      var titCol = (s[0])? "COLOR='"+s[0]+"'" : ""
      var txtCol = (s[1])? "COLOR='"+s[1]+"'" : ""
      var titBgCol = (s[2])? "BGCOLOR='"+s[2]+"'" : ""
      var txtBgCol = (s[3])? "BGCOLOR='"+s[3]+"'" : ""
      var titBgImg = (s[4])? "BACKGROUND='"+s[4]+"'" : "" 
      var txtBgImg = (s[5])? "BACKGROUND='"+s[5]+"'" : ""
      var titTxtAli = (s[6] && s[6].toLowerCase()!="left")? "ALIGN='"+s[6]+"'" : ""
      var txtTxtAli = (s[7] && s[7].toLowerCase()!="left")? "ALIGN='"+s[7]+"'" : ""   
      var add_height = (s[15])? "HEIGHT='"+s[15]+"'" : ""
      if(!s[8])  s[8] = "Verdana,Arial,Helvetica"
      if(!s[9])  s[9] = "Verdana,Arial,Helvetica"                 
      if(!s[12]) s[12] = 1
      if(!s[13]) s[13] = 1
      if(!s[14]) s[14] = 200
      if(!s[16]) s[16] = 0
      if(!s[17]) s[17] = 0
      if(!s[18]) s[18] = 10
      if(!s[19]) s[19] = 10
      hs = s[11].toLowerCase() 
      if(ps==20001108){
      if(s[2]) ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
      ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"}
      var closeLink=(hs=="sticky")? "<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
      var title=(t[0]||hs=="sticky")? "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>" : ""
      var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
      if(nn4) {
          with(eval(obj+"document")) {
              open()
              write(txt)
              close()
          }
      }
      else eval(obj+"innerHTML=txt")
      tbody = {
          Pos:s[10].toLowerCase(), 
          Xpos:s[18],
          Ypos:s[19], 
          Transition:s[20],
          Duration:s[21], 
          Alpha:s[22],
          ShadowType:s[23].toLowerCase(),
          ShadowColor:s[24],
          Width:parseInt(eval(obj+iw)+3+sbw)
      }
      if(ie4) { 
          TipLayer.style.width = s[14]
          tbody.Width = s[14]
      }
      Count=0 
      move=1
   }
  }
}

function MoveTip(e) {
  if(move) {
      var X,Y,MouseX = eval(mx),MouseY = eval(my); tbody.Height = parseInt(eval(obj+ih)+3)
      tbody.wiw = parseInt(eval(ww+"+"+scl)); tbody.wih = parseInt(eval(wh+"+"+sct))
      switch(tbody.Pos) {
          case "left" : X=MouseX-tbody.Width-tbody.Xpos; Y=MouseY+tbody.Ypos; break
          case "center": X=MouseX-(tbody.Width/2); Y=MouseY+tbody.Ypos; break
          case "float": X=tbody.Xpos+eval(scl); Y=tbody.Ypos+eval(sct); break 
          case "fixed": X=tbody.Xpos; Y=tbody.Ypos; break     
          default: X=MouseX+tbody.Xpos; Y=MouseY+tbody.Ypos
      }

      if(tbody.wiw<tbody.Width+X) X = tbody.wiw-tbody.Width
      if(tbody.wih<tbody.Height+Y+sbw) {
          if(tbody.Pos=="float"||tbody.Pos=="fixed") Y = tbody.wih-tbody.Height-sbw
          else Y = MouseY-tbody.Height
      }
      if(X<0) X=0 
      eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
      ViewTip()
  }
}

function ViewTip() {
      Count++
  if(Count == 1) {
      if(cssFilters&&FiltersEnabled) {    
          for(Index=28; Index<31; Index++) { TipLayer.filters[Index].enabled = 0 }
          for(s=0; s<28; s++) { if(TipLayer.filters[s].status == 2) TipLayer.filters[s].stop() }
          if(tbody.Transition == 51) tbody.Transition = parseInt(Math.random()*50)
          var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0
          var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0
          var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0 
          if(tbody.Alpha>0&&tbody.Alpha<100) {
              TipLayer.filters[28].enabled = 1
              TipLayer.filters[28].opacity = tbody.Alpha
          }
          if(tbody.ShadowColor&&tbody.ShadowType == "simple") {
              TipLayer.filters[29].enabled = 1
              TipLayer.filters[29].color = tbody.ShadowColor
          }
          else if(tbody.ShadowColor&&tbody.ShadowType == "complex") {
              TipLayer.filters[30].enabled = 1
              TipLayer.filters[30].color = tbody.ShadowColor
          }
          if(applyTrans||advFilters) {
              eval(obj+sv+hl)
              if(applyTrans) TipLayer.filters[0].transition = tbody.Transition
              TipLayer.filters[which].duration = tbody.Duration 
              TipLayer.filters[which].apply()
          }
      }
      eval(obj+sv+vl)
      if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters)) TipLayer.filters[which].play()
      if(hs == "sticky") move=0
      }
}

function stickyhide() {
  eval(HideTip)
}

function ReloadTip() {
   if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload()
   else if(hs == "sticky") eval(HideTip)
}

function htm() {
  if(sNav) {
      if(hs!="keep") {
          move=0; 
          if(hs!="sticky") eval(HideTip)
      }   
  } 
}


//-->


// curvy corners 
var niftyOk=(document.getElementById && document.createElement && Array.prototype.push);
var niftyCss=false;

String.prototype.find=function(what){
return(this.indexOf(what)>=0 ? true : false);
}

var oldonload=window.onload;
if(typeof(NiftyLoad)!='function') NiftyLoad=function(){};
if(typeof(oldonload)=='function')
    window.onload=function(){oldonload();AddCss();NiftyLoad()};
else window.onload=function(){AddCss();NiftyLoad()};

function AddCss(){
niftyCss=true;
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","Memorials_styles.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
}

function Nifty(selector,options){
if(niftyOk==false) return;
if(niftyCss==false) AddCss();
var i,v=selector.split(","),h=0;
if(options==null) options="";
if(options.find("fixed-height"))
    h=getElementsBySelector(v[0])[0].offsetHeight;
for(i=0;i<v.length;i++)
    Rounded(v[i],options);
if(options.find("height")) SameHeight(selector,h);
}

function Rounded(selector,options){
var i,top="",bottom="",v=new Array();
if(options!=""){
    options=options.replace("left","tl bl");
    options=options.replace("right","tr br");
    options=options.replace("top","tr tl");
    options=options.replace("bottom","br bl");
    options=options.replace("transparent","alias");
    if(options.find("tl")){
        top="both";
        if(!options.find("tr")) top="left";
        }
    else if(options.find("tr")) top="right";
    if(options.find("bl")){
        bottom="both";
        if(!options.find("br")) bottom="left";
        }
    else if(options.find("br")) bottom="right";
    }
if(top=="" && bottom=="" && !options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector);
for(i=0;i<v.length;i++){
    FixIE(v[i]);
    if(top!="") AddTop(v[i],top,options);
    if(bottom!="") AddBottom(v[i],bottom,options);
    }
}

function AddTop(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Top");
if(options.find("small")){
    d.style.marginBottom=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginBottom=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginBottom=(p-5)+"px";
for(i=1;i<=lim;i++)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingTop="0";
el.insertBefore(d,el.firstChild);
}

function AddBottom(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Bottom");
if(options.find("small")){
    d.style.marginTop=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginTop=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginTop=(p-5)+"px";
for(i=lim;i>0;i--)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingBottom=0;
el.appendChild(d);
}

function CreateStrip(index,side,color,border,btype){
var x=CreateEl("b");
x.className=btype+index;
x.style.backgroundColor=color;
x.style.borderColor=border;
if(side=="left"){
    x.style.borderRightWidth="0";
    x.style.marginRight="0";
    }
else if(side=="right"){
    x.style.borderLeftWidth="0";
    x.style.marginLeft="0";
    }
return(x);
}

function CreateEl(x){
return(document.createElement(x));
}

function FixIE(el){
if(el.currentStyle!=null && el.currentStyle.hasLayout!=null && el.currentStyle.hasLayout==false)
    el.style.display="inline-block";
}

function SameHeight(selector,maxh){
var i,v=selector.split(","),t,j,els=[],gap;
for(i=0;i<v.length;i++){
    t=getElementsBySelector(v[i]);
    els=els.concat(t);
    }
for(i=0;i<els.length;i++){
    if(els[i].offsetHeight>maxh) maxh=els[i].offsetHeight;
    els[i].style.height="auto";
    }
for(i=0;i<els.length;i++){
    gap=maxh-els[i].offsetHeight;
    if(gap>0){
        t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";
        nc=els[i].lastChild;
        if(nc.className=="niftycorners")
            els[i].insertBefore(t,nc);
        else els[i].appendChild(t);
        }
    }
}

function getElementsBySelector(selector){
var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;
if(selector.find("#")){ //id selector like "tag#id"
    if(selector.find(" ")){  //descendant selector like "tag#id tag"
        s=selector.split(" ");
        var fs=s[0].split("#");
        if(fs.length==1) return(objlist);
        f=document.getElementById(fs[1]);
        if(f){
            v=f.getElementsByTagName(s[1]);
            for(i=0;i<v.length;i++) objlist.push(v[i]);
            }
        return(objlist);
        }
    else{
        s=selector.split("#");
        tag=s[0];
        selid=s[1];
        if(selid!=""){
            f=document.getElementById(selid);
            if(f) objlist.push(f);
            return(objlist);
            }
        }
    }
if(selector.find(".")){      //class selector like "tag.class"
    s=selector.split(".");
    tag=s[0];
    selclass=s[1];
    if(selclass.find(" ")){   //descendant selector like tag1.classname tag2
        s=selclass.split(" ");
        selclass=s[0];
        tag2=s[1];
        }
    }
var v=document.getElementsByTagName(tag);  // tag selector like "tag"
if(selclass==""){
    for(i=0;i<v.length;i++) objlist.push(v[i]);
    return(objlist);
    }
for(i=0;i<v.length;i++){
    c=v[i].className.split(" ");
    for(j=0;j<c.length;j++){
        if(c[j]==selclass){
            if(tag2=="") objlist.push(v[i]);
            else{
                v2=v[i].getElementsByTagName(tag2);
                for(k=0;k<v2.length;k++) objlist.push(v2[k]);
                }
            }
        }
    }
return(objlist);
}

function getParentBk(x){
var el=x.parentNode,c;
while(el.tagName.toUpperCase()!="HTML" && (c=getBk(el))=="transparent")
    el=el.parentNode;
if(c=="transparent") c="#FFFFFF";
return(c);
}

function getBk(x){
var c=getStyleProp(x,"backgroundColor");
if(c==null || c=="transparent" || c.find("rgba(0, 0, 0, 0)"))
    return("transparent");
if(c.find("rgb")) c=rgb2hex(c);
return(c);
}

function getPadding(x,side){
var p=getStyleProp(x,"padding"+side);
if(p==null || !p.find("px")) return(0);
return(parseInt(p));
}

function getStyleProp(x,prop){
if(x.currentStyle)
    return(x.currentStyle[prop]);
if(document.defaultView.getComputedStyle)
    return(document.defaultView.getComputedStyle(x,'')[prop]);
return(null);
}

function rgb2hex(value){
var hex="",v,h,i;
var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;
var h=regexp.exec(value);
for(i=1;i<4;i++){
    v=parseInt(h[i]).toString(16);
    if(v.length==1) hex+="0"+v;
    else hex+=v;
    }
return("#"+hex);
}

function Mix(c1,c2){
var i,step1,step2,x,y,r=new Array(3);
if(c1.length==4)step1=1;
else step1=2;
if(c2.length==4) step2=1;
else step2=2;
for(i=0;i<3;i++){
    x=parseInt(c1.substr(1+step1*i,step1),16);
    if(step1==1) x=16*x+x;
    y=parseInt(c2.substr(1+step2*i,step2),16);
    if(step2==1) y=16*y+y;
    r[i]=Math.floor((x*50+y*50)/100);
    r[i]=r[i].toString(16);
    if(r[i].length==1) r[i]="0"+r[i];
    }
return("#"+r[0]+r[1]+r[2]);
}

// gradient 

window.addEventListener?window.addEventListener("load",createGradient,false):window.attachEvent("onload",createGradient);

function createGradient() {
  if(!document.getElementById)return;
  
  objArray = getGradientObjects();
  if(!objArray.length) return;
  
  for(i=0;i<objArray.length;i++) {
      params = objArray[i].className.split(" ");
      if(document.all && !window.opera) {
          objArray[i].style.width = objArray[i].offsetWidth + "px";
          params[3] == "horizontal"?gType = 1:gType = 0;
          objArray[i].style.filter = "progid:DXImageTransform.Microsoft.Gradient(GradientType="+gType+",StartColorStr=\"#" + params[1] + "\",EndColorStr=\"#" + params[2] + "\")";
  } else {
          colorArray = createColorPath(params[1],params[2]);
          x=0;y=0;
          if(params[3] == "horizontal") {
              w=Math.round(objArray[i].offsetWidth/colorArray.length);
              if(!w)w=1;
              h = objArray[i].offsetHeight;
          } else {
              h = Math.round(objArray[i].offsetHeight/colorArray.length);
              if(!h) h =1;
              w = objArray[i].offsetWidth;
          }
          makeGrandParent(objArray[i]);
          tmpDOM = document.createDocumentFragment();
          for(p=0;p<colorArray.length;p++) {
              g = document.createElement("div");
              g.setAttribute("style","position:absolute;z-index:0;top:" + y + "px;left:" + x + "px;height:" + h + "px;width:" + w + "px;background-color:rgb(" + colorArray[p][0] + "," + colorArray[p][1] + "," + colorArray[p][2] + ");");
              params[3] == "horizontal"?x+=w:y+=h;
              tmpDOM.appendChild(g);
              if(y>=objArray[i].offsetHeight || x >= objArray[i].offsetWidth) break;
          }
          objArray[i].appendChild(tmpDOM);
          tmpDOM = null;
      }
  }
}

function getGradientObjects() {
  a = document.getElementsByTagName("*");
  objs = new Array();
  for(i=0;i<a.length;i++) {
      c = a[i].className;
      if(c != "") if(c.indexOf("gradient") == 0) objs[objs.length] = a[i];
  } 
  return objs;
}
  
function createColorPath(color1,color2) {
  colorPath = new Array();
  colorPercent = 1.0;
  do {
      colorPath[colorPath.length]=setColorHue(longHexToDec(color1),colorPercent,longHexToDec(color2));
      colorPercent-=.01;
  } while(colorPercent>0);
  return colorPath;
}
      
function setColorHue(originColor,opacityPercent,maskRGB) {
  returnColor=new Array();
  for(w=0;w<originColor.length;w++) returnColor[w] = Math.round(originColor[w]*opacityPercent) + Math.round(maskRGB[w]*(1.0-opacityPercent));
  return returnColor;
}

function longHexToDec(longHex) {
  return new Array(toDec(longHex.substring(0,2)),toDec(longHex.substring(2,4)),toDec(longHex.substring(4,6)));    
}

function toDec(hex) { 
  return parseInt(hex,16);
}
  
function makeGrandParent(obj) {
  disp = document.defaultView.getComputedStyle(obj,'').display;
  disp == "block"?nSpan = document.createElement("div"):  nSpan = document.createElement("span");
  mHTML = obj.innerHTML;
  obj.innerHTML = "";
  nSpan.innerHTML = mHTML;
  nSpan.setAttribute("style","position:relative;z-index:10;");
  obj.appendChild(nSpan);
}

var xmlHttp // xmlHttp variable

function GetXmlHttpObject(){ // This function we will use to call our xmlhttpobject.
  var objXMLHttp=null // Sets objXMLHttp to null as default.
  if (window.XMLHttpRequest){ // If we are using Netscape or any other browser than IE lets use xmlhttp.
      objXMLHttp=new XMLHttpRequest() // Creates a xmlhttp request.
  }else if (window.ActiveXObject){ // ElseIf we are using IE lets use Active X.
      objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP") // Creates a new Active X Object.
  } // End ElseIf.
  return objXMLHttp // Returns the xhttp object.
} // Close Function

function AddToCart(recordnum){ // This function we will use to check to see if a username is taken or not.
  xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object.
  if (xmlHttp==null){ // If it cannot create a new Xmlhttp object.
      alert ("Browser does not support HTTP Request") // Alert Them!
      return // Returns.
  } // End If.

  var buttonID = "atc" + recordnum;
  //alert(buttonID);
  //alert(document.getElementById(buttonID).value);
  var url="Memorials_cart.asp?recordnum="+recordnum // Url that we will use to add to cart.
  xmlHttp.open("GET",url,true) // Opens the URL using GET
  xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange is equal to 4 than that means the request is done.
      if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text.
          //alert(xmlHttp.responseText)

              e = document.getElementById(buttonID);
              //e.value =  xmlHttp.responseText;
              e.className="buttonCheck";
              e.value = "\u221A";      // this is the js hex equivalent of square root symbol to look like checkmark
              

          //document.getElementById(buttonID).innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php
      } // End If.
  }; // Close Function
  xmlHttp.send(null); // Sends NULL instead of sending data.
} // Close Function.

