var rules={

'.nav_top img': function(el)
 {
  if(!this.src)return
  var nm;
  el.onmouseover=function(){ nm=this.src.split(".gif");this.src=nm[0]+"_selected.gif" }
  el.onmouseout=function(){ nm=this.src.split("_selected.gif");this.src=nm[0]+".gif" }
 },

'.nav_top a.selected img': function(el){ el.onmouseover=null;el.onmouseout=null },

'.prod': function(el)
 {
  el.onmouseover=function(){ this.style.borderColor="#487b10" }
  el.onmouseout=function(){ this.style.borderColor="#CCCCCC" }
 },

'#big_pic img':function(el)
 {
  el.onmouseover=function()
	{ document.getElementById("big_pic").style.backgroundImage="url(imgs/"+this.id+".jpg)" }
 },

'div.testimonials div': function(el)
 {
  el.onmouseover=function(){ this.style.color="#000000" }
  el.onmouseout=function(){ this.style.color="" }
 },

'div.news tr': function(el)
 {
  el.onmouseover=function(){ this.parentNode.parentNode.className="hover" }
  el.onmouseout=function(){ this.parentNode.parentNode.className="" }
 }

}

var customLS = new function()
{
var re,lo,intv,reA,reImg,loA,loImg
this.start = function(id)
{
  re = document.getElementById(id),
  loA = document.getElementById('livechat'),
  loImg = loA.firstChild
  intv = setInterval(chk1, 10)
}
var chk1 = function()
{
  if(re.firstChild)
  {
    clearInterval(intv)
    intv = setInterval(chk2, 60000);
    reA = re.firstChild
    reImg = reA.firstChild
    chk2()
  }
}
var chk2 = function()
{
  loA.href = reA.href
  loA.onclick = reA.onclick
  loImg.src = (reImg.src.indexOf('online')>0) ?'/imgs/Live_help_online.gif': '/imgs/Live_help_offline.gif'
}
}

document.Behaviour.register(rules)
