function calculate() {
	var rate = document.getElementById('rate').value;
	var money = document.getElementById('money').value;
	var result = money * rate;
	document.getElementById('result').value = result.toFixed(0)
}

function setTab(name,cursel,n){for(i=1;i<=n;i++){var menu=document.getElementById(name+"_"+i);var con=document.getElementById(name+"_"+i+"_news");menu.className=i==cursel?"hot1":"hot2";con.style.display=i==cursel?"block":"none"}}function DrawImage(ImgD,FitWidth,FitHeight){var image=new Image();image.src=ImgD.src;if(image.width>0&&image.height>0){if(image.width/image.height>=FitWidth/FitHeight){if(image.width>FitWidth){ImgD.width=FitWidth;ImgD.height=(image.height*FitWidth)/image.width}else{ImgD.width=image.width;ImgD.height=image.height}}else{if(image.height>FitHeight){ImgD.height=FitHeight;ImgD.width=(image.width*FitHeight)/image.height}else{ImgD.width=image.width;ImgD.height=image.height}}}}function ShowDiv(obj){document.getElementById(obj).style.display="block"}function CloseDiv(obj){document.getElementById(obj).style.display="none"}
function addfavor(obj){var title=document.title,url=encodeURI(location.href);try{window.external.AddFavorite(url,title);return false}catch(e){try{window.sidebar.addPanel(title,url,"");return false}catch(e){try{obj.setAttribute("rel","sidebar"),obj.title=title,obj.href=url}catch(e){alert("加入收藏失敗，請使用Ctrl+D進行添加，或手動在瀏覽器裡進行設置")}}}}
function childStyle(a,b,c,d){eval('a.getElementsByTagName(b)[0].style.'+c+'=d')}
//function filter(a,b){a.value = decodeURIComponent(a.value);if(a.value==a.defaultValue || a.value==''){a.focus();return false;}if(typeof(b)!='undefined'){c=b.substring(b.lastIndexOf('/')+1,b.lastIndexOf('.'));a.value==a.defaultValue?a.focus():location.href=c+'-'+encodeURIComponent(a.value)+(c=='s'?'-seek':'')+'.html';return false}}
function filter(a,b){a.value = decodeURIComponent(a.value);if(a.value==a.defaultValue || a.value==''){a.focus();return false}}
function DrawImages(img){var file=new Image();file.src=img.src,a=file.width/file.height,b=img.width/img.height;if(a>b){file.width>img.width?img.height=(file.height*img.width)/file.width:img.width=file.width}else if(a<b){if(file.height>img.height){img.width=(file.width*img.height)/file.height}else{img.width=file.width;img.height=file.height}}}