﻿var pltsPop=null;
var pltsoffsetX = 10;
var pltsoffsetY = 15;
var pltsPopbg="#ffff00";
var pltsPopfg="#111111";
var pltsTitle="";
document.write('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>');
function pltsinits()
{
    document.onmouseover   = plts;
    document.onmousemove = moveToMouseLoc;
}
function plts()
{  var o=event.srcElement;
    if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
    if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
    pltsPop=o.dypop;
    if(pltsPop!=null&&pltsPop!=""&&typeof(pltsPop)!="undefined")
    {
pltsTipLayer.style.left=-1000;
pltsTipLayer.style.display='';
var Msg=pltsPop.replace(/\0x13/g,"<br />");

var re=/\{(.[^\{]*)\}/ig;
if(!re.test(Msg))pltsTitle="中国南京软件";
else{
   re=/\{(.[^\{]*)\}(.*)/ig;
     pltsTitle=Msg.replace(re,"$1")+"&nbsp;";
   re=/\{(.[^\{]*)\}/ig;
   Msg=Msg.replace(re,"");
   Msg=Msg.replace("<br>","");}
  
        var content =
       '<table style="FILTER:alpha(opacity=90) shadow(color=#4A90CB,direction=150);" id=toolTipTalbe border=0><tr><td width="100%"><table class=selet_bg cellspacing="0" cellpadding="0" style="width:100%" style="font size:11px;">'+
       '<tr id=pltsPoptop><th height=9 valign=middle class=header><p id=topleft valign=middle align=left> ↖'+pltsTitle+'</p><p id=topright align=right style="display:none">'+pltsTitle+' ↗</font></th></tr>'+
       '<tr><td style="color=#000000" style="padding-left:10px;padding-right:10px;padding-top: 4px;padding-bottom:4px;line-height:135%;word-break:break-all;width:270">'+Msg+'</td></tr>'+
       '<tr id=pltsPopbot style="display:none"><th height=12 valign=bottom class=header><p id=botleft align=left> ↙'+pltsTitle+'</p><p id=botright align=right style="display:none">'+pltsTitle+' ↘</font></th></tr>'+
       '</table></td></tr></table>';
        pltsTipLayer.innerHTML=content;
        toolTipTalbe.style.width=Math.min(pltsTipLayer.clientWidth,document.body.clientWidth/2.2);
        moveToMouseLoc();
        return true;
       }
    else
    {
     pltsTipLayer.innerHTML='';
       pltsTipLayer.style.display='none';
        return true;
    }
}

function moveToMouseLoc()
{
if(pltsTipLayer.innerHTML=='')return true;
var MouseX=event.x;
var MouseY=event.y;
//window.status=event.y;
var popHeight=pltsTipLayer.clientHeight;
var popWidth=pltsTipLayer.clientWidth;
if(MouseY+pltsoffsetY+popHeight>document.body.clientHeight)
{
    popTopAdjust=-popHeight-pltsoffsetY*1.5;
    pltsPoptop.style.display="none";
    pltsPopbot.style.display="";
}
  else
{
     popTopAdjust=0;
    pltsPoptop.style.display="";
    pltsPopbot.style.display="none";
}
if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth)
{
  popLeftAdjust=-popWidth-pltsoffsetX*2;
  topleft.style.display="";
  botleft.style.display="";
  topright.style.display="none";
  botright.style.display="none";
}
else
{
  popLeftAdjust=0;
  topleft.style.display="";
  botleft.style.display="";
  topright.style.display="none";
  botright.style.display="none";
}
pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust;
pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust;
   return true;
}
pltsinits();


function doPrint(){
var str="<html>";
var article;
var css;
var strAdBegin="<!--NEWSZW_HZH_BEGIN-->";
var strAdEnd="<!--NEWSZW_HZH_END-->";
var strFontSize='【<A href="javascript:doZoom(16)">大</A> <A href="javascript:doZoom(14)">中</A> <A href="javascript:doZoom(12)">小</A>】'
var strdoPrint="doPrint()";
var strTmp;

css="<style>"
+"body{font-family:宋体}"
+"td,.f12{font-size:12px}"
+".f24 {font-size:24px;}"
+".f14 {font-size:14px;}"
+".title14 {font-size:14px;line-height:130%}"
+".l17 {line-height:170%;}"
+"</style>";

str +=	css;
str +=	'<meta http-equiv="content-type" content="text/html; charset=gb2312">';
str +=	'<title>'+document.title+'</title>';
str +=	"<body bgcolor=#ffffff topmargin=5 leftmargin=5 marginheight=5 marginwidth=5 onLoad='window.print()'>";
str +=	"<center><table width=800 border=0 cellspacing=0 cellpadding=0><tr><td height=34 width=150></td><td valign=bottom></td><td align=right valign=bottom><a href='javascript:history.back()'>返回</a>　<a href='javascript:window.print()'>打印</a></td></tr></table>";
str +=	"<table width=800 border=0 cellpadding=0 cellspacing=20 bgcolor=#EDF0F5><tr><td>";

article=document.getElementById('article').innerHTML;
if(article.indexOf(strAdBegin)!=-1){
str +=article.substr(0,article.indexOf(strAdBegin));
strTmp=article.substr(article.indexOf(strAdEnd)+strAdEnd.length, article.length);
}else{
strTmp=article
}
str +=strTmp
//str +=  window.location.href
str +=	"</td></tr></table></center>";
str +=	"</body></html>";
document.write(str);
document.close();

}
