function ltrim(value){var re=/\s*((\S+\s*)*)/;return value.replace(re,"$1");}
function rtrim(value){var re=/((\s*\S+)*)\s*/;return value.replace(re,"$1");}
function trim(value){return ltrim(rtrim(value));}
function formatNumber(num,dec,thou,pnt,curr1,curr2,n1,n2){var x=Math.round(num*Math.pow(10,dec));if(x>=0)n1=n2='';var y=(''+Math.abs(x)).split('');var z=y.length-dec;if(z<0)z--;for(var i=z;i<0;i++)y.unshift('0');if(z<0)z=1;y.splice(z,0,pnt);if(y[0]==pnt)y.unshift('0');while(z>3){z-=3;y.splice(z,0,thou);}var r=curr1+n1+y.join('')+n2+curr2;return r;}
function showfeature(filepath){var width=600;var height=300;var left=(screen.width/2)-(width/2);var top=(screen.height/2)-(height/2);window.open(filepath,"featurepopup","resizable=yes,scrollbars=yes,location=no,fullscreen=no,left="+left+",top="+top+",height="+height+",width="+width);}
function buttonHover(obj,hover,showlock){if(hover){if(showlock){obj.cells[0].className='lock_custbuttonplefthover';}
else{obj.cells[0].className='custbuttonplefthover';}
obj.cells[1].className='custbuttonpmidhover';obj.cells[2].className='custbuttonprighthover';}
else{if(showlock){obj.cells[0].className='lock_custbuttonpleft';}
else{obj.cells[0].className='custbuttonpleft';}
obj.cells[1].className='custbuttonpmid';obj.cells[2].className='custbuttonpright';}}
function buttonHover2(obj,hover){if(hover){obj.cells[1].className='enlargehover';obj.cells[3].className='enlargetxt_hover';}
else{obj.cells[1].className='enlargenormal';obj.cells[3].className='enlargetxt_normal';}}
function LD_sIRes(){var i,x,a=document.LD_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function LD_PILoad(){var d=document;if(d.images){if(!d.LD_p)d.LD_p=new Array();var i,j=d.LD_p.length,a=LD_PILoad.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.LD_p[j]=new Image;d.LD_p[j++].src=a[i];}}}
function LD_sIChg(){var i,j=0,x,a=LD_sIChg.arguments;document.LD_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=LD_findObj(a[i]))!=null){document.LD_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function LD_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=LD_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}