function submitForm(thisForm)
{
    thisForm.submit();
}

function refreshPage( thisForm, action )
{
    thisForm.change.value = action;
    thisForm.submit();
}

function confirmDelete( objectType )
{
    return confirm( "Are you sure you want to Delete the Order " + objectType + "?" );
}

function openPopUpWindow(url)
{
    var screenX = eval( this.parent.screenLeft + 100 );
    var screenY = eval( this.parent.screenTop + 400 );

    helpWin =window.open(url,"helpWin","height=350,width=700,status=no,resizable=yes,scrollbars=yes,screenX=" + screenX + ",screenY=" + screenY + ",left=" + screenX
            + ",top=" + screenY);
    helpWin.focus();
}


function setShipping(element, thisForm) {

    if (element.checked)
    {
        thisForm.elements["order.customer.addressRelatedByShipAddrId.name"].value = thisForm.elements["order.customer.addressRelatedByBillAddrId.name"].value;
        thisForm.elements["order.customer.addressRelatedByShipAddrId.address1"].value = thisForm.elements["order.customer.addressRelatedByBillAddrId.address1"].value;
        thisForm.elements["order.customer.addressRelatedByShipAddrId.address1"].value = thisForm.elements["order.customer.addressRelatedByBillAddrId.address1"].value;
        thisForm.elements["order.customer.addressRelatedByShipAddrId.address2"].value = thisForm.elements["order.customer.addressRelatedByBillAddrId.address2"].value;
        thisForm.elements["order.customer.addressRelatedByShipAddrId.city"].value = thisForm.elements["order.customer.addressRelatedByBillAddrId.city"].value;
        thisForm.elements["order.customer.addressRelatedByShipAddrId.countryId"].options[thisForm.elements["order.customer.addressRelatedByBillAddrId.countryId"].selectedIndex].selected = true;
        thisForm.elements["order.customer.addressRelatedByShipAddrId.zipcode"].value = thisForm.elements["order.customer.addressRelatedByBillAddrId.zipcode"].value;
        thisForm.elements["order.customer.addressRelatedByShipAddrId.region"].value = thisForm.elements["order.customer.addressRelatedByBillAddrId.region"].value;
    }else
    {
        thisForm.elements["order.customer.addressRelatedByShipAddrId.name"].value = "";
        thisForm.elements["order.customer.addressRelatedByShipAddrId.address1"].value = "";
        thisForm.elements["order.customer.addressRelatedByShipAddrId.address2"].value = "";
        thisForm.elements["order.customer.addressRelatedByShipAddrId.city"].value = "";
        thisForm.elements["order.customer.addressRelatedByShipAddrId.address1"].value = "";
        thisForm.elements["order.customer.addressRelatedByShipAddrId.countryId"].value = 223;
        thisForm.elements["order.customer.addressRelatedByShipAddrId.zipcode"].value = "";
        thisForm.elements["order.customer.addressRelatedByShipAddrId.region"].value = "";
    }
}

