//****************************************************************************************************************
//Load priview picture
//****************************************************************************************************************
function PicView(vId)
{
	try
	{
		//Load picture URL
		var vURL='/mxx/ascx/view.pic.aspx?vMapId=4&vId='+vId+'&vShowType=3&vSize=153';		
				
		//
		window.document.all('ID_IMG').onLoad=OnImgLoad();
		window.document.all('ID_IMG').src=vURL;
	}
	catch(eX)
	{
	}
}

//****************************************************************************************************************
//Get position of current cursor
//****************************************************************************************************************
function OnImgLoad()
{	
	try
	{
		//Get current position of mouse
		//
		var vX=document.body.scrollLeft+event.x+20 ;
		var vY=document.body.scrollTop+event.y-window.document.all('ID_IMG').height/2;
		
		//Adjust position of DIV
		//
		window.document.all('ID_PIC_VIEW').style.posLeft=vX;
		window.document.all('ID_PIC_VIEW').style.posTop=vY;		

		//Show it
		//
		window.document.all('ID_PIC_VIEW').style.display='';
	}
	catch(eX)
	{
	}
}

//****************************************************************************************************************
//Close picture window
//****************************************************************************************************************
function PicClose()
{	
	try
	{
		//Hide
		//
		window.document.all('ID_PIC_VIEW').style.display='none';
		window.document.all('ID_IMG').src='/mxx/shangcheng/images/loading.gif';
	}
	catch(eX)
	{
	}		
}


function OnLoad()
{
	var vXView='<div id="ID_PIC_VIEW" style="DISPLAY:none; POSITION:absolute;"><img  id="ID_IMG" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"></div>';
	var vEle=window.document.createElement('<div id=ID_DIV_X_VIEW></div>');
	vEle.innerHTML =vXView;
	
	//Add new Element to body
	//	
	window.document.body.insertBefore(vEle);	
}

//****************************************************************************************************************
//Eevet for window onload
//****************************************************************************************************************
window.onload=OnLoad;

//****************************************************************************************************************
//
//Call function
//
//****************************************************************************************************************
//OnLoad();