﻿function DlibAlert(sMsg,strUrl)
    {
            var str = "<div id=\"DlibAlert\"  style=\"padding:2px;background:#ffffff none repeat scroll 0;position:absolute;z-index:100000;color:#0072c3;display:none;\">" + 
            "<table id=\"__01\" width=\"279\" height=\"153\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border:1px solid #CAD4F7;\">" +
	        "<tr>" +
		    "<td width=\"3\" height=\"151\" align=\"left\" valign=\"top\"><img src=\"../images/ts_01.gif\" width=\"3\" height=\"53\"></td>" +
		    "<td valign=\"top\" class=\"hj\"><table width=\"100%\" height=\"152\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" +
            "<tr>" + 
            "<td height=\"23\" align=\"right\" style=\"padding-right:4px;\"><img src=\"../images/close.gif\" width=\"9\" height=\"9\" onclick=\"DlibAlertonok('"+strUrl.toString()+"');\"></td>" +
            "</tr>" +
            "<tr>" +
            "<td height=\"81\" align=\"center\"><img src=\"../images/0.gif\" width=\"46\" height=\"44\" align=\"absmiddle\" style=\"margin-right:10px;\">" + sMsg + "</td>" +
            "</tr>" +
            "<tr>" +
            "<td align=\"center\" valign=\"top\"><div class='tipOk' onclick=\"DlibAlertonok('"+strUrl.toString()+"');\"><img src='../images/button_qd.gif' /></div></td>" +
            "</tr>" + 
            "</table></td>" +
		    "<td width=\"3\" align=\"right\" valign=\"top\"><img src=\"../images/ts_04.gif\" width=\"3\" height=\"53\"></td>" +
	        "</tr>" +
            "</table>" + 
            "</div>";
            document.write(str);
            document.all.DlibAlert.style.left = (window.screen.width-360)/2;
            document.all.DlibAlert.style.top = (window.screen.height-240)/2;
            document.all.DlibAlert.style.display = "";            
    }
    
    function DlibAlertonok(strUrl)
    {
        if(document.all.DlibAlert)
        {
            document.all.DlibAlert.style.display = "none";          
            if(strUrl.toString().length>0)
            {
                top.location.href = strUrl.toString();
            }                    
            
        }        
    }
    
    function DlibAlertNeedPicUrl(sMsg,strUrl,strPicUrl)
    {
            var str = "<div id=\"DlibAlert\"  style=\"padding:2px;background:#ffffff none repeat scroll 0;position:absolute;z-index:100000;color:#0072c3;display:none;\">" + 
            "<table id=\"__01\" width=\"279\" height=\"153\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border:1px solid #CAD4F7;\">" +
	        "<tr>" +
		    "<td width=\"3\" height=\"151\" align=\"left\" valign=\"top\"><img src=\""+ strPicUrl +"images/ts_01.gif\" width=\"3\" height=\"53\"></td>" +
		    "<td valign=\"top\" class=\"hj\"><table width=\"100%\" height=\"152\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" +
            "<tr>" + 
            "<td height=\"23\" align=\"right\" style=\"padding-right:4px;\"><img src=\""+ strPicUrl +"images/close.gif\" width=\"9\" height=\"9\" onclick=\"DlibAlertonok('"+strUrl.toString()+"');\"></td>" +
            "</tr>" +
            "<tr>" +
            "<td height=\"81\" align=\"center\"><img src=\""+ strPicUrl +"images/0.gif\" width=\"46\" height=\"44\" align=\"absmiddle\" style=\"margin-right:10px;\">" + sMsg + "</td>" +
            "</tr>" +
            "<tr>" +
            "<td align=\"center\" valign=\"top\"><div class='tipOk' onclick=\"DlibAlertonok('"+strUrl.toString()+"');\"><img src='"+ strPicUrl +"images/button_qd.gif' /></div></td>" +
            "</tr>" + 
            "</table></td>" +
		    "<td width=\"3\" align=\"right\" valign=\"top\"><img src=\""+ strPicUrl +"images/ts_04.gif\" width=\"3\" height=\"53\"></td>" +
	        "</tr>" +
            "</table>" + 
            "</div>";
            document.write(str);
            document.all.DlibAlert.style.left = (window.screen.width-360)/2;
            document.all.DlibAlert.style.top = (window.screen.height-240)/2;
            document.all.DlibAlert.style.display = "";            
    }