//$.cookie
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('n.5=v(a,b,c){4(7 b!=\'w\'){c=c||{};4(b===o){b=\'\';c.3=-1}2 d=\'\';4(c.3&&(7 c.3==\'p\'||c.3.q)){2 e;4(7 c.3==\'p\'){e=x y();e.z(e.A()+(c.3*B*r*r*C))}s{e=c.3}d=\'; 3=\'+e.q()}2 f=c.8?\'; 8=\'+(c.8):\'\';2 g=c.9?\'; 9=\'+(c.9):\'\';2 h=c.t?\'; t\':\'\';6.5=[a,\'=\',D(b),d,f,g,h].E(\'\')}s{2 j=o;4(6.5&&6.5!=\'\'){2 k=6.5.F(\';\');G(2 i=0;i<k.m;i++){2 l=n.H(k[i]);4(l.u(0,a.m+1)==(a+\'=\')){j=I(l.u(a.m+1));J}}}K j}};',47,47,'||var|expires|if|cookie|document|typeof|path|domain|||||||||||||length|jQuery|null|number|toUTCString|60|else|secure|substring|function|undefined|new|Date|setTime|getTime|24|1000|encodeURIComponent|join|split|for|trim|decodeURIComponent|break|return'.split('|'),0,{}));


jQuery.preloadImages = function()
{
	for(var i = 0; i<arguments.length; i++)
	{
		jQuery("<img>").attr("src", arguments[i]);
	}
}

function validate(form)
{
	var vf = true;
	
	$('.rtb',form).each
	(
	 	function ()
			{
				if ($.trim(this.value)==this.dv)
					{
						alert(this.title + ' is required.');
						this.focus();
						vf = false;
						return false;
					}
			}
	);
	
	if (!vf) return vf;
	
	$('.emailtb',form).each
	(
	 	function ()
			{
				if (!filterE(this.value))
					{
						alert('Please enter a valid email address');
						this.value = '';
						this.focus();
						vf = false;
						return false;
					}
			}
	);
	
	if (!vf) return vf;
	
	$(".rb",form).each
	(
		function ()
			{
				var isSel = false;
				
				$(".rb",form).each
					(
						function ()
							{
								if (this.checked) 
									{
										$(".rb[@name="+this.name+"]",form).each
											(
												function ()
													{
														this.isSel = true;
													}
											);
											
									}
							}
					);
				
				$(".rb",form).each
				(
					function ()
					{
					if (!vf) return vf;
					if (!this.isSel)
						{
						alert('Please select atleast one option');
						this.focus();
						vf = false;
						return false;
						}
					}
				);
			}
	);	
	
	return vf;
}

function filterE(str) {
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1)
		   	return false;
		else if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
		   	return false;
		else if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
		   	return false;
		else if (str.indexOf(at,(lat+1))!=-1)
			return false;
		else if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
		   	return false;
		else if (str.indexOf(dot,(lat+2))==-1)
		    return false;
		else if (str.indexOf(" ")!=-1)
		    return false;
 		return true					
	}
	
function saveCookie(cName,cValue)
	{
	document.cookie = cName + "=" + cValue + ";path=/"
	}

function cookieVal(cookieName)
	{
	thisCookie = document.cookie.split("; ");
	for (i=0; i<thisCookie.length; i++)
			{
			if (cookieName == thisCookie[i].split("=")[0])
					{
					return thisCookie[i].split("=")[1];
					}
			}
			return 0;
	}
	