var submitDone;
submitDone = 0;

var selectedproDone;
selectedproDone= 0;


function _CF_onError(form_object, input_object, object_value, error_message)
    {
	alert(error_message);
		input_object.focus();
       	return false;	
    }



function _CF_hasValue(obj, obj_type)
    {
    if (obj_type == "TEXT")
	{
    	if (obj.value.length == 0) 
      		return false;
    	else 
      		return true;
   	}
	}

function  _CF_checkcheckform(_CF_this)

    {


    if  (!_CF_hasValue(_CF_this.coupon, "TEXT" )) 

        {
        if  (!_CF_onError(_CF_this, _CF_this.coupon, _CF_this.coupon.value, "Please enter your Coupon Code"))

   	        {

       	    return false; 

           	}
        }

	if (document.all && document.couponform.submit) {
		document.couponform.submit.disabled = true;
		document.couponform.submit.value = '  please wait...  ';
	}

	if (submitDone == 0) {
		submitDone = 1;
		return true;
	}
	else { 
		if (!document.couponform.submit || !document.all) {
			alert("Please wait..."); 
		}
		return false; 
	}   	    


    } 