function at_attach(parent, child, showtype, position, cursor){  var p = document.getElementById(parent);  var c = document.getElementById(child);  p["at_parent"]     = p.id;  c["at_parent"]     = p.id;  p["at_child"]      = c.id;  c["at_child"]      = c.id;  p["at_position"]   = position;  c["at_position"]   = position;  c.style.position   = "absolute";  c.style.visibility = "hidden";  if (cursor != undefined) p.style.cursor = cursor;  switch (showtype)  {    case "click":      p.onclick     = at_click;      p.onmouseout  = at_hide;      c.onmouseover = at_show;      c.onmouseout  = at_hide;      break;    case "hover":      p.onmouseover = at_show;      p.onmouseout  = at_hide;      c.onmouseover = at_show;      c.onmouseout  = at_hide;      break;  }}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_mdt/images/nsm_mdt/bgnilai.jpg)';   if (bdy[1]) bdy[1].style.backgroundImage = 'url(/html/themes/nsm_mdt/images/nsm_mdt/bgbesar1.jpg)';    if (bdy[2]) bdy[2].style.backgroundImage = 'url(/html/themes/nsm_mdt/images/nsm_mdt/bgbesar2.jpg)';    if (bdy[3]) bdy[3].style.backgroundImage = 'url(/html/themes/nsm_mdt/images/nsm_mdt/NATURE-WaitingForSunset.jpg)';    if (bdy[4]) bdy[4].style.backgroundImage = 'url(/html/themes/nsm_mdt/images/nsm_mdt/9.jpg)';    if (bdy[5]) bdy[5].style.backgroundImage = 'url(/html/themes/nsm_mdt/images/nsm_mdt/3.jpg)';    if (bdy[6]) bdy[6].style.backgroundImage = 'url(/html/themes/nsm_mdt/images/nsm_mdt/aqua.jpg)';    if (bdy[7]) bdy[7].style.backgroundImage = 'url(/html/themes/nsm_mdt/images/nsm_mdt/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);});}});}}};jQuery(function(){                            jQuery('#container-5').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'normal' });                            jQuery('<p><a href="#">Disable third tab<\/a><\/p>').prependTo('#fragment-28').find('a').click(function() {                    jQuery(this).parents('div').eq(1).disableTab(3);                    return false;                });                jQuery('<p><a href="#">Activate third tab<\/a><\/p>').prependTo('#fragment-28').find('a').click(function() {                    jQuery(this).parents('div').eq(1).triggerTab(3);                    return false;                });                jQuery('<p><a href="#">Enable third tab<\/a><\/p>').prependTo('#fragment-28').find('a').click(function() {                    jQuery(this).parents('div').eq(1).enableTab(3);                    return false;                });            });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]})ddaccordion.init({headerclass: "silverheader", contentclass: "submenu", revealtype: "click", collapseprev: true, defaultexpanded: [5], onemustopen: true,animatedefault: false, persiststate: true, toggleclass: ["", "selected"], togglehtml: ["", "", ""], animatespeed: "normal", oninit:function(headers, expandedindices){ },onopenclose:function(header, index, state, isuseractivated){ }})/* 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(){jQuery(".lightbox").lightbox();});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;}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();}});			        });	/*********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);}}// 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);}}/********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);}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("fontSize");size = cookie ? cookie : 11;cookieColor = readCookie("color");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("fontSize", size, 365);createCookie("color", 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','#ffffff');changecss('.portlet-topper','color','#ffffff');changecss('#nav a','color','#ffffff');changecss('#p_p_id_71_INSTANCE_0ESL_ .portlet-content a','color','black');changecss('#p_p_id_71_INSTANCE_5nrA_ .portlet-content a','color','black');changecss('body','color','black');changecss('a','color','#5078AA');changecss('a:hover','color','#7EACD6');changecss('.title2_font','color','#0000FF');changecss('.content_font','color','#000000');changecss('#topbg ','color','#ffffff');changecss('#topbg a ','color','#ffffff');changecss('.nav-menu-style-1 li a','color','#ffffff');changecss('#nav li ul li a','color','#ffffff');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('#p_p_id_71_INSTANCE_0ESL_ .portlet-content a','color',Color);changecss('#p_p_id_71_INSTANCE_5nrA_ .portlet-content 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('.nav-menu-style-1 li a','color',Color);changecss('#nav li ul li a','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('#p_p_id_71_INSTANCE_0ESL_ .portlet-content a','color',Color);changecss('#p_p_id_71_INSTANCE_5nrA_ .portlet-content 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('.nav-menu-style-1 li a','color',Color);changecss('#nav li ul li a','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('#p_p_id_71_INSTANCE_0ESL_ .portlet-content a','color',Color);changecss('#p_p_id_71_INSTANCE_5nrA_ .portlet-content a','color',Color);changecss('#nav 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('.nav-menu-style-1 li a','color',Color);changecss('#nav li ul li a','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 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('.nav-menu-style-1 li a','color',Color);changecss('#nav li ul li a','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************/var switchcontent_ajax_msg='<em>Loading Ajax content...</em>' var switchcontent_ajax_bustcache=truefunction switchcontent(className, filtertag){this.className=classNamethis.collapsePrev=false this.persistType="none" this.filter_content_tag=(typeof filtertag!="undefined")? filtertag.toLowerCase() : ""this.ajaxheaders={}}switchcontent.prototype.setStatus=function(openHTML, closeHTML){this.statusOpen=openHTMLthis.statusClosed=closeHTML}switchcontent.prototype.setColor=function(openColor, closeColor){this.colorOpen=openColorthis.colorClosed=closeColor}switchcontent.prototype.setPersist=function(bool, days){ if (bool==true){ if (typeof days=="undefined") this.persistType="session"else{ this.persistType="days"this.persistDays=parseInt(days)}}elsethis.persistType="none"}switchcontent.prototype.collapsePrevious=function(bool){ this.collapsePrev=bool}switchcontent.prototype.setContent=function(index, filepath){ this.ajaxheaders["header"+index]=filepath}switchcontent.prototype.sweepToggle=function(setting){ if (typeof this.headers!="undefined" && this.headers.length>0){ for (var i=0; i<this.headers.length; i++){if (setting=="expand")this.expandcontent(this.headers[i]) else if (setting=="contract")this.contractcontent(this.headers[i]) }}}switchcontent.prototype.defaultExpanded=function(){ var expandedindices=[] for (var i=0; (!this.collapsePrev && i<arguments.length) || (this.collapsePrev && i==0); i++)expandedindices[expandedindices.length]=arguments[i]this.expandedindices=expandedindices.join(",")}switchcontent.prototype.togglecolor=function(header, status){if (typeof this.colorOpen!="undefined")header.style.color=status}switchcontent.prototype.togglestatus=function(header, status){if (typeof this.statusOpen!="undefined")header.firstChild.innerHTML=status}switchcontent.prototype.contractcontent=function(header){var innercontent=document.getElementById(header.id.replace("-title", "")) innercontent.style.display="none"this.togglestatus(header, this.statusClosed)this.togglecolor(header, this.colorClosed)}switchcontent.prototype.expandcontent=function(header){var innercontent=document.getElementById(header.id.replace("-title", ""))if (header.ajaxstatus=="waiting"){switchcontent.connect(header.ajaxfile, header)}innercontent.style.display="block"this.togglestatus(header, this.statusOpen)this.togglecolor(header, this.colorOpen)}switchcontent.prototype.toggledisplay=function(header){var innercontent=document.getElementById(header.id.replace("-title", "")) if (innercontent.style.display=="block")this.contractcontent(header)else{this.expandcontent(header)if (this.collapsePrev && typeof this.prevHeader!="undefined" && this.prevHeader.id!=header.id) this.contractcontent(this.prevHeader) }if (this.collapsePrev)this.prevHeader=header }switchcontent.prototype.collectElementbyClass=function(classname){ var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") this.headers=[], this.innercontents=[]if (this.filter_content_tag!="") var allelements=document.getElementsByTagName(this.filter_content_tag)else var allelements=document.all? document.all : document.getElementsByTagName("*")for (var i=0; i<allelements.length; i++){if (typeof allelements[i].className=="string" && allelements[i].className.search(classnameRE)!=-1){if (document.getElementById(allelements[i].id+"-title")!=null){ this.headers[this.headers.length]=document.getElementById(allelements[i].id+"-title")this.innercontents[this.innercontents.length]=allelements[i] }}}}switchcontent.prototype.init=function(){var instanceOf=thisthis.collectElementbyClass(this.className) if (this.headers.length==0) returnif (this.persistType=="days" && (parseInt(switchcontent.getCookie(this.className+"_dtrack"))!=this.persistDays))switchcontent.setCookie(this.className+"_d", "", -1) var opencontents_ids=(this.persistType=="session" && switchcontent.getCookie(this.className)!="")? ','+switchcontent.getCookie(this.className)+',' : (this.persistType=="days" && switchcontent.getCookie(this.className+"_d")!="")? ','+switchcontent.getCookie(this.className+"_d")+',' : (this.expandedindices)? ','+this.expandedindices+',' : ""for (var i=0; i<this.headers.length; i++){ if (typeof this.ajaxheaders["header"+i]!="undefined"){ this.headers[i].ajaxstatus='waiting'this.headers[i].ajaxfile=this.ajaxheaders["header"+i]}if (typeof this.statusOpen!="undefined") this.headers[i].innerHTML='<span class="status"></span>'+this.headers[i].innerHTML if (opencontents_ids.indexOf(','+i+',')!=-1){ this.expandcontent(this.headers[i]) if (this.collapsePrev) this.prevHeader=this.headers[i]  }else this.contractcontent(this.headers[i]) this.headers[i].onclick=function(){instanceOf.toggledisplay(this)}}switchcontent.dotask(window, function(){instanceOf.rememberpluscleanup()}, "unload") }switchcontent.prototype.rememberpluscleanup=function(){var opencontents=new Array("none")for (var i=0; i<this.innercontents.length; i++){if (this.persistType!="none" && this.innercontents[i].style.display=="block" && (!this.collapsePrev || (this.collapsePrev && opencontents.length<2)))opencontents[opencontents.length]=i this.headers[i].onclick=null }if (opencontents.length>1) opencontents.shift() if (typeof this.statusOpen!="undefined")this.statusOpen=this.statusClosed=null if (this.persistType=="session")switchcontent.setCookie(this.className, opencontents.join(",")) else if (this.persistType=="days" && typeof this.persistDays=="number"){ switchcontent.setCookie(this.className+"_d", opencontents.join(","), this.persistDays)switchcontent.setCookie(this.className+"_dtrack", this.persistDays, this.persistDays)}}switchcontent.dotask=function(target, functionref, tasktype){var tasktype=(window.addEventListener)? tasktype : "on"+tasktypeif (target.addEventListener)target.addEventListener(tasktype, functionref, false)else if (target.attachEvent)target.attachEvent(tasktype, functionref)}switchcontent.connect=function(pageurl, header){var page_request = falsevar bustcacheparameter=""if (window.ActiveXObject){ try {page_request = new ActiveXObject("Msxml2.XMLHTTP")} catch (e){try{page_request = new ActiveXObject("Microsoft.XMLHTTP")}catch (e){}}}else if (window.XMLHttpRequest) page_request = new XMLHttpRequest()elsereturn falsepage_request.onreadystatechange=function(){switchcontent.loadpage(page_request, header)}if (switchcontent_ajax_bustcache) bustcacheparameter=(pageurl.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()page_request.open('GET', pageurl+bustcacheparameter, true)page_request.send(null)}switchcontent.loadpage=function(page_request, header){var innercontent=document.getElementById(header.id.replace("-title", "")) innercontent.innerHTML=switchcontent_ajax_msg if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){innercontent.innerHTML=page_request.responseTextheader.ajaxstatus="loaded"}}switchcontent.getCookie=function(Name){ var re=new RegExp(Name+"=[^;]+", "i"); if (document.cookie.match(re)) return document.cookie.match(re)[0].split("=")[1] return ""}switchcontent.setCookie=function(name, value, days){if (typeof days!="undefined"){ var expireDate = new Date()var expstring=expireDate.setDate(expireDate.getDate()+days)document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()}elsedocument.cookie = name+"="+value}// Copyright (C) 2005-2008 Ilya S. Lyubinskiy. All rights reserved.// Technical support: http://www.php-development.ru///// YOU MAY NOT// (1) Remove or modify this copyright notice.// (2) Re-distribute this code or any part of it.//     Instead, you may link to the homepage of this code://     http://www.php-development.ru/javascripts/dropdown.php//// YOU MAY// (1) Use this code on your website.// (2) Use this code as part of another product.//// NO WARRANTY// This code is provided "as is" without warranty of any kind.// You expressly acknowledge and agree that use of this code is at your own risk.// ***** Popup Control *********************************************************// ***** at_show_aux *****function at_show_aux(parent, child){  var p = document.getElementById(parent);  var c = document.getElementById(child );  var top  = (c["at_position"] == "y") ? p.offsetHeight+2 : 0;  var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;  for (; p; p = p.offsetParent)  {    top  += p.offsetTop;    left += p.offsetLeft;  }  c.style.position   = "absolute";  c.style.top        = top +'px';  c.style.left       = left+'px';  c.style.visibility = "visible";}// ***** at_show *****function at_show(){  var p = document.getElementById(this["at_parent"]);  var c = document.getElementById(this["at_child" ]);  at_show_aux(p.id, c.id);  clearTimeout(c["at_timeout"]);}// ***** at_hide *****function at_hide(){  var p = document.getElementById(this["at_parent"]);  var c = document.getElementById(this["at_child" ]);  c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 333);}// ***** at_click *****function at_click(){  var p = document.getElementById(this["at_parent"]);  var c = document.getElementById(this["at_child" ]);  if (c.style.visibility != "visible") at_show_aux(p.id, c.id); else c.style.visibility = "hidden";  return false;}// ***** at_attach *****// PARAMETERS:// parent   - id of the parent html element// child    - id of the child  html element that should be droped down// showtype - "click" = drop down child html element on mouse click//            "hover" = drop down child html element on mouse over// position - "x" = display the child html element to the right//            "y" = display the child html element below// cursor   - omit to use default cursor or specify CSS cursor namefunction at_attach(parent, child, showtype, position, cursor){  var p = document.getElementById(parent);  var c = document.getElementById(child);  p["at_parent"]     = p.id;  c["at_parent"]     = p.id;  p["at_child"]      = c.id;  c["at_child"]      = c.id;  p["at_position"]   = position;  c["at_position"]   = position;  c.style.position   = "absolute";  c.style.visibility = "hidden";  if (cursor != undefined) p.style.cursor = cursor;  switch (showtype)  {    case "click":      p.onclick     = at_click;      p.onmouseout  = at_hide;      c.onmouseover = at_show;      c.onmouseout  = at_hide;      break;    case "hover":      p.onmouseover = at_show;      p.onmouseout  = at_hide;      c.onmouseover = at_show;      c.onmouseout  = at_hide;      break;  }}jQuery(document).ready(function(){/* This code is executed after the DOM has been completely loaded */var totWidth=0;var positions = new Array();jQuery('#slides .slide').each(function(i){/* Traverse through all the slides and store their accumulative widths in totWidth */positions[i]= totWidth;totWidth += jQuery(this).width();/* The positions array contains each slide's commulutative offset from the left part of the container */if(!jQuery(this).width()){alert("Please, fill in width & height for all your images!");return false;}});jQuery('#slides').width(totWidth);/* Change the cotnainer div's width to the exact width of all the slides combined */jQuery('#menu ul li a').click(function(e,keepScroll){/* On a thumbnail click */jQuery('li.menuItem').removeClass('act').addClass('inact');jQuery(this).parent().addClass('act');var pos = jQuery(this).parent().prevAll('.menuItem').length;jQuery('#slides').stop().animate({marginLeft:-positions[pos]+'px'},450);/* Start the sliding animation */e.preventDefault();/* Prevent the default action of the link */// Stopping the auto-advance if an icon has been clicked:if(!keepScroll) clearInterval(itvl);});jQuery('#menu ul li.menuItem:first').addClass('act').siblings().addClass('inact');/* On page load, mark the first thumbnail as active *//***** * *	Enabling auto-advance. * ****/ var current=1;function autoAdvance(){if(current==-1) return false;jQuery('#menu ul li a').eq(current%jQuery('#menu ul li a').length).trigger('click',[true]);	// [true] will be passed as the keepScroll parameter of the click function on line 28current++;}// The number of seconds that the slider will auto-advance in:var changeEvery = 10;var itvl = setInterval(function(){autoAdvance()},changeEvery*1000);/* End of customizations */});