﻿var bgObj;
var msgObj;
var background="#fff";//背景颜色
var finishOpacity="75";//透明度
function HandleClew(str){ //普通、失败时操作提示    
   var sWidth,sHeight; 
   sWidth=document.body.offsetWidth; 
   sHeight=document.body.clientHeight; 
   bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv'); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background=background; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity="+finishOpacity+")"; 
   bgObj.style.opacity="0.6"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "10000";
   bgObj.onclick=function(){ 
                document.body.removeChild(bgObj); 
                document.body.removeChild(msgObj);
                SelectDisplayShow();//显示列表框
                } 
   document.body.appendChild(bgObj);
            

   var tipsHtml="<a href=\"javascript:DivClose();\" title=\"关闭\" class=\"tips_close\"></a>";
   tipsHtml+="<p><img src=\"/style/2008/img/tips_icon.gif\"/>&nbsp;"+str+"</p>";
  
   msgObj=document.createElement("div") 
   msgObj.setAttribute("id","msgDiv"); 
   msgObj.style.position = "absolute"; 
   msgObj.style.left = "55%"; 
   msgObj.style.top = "50%";
   msgObj.style.marginLeft = "-225px" ; 
   msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; 
   msgObj.style.zIndex = "10001"; 
   msgObj.className="float_tips"; 
   msgObj.innerHTML=tipsHtml;
   document.body.appendChild(msgObj);
   SelectDisplay();//隐藏select对象
} 

function GoodOperatingClew(str){ //成功操作提示    
   var sWidth,sHeight; 
   sWidth=document.body.offsetWidth; 
   sHeight=document.body.clientHeight; 
   bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv'); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background=background; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity="+finishOpacity+")"; 
   bgObj.style.opacity="0.6"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "10000";
   bgObj.onclick=function(){ 
                document.body.removeChild(bgObj); 
                document.body.removeChild(msgObj);
                SelectDisplayShow();//显示列表框
                } 
   document.body.appendChild(bgObj);
            

   var tipsHtml="<a href=\"javascript:DivClose();\" title=\"关闭\" class=\"tips_close\"></a>";
   tipsHtml+="<p><img src=\"/style/2008/img/tips_succeed.gif\"/>&nbsp;"+str+"</p>";
  
   msgObj=document.createElement("div") 
   msgObj.setAttribute("id","msgDiv"); 
   msgObj.style.position = "absolute"; 
   msgObj.style.left = "55%"; 
   msgObj.style.top = "50%";
   msgObj.style.marginLeft = "-225px" ; 
   msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; 
   msgObj.style.zIndex = "10001"; 
   msgObj.className="float_tips"; 
   msgObj.innerHTML=tipsHtml;
   document.body.appendChild(msgObj);
   SelectDisplay();//隐藏select对象   
} 


//弹出背景颜色
function ShowBJ(obj){ 
   var msgw,msgh,bordercolor; 
   titleheight=25 //提示窗口标题高度 
   bordercolor="#336699";//提示窗口的边框颜色 
   titlecolor="#99CCFF";//提示窗口的标题颜色 
    
   var sWidth,sHeight; 
   sWidth=document.body.offsetWidth; 
   sHeight=document.body.clientHeight; 
   bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv'); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background=background; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity="+finishOpacity+")"; 
   bgObj.style.opacity="0.6"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "0";
   document.body.appendChild(bgObj);     
   msgObj=document.createElement("div") 
   msgObj.setAttribute("id","msgDiv"); 
   msgObj.setAttribute("align","center"); 
   msgObj.style.background="white"; 
   msgObj.style.border="1px solid " + bordercolor; 
      msgObj.style.position = "absolute"; 
            msgObj.style.left = "50%"; 
            msgObj.style.top = "50%"; 
            msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
            msgObj.style.marginLeft = "-225px" ; 
            msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";
            msgObj.style.textAlign = "center"; 
            msgObj.style.lineHeight ="25px"; 
            msgObj.style.zIndex = "0";    
     
     document.body.appendChild(msgObj);   
     var txt=document.createElement("span"); 
     txt.style.margin="0";
     txt.style.padding="0px";
     txt.style.height="0px"; 
     txt.setAttribute("id","msgTxt"); 
     txt.innerHTML=obj.outerHTML;        
     document.getElementById("msgDiv").appendChild(txt);   
     SelectDisplay();//隐藏select对象       
} 

//弹出背景颜色
function ShowBJ(){ 
   var sWidth,sHeight; 
   sWidth=document.body.offsetWidth; 
   sHeight=document.body.clientHeight; 
   bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv'); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background=background; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity="+finishOpacity+")"; 
   bgObj.style.opacity="0.6"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "0";
   document.body.appendChild(bgObj);            
   SelectDisplay();//隐藏select对象
} 

function SelectDisplay()
{
    for (var i=0;i<AecTime.getTagsObjet("select").length;i++)
    {
       var obj=AecTime.getTagsObjet("select")[i];
       if (obj.className!="NoDisplay")//防止不必要的select标签隐藏
       {
           obj.style.display="none";
       }
    }
    
    if (navigator.appName.indexOf("Microsoft") != -1)
    {
        for (var i=0;i<AecTime.getTagsObjet("object").length;i++)
        {
           var obj=AecTime.getTagsObjet("object")[i];
           if (obj.className!="NoDisplay")//防止不必要的select标签隐藏
           {
               obj.style.display="none";
           }
        }    
    }
    else
    {
        for (var i=0;i<AecTime.getTagsObjet("embed").length;i++)
        {
           var obj=AecTime.getTagsObjet("embed")[i];
           if (obj.className!="NoDisplay")//防止不必要的select标签隐藏
           {
               obj.style.display="none";
           }
        }  
    }
    //万年历关闭显示
    if (document.getElementById("Calendar")!=null)
    {
        document.getElementById("Calendar").style.display="none";
    }    
}

function SelectDisplayShow()
{
    for (var i=0;i<AecTime.getTagsObjet("select").length;i++)
    {
       var obj=AecTime.getTagsObjet("select")[i];
       obj.style.display="inline";
    }    

    if (navigator.appName.indexOf("Microsoft") != -1)
    {
        for (var i=0;i<AecTime.getTagsObjet("object").length;i++)
        {
           var obj=AecTime.getTagsObjet("object")[i];
           obj.style.display="inline";
        }    
    }
    else
    {
        for (var i=0;i<AecTime.getTagsObjet("embed").length;i++)
        {
           var obj=AecTime.getTagsObjet("embed")[i];
           obj.style.display="inline";
        }  
    }

    //万年历显示
    if (document.getElementById("Calendar")!=null)
    {
        document.getElementById("Calendar").style.display="inline";
    }   
}

function DivBJClose()
{ 
     document.body.removeChild(bgObj);
     SelectDisplayShow();//显示列表框
 }

function DivClose()
{ 
     if(bgObj!=null)
     { 
        document.body.removeChild(bgObj);  
     }
     if(msgObj!=null)
     { 
        document.body.removeChild(msgObj); 
     }
     SelectDisplayShow();//显示列表框      
 } 
 

 

 
 

