<?php
	$c_o_name = "orientation";
	if (!isset($_COOKIE[$c_o_name])) {
		$c_o_value = "0";
		setcookie($c_o_name, $c_o_value, time()+(86400 * 30), "/" );
	}
?>


<script type="text/javascript">
	function retourne_cookie(){
		if (document.cookie.replace(/(?:(?:^|.*;\s*)orientation\s*\=\s*([^;]*).*$)|^.*$/, "$1") == "180") {
			document.getElementById('html').style.transform = "rotate(180deg)";
		}
		else
			document.getElementById('html').style.transform = "rotate(0deg)";
	}

	function retourne(){
    	if(document.getElementById('html').style.transform == "rotate(0deg)"){
    		document.getElementById('html').style.transform = "rotate(180deg)";
    		document.cookie="orientation = 180";
    	}
    	else{
    		document.getElementById('html').style.transform = "rotate(0deg)";
    		document.cookie="orientation = 0";
    	}
    }

    function retourne_history(){
    	
    }
</script>