﻿//FLASH
function insertFlash(elm, url, w, h) {
if (!document.getElementById(elm)) return;
var str = '';
str += '<object width="'+ w +'" height="'+ h +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">';
str += '<param name="movie" value="'+ url +'">';
str += '<param name="wmode" value="opaque">';
str += '<param name="quality" value="autohigh">';
str += '<embed width="'+ w +'" height="'+ h +'" src="'+ url +'" quality="autohigh" wmode="opaque" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
str += '</object>';
document.getElementById(elm).innerHTML = str;
}

//改变主导航条链接样式
function changepic(id)
{
    for(var i=1;i<9;i++)
    {
        document.getElementById('a'+i).className = "l" ;
    }
    document.getElementById('a'+id).className = "h" ;
}

//改变类别导航条链接样式
function changeprotype(id,num)
{
    for(var i=1;i<=num;i++)
    {
        document.getElementById('t'+i).className = "pt" ;
    }
    document.getElementById('t'+id).className = "ptn" ;
}

//上下滚动
function scroll(n)
{
 temp=n;
 var News = document.getElementById("contentBox");
News.scrollTop=News.scrollTop+temp;
if (temp==0) return;
setTimeout("scroll(temp)",30);
}

/*产品展示 选项卡的切换*/
function changesp(id,obj)
{
for(var i=1;i<5;i++)
{
document.getElementById('mys'+i).style.backgroundImage="url(images/pro/be_line001.gif)";
document.getElementById('mys'+i).style.color="white";
document.getElementById('top'+i).style.display="none";
}
obj.style.backgroundImage="url(images/pro/be_line002.gif)";
obj.style.color="black";
document.getElementById('top'+id).style.display="";
}

/*友情链接--显示--隐藏*/
function showfriend(id)
{
    if(id==0)
    {
        document.getElementById('friendlist').style.display="";
    }
    else
    {
        setTimeout(function(){showfriend2()},3000)
        //document.getElementById('friendlist').style.display="none";
    }
}

function showfriend2()
{
    document.getElementById('friendlist').style.display="none";
}

function showfriend3()
{
    if(document.getElementById('friendlist').style.display=="none")
    {
    document.getElementById('friendlist').style.display="";
    }
    else
    {
        document.getElementById('friendlist').style.display="none";
    }
}


//无提示关闭窗口
function CloseWindow()
{
    window.opener=null; 
    window.open('','_self'); 
    window.close();
}