function ShowPic_Style(ShowPicID,ShowPicSrc,HidPicStrID,HidPicStrSrc,ShowStyle,HidStyleStr,HrefID,HrefAddr)
{
 var str_PicID=HidPicStrID.split(",");
 var str_PicSrc=HidPicStrSrc.split(",");
 var str_Style=HidStyleStr.split(",");
 var tmp_1;
 
 ShowPicID.src=ShowPicSrc;
 ShowStyle.style.display='block';
 
 //分别取得ID地址和Src地址，并进行赋值
 for(a=0;a<str_PicID.length;a++)
 {
  for(b=0;b<str_PicSrc.length;b++)
  {
   //alert(str_PicID[a]);
   tmp_1=str_PicID[a]+".src='"+str_PicSrc[b]+"'";
   eval(tmp_1);
   a=a+1;
  }
 }
 //隐藏相关数据
 for(c=0;c<str_Style.length;c++)
 {
	 tmp=str_Style[c]+".style.display='none';"
	 //alert(tmp);
	 eval(tmp);
 }
 
 //改变超链接
 HrefID.href=HrefAddr;
}
function ShowID(ID)
{
 if(ID.style.display=='none')
 {
  //alert('run here1');
  ID.style.display='block'; 
 }
 else
 {
  //alert('run here2');
  ID.style.display='none';
 }
}

//自动等比例变换缩放图片
function  DrawImage(ImgD,ImgW,ImgH){  
//调用示例：onload="javascript:DrawImage(this,160,120);"
var  flag=false;  
  var  image=new  Image();  
  image.src=ImgD.src;  
     if(image.width>0  &&  image.height>0){  
       flag=true;  
       if(image.width/image.height>=  ImgW/ImgH){  
         if(image.width>ImgW){      
         ImgD.width=ImgW;  
         ImgD.height=(image.height*ImgW)/image.width;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>ImgH){      
         ImgD.height=ImgH;  
         ImgD.width=(image.width*ImgH)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       }  
}

//点击切换效果,序号从1开始编号 onClick="changeDis(3,'line1','line');"
function changeDis(sum,showID,IDName)
{
 var str,i,getID;
 for(i=1;i<sum+1;i++){
 getID=document.getElementById(IDName+i);
 getID.style.display='none';
 
 }
 var mainID=document.getElementById(showID);
 mainID.style.display='block';
}

//点击切换CSS,序号从1开始编号 onClick="ChangeCss(3,'line1','line','css01','css02','css03');"
function ChangeCss(sum,showID,IDName,Css_main,Css_else,Css_First)
{
 var str,i;
 for(i=1;i<sum+1;i++){
 getID=document.getElementById(IDName+i);
 getID.className=Css_else;
 }
 var mainID=document.getElementById(showID);
 mainID.className=Css_main;
 if(showID==IDName+"1")
 {
 mainID.className=Css_First;
 }
}

/*视频播放函数 依存函数：  */
function flashPlay(DivID,src,auto,width,height)
{	
var s5 = new SWFObject("FlvPlayerV2009.swf","mediaplayer",width,height,"6");
s5.addParam("allowfullscreen","true");
s5.addVariable("width",width);
s5.addVariable("height",height);
s5.addParam("allowfullscreen","true");
s5.addParam("transparent","true");
s5.addParam("wmode","transparent");

s5.addVariable("image","");
s5.addVariable("file",src);
s5.addVariable("backcolor","0x000000");
s5.addVariable("frontcolor","0xE2F0FE");
if(auto=="Y")
{
s5.addVariable("autostart","true");
}
s5.write(DivID);
//document.write(s5);
}	
   
function mediaPlayer(DivID,src,auto,width,height)
{
if(auto=="Y")
{
var str="<EMBED height="+height+" type=application/x-shockwave-flash width="+width+" src="+src+" console='Clip1' controls='IMAGEWINDOW,ControlPanel,StatusBar' autostart='true'></EMBED>";
}
else
{
var str="<EMBED height="+height+" type=application/x-shockwave-flash width="+width+" src="+src+" console='Clip1' controls='IMAGEWINDOW,ControlPanel,StatusBar' autostart='false'></EMBED>";
}
document.getElementById(DivID).innerHTML=str;
}

function mediaPlayer_realone(DivID,src,auto,width,height)
{
if(auto=="Y")
{
var str="<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height="+height+" id=video1 width="+width+" VIEWASTEXT><param name=_ExtentX value=5503><param name=_ExtentY value=1588><param name=AUTOSTART value=-1><param name=SHUFFLE value=0><param name=PREFETCH value=0><param name=NOLABELS value=0><param name=SRC value="+src+"><param name=CONTROLS value=Imagewindow,StatusBar,ControlPanel><param name=CONSOLE value=RAPLAYER><param name=LOOP value=0><param name=NUMLOOP value=0><param name=CENTER value=0><param name=MAINTAINASPECT value=><param name=BACKGROUNDCOLOR value=#000000></OBJECT>";
}
else
{
var str="<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height="+height+" id=video1 width="+width+" VIEWASTEXT><param name=_ExtentX value=5503><param name=_ExtentY value=1588><param name=AUTOSTART value=0><param name=SHUFFLE value=0><param name=PREFETCH value=0><param name=NOLABELS value=0><param name=SRC value="+src+"><param name=CONTROLS value=Imagewindow,StatusBar,ControlPanel><param name=CONSOLE value=RAPLAYER><param name=LOOP value=0><param name=NUMLOOP value=0><param name=CENTER value=0><param name=MAINTAINASPECT value=><param name=BACKGROUNDCOLOR value=#000000></OBJECT>";
}
document.getElementById(DivID).innerHTML=str;
}

function playVideo(DivID,src,auto,width,height)
{
if(src.match(".flv"))
{flashPlay(DivID,src,auto,width,height);}
else if(src.match(".rm")||src.match(".rmvb"))
{mediaPlayer_realone(DivID,src,auto,width,height);}
else if(src.match(".wmv")||src.match(".wma")||src.match(".avi")||src.match(".mp3")||src.match(".swf"))
{mediaPlayer(DivID,src,auto,width,height);}
else
{document.getElementById(DivID).innerHTML="播放失败，不支持的文件格式";}
}
/*视频播放函数*/

//隐藏一个层,显示一个层,可以实现在同一页面的翻页效果
function changePage(HidPage,ShowPage)
{
 //alert(nextPage)
 eval(HidPage+".style.display='none';");
 eval(ShowPage+".style.display='';");
}

//IE6.0中png图片透明函数 使用方法：<img src="xyz.png" width="10" height="20" onload="fixPNG(this)">
function fixPNG(myImage_1) 
{
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	var myImage = new Image();
	myImage.src="images/but08.png"
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
    var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
    var imgTitle = (myImage.title) ? 
               "title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
    var imgStyle = "display:inline-block;" + myImage.style.cssText
    //alert('width:'+myImage.width);
	var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
    myImage.outerHTML = strNewHTML   
    }
}

//跳转菜单 JumpMenu(this,'_blank')
function JumpMenu(SelID,target)
{
 if(SelID.options[SelID.selectedIndex].value!="")
 {
	 if(target=="_blank")
	 {
	  window.open(SelID.options[SelID.selectedIndex].value);
	 }
	 else
	 {
	  window.location=SelID.options[SelID.selectedIndex].value;
	 }
 }
}
