Friday, July 31, 2009

resize font size


function resetCurrentsize() {
currentSize = 13;
if(strLocalization == "JP") {
if(typeof(fontOverride) == "undefined") {
currentSize = 16;
} else {
currentSize = fontOverride;
}
}
if(strLocalization == "CN") {
if(typeof(fontOverride) == "undefined") {
currentSize = 14;
} else {
currentSize = fontOverride;
}
}
if (typeof(preDefaultSize) != "undefined") {
currentSize = preDefaultSize;
}
document.getElementById("CurrentSize").value = currentSize;
if (document.getElementById) {
document.getElementById("resizeableText").style.cssText = "font-size:"+currentSize+"px";
}
}

function sizeDown() {
if (document.getElementById) {
currentSize--;
document.getElementById("CurrentSize").value = currentSize;
document.getElementById("resizeableText").style.cssText = "font-size:"+currentSize+"px";
}
}

function sizeUp() {
if (document.getElementById) {
currentSize++;
document.getElementById("CurrentSize").value = currentSize;
document.getElementById("resizeableText").style.cssText = "font-size:"+currentSize+"px";
}
}

No comments: