function PercentBar(comp)
{
 var str="";
 if (!comp) comp=0;
 str+='<table border="0" cellpadding="0" cellspacing="0">';
 str+='<tr>';
 str+='<td><img src="images/percent01.gif" width="3" height="22"/></td>';
 if (comp>0)
    { 
     str+='<td background="images/percent.gif">';
     str+='<img src="images/spacer.gif" height="22" border="0" width="'+4*comp+'">';
     str+='</img></td>';
    }
 if (comp<100)
    {
     str+='<td background="images/percent02.gif">';
     str+='<img src="images/spacer.gif" height="22" border="0" width="'+(400-4*comp)+'">';
     str+='</img></td>';
    }
 str+='<td><img src="images/percent03.gif" width="2" height="22"/></td>';
 str+='</tr>';
 str+='</table>';
 return str;
}       
//********************************************************************************************************************************  
// FUNCTION  
// PURPOSE   
// PARAMS
// RETURNS   
//********************************************************************************************************************************    
function ReplaceHardBreaks(str)
{
 ReplaceText(str,"#","<br/>");
}
//********************************************************************************************************************************  
// FUNCTION  
// PURPOSE   
// PARAMS    str1 - string where text should be replaced
//           str2 - old text
//           str3 - new text
// RETURNS   
//********************************************************************************************************************************    
function ReplaceText(str1,str2,str3)
{
 var ss,resS,oldS;
 
 ss = new String(str1);
 oldS= new RegExp(str2,"g"); 
 resS = ss.replace(oldS,str3);
 return resS;
}
//********************************************************************************************************************************    
function isEmpty(s)
{   
	if((s == null) || (s.length == 0)) return true;
	var reg = new RegExp("^\\s+$","g");
	return reg.test(s);

}
