﻿var submitted=false;

function KeyDownHandler(btn)
{
    // process only the Enter key
    if (event.keyCode == 13)
    {
        // cancel the default submit
        event.returnValue=false;
        event.cancel = true;
        // submit the form by programmatically clicking the specified button
        btn.click();
    }
}

function CopyEmail(ctrl_1,ctrl_2)
{  
    var email = document.getElementById(ctrl_1).value;
    document.getElementById(ctrl_2).value =email;
}      
      
function DrpSelected(oSrc, args)
{
    var ind=args.Value;
    var valid=true;
    if(ind == 0) 
        valid = false; 
    args.IsValid = valid;
}


function submitForm()
{
	if(submitted==false)
	{
	    submitted=true;
	    return true;
	}
	else
	{
	    alert('You order is already being processed.');
	    return false;
	}
}