 jQuery(document).ready(function() {            jQuery(".signin").click(function(e) {          e.preventDefault();                jQuery("fieldset#signin_menu").toggle();jQuery(".signin").toggleClass("menu-open");            });jQuery("fieldset#signin_menu").mouseup(function() {return false});jQuery(document).mouseup(function(e) {if(jQuery(e.target).parent("a.signin").length==0) {jQuery(".signin").removeClass("menu-open");jQuery("fieldset#signin_menu").hide();}});			        });	function ChangeBgImg(imgs) {    bdy[0].style.backgroundImage = 'url('+imgs+')';eraseCookie('theme_bg');    createCookie('theme_bg', imgs, 7);}function ChangeBgImgInit() {    bdy = document.getElementsByTagName("body");var theme_bg = readCookie('theme_bg');    bdy[0].style.width = "100%";    bdy[0].style.height = "100%";    bdy[0].style.margin = "0px"       bdy[0].style.backgroundImage = 'url(/html/themes/nsm_mdr/images/nsm_mdr_images/vector.jpg)';   if (bdy[1]) bdy[1].style.backgroundImage = 'url(/html/themes/nsm_mdr/images/nsm_mdr_images/royal3.jpg)';    if (bdy[2]) bdy[2].style.backgroundImage = 'url(/html/themes/nsm_mdr/images/nsm_mdr_images/royal5.2.jpg)';    if (bdy[3]) bdy[3].style.backgroundImage = 'url(/html/themes/nsm_mdr/images/nsm_mdr_images/NATURE-WaitingForSunset.jpg)';    if (bdy[4]) bdy[4].style.backgroundImage = 'url(/html/themes/nsm_mdr/images/nsm_mdr_images/9.jpg)';    if (bdy[5]) bdy[5].style.backgroundImage = 'url(/html/themes/nsm_mdr/images/nsm_mdr_images/3.jpg)';    if (bdy[6]) bdy[6].style.backgroundImage = 'url(/html/themes/nsm_mdr/images/nsm_mdr_images/aqua.jpg)';    if (bdy[7]) bdy[7].style.backgroundImage = 'url(/html/themes/nsm_mdr/images/nsm_mdr_images/shahrul.jpg)';   if (theme_bg){bdy[0].style.backgroundImage = 'url('+theme_bg+')';}	}var skaliWebServices = {megaDropDown: {MENU_PREFIX: "swsMainMenu_",SUBMENU_PREFIX: "swsSubMenu_",SUBMENU_DIV_CLASS: "sws-nav-submenu",MENU_CLASS: "sws-nav-mainmenu",TAG_ID_ATTR: "sws-nav:menu-id",TAG_MENU_CLS: "sws-nav:menu-cls",TAG_SUBMENU_CLS: "sws-nav:submenu-cls",Z_INDEX: 99999,correctSubMenuPosition: function(subMenuObject) {var instance = this;if (jQuery(subMenuObject).attr(instance.TAG_SUBMENU_CLS == instance.SUBMENU_DIV_CLASS)) {var menuId = jQuery(subMenuObject).attr(instance.TAG_ID_ATTR);var parentMenu = jQuery("#"+instance.MENU_PREFIX + menuId);var parentPosition = parentMenu.offset();//var parentW = parentMenu.outerWidth();var parentH = parentMenu.outerHeight();jQuery(subMenuObject).css("top", parentH - 3); // -3 pixelsjQuery(subMenuObject).css("left", parentPosition.left);//these codes are for repositioning the submenu in case it's parent menu is located//at the right most side of the browser, therefore rendering some parts of the//submenu box invisibleif ((parentPosition.left + jQuery(subMenuObject).outerWidth()) > jQuery("body").outerWidth()) {var newPosition = jQuery("body").outerWidth() - jQuery(subMenuObject).outerWidth();jQuery(subMenuObject).css("left", newPosition);}}},main: function() {var instance = this;//main menu on hoverjQuery("span."+instance.MENU_CLASS).each(function() {if (jQuery(this).attr(instance.TAG_MENU_CLS == instance.MENU_CLASS)) {jQuery(this).hover(function() { //mouse overvar menuId = jQuery(this).attr(instance.TAG_ID_ATTR);if (jQuery("#"+instance.SUBMENU_PREFIX + menuId).length > 0) {instance.correctSubMenuPosition(jQuery("#"+instance.SUBMENU_PREFIX + menuId));jQuery("#"+instance.SUBMENU_PREFIX + menuId).stop(true,true);jQuery("#"+instance.SUBMENU_PREFIX + menuId).css("z-index",instance.Z_INDEX);jQuery("#"+instance.SUBMENU_PREFIX + menuId).fadeIn(100);}},function() { //mouse outvar menuId = jQuery(this).attr(instance.TAG_ID_ATTR);if (jQuery("#"+instance.SUBMENU_PREFIX + menuId)) {jQuery("#"+instance.SUBMENU_PREFIX + menuId).css("z-index",instance.Z_INDEX-1);jQuery("#"+instance.SUBMENU_PREFIX + menuId).fadeOut(10);}});}});//submenu on hoverjQuery("div."+instance.SUBMENU_DIV_CLASS).each(function() {if (jQuery(this).attr(instance.TAG_SUBMENU_CLS == instance.SUBMENU_DIV_CLASS)) {jQuery(this).hover(function() { //mouse overjQuery(this).stop(true,true);jQuery(this).css("z-index",instance.Z_INDEX);jQuery(this).fadeIn(100);},function() { //mouse outjQuery(this).css("z-index",instance.Z_INDEX-1);jQuery(this).fadeOut(10);});}});//submenu on click --> fade outjQuery("div."+instance.SUBMENU_DIV_CLASS).each(function() {if (jQuery(this).attr(instance.TAG_SUBMENU_CLS == instance.SUBMENU_DIV_CLASS)) {jQuery(this).click(function() {jQuery(this).css("z-index",instance.Z_INDEX-1);jQuery(this).fadeOut(10);});}});}}};ddaccordion.init({headerclass: "silverheader", contentclass: "submenu", revealtype: "mouseover", collapseprev: false, defaultexpanded: [], onemustopen: false, animatedefault: false, persiststate: false, toggleclass: ["", "selected"], togglehtml: ["", "", ""], animatespeed: "slow", oninit:function(headers, expandedindices){ },onopenclose:function(header, index, state, isuseractivated){ }})jQuery(document).ready(function() {	//Show BannerjQuery(".main_image .desc").show(); //Show BannerjQuery(".main_image .block").animate({ opacity: 0.85 }, 1 ); //Set Opacity//Click and Hover events for thumbnail listjQuery(".image_thumb ul li:first").addClass('active'); jQuery(".image_thumb ul li").click(function(){ //Set Variablesvar imgAlt = jQuery(this).find('img').attr("alt"); //Get Alt Tag of Imagevar imgTitle = jQuery(this).find('a').attr("href"); //Get Main Image URLvar imgDesc = jQuery(this).find('.block').html(); 	//Get HTML of blockvar imgDescHeight = jQuery(".main_image").find('.block').height();	//Calculate height of block	if (jQuery(this).is(".active")) {  //If it's already active, then...return false; // Don't click through} else {//Animate the Teaser				jQuery(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 250 , function() {jQuery(".main_image .block").html(imgDesc).animate({ opacity: 0.85,	marginBottom: "0" }, 250 );jQuery(".main_image img").attr({ src: imgTitle , alt: imgAlt});});}jQuery(".image_thumb ul li").removeClass('active'); //Remove class of 'active' on all listsjQuery(this).addClass('active');  //add class of 'active' on this list onlyreturn false;}) .hover(function(){jQuery(this).addClass('hover');}, function() {jQuery(this).removeClass('hover');});//Toggle TeaserjQuery("a.collapse").click(function(){jQuery(".main_image .block").slideToggle();jQuery("a.collapse").toggleClass("show");});});//Close FunctionjQuery(document).ready(function(){	jQuery("#slider").easySlider({controlsBefore:	'<p id="controls">',controlsAfter:	'</p>',auto: true, continuous: true});jQuery("#slider2").easySlider({controlsBefore:	'<p id="controls2">',controlsAfter:	'</p>',		prevId: 'prevBtn2',nextId: 'nextBtn2'	});			});	featuredcontentglider.init({gliderid: "canadaprovinces", //ID of main glider containercontentclass: "glidecontent", //Shared CSS class name of each glider contenttogglerid: "p-select", //ID of toggler containerremotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disableselected: 0, //Default selected content index (0=1st)persiststate: false, //Remember last content shown within browser session (true/false)?speed: 500, //Glide animation duration (in milliseconds)direction: "downup", //set direction of glide: "updown", "downup", "leftright", or "rightleft"autorotate: true, //Auto rotate contents (true/false)?autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]})function mainmenu(){jQuery(" #nav ul ").css({display: "none"}); jQuery(" #nav li").hover(function(){jQuery(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).fadeIn(100);},function(){jQuery(this).find('ul:first').fadeOut(100);});}jQuery(document).ready(function(){mainmenu();}); /* STANDARD LIFERAY SOURCE */jQuery(document).ready(/*This function gets loaded when all the HTML, not including the portlets, isloaded.*/function() {/* addition/modification for mega drop down menu */skaliWebServices.megaDropDown.main();});Liferay.Portlet.ready(/*This function gets loaded after each and every portlet on the page.portletId: the current portlet's idjQueryObj: the jQuery wrapped object of the current portlet*/function(portletId, jQueryObj) {});jQuery(document).last(/*This function gets loaded when everything, including the portlets, is onthe page.*/function() {	});jQuery(document).ready(function(){    lastBlock = jQuery("#a1");    maxWidth = 500;    minWidth = 35;	    jQuery("#horizontal_accordion ul li a").hover(      function(){        jQuery(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:500 });jQuery(this).animate({width: maxWidth+"px"}, { queue:false, duration:500});lastBlock = this;      }    );});jQuery(document).ready(function(){jQuery(".lightbox").lightbox();});/*********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;}var size;var defaultFontSize = 12;var currentFontSize = size;var Color;var defaultColor = 'black';var currentColor = Color;var prefsLoaded = false;/*********besarkan saiz tulisan**************/function setFontPlus(id){size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 12;} 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('.journal-content-article','font-size',fontSize);changecss('.content_font','font-size',fontSize);changecss('.title2_font','font-size',fontSize);changecss('.service_middle','font-size',fontSize);changecss('.carian','font-size',fontSize);}}// end setFontPlus/*********kecilkan saiz tulisan*************/function setFontMinus(id){size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 12;} else {size = size.substr(0,2);}if(size > 11) {if(size == 17) {size = eval(size) - 2;} else {size = eval(size) - 1;}var fontSize = size + "px";document.getElementById(id).style.fontSize=fontSizechangecss('.content_font','font-size',fontSize);changecss('.journal-content-article','font-size',fontSize);changecss('.title2_font','font-size',fontSize);changecss('.portlet-title','font-size',fontSize);changecss('.service_middle','font-size',fontSize);changecss('.carian','font-size',fontSize);}}/********kembalikan saiz huruf kepada asal************/function revertFontStyles(id){size = document.getElementById(id).style.fontSize;if(size == "" || size == null) {size = 12;} else {size = size.substr(0,2);}if(size > 10) {if(size == 16) {size = 12;} else {size = 12;}var fontSize = size + "px";document.getElementById(id).style.fontSize=fontSize}changecss('.journal-content-article','font-size','12px',fontSize);changecss('.content_font','font-size','12px',fontSize);changecss('.title2_font','font-size','12px',fontSize);changecss('.service_middle','font-size',fontSize);changecss('.carian','font-size',fontSize);}function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else expires = ""; document.cookie = name+"="+value+expires+"; path=/";};function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null;};window.onload = setUserOptions;function setUserOptions(){if(!prefsLoaded){cookie = readCookie("font");size = cookie ? cookie : 12;cookieColor = readCookie("initFontColor()");Color = cookieColor ? cookieColor : 'black';if(Color=='red'){fontRed()}else if(Color=='blue'){fontBlue()}else if(Color=='green'){fontGreen()}else if(Color=='orange') {fontOrange()}else{revertStyles()}setFontSize(size);prefsLoaded = true;}}window.onunload = saveSettings;function saveSettings(){ createCookie("font", size, 365);createCookie("initFontColor()", Color, 365);}function setFontSize(fontSize){fontSize=fontSize + 'px';document.getElementById('wrapper').style.fontSize = fontSize;changecss('.content_font','font-size',fontSize);changecss('.title2_font','font-size',fontSize);changecss('.journal-content-article','font-size',fontSize);};/**********kembalikan warna asal*************/function revertStyles(){Color="";changecss('.portlet-title','color','white');changecss('.portlet-topper','color','#ffffff');changecss('#nav li a','color','black');changecss('#nav li ul li a','color','white');changecss('body','color','black');changecss('a','color','#5078AA');changecss('a:hover','color','#7EACD6');changecss('.title2_font','color','#0000FF');changecss('.content_font','color','#000000');changecss('.applemenu div.search ','color','white');changecss('#topbg ','color','white');changecss('#topbg a ','color','white');changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color','black');}function changecss(theClass,element,value) { 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(){Color='red';changecss('body','color',Color);changecss('.portlet-title','color',Color);changecss('.portlet-topper','color',Color);changecss('a','color',Color);changecss('#nav li a','color',Color);changecss('#nav li ul li a','color',Color);changecss('a:hover','color',Color);changecss('.title2_font','color',Color);changecss('.content_font','color',Color);changecss('.applemenu div.search ','color',Color);changecss('#topbg ','color',Color);changecss('#topbg a ','color',Color);changecss('.content-wrapper ','color',Color);changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color',Color);}/*************tukar warna tulisan kepada warna biru**********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontBlue(){Color='blue';changecss('body','color',Color);changecss('.portlet-title','color',Color);changecss('.portlet-topper','color',Color);changecss('a','color',Color);changecss('#nav li a','color',Color);changecss('#nav li ul li a','color',Color);changecss('a:hover','color',Color);changecss('.title2_font','color',Color);changecss('.content_font','color',Color);changecss('.applemenu div.search ','color',Color);changecss('#topbg ','color',Color);changecss('#topbg a ','color',Color);changecss('.content-wrapper ','color',Color);changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color',Color);}/*************tukar warna tulisan kepada warna green **********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontGreen(){Color='green';changecss('body','color',Color);changecss('.portlet-title','color',Color);changecss('.portlet-topper','color',Color);changecss('a','color',Color);changecss('#nav li a','color',Color);changecss('#nav li ul li a','color',Color);changecss('a:hover','color',Color);changecss('.title2_font','color',Color);changecss('.content_font','color',Color);changecss('.applemenu div.search ','color',Color);changecss('#topbg ','color',Color);changecss('#topbg a ','color',Color);changecss('.content-wrapper ','color',Color);changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color',Color);}/*************tukar warna tulisan kepada warna orange**********//****changecss('<nama class@ id>','<element>','<value>');*************/function fontOrange(){Color='orange';changecss('body','color',Color);changecss('.portlet-topper','color',Color);changecss('.portlet-title','color',Color);changecss('a','color',Color);changecss('#nav li a','color',Color);changecss('#nav li ul li a','color',Color);changecss('a:hover','color',Color);changecss('.title2_font','color',Color);changecss('.content_font','color',Color);changecss('.applemenu div.search ','color',Color);changecss('#topbg ','color',Color);changecss('#topbg a ','color',Color);changecss('.content-wrapper ','color',Color);changecss('input[type="text"], input[type="password"], input[type="file"],input[type="submit"], input[type="button"], input[type="reset"], select, textarea, .textarea','color',Color);}/*******end accessibility************/function popupnr(mylink, windowname, refocus){var mywin, href;if (typeof(mylink) == 'string')   href=mylink;else   href=mylink.href;mywin = window.open('', windowname, 'width=400,height=500,scrollbars=yes');// if we just opened the windowif (   mywin.closed ||    (! mywin.document.URL) ||    (mywin.document.URL.indexOf("about") == 0)   )   mywin.location=href;else if (refocus)   mywin.focus();return false;}function clock() {var digital = new Date();var hours = digital.getHours();var minutes = digital.getMinutes();var seconds = digital.getSeconds();var amOrPm = "a.m";if (hours > 11) amOrPm = "PM";if (hours > 24) amOrPm = "AM";if (hours > 12) hours = hours - 12;if (hours == 0) hours = 12;if (minutes <= 9) minutes = "0" + minutes;if (seconds <= 9) seconds = "0" + seconds;dispTime = "," + " " + hours + ":" + minutes + ":" + seconds + " " + amOrPm;document.getElementById('pendule').innerHTML = dispTime;setTimeout("clock()", 1000);}window.onload=clock;/***********************************************Advertisement footer slider***********************************************/var persistclose= 1 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser sessionvar startX = 0 //set x offset of bar in pixelsvar startY = 0 //set y offset of bar in pixelsvar verticalpos="frombottom" //enter "fromtop" or "frombottom"function iecompattest(){return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}function get_cookie(Name) {var search = Name + "="var returnvalue = "";if (document.cookie.length > 0) {offset = document.cookie.indexOf(search)if (offset != -1) {offset += search.lengthend = document.cookie.indexOf(";", offset);if (end == -1) end = document.cookie.length;returnvalue=unescape(document.cookie.substring(offset, end))}}return returnvalue;}function closebar(){if (persistclose)document.cookie="remainclosed=1"document.getElementById("topbar").style.visibility="hidden"}function staticbar(){barheight=document.getElementById("topbar").offsetHeightvar ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;var d = document;function ml(id){var el=d.getElementById(id);if (!persistclose || persistclose && get_cookie("remainclosed")=="")el.style.visibility="visible"if(d.layers)el.style=el;el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};el.x = startX;if (verticalpos=="fromtop")el.y = startY;else{el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;el.y -= startY;}return el;}window.stayTopLeft=function(){if (verticalpos=="fromtop"){var pY = ns ? pageYOffset : iecompattest().scrollTop;ftlObj.y += (pY + startY - ftlObj.y)/8;}else{var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;ftlObj.y += (pY - startY - ftlObj.y)/8;}ftlObj.sP(ftlObj.x, ftlObj.y);setTimeout("stayTopLeft()", 10);}ftlObj = ml("topbar");stayTopLeft();}if (window.addEventListener)window.addEventListener("load", staticbar, false)else if (window.attachEvent)window.attachEvent("onload", staticbar)else if (document.getElementById)window.onload=staticbar