// JavaScript Document
function set_Fontsize(CtrlType){
	if(CtrlType=="plus"){fontinfo.style.fontSize=eval(parseInt(fontinfo.style.fontSize)+2)+"px"} 
	else{ 
		if(parseInt(fontinfo.style.fontSize)>=8){fontinfo.style.fontSize=eval(parseInt(fontinfo.style.fontSize)-2)+"px";}
		else{fontinfo.style.fontSize="6px";}
	} 
} 

function set_Fontlineheight(CtrlType){
	if(CtrlType=="plus"){fontinfo.style.lineHeight=eval(parseInt(fontinfo.style.lineHeight)+4)+"px";} 
	else{
		if(parseInt(fontinfo.style.lineHeight)>14){fontinfo.style.lineHeight=eval(parseInt(fontinfo.style.lineHeight)-4)+"px";}
		else{fontinfo.style.lineHeight="14px";}
	}
}

//¹öÆÁ
var currentpos,timer;	
function initialize(){timer=setInterval("scrollwindow()",50);}
function sc(){clearInterval(timer);}
function scrollwindow(){
	currentpos=document.body.scrollTop;
	window.scroll(0,++currentpos);
	if(currentpos != document.body.scrollTop){sc();}
}
document.onmousedown=sc;
document.ondblclick=initialize;



//ie png
function correctPNG() 
     {
     for(var i=0; i<document.images.length; i++)
        {
     var img = document.images[i]
     var imgName = img.src.toUpperCase()
     if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
        {
     var imgID = (img.id) ? "id='" + img.id + "' " : ""
     var imgClass = (img.className) ? "class='" + img.className + "' " : ""
     var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
     var imgStyle = "display:inline-block;" + img.style.cssText 
     if (img.align == "left") imgStyle = "float:left;" + imgStyle
     if (img.align == "right") imgStyle = "float:right;" + imgStyle
     if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle  
     var strNewHTML = "<span " + imgID + imgClass + imgTitle
     + " style=\"" + "width:" + img.width + "px; margin:1px; height:" + img.height + "px;" + imgStyle + ";"
        + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
     + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
     img.outerHTML = strNewHTML
     i = i-1
        }
        }
     }
window.attachEvent("onload", correctPNG);


function showimg(theimg,size){  //±£³ÖËõÂÔÍ¼±ÈÀý
  imgobj=new Image();
  imgobj.src=theimg.src;
  if(imgobj.width>imgobj.height&&imgobj.width>size) theimg.width=size;
  else if(imgobj.width<imgobj.height&&imgobj.height>size) theimg.height=size;
}


function F_S(furl){
	if(furl==""){return false;}
	else{window.open(furl);return false;}	
}