jQuery(document).ready(/*This function gets loaded when all the HTML, not including the portlets, isloaded.*/function() {});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 mainmenu(){jQuery(" #nav li").hover(function(){jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(300);},function(){jQuery(this).find('ul:first').fadeOut(300);});}jQuery(document).ready(function(){mainmenu();}); /*---------accordion----------*/ddaccordion.init({headerclass: "silverheader", //Shared CSS class name of headers groupcontentclass: "submenu", //Shared CSS class name of contents grouprevealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseovermouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseovercollapseprev: true, //Collapse previous content (so only one open at any time)? true/falsedefaultexpanded: [0], //index of content(s) open by default [index1, index2, etc] [] denotes no contentonemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)animatedefault: false, //Should contents open by default be animated into view?persiststate: true, //persist state of opened contents within browser session?toggleclass: ["", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]togglehtml: ["", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"oninit:function(headers, expandedindices){ //custom code to run when headers have initalized//do nothing},onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed//do nothing}});/*-------end script-----------*//*-----vozme script-----*/function create_form(d,txt,lang,gn,tgt){fx_2g=d.createElement('form');d.body.appendChild(fx_2g);fx_2g.target=tgt;fx_2g.method='POST';fx_2g.action='http://vozme.com/text2voice.php';//textt=d.createElement('input');t.name='text';t.type='hidden';t.value=txt;fx_2g.appendChild(t);//langl=d.createElement('input');l.name='lang';l.type='hidden';l.value=lang;fx_2g.appendChild(l);//gng=d.createElement('input');g.name='gn';g.type='hidden';g.value=gn;fx_2g.appendChild(g);//interfacei=d.createElement('input');i.name='interface';i.type='hidden';i.value='full';fx_2g.appendChild(i);//submitwindow.open('', tgt, 'width=300,height=220,scrollbars=yes,location=yes,menubar=yes,resizable=yes,status=yes,toolbar=yes'); fx_2g.submit();delete fx_2g;return false;}function get_selection(){var lang = arguments[0] || '';var gn = arguments[1] || '';var tgt='voice_'+parseInt(Math.random()*100000);var d=window.document;if(window.getSelection){ txt=window.getSelection();} else if(d.getSelection){ txt=d.getSelection();} else if(d.selection){ txt=d.selection.createRange().text;} else{ txt='';}create_form(d,txt,lang,gn,tgt);return false;}function get_id(id){var lang = arguments[1] || '';var gn = arguments[2] || '';var tgt= arguments[3] || 'voice_'+parseInt(Math.random()*100000);var d=window.document;var txt='';txt=d.getElementById(id).innerHTML;create_form(d,txt,lang,gn,tgt);return false;}function get_blogger(id){var lang = arguments[1] || '';var gn = arguments[2] || '';var tgt='voice_'+parseInt(Math.random()*100000);var d=window.document;var txt='';pN=d.getElementsByName(id)[0].parentNode;for(n=0;n<pN.childNodes.length;n++){    if(pN.childNodes[n].className == 'post-title entry-title' || pN.childNodes[n].className == 'post-title' || pN.childNodes[n].className == 'post-body entry-content' || pN.childNodes[n].className == 'post-body'){        txt=txt + ' ' + pN.childNodes[n].innerHTML;    }}create_form(d,txt,lang,gn,tgt);return false;}/*---------end script----------*//*-----w3c------------------*/var min=8;var max=14;var font = document.getElementsByTagName('font');var span = document.getElementsByTagName('span');	   var link = document.getElementsByTagName('a');  var table = document.getElementsByTagName('td');	   var div = document.getElementsByTagName('div');var defaultFont = Array(0);var defaultSpan = Array(0);	   var defaultTable = Array(0);	function initFontColor() {if(defaultFont.length == 0 && defaultSpan.length == 0 && defaultTable.length == 0){   for(i=0;i<font.length;i++) {		        defaultFont[i] = font[i].style.color;   }      for(i=0;i<span.length;i++) {			      defaultSpan[i] = span[i].style.color;   }	  	   for(i=0;i<table.length;i++) {      defaultTable[i] = table[i].style.color;   }}}function redFont() {   initFontColor();   for(i=0;i<font.length;i++) {		        font[i].style.color = "#FF0000"   }      for(i=0;i<span.length;i++) {	      span[i].style.color = "#FF0000"   }	  	   for(i=0;i<table.length;i++) {      table[i].style.color = "#FF0000"   }}function blueFont() {   initFontColor();	      for(i=0;i<font.length;i++) {		        font[i].style.color = "#0000FF"   }      for(i=0;i<span.length;i++) {	      span[i].style.color = "#0000FF"   }	  	   for(i=0;i<table.length;i++) {      table[i].style.color = "#0000FF"   }}function yellowFont() {   initFontColor();	      for(i=0;i<font.length;i++) {		        font[i].style.color = "#FFFF66"   }      for(i=0;i<span.length;i++) {	      span[i].style.color = "#FFFF66"   }	  	   for(i=0;i<table.length;i++) {      table[i].style.color = "#FFFF66"   }}function greenFont() {   initFontColor();	      for(i=0;i<font.length;i++) {		        font[i].style.color = "#00FF00"   }      for(i=0;i<span.length;i++) {	      span[i].style.color = "#00FF00"   }	  	   for(i=0;i<table.length;i++) {      table[i].style.color = "#00FF00"   }}function resetFontSize() {      for(i=0;i<font.length;i++) {		        font[i].style.fontSize = "";      font[i].style.color = defaultFont[i];   }      for(i=0;i<span.length;i++) {	      span[i].style.fontSize = "";      span[i].style.color = defaultSpan[i];   }	      	   for(i=0;i<link.length;i++) {	      link[i].style.fontSize = "";   }	   for(i=0;i<table.length;i++) {      table[i].style.fontSize = "";      table[i].style.color = defaultTable[i];   }}function increaseFontSize() {   for(i=0;i<font.length;i++) {		        if(font[i].style.fontSize) { var s = parseInt(font[i].style.fontSize.replace("px",""));      } else { var s = 12;      }      if(s!=max) { s += 1;      }      s = 14;      font[i].style.fontSize = s+"px";   }      for(i=0;i<span.length;i++) {		        if(span[i].style.fontSize) { var s = parseInt(span[i].style.fontSize.replace("px",""));      } else { var s = 12;      }      if(s!=max) { s += 1;      }      s = 14;      span[i].style.fontSize = s+"px";   }	      for(i=0;i<link.length;i++) {   	if(link[i].id != "test"){      if(link[i].style.fontSize) {var s = parseInt(link[i].style.fontSize.replace("px",""));} else { var s = 12;}if(s!=max) {s += 1;}s = 14;link[i].style.fontSize = s+"px";   }  }   for(i=0;i<table.length;i++) {		        if(table[i].style.fontSize) { var s = parseInt(table[i].style.fontSize.replace("px",""));      } else { var s = 12;      }      if(s!=max) { s += 1;      }      s = 14;      table[i].style.fontSize = s+"px";   }   }function decreaseFontSize() {      for(i=0;i<font.length;i++) {      if(font[i].style.fontSize) { var s = parseInt(font[i].style.fontSize.replace("px",""));      } else { var s = 12;      }      if(s!=min) { s -= 1;      }      s = 8;      font[i].style.fontSize = s+"px"   }        for(i=0;i<span.length;i++) {      if(span[i].style.fontSize) { var s = parseInt(span[i].style.fontSize.replace("px",""));      } else { var s = 12;      }      if(s!=min) { s -= 1;      }      s = 8;      span[i].style.fontSize = s+"px"   }   	         for(i=0;i<link.length;i++) {   	if(link[i].id != "test"){  if(link[i].style.fontSize) { var s = parseInt(link[i].style.fontSize.replace("px",""));  } else { var s = 12;  }  if(s!=min) { s -= 1;  }  s = 8;  link[i].style.fontSize = s+"px" }   }	         for(i=0;i<table.length;i++) {      if(table[i].style.fontSize) { var s = parseInt(table[i].style.fontSize.replace("px",""));      } else { var s = 12;      }      if(s!=min) { s -= 1;      }      s = 8;      table[i].style.fontSize = s+"px"   }  	   	  }/*---------end script----------*/SSS_faq = {init : function() {jQuery('div.faq .answer').not(':first').slideToggle('fast');jQuery('div.faq .question').click(function() { SSS_faq.toggle(this) });},toggle : function(elt) {jQuery(elt).toggleClass('active');jQuery(elt).siblings('.answer').slideToggle('fast');}}jQuery(function() { SSS_faq.init();});/*-------------end-----------*/var montharray=new Array("1","2","3","4","5","6","7","8","9","10","11","12")var serverdate=new Date()function padlength(what){var output=(what.toString().length==1)? "0"+what : whatreturn output}function displaytime(){serverdate.setSeconds(serverdate.getSeconds()+1)var datestring=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getMonth())+", "+serverdate.getFullYear()var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())document.getElementById("servertime").innerHTML="  "+timestringreturn timestring}window.onload=function(){setInterval("displaytime()", 1000)} 		function filter (phrase, _id){ 			var words = phrase.value.toLowerCase().split(" "); 			var table = document.getElementById(_id); 			var ele; 			for (var r = 1; r < table.rows.length; r++){ 				ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,""); 	        		var displayStyle = 'none'; 	        		for (var i = 0; i < words.length; i++) { 		    			if (ele.toLowerCase().indexOf(words[i])>=0) 						displayStyle = ''; 		   		 	else { 						displayStyle = 'none'; 						break; 		   			 } 	        		} 			table.rows[r].style.display = displayStyle; 			}}function getPixelsFromTop(obj){objFromTop = obj.offsetTop;while(obj.offsetParent!=null) {objParent = obj.offsetParent;objFromTop += objParent.offsetTop;obj = objParent;}return objFromTop;}function Clickheretoprint(){ 	 var disp_setting="toolbar=yes,directories=yes,menubar=yes,resizable=1,scrollbars=1, width=1100, height=800, left=100, top=25";  		var content_vlue = document.getElementById("print_content").innerHTML;  		var docprint=window.open("","",disp_setting);   		docprint.document.open();   		docprint.document.write('<html><head><title>Economic Planning Unit</title>');   		docprint.document.write('<link href="/html/themes/epu/css/custom.css" rel="stylesheet" type="text/css" />');   		docprint.document.write('</head><body onLoad="self.print()" style="background-image:url(images/bg6.png); background-color: #ffffff;"><center>');   		docprint.document.write(content_vlue);   		docprint.document.write('</center></body></html>');   		docprint.document.close();   		docprint.focus();}jQuery(document).ready(function () {jQuery('#basicModal input.basic, #basicModal a.basic').click(function (e) {e.preventDefault();jQuery('#basicModalContent').modal();});});function move_in(img_name,img_src) {document[img_name].src=img_src;}function move_out(img_name,img_src) {document[img_name].src=img_src;}function move(img_name,img_src) {document[img_name].src=img_src;}function select2Click(obj) 		{ 			//alert(obj.value); 			if (obj.value == "") {} 			else 			{ 			//alert(obj.value); 			window.open(obj.value); 			} 		} 		  		function select2Click2(obj)  		{  			//alert(obj.value);  			if (obj.value == "") {}  			else  			{  			//alert(obj.value);  			window.location=obj.value;  			} 		} 		function delaydelay() {var contentBotDiv = document.getElementById("content_bottomss");var contentBotDiv2 = document.getElementById("content_bottomsss");var contentTopDiv = document.getElementById("content_topss");var contentBots = getPixelsFromTop(contentBotDiv);var contentBotss = getPixelsFromTop(contentBotDiv2);var contentTops = getPixelsFromTop(contentTopDiv);var contentHeights = contentBots - contentTops - 34;var contentHeightss = contentBotss - contentTops - 198;if (contentBotss > contentBots) {getElementByClass('portlet-content'); }else if (contentBotss < contentBots) {	document.getElementById('column-2').style.height= contentHeights + 'px';}}var allHTMLTags = new Array();function getElementByClass(theClass) {//Create Array of All HTML Tagsvar allHTMLTags=document.getElementsByTagName("*");//Loop through all tags using a for loopfor (i=0; i<allHTMLTags.length; i++) {//Get all tags with the specified class name.if (allHTMLTags[i].className==theClass) {//Place any code you want to apply to all//pages with the class specified.//In this example is to "display:none;" them//Making them all dissapear on the page.allHTMLTags[i].style.height = contentHeightss + 'px';}}}setTimeout("delaydelay()",1000);/*------------intranet script-----------*/jQuery(document).ready(function() {//When page loads...jQuery(".tabss_content").hide(); //Hide all contentjQuery("ul.tabss li:first").addClass("active").show(); //Activate first tabjQuery(".tabss_content:first").show(); //Show first tab content//On Click EventjQuery("ul.tabss li").click(function() {jQuery("ul.tabss li").removeClass("active"); //Remove any "active" classjQuery(this).addClass("active"); //Add "active" class to selected tabjQuery(".tabss_content").hide(); //Hide all tab contentvar activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + contentjQuery(activeTab).fadeIn(); //Fade in the active ID contentreturn false;});});/*------------end intranet script-----------*/