﻿// JScript 文件
//收藏
function winFavorite()
{
    window.external.AddFavorite(location.href, document.title);
}

//打印
function winPrint()
{
    window.print();
}

//引用
function winCopyToClip(param)
{
    //var obj = document.getElementById(param).innerText;
    if (document.getElementById(param) != null)
    {
        window.clipboardData.setData("Text", document.getElementById(param).innerText);
        alert("已成功复制内容!");
    }
}

//关闭
function winClose()
{

    window.close();
}

//插入FLASH
//wmode:Window | Opaque | Transparent   (默认为wmode)
function FlashInsert(elmID, url, width, height, wmode)
{
    if (!document.getElementById(elmID)) return;
    var str = '';
    str += '<object width="'+ width +'" height="'+ height +'" 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="wmode">';
    str += '<param name="quality" value="autohigh">';
    str += '<embed width="'+ width +'" height="'+ height +'" src="'+ url +'" quality="autohigh" wmode="wmode" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
    str += '</object>';
    document.getElementById(elmID).innerHTML = str;
}
  function   showpasspord(smessage,target)   
      { Div_passpord.style.top=getTop(target);   
        Div_passpord.style.left=getLeft(target);   
        Div_passpord.style.display="";   
        Div_passpord.innerText=smessage;   
      }   
  function   hidepasspord()   
      {Div_passpord.style.display="none";} 
          function getTop(e){
    var offset=e.offsetTop+1.5;
    if(e.offsetParent!=null) offset+=getTop(e.offsetParent);
    return offset;
}
function getLeft(e){
    var offset=e.offsetLeft;
    if(e.offsetParent!=null) offset+=getLeft(e.offsetParent);
    return offset;
} 