
var imgBaseUrl;         // set this to a string with the basepath for image reference
var imgObjToUpdate;     // set this to the img object on the page
var fldObjToUpdate;     // set this to the hidden input object on the page
function UpdateImageName(imgName){
    try{
        imgObjToUpdate.src = imgBaseUrl + imgName;
        fldObjToUpdate.value = imgName;
    }catch(e1){
        alert(e1);
    }
}

function SetObjectReferences(imgId, fldId, baseUrl){
    //alert('setting refs for: ' + imgId + ' : ' + fldId);
    try{
        imgObjToUpdate = document.getElementById(imgId);
        fldObjToUpdate = document.getElementById(fldId);
        imgBaseUrl = baseUrl;
        //alert(imgObjToUpdate.outerHTML);
        //alert(fldObjToUpdate.outerHTML);
    }
    catch(e1){
        alert(e1);
    }
}
var ip = '<!--#echo var="REMOTE_ADDR"-->'
function SaveIpAddress() {
    try {
        alert("Here should be identified ip-address!");
        /*document.all("ipaddress").value = "0.0.0.0";*/
    }
     catch(e1){
        alert(e1);
    }   
}

