 function changeImage(img, id){
        document.getElementById(id).src=img;
    }

 function Trim(TRIM_VALUE){
    if(TRIM_VALUE.length < 1){
        return"";
    }
    TRIM_VALUE = RTrim(TRIM_VALUE);
    TRIM_VALUE = LTrim(TRIM_VALUE);
    if(TRIM_VALUE==""){
        return "";
    }else{
        return TRIM_VALUE;
    }
} //End Function



function RTrim(VALUE){
    var w_space = String.fromCharCode(32);
    var v_length = VALUE.length;
    var strTemp = "";
    if(v_length < 0){
        return"";
    }
    var iTemp = v_length -1;
    while(iTemp > -1){
        if(VALUE.charAt(iTemp) == w_space){
        }else{
            strTemp = VALUE.substring(0,iTemp +1);
            break;
        }
        iTemp = iTemp-1;
    } //End While
    return strTemp;
} //End Function



function LTrim(VALUE){
    var w_space = String.fromCharCode(32);
    if(v_length < 1){
        return"";
    }
    var v_length = VALUE.length;
    var strTemp = "";
    var iTemp = 0;
    while(iTemp < v_length){
        if(VALUE.charAt(iTemp) == w_space){
        }else{
            strTemp = VALUE.substring(iTemp,v_length);
            break;
        }
        iTemp = iTemp + 1;
    } //End While
    return strTemp;
} //End Function

function fnOpenWin(url) {
         if (document.all)
             var xMax = screen.width, yMax = screen.height;
         else
             if (document.layers)
                 var xMax = window.outerWidth, yMax = window.outerHeight;
             else
                 var xMax = 800, yMax=600;
         var xOffset = (xMax - 610)/2, yOffset = (yMax - 420)/2;
         window.open(url,'centered','width=680,height=500,left=50,top=30,scrollbars=1,resizable=0,menubar=no,toolbar=no,directories=no,location=no');
}//fnOpenWin


