
function imageswap(imgDocID,imgObjName)
{
     document.images[imgDocID].src = eval(imgObjName + ".src");
}


String.prototype.LTrim = new Function("return this.replace(/^\\s+/,'')")
String.prototype.RTrim = new Function("return this.replace(/\\s+$/,'')")
String.prototype.Trim  = new Function("return this.replace(/^\\s+|\\s+$/g,'')")

function str_replace(nach, ersetzte, source) 
{
     anzahl = nach.length;
     dummy = ""
     while (source.indexOf(nach)>=0) 
     {
          aktuell = source.indexOf(nach);
          dummy += source.substr(0, aktuell)
          if (aktuell >= 0) 
               dummy += ersetzte
          source = source.substr((aktuell+anzahl), source.length);
     }
     if (source.length >0) 
          dummy += source
     
     return dummy
}

function ShowImage(imageName)
{
     ShowImageWindow = window.open('./imageview.php?image='+imageName, 'ShowImageWindow', 'width=100, height=100,location=no, status=no, toolbar=no,resizable=yes');
     ShowImageWindow.focus();
}
