<!--
//==================================================================================
// FILE: class.template.php
// DESC: Templating class (used for shop). Written out of office hours
// AUTH: 22/09/2003 RPN Creation
// MODS: 10/12/2004 RPN Brought code in line with coding standards
//==================================================================================


//==================================================================================
// FUNC: updateQuantity
// AUTH: 10/12/2004 RPN
// DESC: updates quantity in box next to each item
// ARGS: form name, and change value
// MODS: 
//==================================================================================
function updateQuantity (formName, changeValue)
{
    temp = Number(document.getElementById(formName).quantity.value);
    {
        temp += Number(changeValue);
    }
    if (temp > 0) 
    {
        document.getElementById(formName).quantity.value = temp;
    }
}




//==================================================================================
// FUNC: confirmDelete
// AUTH: 14/12/2004 RPN
// DESC: checks to see if user wants to delete a row
// ARGS: none
// RETN: true / false
// MODS: 
//==================================================================================
function confirmDelete()
{
    result = confirm("Are you sure you want to delete this variation?");
    return result;
}





//==================================================================================
// FUNC: fullPhoto
// AUTH: 14/12/2004 RPN
// DESC: opens popup window
// ARGS: none
// RETN: true / false
// MODS: 
//==================================================================================
function fullPhoto(id,field)
{
    window.open("fullphoto.php?id="+id+"&field="+field,"popupImage","width=10,height=10,scrollbars=no,resizable=no");
    return false;
}


function resizeWindow()
{
    width  = document.getElementById('popup_image').width;
    height = document.getElementById('popup_image').height + 45;
    window.resizeTo(width,height);
}


//-->

