﻿// JScript 文件
//导航栏样式加载
function menu_load()
{
    var str_url=window.location.href;  //获取url
    var str_class1=/class=hm/;           //获取参数
    str_class1.exec(str_url);
    var str_class=RegExp.rightContext;
    str_class=str_class.substring(0,1);
    if(parseInt(str_class)>= 1 && parseInt(str_class)<=8)
    {
        var int_class;
        int_class=String(parseInt(str_class));
        document.getElementById("td_menu"+int_class).style.backgroundImage="url(/images/style/menu_over.gif)";
    }
    else
    {
        document.getElementById("td_menu1").style.backgroundImage="url(/images/style/menu_over.gif)";
    }
}

//导航栏链接生成
function menu_link(str_menu_id)
{
    var str_menu_index;
    str_menu_index=str_menu_id.substring(7,8);
    if(str_menu_index == "1")
    {
        location.href = "/";
    }
    else
    {
        location.href = "/?class=hl_mn" + str_menu_index;
    }
}

//
function change_display(str_list_id)
{
    if(document.getElementById(str_list_id).style.display == "")
    {
        document.getElementById(str_list_id).style.display = "none";
    }
    else
    {
        document.getElementById(str_list_id).style.display = "";
    }
}

//产品显示页面鼠标经过小图片时改变样式且改变大图src
function image_change(str_di_id)
{
  try
  {
  document.getElementById("div_pd_1").className="div_pd_img1";
  }
  catch(err){}
  try
  {
document.getElementById("div_pd_2").className="div_pd_img1";
  }
  catch(err){}
  try
  {
document.getElementById("div_pd_3").className="div_pd_img1";
  }
  catch(err){}
document.getElementById(str_di_id).className="div_pd_img2";
var str_im_id;
str_im_id=str_di_id.replace("div","img");
document.getElementById("img_pd_b").src = document.getElementById(str_im_id).src;
}

function show_big_pdimg()
{
document.getElementById("div_pd_bb").style.display="";
document.getElementById("img_pd_bb").src = document.getElementById("img_pd_b").src;
}
