// plachow
function showOBSWheel(){
  PopupCenter("/Flash/wheel/oce_final.html", "obswheel", 460, 600);
  return false;
}

function PopupCenter(pageURL, title,w,h) {
  var left = (screen.width/2)-(w/2);
  var top = (screen.height/2)-(h/2);
  var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
  targetWin.focus();
} 

//version 1.2.1
var Site = {
   start : function() {
      $("#brandLabelMenu").TopNavigation();
      $("div.bhvSearch").Search();
      Hover.start($("#brandLabelMenu div ul li li"), "a");
      Hover.start($("#navigationContainer ul ul li"), "a");
      Hover.start($("ul.hlkList li"), "a");
      Hover.start($("ul.tab li"), "a");
      Specs.start($("div.specs h4"));
      $("a[rel=external]").each(function() {
         this.target = "_blank"}
      );
      $("a.bhvPopup").Popup();
      $("div.bhvTabControl").TabControl();
      TableSort.start();
      NewsTicker.start();
      PngFix.start();
      if($("#contentPlacement").height() < $("#navigationContainer").height()) {
         $("#contentPlacement").height($("#navigationContainer").height() + 24 + "px")}
      if($("div#googleMaps").size()) {
         initialize();
         $(document).unload(function() {
            GUnload()}
         )}
      Loading.start()}
   };
$.fn.TopNavigation = function(c) {
   var d = function(b) {
      b.currentItem = 0;
      b.items = $("li.rootItem", b);
      if(!(b.items.size()))return;
      b.items.each(function(a) {
         $(this).hover(function() {
            f(b.items[b.currentItem]); b.currentItem = a; e(this)}
         , function() {
            f(b.items[b.currentItem])}
         )}
      )};
   var e = function(a) {
      if($(a).find("div").length) {
         $(a).addClass("hoverTopMenu").find("a.rootItem").addClass("hoverTopMenu")}
      $(a).find("div").show()};
   var f = function(a) {
      if($(a).find("div").length) {
         $(a).removeClass("hoverTopMenu").find("a.rootItem").removeClass("hoverTopMenu")}
      $(a).find("div").hide()};
   this.each(function() {
      d(this)}
   )};
$.fn.Search = function() {
   var c = function(a) {
      $$ = $(a);
      a.button = $$.find(".searchButton a");
      a.inputbox = $$.find(".searchLabel input");
      a.txt = a.inputbox.val();
      a.url = a.button.attr("href") + "?Search=";
      a.product = $$.find("input:hidden:eq(0)").val();
      a.type = $$.find("input:hidden:eq(1)").val();
      a.inputbox.focus(function() {
         if($(this).val() == a.txt)$(this).val("")}
      );
      a.inputbox.blur(function() {
         if($(this).val() == "")$(this).val(a.txt)}
      );
      a.inputbox.keypress(function(e) {
         if(e.which == "13") {
            d(a); return false}
         }
      );
      a.button.click(function() {
         d(a); return false}
      )};
   var d = function(a) {
      var b = $(a).find("input:radio:checked");
      if(b.size())a.type = b.val();
      if(a.product.length > 0)a.txt = a.inputbox.val() + " " + a.product;
      else a.txt = a.inputbox.val();
      a.txt = jQuery.trim(a.txt);
      if(a.type) {
         if(a.type.toLowerCase() == "kbonly")a.type += "#tab2"}
      location.href = a.url + encodeURIComponent(a.txt) + "&t=" + a.type};
   this.each(function() {
      c(this)}
   )};
var Hover = {
   start : function(b, c) {
      b.each(function() {
         var a = this; if(!$(this).find(c).hasClass("page") &&!$(this).find(c).hasClass("sg")) {
            $(this).find(c).hover(function() {
               $(a).addClass("hover"); $(this).addClass("hover")}
            , function() {
               $(a).removeClass("hover"); $(this).removeClass("hover")}
            )}
         }
      )}
   };
var Specs = {
   start : function(a) {
      a.each(function() {
         $(this).click(function() {
            $(this).next().slideToggle()}
         ); $(this).toggle(function() {
            $(this).addClass("hide")}
         , function() {
            $(this).removeClass("hide")}
         )}
      )}
   };
$.fn.TabControl = function() {
   var c = function(a, b) {
      a.index = b;
      a.tab = j(b);
      a.hash = m(a);
      s(a);
      if(b != 0)n(a);
      $(a).click(function() {
         o(a); $.history.add(a.hash); $("form").attr("action", this.href); return false}
      )};
   var d = function() {
      var b = $.history.getCurrent();
      if(b != "") {
         el = h(b);
         el.tab = k(b);
         o(el);
         $.history.add(b)}
      $(window).history(function(e, a) {
         if(a == "")a = "tab1"; el = h(a); el.tab = k(a); o(el)}
      );
      $("input:submit").click(function() {
         $("form").attr("action", location.href)}
      )};
   var g = function(a) {
      var b = t.find("ul li a:eq(" + a + ")");
      if(!b.size()) {
         b = t.find("ul li a:eq(0)")}
      return b};
   var h = function(a) {
      var b = l(a);
      return g(b)};
   var j = function(a) {
      var f = $("div.bhvTab:eq(" + a + ")");
      if(!f.size()) {
         f = $("div.bhvTab:eq(0)")}
      return f};
   var k = function(a) {
      var b = l(a);
      return j(b)};
   var l = function(a) {
      var b = 0;
      var i = a.split("tab");
      if(i.length > 0) {
         b = i[1] - 1}
      return b};
   var m = function(a) {
      var r = "tab" + (a.index + 1);
      if(a.hash) {
         r = a.hash.substring(1)}
      return r};
   var n = function(a) {
      a.tab.hide()};
   var o = function(a) {
      n(u);
      q(u);
      a.tab.show();
      p(a);
      u = a};
   var p = function(a) {
      $(a).addClass("selected");
      $(a).parent().addClass("selected")};
   var q = function(a) {
      $(a).removeClass("selected");
      $(a).parent().removeClass("selected")};
   var s = function(a) {
      $(a.hash).attr("id", "")};
   var t = this;
   var u = t.find("ul li a:eq(0)");
   u.tab = j(0);
   p(u);
   if(this.size()) {
      $.getScript(javaScriptPluginsFolder + "History.js", function() {
         if($.browser.mozilla) {
            setTimeout(function() {
               t.find("ul li a").each(function(a) {
                  c(this, a)}
               ); d()}
            , 400)}
         else {
            t.find("ul li a").each(function(a) {
               c(this, a)}
            ); d()}
         }
      )}
   };
var TableSort = {
   start : function() {
      if($("table.bhvTableSort").size()) {
         $.getScript(javaScriptPluginsFolder + "TableSorter.js", function() {
            $.getScript(javaScriptPluginsFolder + "Metadata.js", function() {
               if($.browser.mozilla) {
                  setTimeout(function() {
                     $("table.bhvTableSort").each(function() {
                        $(this).tablesorter()}
                     )}
                  , 400)}
               else {
                  $("table.bhvTableSort").each(function() {
                     $(this).tablesorter()}
                  )}
               }
            )}
         )}
      }
   };
var NewsTicker = {
   start : function() {
      if($("ul.bhvNewsTicker").size()) {
         $.getScript(javaScriptPluginsFolder + "NewsTicker.js", function() {
            if($.browser.mozilla) {
               setTimeout(function() {
                  $("ul.bhvNewsTicker").each(function() {
                     $(this).newsTicker(4000)}
                  )}
               , 400)}
            else {
               $("ul.bhvNewsTicker").each(function() {
                  $(this).newsTicker(4000)}
               )}
            }
         )}
      }
   };
var PngFix = {
   start : function() {}
   };
var Loading = {
   start : function() {
      $("form").submit(function() {
         $(".bhvLoading").hide(); $(".loading").removeClass("hide")}
      )}
   };
$.fn.Popup = function() {
   var d = function(c) {
      var a = $(c).attr("rel").split(",");
      c.href = $(c).attr("href");
      c.settings = {
         height : 400, width : 400, toolbar : false, scrollbars : 0, resizable : 1};
      for(var i = 0; i < a.length; i++) {
         b = a[i].split(":");
         if(typeof c.settings[b[0]] != "undefined" && b.length == 2)c.settings[b[0]] = b[1]}
      c.top = (screen.height - c.settings.height) / 2;
      c.left = (screen.width - c.settings.width) / 2;
      c.parameters = "height=" + c.settings.height + ",width=" + c.settings.width + ",toolbar=" + c.settings.toolbar + ",scrollbars=" + c.settings.scrollbars + ",resizable=" + c.settings.resizable + ",top=" + c.top + ",left=" + c.left;
      $(c).bind("click", function() {
         e(c); return false}
      )};
   var e = function(a) {
      var b = "PopUpWindow";
      var c = window.open(a.href, b, a.parameters);
      c.resizeTo(a.settings.width, a.settings.height);
      c.moveTo(a.left, a.top);
      c.focus()};
   this.each(function() {
      d(this)}
   )};
$(document).ready(Site.start);
