//显示部分内容(注：e为元素id,conLen为显示的长度)
 function hideText(e, conLen) {

    textBox = document.getElementById(e);

    if (navigator.appName.indexOf("Explorer") > -1) {
        if (textBox.innerText.length < conLen) {
            return;
        }
        textBox.innerHTML = textBox.innerText.substr(0, conLen);
    } else {
        if (textBox.textContent.length < conLen) {
            return;
        }
        textBox.innerHTML = textBox.textContent.substr(0, conLen);
    }
    textBox.innerHTML += "···";
}

//打印预览
function printerView()
{
      if (location.href.search(/\?/) != -1)
        window.open(location.href + '&printOnly=1','','toolbar=yes,location=no,directories=no,menubar=no,scrollbars=yes,width=640,height=480,resize=yes');
      else
        window.open(location.href + '?printOnly=1','','toolbar=yes,location=no,directories=no,menubar=no,scrollbars=yes,width=640,height=480,resize=yes');
}

function mailpage(){
      mail_str = "mailto:?subject=&nbsp;: " + document.title;
      mail_str += "&body=&nbsp;" + document.title;
      mail_str += "&nbsp;" + location.href;
      location.href = mail_str;
 }

/*显示演示视频*/
function showDemo(ctx,id,vWidth,vHeight)
{   //alert("DDDD");
    if(!vHeight) vHeight = 600;
    if(!vWidth) vWidth = 800;
    var vTop = Math.ceil((screen.availHeight - vHeight)/2) - 25;
    var vLeft = Math.ceil((screen.availWidth - vWidth)/2);
    if(screen.width <= 800) {
      if(screen.width < 700) {
        alert("要求显示器分辨路为800x600以上.");
      }
      vTop = 0;
      vLeft = 0;
      vWidth = screen.availWidth - 10;
      vHeight = screen.availHeight-46;
    }
  window.open(ctx+"/JLSoft/demo/"+id+".swf","demoWin","width="+vWidth+",height="+vHeight+",resizable=0,top="+vTop+",left="+vLeft);
}
