function fadeObject(id, c1, c2, s1, s2) {
  var self = this;
  this.id      = id;
  this.elem    = false;
  this.colour  = {
    stt: [parseInt(c1.substr(0, 2), 16), parseInt(c1.substr(2, 2), 16), parseInt(c1.substr(4, 2), 16)],
    end: [parseInt(c2.substr(0, 2), 16), parseInt(c2.substr(2, 2), 16), parseInt(c2.substr(4, 2), 16)],
    now: [parseInt(c1.substr(0, 2), 16), parseInt(c1.substr(2, 2), 16), parseInt(c1.substr(4, 2), 16)]
  };
  this.steps   = [s1, s2];
  this.dir     = false;
  this.active  = false;
  this.queue   = [];
  this.msg     = [];
  this.message = 0;
  function d2h(num) {
    num = Math.round(num);
    return ((num < 16) ? "0" : "") + num.toString(16);
  }
  this.fade = function(message, direction) {
    this.elem = this.elem || document.getElementById(this.id);
    this.queue.push([message, direction]);
    for (var x = 0; x < this.queue.length; x++) {
      for (var y = x + 1; y < this.queue.length; y++) {
        if (this.queue[x][0] == this.queue[y][0] && this.queue[x][1] != this.queue[y][1]) {
          this.queue.splice(x, 1);
          this.queue.splice(y - 1, 1);
        }
      }
    }
    if (!this.active) setTimeout(function() { self.fadeLoop(); }, 0);
  };
  this.fadeLoop = function() {
    if (!this.active && this.queue.length) {
      if (this.dir && this.message != this.queue[0][0]) this.queue.unshift([this.message, false]);
      var msg = this.queue.shift();
      if (this.msg[msg[0]]) {
        this.active = true;
        this.elem.innerHTML = this.msg[this.message = msg[0]];
        this.dir = msg[1];
      }
    }
    if (this.dir) {
      var c1 = this.colour.stt, c2 = this.colour.end, s = this.steps[0];
    } else var c1 = this.colour.end, c2 = this.colour.stt, s = this.steps[1];
    for (var x = 0, cnow = "", inc = 0; x < 3; x++) {
      this.colour.now[x] += inc = (c2[x] - c1[x]) / s;
      cnow += this.colour.now[x] = (inc < 0) ? Math.max(this.colour.now[x], c2[x]) : Math.min(this.colour.now[x], c2[x]);
    } this.elem.style.color = "#" + d2h(this.colour.now[0]) + d2h(this.colour.now[1]) + d2h(this.colour.now[2]);
    if (cnow == c2.join("")) {
      this.active = false;
      if (!this.queue.length) {
        if (!this.dir) {
          if (this.msg[0]) {
            this.queue.push([0, true]);
            setTimeout(function() { self.fadeLoop(); }, 0);
          } else this.elem.innerHTML = "&nbsp;";
        }
      } else setTimeout(function() { self.fadeLoop(); }, 0);
    } else setTimeout(function() { self.fadeLoop(); }, 0);
  };
  if (window.addEventListener) {
    window.addEventListener('load', function() { self.fade(0, true); }, false); 
  } else if (window.attachEvent)
    window.attachEvent('onload', function() { self.fade(0, true); });
}

function SendArticle(code) {
    link_window = window.open('block/TellFrend.php?ID=' + code, 'sendblog', 'dependent=yes, toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=no, top=0, left=0, width=300, height=300');
    link_window.opener = window;
    link_window.focus();
  }
function Print(code) {
    link_window = window.open('block/Print.php?ArticleId=' + code, 'printblog', 'dependent=yes, toolbar=yes, location=no, status=yes, menubar=no, scrollbars=yes, resizable=no, top=0, left=0, width=700, height=500');
    link_window.opener = window;
    link_window.focus();
  }
function PrintProdect(code) {
    link_window = window.open('block/Print.php?ProductId=' + code, 'printblog', 'dependent=yes, toolbar=yes, location=no, status=yes, menubar=no, scrollbars=yes, resizable=no, top=0, left=0, width=700, height=500');
    link_window.opener = window;
    link_window.focus();
  }
function showhide(id){
		if (document.getElementById){
		obj = document.getElementById(id);
			if (obj.style.display == "none"){
				obj.style.display = "";
			} else {
				obj.style.display = "none";
			}
		}
	}
function GetValPoolForm(form) {
	var btn = valButton(form.r1);
	if (btn == null) return false ;
	else return btn ;
}
function valButton(btn) {
var cnt = -1;
for (var i=btn.length-1; i > -1; i--) {
   if (btn[i].checked) {cnt = i; i = -1;}
   }
if (cnt > -1) return btn[cnt].value;
else return null;
}


<!--
/*
Image Preloader-
© 2002-2004 Telli (www.codezwiz.com)
Visit http://codezwiz.com/
*/
newimage0 = new Image();
newimage0.src = "icons/closed.gif";
newimage1 = new Image();
newimage1.src = "icons/open.gif";
newimage2 = new Image();
newimage2.src = "icons/arrow.gif";

/*
Toggle Menu-
© 2002-2004 Telli (www.codezwiz.com)
Visit http://codezwiz.com/
*/
function Toggle(item) {
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   if (visible) {
     obj.style.display="none";
     key.innerHTML="<img src='icons/closed.gif' align='absmiddle' border='0'>";
   } else {
      obj.style.display="block";
     key.innerHTML="<img src='icons/open.gif' align='absmiddle' border='0'>";
   }
}
//-->