var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var ie4 = (bName=="Microsoft Internet Explorer" && bVer>=4);
var nn4 = (bName=="Netscape" && bVer>=4);

function showInWindow(name) {
	var wndType = arguments[1] ? arguments[1] : 'main';
	var nameWindow = arguments[2] ? arguments[2] : 'wnPopup';
	var addParam = ",resizable=no,scrollbars=no,toolbar=no,location=no,menubar=no,fullscreen=no,status=no";
	breakAnkorLoading();
	if (wndType=='popup') {
		WinWidth  = 570;
		WinHeight = screen.height-200;
		LeftPos   = (screen.width-780)/2+19;
		TopPos    = 116;
	} else if (wndType=='gallery') {
		WinWidth  = 720;
		WinHeight = 720;
		LeftPos   = (screen.width-WinWidth)/2;
		TopPos    = (screen.height-WinHeight)/2;
	} else if (wndType=='full') {
		WinWidth  = screen.width-10;
		WinHeight = screen.height-60;
		LeftPos   = 0;
		TopPos    = 0;
	} else if (wndType=='preview') {
		WinWidth  = screen.width-200;
		WinHeight = screen.height-100;
		LeftPos   = (screen.width-WinWidth)/2;
		TopPos    = (screen.height-WinHeight)/2;
		addParam  = ",resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,fullscreen=no,status=no";
	} else {
		WinWidth  = 630;
		WinHeight = screen.height-230;
		LeftPos   = (screen.width-780)/2-15;
		TopPos    = 110;
		addParam = ",resizable=no,scrollbars=yes,toolbar=no,location=no,menubar=no,fullscreen=no,status=no";
	}
//	HostAddr  = new String(document.location);
//	if (name.substr(0,5)=='http:')
		where = name;
//	else
//		where = HostAddr.substr(0,HostAddr.lastIndexOf("/")+1)+name;
	wnd = window.open(where, nameWindow, "width="+WinWidth+",height="+WinHeight+",left="+LeftPos+",top="+TopPos+",screenX="+LeftPos+",screenY="+TopPos+addParam);
	window.wnd.focus();
}
function dummy() {
;
}
function breakAnkorLoading() {
	if (ie4 && eval('window.event')) {
		window.event.cancelBubble = true;
		window.event.returnValue = false;
	}
}