/*********start accessibilty***************/function toggle (id) {var post = document.getElementById(id);if (post.className=="portletshown") { post.className="portlethidden"; } else { post.className="portletshown"; }}function changeLocation (targetURL) {window.location = targetURL;}/*********besarkan saiz tulisan**************/	function setFontPlus(id){var size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 13;} else {size = size.substr(0,2);}if(size < 15) {if(size == 14) {size = eval(size) + 2;} else {size = eval(size) + 1;}var fontSize = size + "px";document.getElementById(id).style.fontSize=fontSizechangecss('#nav li a','font-size',fontSize);changecss('.portlet-title','font-size',fontSize);}}// end setFontPlus/*********kecilkan saiz tulisan*************/function setFontMinus(id){var size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 10; } else {size = size.substr(0,2);} if(size > 10) {if(size == 16) {size = eval(size) - 2;} else {size = eval(size) - 1;}var fontSize = size + "px";document.getElementById(id).style.fontSize=fontSizechangecss('#nav li a','font-size',fontSize);changecss('.portlet-title','font-size',fontSize);}}/**********kembalikan warna asal*************/function revertStyles(){changecss('.portlet-title','color','white');changecss('#nav a','color','#ffffff');changecss('body','color','black');changecss('a','color','#5078AA');changecss('a:hover','color','#7EACD6');changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','black');}/********kembalikan saiz huruf kepada asal************/function revertFontStyles(id){var size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 11; } else {size = size.substr(0,2);} if(size > 10) {if(size == 16) {size = 11;} else {size = 11;}var fontSize = size + "px";document.getElementById(id).style.fontSize=fontSize}changecss('.portlet-title','font-size','10px');changecss('#nav li a','font-size','13px');}function changecss(theClass,element,value) {//Last Updated on May 21, 2008//documentation for this script at//http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html var cssRules; if (document.all) { cssRules = 'rules'; } else if (document.getElementById) { cssRules = 'cssRules'; } var added = false; 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) { if(document.styleSheets[S][cssRules][R].style[element]){ document.styleSheets[S][cssRules][R].style[element] = value; added=true; break; } } } if(!added){ if(document.styleSheets[S].insertRule){ document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length); } else if (document.styleSheets[S].addRule) { document.styleSheets[S].addRule(theClass,element+': '+value+';'); } } }}// end function changecss/*************tukar warna tulisan kepada warna merah**********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontRed(){changecss('body','color','red');changecss('a','color','red');changecss('#nav a','color','red');changecss('a:hover','color','blue');changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','red');}/*************tukar warna tulisan kepada warna biru**********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontBlue(){changecss('.portlet-title','color','blue');changecss('body','color','blue');changecss('#nav a','color','blue');changecss('a','color','blue');changecss('a:hover','color','blue');changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','blue');}/*************tukar warna tulisan kepada warna green **********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontGreen(){changecss('.portlet-title','color','green');changecss('body','color','green');changecss('#nav a','color','green');changecss('a','color','green');changecss('a:hover','color','blue');changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','green');}/*************tukar warna tulisan kepada warna orange**********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontOrange(){changecss('.portlet-title','color','orange');changecss('body','color','orange');changecss('#nav a','color','orange');changecss('a','color','orange');changecss('a:hover','color','blue');changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','orange');}/*******end accessibility************/
