﻿// JScript 文件
  //========================= 设置字体大中小 start =============
function doZoom(size){
	var artibody = document.getElementById('artibody');
	if(!artibody){
		return;
	}
	var artibodyChild = artibody.childNodes;
	artibody.style.fontSize = size + 'px';
	//再对artibody div内的直接html节点设置fontSize属性
	for(var i = 0; i < artibodyChild.length; i++){
		if(artibodyChild[i].nodeType == 1){
			artibodyChild[i].style.fontSize = size + 'pt';
		}
	}		
}

function ChangeFontSize(tagID, fontSize){
    var t = document.getElementById(tagID);
    if (t) t.style.fontSize = fontSize;
}
function ChangeDivFontSize(parentNode, classID, fontSize){
    var p = document.getElementById(parentNode);
    if (p){
        var ts = p.getElementsByTagName("div");
        for (var i=0; ts!=null && i<ts.length; i++){
            if (ts[i] && ts[i].className=="info_content") ts[i].style.fontSize = fontSize;
        }
    }
}
//========================= 设置字体大中小 end =============
// eg: 
function changecss(theClass,element,value) 
{
    //documentation for this script at http://www.shawnolson.net/a/503/
    var cssRules;
    if (document.all) 
    {
        cssRules = 'rules';
    }
    else if (document.getElementById) {
        cssRules = 'cssRules';
    }
    
    for (var S = 0; S < document.styleSheets.length; S++)
    {
        for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) 
        {
            if (document.styleSheets[S][cssRules][R].selectorText == theClass) 
            {
                document.styleSheets[S][cssRules][R].style[element] = value;
            }
        }
    }	
}