/*
 * ---------------------------
 * functions for the examples
 * ---------------------------
 */
function mycallbackfunc(v,m,f){
	$.prompt('i clicked ' + v);
}

function mycallbackform(v,m,f){

//$.prompt(v +' ' + f.alertValue);
}

function mysubmitfunc(v,m,f){
	an = m.children('#alertName');
	if(f.alertName == ""){
		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 = '<div id="maindiv"><div id="topSearchwerpper"> User Login</div><div id="topSearchwerpperboder8"><div id="UserLogin">	<div class="textfells" id="UserLeft">E-mail</div><div id="UserRight"><input style="width:150px;"  name="user_email" type="text" class="textfells" id="user_email"   onFocus="validkey(event)" onClick="validkey(event)" onKeyPress="validkey(event)" /></div></div><div id="PassLogin"><div class="textfells" id="UserLeft">Password</div><div id="UserRight"><input style="width:150px;"  name="user_password" type="password" class="textfells" id="user_password" onFocus="validkey(event)" onClick="validkey(event)" onKeyPress="validkey(event)" /></div></div><div id="Login_Sub_div"><div class="textfells" id="MainLogin_Side"><a href="#"><img src="_images/login.gif" onClick="userlogin()" border="0" name="loginButton" id="loginButton"  /></a></div>&nbsp;<div  id="MainLogin_Side2"><a href="forgot-password.php" class="linik2">Lost your password?</a></div></div><div></div><div id="messageBox"></div></div></div>';



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 $.prompt.goToState('state1');//go forward
			return false; 
		}
	},
	state1: {
		html:'test 2',
		buttons: { Back: -1, Exit: 0 },
		focus: 1,
		submit:function(v,m){ 
			if(v==0) $.prompt.close()
			else if(v=-1) $.prompt.goToState('state0');//go back
			return false; 
		}
	}
};

