function notify_login(varlang){
	if(varlang==0){
		alert("Cette fonctionnalité est réservée aux membres\n\n Inscrivez-vous gratuitement et sans obligations de votre part.");
	}else if(varlang==1){
		alert("This fonctionnality is reserved for members only\n\n Signup now! it's quick and free.");
	}
}

function member_delete(varlang){
	if(varlang==0){
		q="Vous êtes sur le point de détruire votre compte LiveRobotControl\n\n Continuer ?.";
	}else if(varlang==1){
		q="You are about to delete your LiveRobotControl account\n\n Proceed ?.";
	}

	var reponse = confirm (q)
	if(reponse==true){
		window.location = "index.php?member_delete=1"
	}
}

function preview(username,sid,logged_in,lang){
	if(logged_in==true)
		open_replay(username,sid);
	else
		notify_login(lang);
}

function open_replay(username,sid){
	var lnk="http://www.liverobotcontrol.com/replay.php?v="+username+"-"+sid;
	var topStr = (screen.availHeight/2) - (480 / 2);
	var leftStr = (screen.availWidth/2) - (360 / 2);

	window.open(lnk,"","location=0,status=0,scrollbars=0,width=480,height=384,left=" + leftStr + ", top=" + topStr);
}

function openRulesFr() { 
	aWindow=window.open("http://www.liverobotcontrol.com/template/fr/condition.html","Large","toolbar=no,width=700,height=600,status=no,scrollbars=yes,resizable=yes,menubars=no");
}

function openRulesEn() { 
	aWindow=window.open("http://www.liverobotcontrol.com/template/en/condition.html","Large","toolbar=no,width=700,height=600,status=no,scrollbars=yes,resizable=yes,menubars=no");
}