//图片根据最大宽度与高度自动调节
function initImageSize(targetImage,imageWidth,imageHeight)
{
	var showImage=new Image();
	showImage.src=targetImage.src;
	var sourceWidth=showImage.width;
	var sourceHeight=showImage.height;
	var tempWidth;
	if(sourceWidth>imageWidth)
	{
		tempWidth=imageWidth;
	}
	else
	{
		tempWidth=sourceWidth;
	}
	if((sourceHeight*tempWidth/sourceWidth)>imageHeight)
	{
		targetImage.height=imageHeight;
		targetImage.width=imageHeight/sourceHeight*sourceWidth;
	}
	else
	{
		targetImage.width=tempWidth;
		targetImage.height=tempWidth/sourceWidth*sourceHeight;
	}
}

function detail(htmlurl,t,l,w,h)
{
	try
	{
		var newwin=window.open(htmlurl,"newWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top="+t+",left="+l+",width="+w+",height="+h);
		newwin.focus();
	}
	catch(e){;}
	return false;
}

var flag=false;
function DrawImage(ImgD){
	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0 && image.height>0){
		flag=true;
			if(image.width>500){ 
				ImgD.width=500;
				ImgD.height=(image.height*500)/image.width;
			}
			if (image.width<200)
			{ImgD.style.display="none";
			}
	}
}
function dotpageview(pnumber,pcount)
{
for(i=0;i<=pcount;i++)
{
if(i==pnumber)
{
document.getElementById("dotpage"+i).style.display="";
if(pnumber!=0){
document.getElementById("dota"+i).style.color="#000000";
}
}
else
{
document.getElementById("dotpage"+i).style.display="none";document.getElementById("dota"+i).style.color="#000000";
}
}
}
function viewfontsize(big)
{
document.getElementById("articlecontent").style.fontSize=big;
}
//-->
