//Khoi tao khi trang duoc load xong
//this.onload=PageLoad;
function PageLoad()
{
	face.maxViewPortInfo["width"]=window.screen.width*0.98;
	face.maxViewPortInfo["height"]=window.screen.height*0.81;
	
	Map.style.left = parseInt((face.maxViewPortInfo["width"]-parseInt(Map.style.width))/2);
	Map.style.top = parseInt((face.maxViewPortInfo["height"]-parseInt(Map.style.height))/2);

	face.maxViewPortInfo["left"]=-parseInt(Map.style.left);
	face.maxViewPortInfo["top"]=-parseInt(Map.style.top);
	
	ChangeMap("BK/");
	map.desktop.ondragstart=function(){return false;}
	setInterval("face.MapMove();",500);
	map.desktop.onmousedown=face.MouseDown;
	map.desktop.onmouseup=face.MouseUp;
	map.desktop.onmouseout=face.MouseUp;
	map.small.onclick=face.GoLoc;
	map.viewPort.ondblclick=face.ChangeView;
	return;
}
function ChangeMap(folder)
{
	if(folder=="")return;
	arrLoc = folder.split("/");
	loc=arrLoc[arrLoc.length-2];
	face.HiddenSearch();
	
	//if(loc=="DT")face.ResetMap(folder,3328,3328,150,150);
	if(loc=="BK")face.ResetMap(folder,1653,2325,150,210);

	SetPlaceNameCenter();
	PlaceImg.src="image/"+loc+".gif";
	PlaceImg.style.visibility="hidden";
	if(loc=="BK")face.VisibleSearch();
}
function SetPlaceNameCenter()
{
	PlaceName.style.width= parseInt(map.viewPort.style.width);
	map.small.style.left = parseInt(parseInt(map.small.style.left)+(150-parseInt(map.small.style.width))/2)
}
