function   getLeft(e){   
  var   ret=e.offsetLeft   
  while(e=e.offsetParent)ret+=e.offsetLeft   
  return   ret;   
}    
function   getTop(e){   
  var   ret=e.offsetTop   
  while(e=e.offsetParent)ret+=e.offsetTop   
  return   ret;   
}  
  
function $(id){
	return document.getElementById(id);
}

function flashObject(file_name,width,height){
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '">');
  document.write('<param name="movie" value="' + file_name + '">');
  document.write('<param name="quality" value="high">');
  document.write('<param name="wmode" value="transparent">');
  document.write('<embed src="' + file_name + '" width="' + width + '" height="' + height + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>');
  document.write('</object>');
}

function GetflashObject(flash_url,FlashVars,scene_width,scene_height){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+scene_width+'" height="'+scene_height+'" id="show" align="left">')
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="'+flash_url+'" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="scale" value="noscale" />');
document.write('<param name="wmode" value="transparent" />');
document.write('<param name="FlashVars" value="'+FlashVars+'" />');
document.write('<param name="bgcolor" value="#ffffff" />');
document.write('<embed src="'+flash_url+'" quality="high" FlashVars="'+FlashVars+'" name="flv_play" align="left" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');

}


function suij(){return Math.round(9000*Math.random()+1000);}
 function removeAllSpace(str){   
        var localString ="";   
        for(var index = 0; index<str.length; index++) {  
            if(str.charCodeAt(index)!= 32){   
                localString += str.charAt(index).replace(/[\r\n]/g,"");
            };   
         }
       return localString;   
    }   
/////////////////////////////////
function tzvis_Ajax(sUrl,sQueryString,oResultFunc){
    var xh;
    xh = new ActiveXObject("Microsoft.XMLHTTP")
    xh.onreadystatechange = function(){
	     if(xh.readyState==4)  
          {  
		       
               if(xh.status==200){
				  oResultFunc(xh.responseText);
				  xh=null;
				  CollectGarbage();
			   }else{
				 // alert("Ajax´íÎó");
				 tzvis_Ajax(sUrl,sQueryString,oResultFunc)
			   }
		   }
	}; 
    xh.open("POST",sUrl + "?timeStamp=" + new Date().getTime() + "&"+sQueryString,true);
    xh.send();

}



 ///////////////////////////////////////////////
