function str_trim(_1){
var _2="";
_2=str_trimleft(_1);
_2=str_trimright(_2);
return _2;
}
function str_trimleft(_3){
var _4="";
var i=len=0;
if(_3+""=="undefined"||_3==null){
return null;
}
_3+="";
if(_3.length==0){
_4="";
}else{
len=_3.length;
while((i<=len)&&(_3.charAt(i)==" ")){
i++;
}
_4=_3.substring(i,len);
}
return _4;
}
function str_trimright(_6){
var _7="";
var i=0;
if(_6+""=="undefined"||_6==null){
return null;
}
_6+="";
if(_6.length==0){
_7="";
}else{
i=_6.length-1;
while((i>=0)&&(_6.charAt(i)==" ")){
i--;
}
_7=_6.substring(0,i+1);
}
return _7;
}
function str_replacechar(_9,_a,_b){
newstring="";
for(c=0;c<_b.length;c++){
string_char=_b.charAt(c);
if(string_char==_9){
newstring=newstring+_a;
}else{
newstring=newstring+string_char;
}
}
return newstring;
}
function openWindow(_c,_d,_e,_f){
if(_e==0){
leftpos=10000;
toppos=10000;
heightVar="";
widthVar="";
}else{
leftpos=(screen.width)?(screen.width-_e)/2:100;
toppos=(screen.height)?(screen.height-_f)/2:100;
widthVar="width="+_e+",";
heightVar="height="+_f+",";
}
winobject=window.open(_c,_d,"menubar=0,statusbar=0,scrollbars=1,toolbar=0,location=0,"+widthVar+heightVar+"left="+leftpos+",top="+toppos);
winobject.focus();
}
function setOpenerFieldValue(_10,_11){
if(!_10){
return false;
}
if(!isOpenerWindowOpen()){
return false;
}
field_object=opener.document.getElementById(_10);
if(!field_object){
return false;
}
field_object.value=_11;
return true;
}
function getOpenerFieldValue(_12){
if(!_12){
return null;
}
if(!isOpenerWindowOpen()){
return null;
}
field_object=opener.document.getElementById(_12);
if(!field_object){
return null;
}
return field_object.value;
}
function resizeAndCenterWindow(_13,_14){
window.resizeTo(_13,_14);
leftpos=(window.screen.availWidth)?(window.screen.availWidth-_13)/2:100;
toppos=(window.screen.availHeight)?(window.screen.availHeight-_14)/2:100;
window.moveTo(leftpos,toppos);
}
function focusOpenerWindow(){
if(!isOpenerWindowOpen()){
return false;
}
opener.focus();
return true;
}
function isOpenerWindowOpen(){
if(opener==null){
return false;
}
if(opener.closed){
return false;
}
if(typeof opener.document=="unknown"){
return false;
}
return true;
}
function is_valid_date(_15){
_15=new Date(_15);
return (_15!="NaN");
}
function changeImgSrc(obj,_17){
obj=document.getElementById(obj);
obj.setAttribute("src",_17);
}
function scrollIt(){
newHeight=document.body.scrollHeight;
if(document.compatMode&&document.compatMode!="BackCompat"){
document.documentElement.scrollTop=newHeight;
}else{
document.body.scrollTop=newHeight;
}
keepscrolling=setTimeout("scrollIt()",1000);
}
function startAutoScroll(){
keepscrolling=setTimeout("scrollIt()",1000);
}
function stopAutoScroll(){
clearTimeout(keepscrolling);
}
function updateProgressBar(_18,_19,_1a,_1b,_1c){
progress_bar=_18+"-bar";
progress_title=_18+"-title";
progress_activity=_18+"-activity";
if(_1c){
document.getElementById(progress_title).innerHTML=unescape(_1c);
}
document.getElementById(progress_activity).innerHTML=_1a+" of "+_1b+" ("+_19+"%)";
document.getElementById(progress_bar).style.width=(2*_19);
}
function GenUniqueID(){
var _1d=new Date();
var _1e=(_1d.getTime());
return _1e;
}
function copyElementToClipboard(_1f){
if(!document.body||!document.body.createTextRange){
return;
}
element=document.getElementById(_1f);
if(!element){
return;
}
rng=document.body.createTextRange();
rng.moveToElementText(element);
rng.execCommand("Copy");
}
function dbgDump(_20,_21){
msg="";
counter=0;
for(var _22 in _20){
if(_21){
if(_22.substring(0,_21.length)!=_21){
continue;
}
}
msg+=_22+" = "+_20[_22]+"\r\n";
if(counter==50){
alert(msg);
msg="";
counter=0;
}
counter++;
}
if(counter<50){
alert(msg);
}
}

