//Ñ°±¦×¨ÓÃ
function goXunBao(timeCount)
{	
    //alert('find start!');
	if(!timeCount) timeCount = 0;
	timeCount++;
	if(timeCount>1000) return;

	try{
	    var a = mapAbb();
	    //lx=parseInt(a.px1);
	    //ly=parseInt(a.py1);
	    //rx=parseInt(a.px3);
	    //ry=parseInt(a.py3);
		//lx = GetCenterx()-377;
		//ly = GetCentery()-245;
		//rx = GetCenterx()+377;
		//ry = GetCentery()+245;
		//alert(lx+'_'+rx);
		//alert(ly+'_'+ry);
		randID = 'xunbao' + getRandomList(5);
		var objXunBao = document.createElement('script');
		objXunBao.id = randID;
		objXunBao.language = 'javascript';
		objXunBao.src = 'script.aspx?action=xunbao&objID=' + randID + '&lx=' + lx + '&ly=' + ly + '&rx=' + rx + '&ry=' + ry + '&node=' + NODE;
		document.body.appendChild(objXunBao);
		//location.href=objXunBao.src;
	   }
	catch(e)
	{
		funcStr = 'goXunBao(' + timeCount + ');';
		setTimeout(funcStr,500);
	}
}

function removeXunBaoScript(objid)
{
	if( getId(objid) )
		document.body.removeChild(getId(objid));
}

function createXunBao(baox, baoy, info, pic, timeCount)
{
    //alert('Find BB');
	if(!timeCount) timeCount = 0;
	timeCount++;
	if(timeCount>20) return;
	
	funcStr = 'createXunBao('+baox+','+baoy+',\''+info+'\',\''+pic+'\','+timeCount+')';
	
	checkID = 'check' + baox + '_' + baoy;
	//var checkObj='window._eds_map.'+checkID;
	var checkObj=getMapElementById(checkID);
	//var checkObj = eval('window._eds_map.'+checkID);
	//alert('1');
	if(checkObj)
	{
	    //alert('2');
		if(checkObj.width==28&&checkObj.height==30)
		{
			setTimeout(funcStr,500);
			return;
		}
	}
	else
	{
		//alert('3');
		putPop(baox-1000,baoy-1000, 0, 0, '<img src=check.aspx?'+getRandomList(3)+' id='+checkID+'>');
		setTimeout(funcStr,500);
		return;
	}
    
	objbao = getId('bao' + baox + '_' + baoy);
	if( objbao ) return ;
	
	try
	{
		if(getMapStatus())
		{
		    var leftl = (window.screen.width-430)/2;
			var top = (window.screen.height-400)/2;
			//url = 'http://hztest.edushi.com/xunbaocheck.aspx?baox='+ baox + '&baoy='+ baoy + '&info=' + info + '&node=' + NODE;
			url = 'xunbaocheck.aspx?baox='+ baox + '&baoy='+ baoy + '&info=' + info + '&node=' + NODE;
			astr = '<div style="cursor:hand" onclick="parent.winopen(\'' + url + '\',\'Ñ°±¦\',443,334,0,0,'+leftl+','+top+');">';
			astr += '<img src=http://' + Authority + '/cityresource/' + CITYCODE + '/xunbao/' + pic + ' border=0>';
			astr += '</div>';
			removePop('bao' + baox + '_' + baoy);
			removePop(checkID);
			
			putPopT(baox, baoy, 0, 0, astr, 'bao' + baox + '_' + baoy);
			//alert('PutOk!');
			
		}
		else
		{
			funcStr = 'createXunBao('+baox+','+baoy+',\''+info+'\',\''+pic+'\','+timeCount+');';
			setTimeout(funcStr,500);
		}
	}
	catch(e)
	{
	
		funcStr = 'createXunBao('+baox+','+baoy+',\''+info+'\',\''+pic+'\','+timeCount+');';
		setTimeout(funcStr,500);
	}
}
