/*Please use UTF-8 and file encoding*/

/*2010-06-02: added by ryan to reset the input text fields for particular row*/
jQuery.noConflict();
function resetCode(num) {
	jQuery("input[name^='pdtcode"+num+"']").val('');
	jQuery("input[name$='_"+num+"']").val('');
}
/*2010-06-02*/

/*2010-06-11: added by ryan to allow quick email subscription in the myDvB area*/
function emailSubscribe(type,lang,email) {
	jQuery.post("../xml/subscribeEmail.php", { type: type, email: email}, function(response){
		if(response=="1") {
			if(type==1) {
				if(lang=='chi') {
					jQuery("span#spanEmailSubscribe1").html("已訂閱最新得利資訊");
				} else {
					jQuery("span#spanEmailSubscribe1").html("Subscribed latest e-News/ Promotional offers");
				}
			} else if(type==2) {
				if(lang=='chi') {
					jQuery("span#spanEmailSubscribe2").html("已訂閱得利積分獎賞計劃");
				} else {
					jQuery("span#spanEmailSubscribe2").html("Subscribed Loyalty Program Update");
				}
			}
		} else {
			if(type==1) {
				if(lang=='chi') {
					jQuery("span#spanEmailSubscribe1").html("錯誤: 請重新嘗試");
				} else {
					jQuery("span#spanEmailSubscribe1").html("Error: please try again");
				}
			} else if(type==2) {
				if(lang=='eng') {
					jQuery("span#spanEmailSubscribe2").html("錯誤: 請重新嘗試"); 
				} else {
					jQuery("span#spanEmailSubscribe2").html("Error: please try again");
				}
			}
		}
	});
}
/*2010-06-11*/
