// JavaScript Document
var mapc;
var entireMap,bone;

function onClassLibLoaded()
{
	try
	{	
		mapc = new MapClient(_el("mapareas"));
		mapc.setServerScriptType("jsp");
		mapc.setEngineURL( engineurl );
		mapc.setSpInfo( SPInfo );
		mapc.setAppId( APPID );
		mapc.setUserInfo( UserInfo );		
		mapc.setMapImageRoot( MapDataRoot );
		mapc.setIsLoadVmp(false);
		mapc.setIsLoadAd(false);
		mapc.setMapImageType( MapImageType );
		mapc.setStyleLibraryRoot( StyleLibraryRoot );
		mapc.createMapArea(0,0,'','','','',_el('maparea'));
		entireMap = new EntireMapOperation(mapc);
		//bone = new PanBone(mapc,'',25);
		Event.addListener(mapc,"sdschange",function(a)
		{
			if (_submitParam)
			{  
				eval(_submitParam);
			}
			mapc.map._km="km";
			mapc.map._m="m";
			window.setTimeout(function()
			{
				initMapService();

				ft = mapc.map.addPoint(12957255,4836482,'Beijing International Convention Center','bjoly','S01',{"on":"true","style":"Label01"},{"src":"olyorg.htm","width":"240","height":"140"},true);
				ft.element.icon.style.zIndex='5000';
				ft.element.label.style.zIndex='1999';

				//bone.adjustsliding((9-mapc.getLevelIndex()))
		   });
		   
		 });  
		entireMap.submit();
	}
	catch(e)
	{   alert("1:" +e.description)
		window.status=(e.description);
	}
}
function initMapService()//3
{   var obj=_el("classloder1");
	obj.onModulesLoaded=function()
	{  
		_el("classloder3").src="ap301.js"
	}
	obj.loadModules(_el("classloader2") );	
}
function _el(i) 
{
	return document.getElementById(i);
}