// funkcija za potrjevanje forme
function submit(formName)
{
   document.forms[formName].submit()
}

function submitCommand(formName, cmd)
{
    document.forms[formName].command.value=cmd
    document.forms[formName].submit()
}

function submitCommandInNewWindow(formName, cmd)
{
    document.forms[formName].command.value=cmd
    document.forms[formName].target='_blank'
    document.forms[formName].submit()
}

function submitCommandIdProduct(formName, cmd, idProduct)
{
    document.forms[formName].command.value=cmd
    document.forms[formName].idProduct.value=idProduct
    document.forms[formName].submit()
}

function submitCommandAddToBasket(formName, idProduct, forwardToUse, reqsn)
{
    document.forms[formName].idProduct.value=idProduct
    document.forms[formName].forwardToUse.value=forwardToUse
    document.forms[formName].reqsn.value=reqsn
    document.forms[formName].submit()
}

function submitId(formName, idVal)
{
    document.forms[formName].id.value=idVal
    document.forms[formName].submit()
}

function submitIdInNewWindow(formName, idVal)
{
    document.forms[formName].id.value=idVal
    document.forms[formName].target='_blank'
    document.forms[formName].submit()
}

// Original:  Ronnie T. Moore
// Web Site:  The JavaScript Source
// Dynamic 'fix' by: Nannette Thacker
// Web Site: http://www.shiningstar.net
// This script and many more are available free online at
// The JavaScript Source!! http://javascript.internet.com
//<!-- Begin -->
function textCounter(field, countfield, maxlimit) {
    if (field.value.length > maxlimit) // if too long...trim it!
        field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
    else
        countfield.value = maxlimit - field.value.length;
}
//<!-- End -->


