function getViewportHeight() 
{
	if (window.innerHeight != window.undefined) return window.innerHeight;
	if (document.compatMode=='CSS1Compat') return document.documentElement.clientHeight;
	if (document.body) return document.body.clientHeight; 
	return window.undefined; 
}

function getViewportWidth() 
{
	if (window.innerWidth!=window.undefined) return window.innerWidth; 
	if (document.compatMode=='CSS1Compat') return document.documentElement.clientWidth; 
	if (document.body) return document.body.clientWidth; 
	return window.undefined; 
}
				
function Func_Show_Article(_strfcode)
{				
	var fullHeight = getViewportHeight();
	var fullWidth = getViewportWidth();
		
	var theBody = document.documentElement;
		
	var scTop = parseInt(theBody.scrollTop,10);
	var scLeft = parseInt(theBody.scrollLeft,10);
					
	iheight = 500;
	iwidth = 600;
					
	scTop = (scTop + ((fullHeight - iheight) / 2));
	scLeft = (scLeft + ((fullWidth - iwidth) / 2));
					
	var strUrl = "MainIndex_ShowArticle.aspx?fcode="+_strfcode;
	var strStatus = "height="+iheight+", width="+iwidth+", top="+scTop+",left="+scLeft+", toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no";
	window.open(strUrl, 'newwindow', strStatus); 
}

function Func_Show_Article1(_strfcode)
{				
	var fullHeight = getViewportHeight();
	var fullWidth = getViewportWidth();
		
	var theBody = document.documentElement;
		
	var scTop = parseInt(theBody.scrollTop,10);
	var scLeft = parseInt(theBody.scrollLeft,10);
					
	iheight = 500;
	iwidth = 600;
					
	scTop = (scTop + ((fullHeight - iheight) / 2));
	scLeft = (scLeft + ((fullWidth - iwidth) / 2));
					
	var strUrl = "MainIndex_ShowArticle.aspx?fcode="+_strfcode + "&Type=1";
	var strStatus = "height="+iheight+", width="+iwidth+", top="+scTop+",left="+scLeft+", toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no";
	window.open(strUrl, 'newwindow', strStatus); 
}

function Func_Show_Person(_strfcode)
{				
	var fullHeight = getViewportHeight();
	var fullWidth = getViewportWidth();
		
	var theBody = document.documentElement;
		
	var scTop = parseInt(theBody.scrollTop,10);
	var scLeft = parseInt(theBody.scrollLeft,10);
					
	iheight = 500;
	iwidth = 600;
					
	scTop = (scTop + ((fullHeight - iheight) / 2));
	scLeft = (scLeft + ((fullWidth - iwidth) / 2));
					
	var strUrl = "MainIndex_ShowPerson.aspx?fcode="+_strfcode;
	var strStatus = "height="+iheight+", width="+iwidth+", top="+scTop+",left="+scLeft+", toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no";
	window.open(strUrl, 'newwindow', strStatus); 
}

function Func_Show_Pic(_strName, _strfcode, _strfpath)
{				
	var fullHeight = getViewportHeight();
	var fullWidth = getViewportWidth();
		
	var theBody = document.documentElement;
		
	//var scTop = parseInt(theBody.scrollTop,10);
	//var scLeft = parseInt(theBody.scrollLeft,0);
	scTop = 100;
	scLeft = 200;
					
	iheight = 450;
	iwidth = 680;
					
	scTop = (scTop + ((fullHeight - iheight) / 2));
	scLeft = (scLeft + ((fullWidth - iwidth) / 2));
						
	var strUrl = "Edit_ArticlePic.aspx?F_FileName=" + _strName + "&FLy_FCode=" + _strfcode + "&FLy_FilePath=" + _strfpath;
	var strStatus = "height="+iheight+", width="+iwidth+", top="+scTop+",left="+scLeft+", toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=no, status=no";
	window.open(strUrl, '', strStatus); 
}
