var isWin = (navigator.platform == "Win32") || (navigator.platform == "Windows");
var isIE = navigator.userAgent.indexOf("IE") > 0;
var isIE5 = navigator.userAgent.indexOf("IE 5.0") > 0;
var isIE6 = navigator.userAgent.indexOf("IE 6.0") > 0;
var isNav = (navigator.appName.indexOf("Netscape") != -1);
var element;
function $(A) {
  return typeof(A) == "string" ? document.getElementById(A) : A
}
String.prototype.trim = function() {
  return this.replace(/(^[\s]*)|([\s]*$)/g, "")
};
function findPos(A) {
  var B = curtop = 0;
  if (A.offsetParent) {
    while (A.offsetParent) {
      B += A.offsetLeft;
      curtop += A.offsetTop;
      A = A.offsetParent
    }
  }
  return [B, curtop]
}
function addEventSimple(C, A, B) {
  if (C.addEventListener) {
    C.addEventListener(A, B, false)
  } else {
    if (C.attachEvent) {
      C.attachEvent("on" + A, B)
    }
  }
}
function removeEventSimple(C, A, B) {
  if (C.removeEventListener) {
    C.removeEventListener(A, B, false)
  } else {
    if (C.detachEvent) {
      C.detachEvent("on" + A, B)
    }
  }
}
function createCookie(C, D, E) {
  if (E) {
    var B = new Date();
    B.setTime(B.getTime() + (E * 24 * 60 * 60 * 1000));
    var A = "; expires=" + B.toGMTString()
  } else {
    var A = ""
  }
  document.cookie = C + "=" + D + A + "; path=/"
}
function readCookie(B) {
  var D = B + "=";
  var A = document.cookie.split(";");
  for (var C = 0; C < A.length; C++) {
    var E = A[C];
    while (E.charAt(0) == " ") {
      E = E.substring(1, E.length)
    }
    if (E.indexOf(D) == 0) {
      return E.substring(D.length, E.length)
    }
  }
  return null
}
function eraseCookie(A) {
  createCookie(A, "", -1)
}
Array.prototype.add = function(A) {
  this[this.length] = A
};
function isNone(A) {
  return A == null || A.trim() == "" ? true: false
}
function efocu(B) {
  try {
    $(B).focus()
  } catch(A) {}
}
function insHtm(obj, code, pos) {
  obj = $(obj);
  if (isIE) {
    obj.parentNode.insertAdjacentHTML(pos == null ? "beforeend": "afterbegin", code)
  } else {
    var r = obj.ownerDocument.createRange();
    r.setStartBefore(obj);
    eval("obj.parentNode." + (pos == null ? "appendChild": "insertBefore") + "(r.createContextualFragment(code),obj.parentNode.firstChild)")
  }
}
String.prototype.inc = function(B, A) {
  if (A == null) {
    A = ","
  }
  return (A + this + A).indexOf(A + B + A) > -1 ? true: false
};
String.prototype.sub = function(E, D) {
  if (D == null) {
    D = ","
  }
  var C = D + this + D;
  var B = C.indexOf(E);
  if (B == -1) {
    return 0
  }
  var A = 0;
  while (C.charAt(B + 3 + A) != "/") {
    A++
  }
  return C.substring(B + 3, B + 3 + A)
};
function hide(A) {
  element = $(A);
  element.style.display = "none"
}
function show(A) {
  element = $(A);
  element.style.display = ""
}
function remove(A) {
  element = $(A);
  element.parentNode.removeChild(element)
}
function toggle(A) {
  A = $(A);
  if (A.style.display == "none") {
    A.style.display = "block"
  } else {
    A.style.display = "none"
  }
}
function menuToggle(B, A, C) {
  B = $(B);
  if (B.addEventListener) {
    B.addEventListener(A, C, false)
  } else {
    B.attachEvent("on" + A, C)
  }
}
function setOpacity(C, A) {
  var B = $(A).style;
  if (navigator.userAgent.indexOf("Firefox") != -1) {
    if (C == 100) {
      C = 99.9999
    }
  }
  B.filter = "alpha(opacity=" + C + ")";
  B.opacity = (C / 100)
}
function getSize() {
  if (self.innerHeight) {
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
    myScroll = window.pageYOffset
  } else {
    if (document.documentElement && document.documentElement.clientHeight) {
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
      myScroll = document.documentElement.scrollTop
    } else {
      if (document.body) {
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
        myScroll = document.body.scrollTop
      }
    }
  }
}
var str = '<div id="WWPopup" style="height:56px;display:none;margin:-56px auto 0 auto;width:952px;background:#fff url(' + baseURL + '/images/root/blue_bg.gif) repeat-x;"><div id="WWPopupBody" style="width:900px;height:50px;margin:0 auto;color:#333;padding-top:3px;font-weight:bold;font:12px Arial,Helvetica, sans-serif;position: relative;">';
str += '<strong>Important Notice:</strong> Dear Customers, Due to data migration, for customer who made order during PST 10:00PM May 31st to PST 9:00PM June 2nd, your order information and login information will be unavailable temporarily. We\'ll finish the data merge in the next 24 hours. Please note your order is being processed normally during the merge of data. If you have any questions please email to <a href="mailto:admin@admin.com" class="u b">admin@admin.com</a>. We apologize for any inconvenience.';
str += "</div></div>";
function flashWrite(F, B, D, A, E) {
  var C = "";
  C = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + D + '" height="' + A + '" id="' + F + '" align="middle">';
  C += '<param name="movie" value="' + B + '" />';
  C += '<param name="quality" value="high" />';
  C += '<param name="wmode" value="' + E + '" />';
  C += '<param name="bgcolor" value="#ffffff" />';
  C += '<embed src="' + B + '" quality="high" wmode="' + E + '" bgcolor="#ffffff" width="' + D + '" height="' + A + '" id="' + F + '" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed>    ';
  C += "</object>";
  document.write(C)
}
function showWWPopup() {
  if (window != top || $("popuplargerimageBody")) {
    return false
  }
  var A = $("WWPopup");
  var D, B;
  A.style.display = "";
  var C = function() {
    D += 8;
    if (D >= 56) {
      A.style.marginTop = "0";
      window.clearInterval(B)
    } else {
      A.style.marginTop = "-" + (56 - D) + "px"
    }
  },
  D = 0;
  var B = window.setInterval(C, 5)
}
function layerswich() {
  if ($("boxswitch") === null) {
    return
  }
  var B, A = 0;
  var C = $("boxswitch").getAttribute("evt");
  while (B = $("boxswitch").getElementsByTagName("DIV")[A++]) {
    if (B.className == "on" || B.className == "off") {
      if (C == "click") {
        B.onclick = function() {
          var E = $("layer_switch").getElementsByTagName("DIV");
          for (var F = 0; F < E.length; F++) {
            E[F].className = E[F].className.replace("show", "hide");
            E[F].className = E[F].className.replace("on", "off")
          }
          this.className = "on";
          var D = this.getAttribute("title");
          $(D).className = "show"
        }
      } else {
        B.onmouseover = function() {
          var E = $("layer_switch").getElementsByTagName("DIV");
          for (var F = 0; F < E.length; F++) {
            E[F].className = E[F].className.replace("show", "hide");
            E[F].className = E[F].className.replace("on", "off")
          }
          this.className = "on";
          var D = this.getAttribute("title");
          $(D).className = "show"
        }
      }
    }
  }
}
function clicklayerswich() {
  if ($("boxswitch") == null) {
    return
  }
  var B, A = 0;
  while (B = $("boxswitch").getElementsByTagName("DIV")[A++]) {
    if (B.className == "on" || B.className == "off") {
      B.onclick = function() {
        var D = $("layer_switch").getElementsByTagName("DIV");
        for (var E = 0; E < D.length; E++) {
          D[E].className = D[E].className.replace("show", "hide");
          D[E].className = D[E].className.replace("on", "off")
        }
        this.className = "on";
        var C = this.getAttribute("title");
        $(C).className = "show"
      }
    }
  }
}
function srcMarquee() {
  this.ID = $(arguments[0]);
  if (!this.ID) {
    this.ID = -1;
    return
  }
  this.Direction = this.Width = this.Height = this.DelayTime = this.WaitTime = this.Correct = this.CTL = this.StartID = this.Stop = this.MouseOver = 0;
  this.Step = 1;
  this.Timer = 30;
  this.DirectionArray = {
    top: 0,
    bottom: 1,
    left: 2,
    right: 3
  };
  if (typeof arguments[1] == "number") {
    this.Direction = arguments[1]
  }
  if (typeof arguments[2] == "number") {
    this.Step = arguments[2]
  }
  if (typeof arguments[3] == "number") {
    this.Width = arguments[3]
  }
  if (typeof arguments[4] == "number") {
    this.Height = arguments[4]
  }
  if (typeof arguments[5] == "number") {
    this.Timer = arguments[5]
  }
  if (typeof arguments[6] == "number") {
    this.DelayTime = arguments[6]
  }
  if (typeof arguments[7] == "number") {
    this.WaitTime = arguments[7]
  }
  if (typeof arguments[8] == "number") {
    this.ScrollStep = arguments[8]
  }
  this.ID.style.overflow = this.ID.style.overflowX = this.ID.style.overflowY = "hidden";
  this.ID.noWrap = false;
  this.IsNotOpera = (navigator.userAgent.toLowerCase().indexOf("opera") == -1);
  if (arguments.length >= 7) {
    this.Start()
  }
}
srcMarquee.prototype.Start = function() {
  if (this.ID == -1) {
    return
  }
  if (this.WaitTime < 800) {
    this.WaitTime = 800
  }
  if (this.Timer < 20) {
    this.Timer = 20
  }
  if (this.Width == 0) {
    this.Width = parseInt(this.ID.style.width)
  }
  if (this.Height == 0) {
    this.Height = parseInt(this.ID.style.height)
  }
  if (typeof this.Direction == "string") {
    this.Direction = this.DirectionArray[this.Direction.toString().toLowerCase()]
  }
  this.HalfWidth = Math.round(this.Width / 2);
  this.BakStep = this.Step;
  this.ID.style.width = this.Width;
  this.ID.style.height = this.Height;
  if (typeof this.ScrollStep != "number") {
    this.ScrollStep = this.Direction > 1 ? this.Width: this.Height
  }
  var C = this;
  var D = this.Timer;
  var A = this.DelayTime;
  var B = this.WaitTime;
  C.StartID = function() {
    C.Scroll()
  };
  C.Continue = function() {
    if (C.MouseOver == 1) {
      setTimeout(C.Continue, A)
    } else {
      clearInterval(C.TimerID);
      C.CTL = C.Stop = 0;
      C.TimerID = setInterval(C.StartID, D)
    }
  };
  C.Pause = function() {
    C.Stop = 1;
    clearInterval(C.TimerID);
    setTimeout(C.Continue, A)
  };
  C.Begin = function() {
    C.ClientScroll = C.Direction > 1 ? C.ID.scrollWidth: C.ID.scrollHeight;
    if ((C.Direction <= 1 && C.ClientScroll < C.Height) || (C.Direction > 1 && C.ClientScroll < C.Width)) {
      return
    }
    C.ID.innerHTML += C.ID.innerHTML;
    C.TimerID = setInterval(C.StartID, D);
    if (C.ScrollStep < 0) {
      return
    }
    C.ID.onmousemove = function(E) {
      if (C.ScrollStep == 0 && C.Direction > 1) {
        var E = E || window.event;
        if (window.event) {
          if (C.IsNotOpera) {
            C.EventLeft = E.srcElement.id == C.ID.id ? E.offsetX - C.ID.scrollLeft: E.srcElement.offsetLeft - C.ID.scrollLeft + E.offsetX
          } else {
            C.ScrollStep = null;
            return
          }
        } else {
          C.EventLeft = E.layerX - C.ID.scrollLeft
        }
        C.Direction = C.EventLeft > C.HalfWidth ? 3 : 2;
        C.AbsCenter = Math.abs(C.HalfWidth - C.EventLeft);
        C.Step = Math.round(C.AbsCenter * (C.BakStep * 2) / C.HalfWidth)
      }
    };
    C.ID.onmouseover = function() {
      if (C.ScrollStep == 0) {
        return
      }
      C.MouseOver = 1;
      clearInterval(C.TimerID)
    };
    C.ID.onmouseout = function() {
      if (C.ScrollStep == 0) {
        if (C.Step == 0) {
          C.Step = 1
        }
        return
      }
      C.MouseOver = 0;
      if (C.Stop == 0) {
        clearInterval(C.TimerID);
        C.TimerID = setInterval(C.StartID, D)
      }
    }
  };
  setTimeout(C.Begin, B)
};
srcMarquee.prototype.Scroll = function() {
  switch (this.Direction) {
  case 0:
    this.CTL += this.Step;
    if (this.CTL >= this.ScrollStep && this.DelayTime > 0) {
      this.ID.scrollTop += this.ScrollStep + this.Step - this.CTL;
      this.Pause();
      return
    } else {
      if (this.ID.scrollTop >= this.ClientScroll) {
        this.ID.scrollTop -= this.ClientScroll
      }
      this.ID.scrollTop += this.Step
    }
    break;
  case 1:
    this.CTL += this.Step;
    if (this.CTL >= this.ScrollStep && this.DelayTime > 0) {
      this.ID.scrollTop -= this.ScrollStep + this.Step - this.CTL;
      this.Pause();
      return
    } else {
      if (this.ID.scrollTop <= 0) {
        this.ID.scrollTop += this.ClientScroll
      }
      this.ID.scrollTop -= this.Step
    }
    break;
  case 2:
    this.CTL += this.Step;
    if (this.CTL >= this.ScrollStep && this.DelayTime > 0) {
      this.ID.scrollLeft += this.ScrollStep + this.Step - this.CTL;
      this.Pause();
      return
    } else {
      if (this.ID.scrollLeft >= this.ClientScroll) {
        this.ID.scrollLeft -= this.ClientScroll
      }
      this.ID.scrollLeft += this.Step
    }
    break;
  case 3:
    this.CTL += this.Step;
    if (this.CTL >= this.ScrollStep && this.DelayTime > 0) {
      this.ID.scrollLeft -= this.ScrollStep + this.Step - this.CTL;
      this.Pause();
      return
    } else {
      if (this.ID.scrollLeft <= 0) {
        this.ID.scrollLeft += this.ClientScroll
      }
      this.ID.scrollLeft -= this.Step
    }
    break
  }
};
var timer;
function marquee(D, C, E, A) {
  var G = $(A);
  var F;
  for (i = 0; i < G.childNodes.length; i++) {
    if (G.childNodes[i].tagName == null) {
      G.removeChild(G.childNodes[i])
    }
  }
  if (G == null) {
    return
  }
  function B(M, K, L) {
    if (L == K) {
      var I = M.firstChild;
      M.appendChild(I);
      I.style.marginTop = M.firstChild.style.marginTop = "0px";
      L = 0
    } else {
      var J = 3,
      L = L + J,
      H = (L >= K ? L - K: 0);
      M.firstChild.style.marginTop = -L + H + "px";
      F = setTimeout(function() {
        B(M, K, L - H)
      },
      20)
    }
  }
  marqueeTimer = setInterval(function() {
    clearTimeout(F);
    B(G, C, E)
  },
  D)
}
function addListener(B, C, D, A) {
  A = A || false;
  if (window.addEventListener) {
    B.addEventListener(C, D, A);
    return true
  } else {
    if (window.attachEvent) {
      B.attachEvent("on" + C, D);
      return true
    } else {
      return false
    }
  }
}
var ImageLoader = function(A) {
  this.url = A;
  this.image = null;
  this.loadEvent = null
};
ImageLoader.prototype = {
  load: function() {
    this.image = document.createElement("img");
    var A = this.url;
    var C = this.image;
    var B = this.loadEvent;
    addListener(this.image, "load",
    function(D) {
      if (B != null) {
        B(A, C)
      }
    },
    false);
    this.image.src = this.url
  },
  getImage: function() {
    return this.image
  }
};
function loadImage(B, C) {
  var A = new ImageLoader(C);
  A.loadEvent = function(D) {
    obj = $(B);
    obj.src = D
  };
  A.load()
}
function rewrite_url(C, A) {
  if (A == null || A == "undefined") {
    return ""
  }
  var D = /[^a-zA-Z0-9]/ig;
  var B = "";
  if (FRIENDLY_URLS != null && FRIENDLY_URLS == "true") {
    B = baseURL + C.replace(D, "-") + "_p" + A + ".html"
  } else {
    B = linkURL + A
  }
  return B
}


function page_go(id, num, c, t, cid) {
  var Prev = id + "Prev";
  var Next = id + "Next";
  var pageId = id + "Page";
  var Page = 0;
  var currentPage = 1;
  var PageNumber = Math.ceil(t / num);
  var activeClick = true;
  var productLen = productArr.length;
  var gopage = 0;
  if (num > t) activeClick = false;
  if (t != null) {
    gopage = Math.ceil(c / num);
    if (c % num == 0) gopage++;
  }
  updateProduct('goto', gopage);
  function updateProduct(type, gopage) {
    if (type == 'pre') {
      Page -= parseInt(num);
      currentPage--
    };
    if (type == 'next') {
      Page += parseInt(num);
      currentPage++
    };
    if (type == 'goto' && gopage != null) {
      Page = (gopage - 1) * num;
      currentPage = gopage;
    }
    if (Page < 0) {
      Page = num * (PageNumber - 1);
      currentPage = PageNumber;
    }
    if (Page >= t) {
      Page = 0;
      currentPage = 1;
    }
    $(pageId).innerHTML = currentPage + '/' + PageNumber;
    for (i = 0; i < num; i++) {
      if (i >= productLen) break;
      n_page = i + Page;
      $('li' + i).style.display = 'block';
      if (productArr[n_page] == null) {
        $('li' + i).style.display = 'none';
        continue;
      }
      if (!cid) {
        $('cell_name' + i).style.display = "none";
        $('cell_source_price' + i).style.display = "none";
      } else {
        $('cell_name' + i).style.display = "";
        $('cell_source_price' + i).style.display = "";
      }
      $('cell_price' + i).innerHTML = productArr[n_page][3];
      $('cell_name' + i).innerHTML = productArr[n_page][4];
      $('cell_source_price' + i).innerHTML = productArr[n_page][2];
      $('cell_name' + i).href = $('cell_link' + i).href = rewrite_url(productArr[n_page][5], productArr[n_page][0]);
      $('cell_name' + i).title = $('cell_link' + i).title = productArr[n_page][5];
      $('cell_img' + i).src = ImgPath + "rootimages/loading_img_s.gif";
      $('cell_img' + i).alt = productArr[n_page][5];
      $('cell_img' + i).title = productArr[n_page][5];
      loadImage('cell_img' + i, imgURL + productArr[n_page][1]); (productArr[n_page][0] == productid) ? $('cell_img' + i).className = "allborder": $('cell_img' + i).className = ''; (productArr[n_page][6][0] != 0) ? $('a_arr_' + i).style.display = "": $('a_arr_' + i).style.display = "none";
      if (productArr[n_page][6][1] != 0) {
        $('b_arr_' + i).style.display = "";
        if (productArr[n_page][6][1] != -1) $('b_arr_' + i).innerHTML = productArr[n_page][6][1];
      } else {
        $('b_arr_' + i).style.display = "none";
      } (productArr[n_page][6][2] != 0) ? $('c_arr_' + i).style.display = "": $('c_arr_' + i).style.display = "none"; (productArr[n_page][6][3] != 0) ? $('d_arr_' + i).style.display = "": $('d_arr_' + i).style.display = "none";
    }
  }
  if (activeClick) {
    $(Prev).onclick = function() {
      updateProduct('pre')
    };
    $(Next).onclick = function() {
      updateProduct('next')
    };
  }
}
function postAjax(B, C, D) {
  var A = new Object();
  A.method = "post";
  A.asynchronous = true;
  A.parameters = C;
  A.onComplete = D;
  return new Ajax.Request(B, A)
}
function checkWholesalNewsletter(A) {
  if ($(A) == null) {
    return
  }
  if (checkEmail(A)) {
    hide("wholesale_newsletter_text");
    show("wholesale_newsletter_loading");
    postAjax(window.location.pathname + "?main_page=wholesale_newsletter", A + "=" + $(A).value,
    function(B) {
      if (B.readyState == 4 && B.status == 200) {
        $("wholesale_newsletter_text").innerHTML = B.responseText;
        hide("wholesale_newsletter_loading");
        show("wholesale_newsletter_text");
        if (B.responseText.indexOf("touch") > 0) {
          $(A).value = ""
        }
      }
    })
  }
}
function checkEmail(B) {
  var A = $(B) == null ? "": $(B).value;
  if (!/(\,|^)([\w+._]+@\w+\.(\w+\.){0,3}\w{2,4})/.test(A.replace(/-|\//g, ""))) {
    $(B).focus();
    alert('Please check your email address.\nYour email addresses should look like "myname@gmail.com"');
    return false
  } else {
    return true
  }
}
var openShow = false;
function show_chat_div(F) {
  if (openShow) {
    close_chat_div();
    return
  }
  openShow = true;
  var C = F.getAttribute("title");
  var A = F.getAttribute("msn");
  var D = F.getAttribute("skype");
  var B = F.getAttribute("email");
  var E = F.getAttribute("yahoo");
  var H = F.getAttribute("aim");
  var G = "";
  G += "<ul class='gray_trangle_list'>";
  if (B != null && B != "") {
    G += "<li><span class='big black b'>Email</span><BR/> <span>" + B + "</span></li>"
  }
  if (A != null && A != "") {
    G += "<li><span class='big black b'>MSN</span><BR/> <span>" + A + "</span></li>"
  }
  if (D != null && D != "") {
    G += "<li><span class='big black b'>SKYPE</span><BR/> <span>" + D + "</span></li>"
  }
  if (E != null && E != "") {
    G += "<li><span class='big black b'>YAHOO</span><BR/> <span>" + E + "</span></li>"
  }
  G += "</ul>";
  $("chat_div_name").innerHTML = G;
  jQuery("#live_online").css("background-position","0 -50px");
  show("chat_div");
  clearInterval(marqueeTimer);
  hide_select("in")
}
function close_chat_div() {
  hide("chat_div");
  jQuery("#live_online").css("background-position","0 0");
  marquee(3000, 15, 0, "nav_chat_sales");
  hide_select("out");
  openShow = false
}
function hide_select(C) {
  var B = document.getElementsByTagName("select");
  if (C == "in") {
    for (var A = 0; A < B.length; A++) {
      if (B[A].getAttribute("rel") == "dropdown") {
        B[A].style.visibility = "hidden"
      }
    }
  } else {
    for (var A = 0; A < B.length; A++) {
      if (B[A].getAttribute("rel") == "dropdown") {
        B[A].style.visibility = "visible"
      }
    }
  }
}
function back(A) {
  history.go(A);
  return false
}
function floatBox(J, E) {
  var B, A, H, D;
  var C = 339;
  var I = 328;
  if (isIE) {
    H = $(J).childNodes[0];
    D = 120
  } else {
    H = $(J);
    D = 130
  }
  B = H.offsetLeft - C;
  A = H.offsetTop - D;
  var F = $("pop_window");
  F.style.position = "absolute";
  F.style.zIndex = 999;
  F.style.top = A + "px";
  F.style.left = B + "px";
  F.style.width = C + "px";
  F.style.height = I + "px";
  var G = "<img onclick='close_box(this)' src='" + baseURL + "images/icons/close.gif' class='hand' title='close' alt='close' id='floatBox_img'/><div class='png'>";
  switch (E) {
  case "shipping_info":
    G += shipping_info;
    break;
  case "payment_option":
    G += payment_option;
    break;
  case "questions":
    G += questions;
    break;
  default:
    G += content;
    break
  }
  G += "</div>";
  F.innerHTML = G;
  show("pop_window");
  return false
}
function close_box(A) {
  hide(A.parentNode)
};


function scrollup(F, D, E) {
  timer_flg = false;
  if (E == D) {
    var B = F.firstChild;
    F.appendChild(B);
    B.style.marginTop = F.firstChild.style.marginTop = "0px";
    E = 0;
    timer_flg = true
  } else {
    var C = 3,
    E = E + C,
    A = (E >= D ? E - D: 0);
    F.firstChild.style.marginTop = -E + A + "px";
    window.setTimeout(function() {
      scrollup(F, D, E - A)
    },
    20)
  }
}
function scrollup_online(F, D, E) {
  online_timer_flg = false;
  if (E == D) {
    var B = F.firstChild;
    F.appendChild(B);
    B.style.marginTop = F.firstChild.style.marginTop = "0px";
    E = 0;
    online_timer_flg = true
  } else {
    var C = 3,
    E = E + C,
    A = (E >= D ? E - D: 0);
    F.firstChild.style.marginTop = -E + A + "px";
    window.setTimeout(function() {
      scrollup_online(F, D, E - A)
    },
    20)
  }
}

function g(A) {
  return document.getElementById(A)
}
function HoverLi(B) {
  for (var A = 1; A <= 2; A++) {
    g("tb_" + A).className = "normaltab";
    g("tbc_0" + A).className = "undis"
  }
  g("tbc_0" + B).className = "dis";
  g("tb_" + B).className = "hovertab"
}
function MM_showHideLayers() {
  var i, p, v, obj, args = MM_showHideLayers.arguments;
  for (i = 0; i < (args.length - 2); i += 3) {
    with(document) {
      if (getElementById && ((obj = getElementById(args[i])) != null)) {
        v = args[i + 2];
        if (obj.style) {
          obj = obj.style;
          v = (v == "show") ? "visible": (v == "hide") ? "hidden": v
        }
        obj.visibility = v
      }
    }
  }
}
function ap_showHideLayers() {
  var i, p, v, obj, args = ap_showHideLayers.arguments;
  for (i = 0; i < (args.length - 2); i += 3) {
    with(document) {
      if (getElementById && ((obj = getElementById(args[i])) != null)) {
        v = args[i + 2];
        if (obj.style) {
          obj = obj.style;
          v = (v == "show") ? "visible": (v == "hide") ? "hidden": v
        }
        obj.visibility = v
      }
    }
  }
}
function aps_showHideLayers() {
  var i, p, v, obj, args = aps_showHideLayers.arguments;
  for (i = 0; i < (args.length - 2); i += 3) {
    with(document) {
      if (getElementById && ((obj = getElementById(args[i])) != null)) {
        v = args[i + 2];
        if (obj.style) {
          obj = obj.style;
          v = (v == "show") ? "visible": (v == "hide") ? "hidden": v
        }
        obj.visibility = v
      }
    }
  }
}
function aps_showHideLayers() {
  var i, p, v, obj, args = aps_showHideLayers.arguments;
  for (i = 0; i < (args.length - 2); i += 3) {
    with(document) {
      if (getElementById && ((obj = getElementById(args[i])) != null)) {
        v = args[i + 2];
        if (obj.style) {
          obj = obj.style;
          v = (v == "show") ? "visible": (v == "hide") ? "hidden": v
        }
        obj.visibility = v
      }
    }
  }
}
function img_showHideLayers() {
  var i, p, v, obj, args = img_showHideLayers.arguments;
  for (i = 0; i < (args.length - 2); i += 3) {
    with(document) {
      if (getElementById && ((obj = getElementById(args[i])) != null)) {
        v = args[i + 2];
        if (obj.style) {
          obj = obj.style;
          v = (v == "show") ? "visible": (v == "hide") ? "hidden": v
        }
        obj.visibility = v
      }
    }
  }
};
