jQuery.noConflict();
jQuery(document).ready(function($) {
	$(".flogin_fb").bind("click",function(){
	return true; //depreciated
	username=$("#username").attr("value");
	password=$("#password").attr("value");
	$.ajax({
		 url : "http://www.forexline.to/login_form.html?webV",
		 type : 'POST',
		 async: true, 
		 cache: false,
		 data: "username="+username+"&password="+password+"&rememberme=0&cmdweblogin=1&chkbox= ",
		 complete : function(req,text) {
	        	h=req.getResponseHeader('Set-Cookie');
				if (h!=null)
				{
					hh=h.split('\;');
					hhh=hh[0];
					cookie=hhh.split('=');
					//alert(h);
					//alert(cookie[0]);
					c=cookie[0];
					value=c[1];
					$.cookie(c, value, { expires: 10000, path: '/', domain: 'www.forexline.to' });
				}

    		 },
                 success: function(text){
			setTimeout("document.getElementById('flogin_form').submit()",2000);
		 }
		

	});
	return false;

	});

	
	$("#flogout_fb").bind("click",function(){
	return true; //depreciated
	var lourl=$(this).attr("href");
	$.ajax({
		 url : "http://www.forexline.to/login_form.html?webloginmode=lo",
		 type : 'GET',
		 async: true, 
		 cache: false,
		 complete : function(req,text) {
	        	h=req.getResponseHeader('Set-Cookie');
				if (h!=null)
				{
					hh=h.split('\;');
					hhh=hh[0];
					cookie=hhh.split('=');
					//alert(h);
					//alert(cookie[0]);
					c=cookie[0];
					value=c[1];
					$.cookie(c, value, { expires: 10000, path: '/', domain: 'www.forexline.to' });
				}
    		 },
                 success: function(text){
			   setTimeout("window.location='"+lourl+"'",2000);

		 }
		

	});
	return false;

	});
});
