﻿// JScript 文件
function addImgLink(){
    $("#article_content_main img").each(function(){
        $(this).after("<div><a href='"+this.src+"' target='_blank'>查看大图</a></div>");
    });
}

function checkAll(checkboxId)
{
    var checkboxs = document.getElementsByName(checkboxId);
    for(var i = 0; i < checkboxs.length; i++)
    {
        if(checkboxs[i].checked) checkboxs[i].checked = false;
        else checkboxs[i].checked = true;
    }
}

function runcode_open_new(element)
{
	var code = document.getElementById(element).value;
	var win = window.open("", "", "");
	win.opener = null;
	win.document.write(code);
	win.document.close();
}

function FontZoom(fsize){
	var ctext = document.getElementById("article_content_main");
	ctext.style.fontSize = fsize +"px";
}

function addBookmark(title,url) {
    if (window.sidebar) { window.sidebar.addPanel(title, url,""); } 
    else if( document.all ) {window.external.AddFavorite( url, title);} 
    else if( window.opera && window.print ) {return true;}
}
