
function mycallbackfunc(v,m){
	$.prompt('i clicked ' + v);
}

function mycallbackform(v,m){
	if(v==true)
	{
	location.href='ShoppingCart.aspx';
	}
}

function mysubmitfunc(v,m){
	an = m.children('#alertName');
	if(an.val() == ""){
		an.css("border","solid #ff0000 1px");
		return false;
	}
	return true;
}

jQuery.fn.extend({
	myanimation: function(speed){
		var t = $(this);
		if(t.css("display") == "none") 
			t.show(speed,function(){ t.hide(speed,function(){ t.show(speed); }); });
		else t.hide(speed,function(){ t.show(speed,function(){ t.hide(speed); }); });
	}
});

var txt = '已成功将所选商品加入购物车';
var txt_EN='Have been successfully selected commodities Add to shopping cart';
var txt2 = 'Try submitting an empty field:<br /><input type="text" id="alertName" name="myname" value="" />';	

var brown_theme_text = '<h3>Example 13</h3><p>Save these settings?</p><img src="images/help.gif" alt="help" class="helpImg" />';

var statesdemo = {
	state0: {
		html:'test 1.<br />test 1..<br />test 1...',
		buttons: { Cancel: false, Next: true },
		focus: 1,
		submit:function(v,m){ 
			if(!v) return true;
			else $.ImpromptuGoToState('state1');//go forward
			return false; 
		}
	},
	state1: {
		html:'test 2',
		buttons: { Back: -1, Exit: 0 },
		focus: 1,
		submit:function(v,m){ 
			if(v==0) jQuery.ImpromptuClose()
			else if(v=-1) $.ImpromptuGoToState('state0');//go back
			return false; 
		}
	}
};

function alertMsg()
{
$.prompt(txt,{ callback: mycallbackform, buttons: {查看购物车修改数量:true,继续购物:false } });
}
function alertMsg_EN()
{
$.prompt(txt_EN,{ callback: mycallbackform, buttons: { 'View ShoppingCart':true, 'Continue shopping':false } });
}