function closeWindow() 
{ 
 if(document.getElementById('back')!=null) 
 { 
 document.getElementById('back').parentNode.removeChild(document.getElementById('back')); 
 } 
 if(document.getElementById('mesWindow')!=null) 
 { 
 document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow')); 
 } 

} 

function mouserw(ev)
 {

 return { 
 x:document.documentElement.scrollLeft+360,y:document.documentElement.scrollTop +300
 }; 
 }
function mouserw2(ev)
 {
 return { 
  x: window.scrollX+360,y:window.scrollY+300
 }; 
 }


function getNavi()
{
   if(navigator.userAgent.indexOf("MSIE")>0) {
        return "MSIE";
   }
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
        return "Firefox";
   }
   if(isSafari=navigator.userAgent.indexOf("Safari")>0) {
        return "Safari";
   } 
   if(isCamino=navigator.userAgent.indexOf("Camino")>0){
        return "Camino";
   }
   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){
        return "Gecko";
   }  
   if(isMozilla=navigator.userAgent.indexOf("Chrome/")>0){
        return "Chrome";
   }  
}

function mousePosition(ev) 
 { 
 if(getNavi()=="MSIE")
 {
 return mouserw(ev);
 }
 else
 {
  return mouserw2(ev);
 }
 } 
 

function showdiv(ev)
    {
         var objPos = mousePosition(ev); 
         showMessageBox(objPos);
        // carlist(car);
         //CarCanshu(canshu);
         //CarCsz();
    }
//ֲ
var isIe=(document.all)?true:false; 

function showMessageBox(objPos) 
{ 
 var bWidth=parseInt(document.documentElement.scrollWidth); 
 var bHeight=parseInt(document.documentElement.scrollHeight); 
 var back=document.createElement("div"); 
 back.id="back"; 
 var styleStr="clear:both;top:0px;left:0px;position:absolute;background:#ccc;width:"+bWidth+"px;height:"+bHeight+"px;"; 
 styleStr+=(isIe)?"filter:alpha(opacity=0);":"opacity:0;"; 
 back.style.cssText=styleStr; 
 document.body.appendChild(back); 
 showBackground(back,50); 
 var mesW=document.createElement("div"); 
 mesW.id="mesWindow"; 
 mesW.className="mesWindow"; 
mesW.innerHTML="<div id='divjiucuo' style='background-color:#666666;padding:5px;width:395px'><div style='height:240px;width:390px;background-color:#ffffff;border:2px solid #000000; '><table width='100%'  border='0' cellspacing='0' ><tr style='background-color:#355582;' height='20px'><td width='80%' ><font color='#ffffff'>任务提醒框</font></td><td width='20%' align='right'><span style='color:#ffffff;cursor:pointer' onclick='closeWindow()'>×</span></td></tr><tr><td height='40px' align='center' colspan='2'>"+gtable+"</td></tr></table></div></div>"; 
 styleStr="Z-INDEX:1000; LEFT:"+objPos.x+"px; POSITION:absolute; TOP: "+objPos.y+"px;width:350px;height:200px"; 
 mesW.style.cssText=styleStr; 
 document.body.appendChild(mesW); 
} 


function showBackground(obj,endInt) 
{ 
 if(isIe) 
 { 
 obj.filters.alpha.opacity+=1; 
 if(obj.filters.alpha.opacity<endInt) 
 { 
showBackground(obj,endInt);
 } 
 }
 else
 { 
 var al=parseFloat(obj.style.opacity);al+=0.01; 
 obj.style.opacity=al; 
 if(al<(endInt/100)) 
 {
showBackground(obj,endInt);}
 } 
} 
