﻿// Fichier JScript


 // document.Write is questionable and I have known it to cause problems on some browsers

 // this is a more standards orientated approach - targets a Form.

    

// Script is not page dependent - place in included Javascript file to share accross pages.

function appendTime(frm){

    var d = new Date();

    appendParam('uDate', d.getTime(), frm);

}



function appendParam(pName, pVal, tForm){



    var n = document.createElement('input');

    n.setAttribute('name', pName);

    n.setAttribute('type', 'hidden');

    n.setAttribute('value', pVal);



    var f = document.getElementById(tForm);

        if (!f){

            // When using single Form page or not specifying Form

            f = document.forms[0];

        }

    // append the new Element to the Form!

    f.appendChild(n);  

}


