
function _ID(obj){return document.getElementById(obj)}
function closeLayer(){
	
		
		document.getElementById('vantt_tour').parentNode.removeChild( document.getElementById('vantt_tour') );
		document.getElementById('objPopupLayerBg').parentNode.removeChild( document.getElementById('objPopupLayerBg') );
		document.getElementById("main_flash").style.visibility="visible";
	
}

function goToPage(sURL) {
document.location.href=sURL;	
}
function popupLayer(s,w,h)
{
	if (!w) w = 760;
	if (!h) h = 500;

	var pixelBorder = 3;
	var titleHeight = 12;
	w += pixelBorder * 2;
	h += pixelBorder * 2 + titleHeight;

	var bodyW = document.documentElement.clientWidth;
	var bodyH = document.documentElement.clientHeight;

	var posX = (bodyW - w) / 2;
	var posY = (bodyH - h) / 2;

	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		left = 0;
		top = 0;
		width = "100%";
		zIndex=20;
		height = document.documentElement.scrollHeight+"px";
		backgroundColor = "black";
		filter = "Alpha(Opacity=50)";
		opacity = "0.5";
	}
	obj.id = "objPopupLayerBg";
	document.body.appendChild(obj);

	var obj = document.createElement("div");
	var tmp = (parseInt(posY) + document.documentElement.scrollTop-100);
	with (obj.style){
		position = "absolute";
		left = parseInt(posX)+"px";//posX + document.documentElement.scrollLeft;
		top = tmp+"px";
		width =  "760px";
		height = "500px";
		backgroundColor = "#FFFFFF";
		border = "none";		
		overflow="hidden";
		
	}
	//alert(obj.style.left);
	obj.id = "vantt_tour";
	document.body.appendChild(obj);
/*
	var bottom = document.createElement("div");
	with (bottom.style){
		position = "absolute";
		width = w - pixelBorder * 2;
		height = titleHeight;
		left = 0;
		top = h - titleHeight - pixelBorder * 3;
		padding = "2px 0 0 0";
		textAlign = "right";
		backgroundColor = "#000000";
		color = "#ffffff";
		font = "bold 11px tahoma";
	}
	
	//bottom.innerHTML = "<a href='javascript:closeLayer()'><font color='#FFFFFF'>Ã¢´Ý±â</font></a>&nbsp;&nbsp;&nbsp;";
	//obj.appendChild(bottom);
*/
	var ifrm = document.createElement("iframe");
	
	with (ifrm.style){
		width = "780px";
		height = "520px";
		scrolling = "no";
		
	}
	ifrm.style.frameborder = 0;
	ifrm.src = s;
	obj.appendChild(ifrm);
}
