<?php

// if on m.kestufoot.com redirect on mobile version
if ($_SERVER["SERVER_NAME"]==$GAME_SUB_DOMAIN_PROD_MOBILE || $_SERVER["SERVER_NAME"]==$GAME_SUB_DOMAIN_DEV_MOBILE ){
    $sess->redirect('Mobile/index.php','');
}

?>
<html>
<head>
<title><?php echo $header_title ?></title>
<?php echo ( $header_description )?"<META NAME='description' content='". $header_description."' >\n":"" ; ?>
<?php echo ( $header_keywords )?"<META NAME='Keywords' content='". $header_keywords."' >\n":"" ; ?>
<link rel="stylesheet" href="<?php echo $SERVER_URL?>common.css">
<link rel="stylesheet" href="<?php echo $SERVER_URL?>links.css">
<link rel="stylesheet" href="<?php echo $SERVER_URL?>tables.css">
<link rel="shortcut icon" href="<?php echo $IMAGES_DIR?>favicon.ico" />
<link href="fond.css" rel="stylesheet" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="verify-v1" content="WP6vvxFayEsqSTWVwJuOy2/r6VLe6vLEaF3+pkgo+U0=" /> 
</head>
<body LEFTMARGIN="0" TOPMARGIN="0" rightmargin=0 bottommargin=0  >
<div id="fb-root"></div>

<script>
window.fbAsyncInit = function() {
  FB.init({
    appId: "11364124895",
    xfbml: true,
    cookie: true,
    status: true	
  });
};
(function() {
  var e = document.createElement('script'); e.async = true;
  e.src = document.location.protocol + '//connect.facebook.net/fr_FR/all.js';
  document.getElementById('fb-root').appendChild(e);
}());

//if on mobile, ask the user for redirect him on mobile version
var deviceIphone = "iphone";
var deviceIpod = "ipod";
var engineWebKit = "webkit";
var deviceSymbian = "symbian";
var engineWebKit = "webkit";
var deviceAndroid = "android";

//Initialize our user agent string to lower case.
var uagent = navigator.userAgent.toLowerCase();

//**************************
// Detects if the current device is an iPhone.
function DetectIphone()
{
   if (uagent.search(deviceIphone) > -1)
      return true;
   else
      return false;
}

//**************************
// Detects if the current device is an iPod Touch.
function DetectIpod()
{
   if (uagent.search(deviceIpod) > -1)
      return true;
   else
      return false;
}

//**************************
// Detects if the current device is on webkit engine.
function DetectWebkit(){
    if (uagent.search(engineWebKit) > -1)
        return true;
    else
        return false;
}

//**************************
// Detects if the current device is an iPhone or iPod Touch.
function DetectIphoneOrIpod()
{
    if (DetectIphone())
       return true;
    else if (DetectIpod())
       return true;
    else
       return false;
}

//**************************
// Detects if the current browser is the S60 Open Source Browser.
// Screen out older devices and the old WML browser.
function DetectS60OssBrowser()
{
   if (uagent.search(engineWebKit) > -1)
   {
     if ((uagent.search(deviceS60) > -1 ||
          uagent.search(deviceSymbian) > -1))
        return true;
     else
        return false;
   }
   else
      return false;
}

//**************************
// Detects if the current device is an Android OS-based device.
function DetectAndroid()
{
   if (uagent.search(deviceAndroid) > -1)
      return true;
   else
      return false;
}


//**************************
// Detects if the current device is an Android OS-based device and
//   the browser is based on WebKit.
function DetectAndroidWebKit()
{
   if (DetectAndroid())
   {
     if (DetectWebkit())
        return true;
     else
        return false;
   }
   else
      return false;
}

/*if (DetectIphoneOrIpod() || DetectAndroidWebKit() || DetectS60OssBrowser()){
    if (confirm('Une version pour mobile existe. Souhaitez-vous être redirigé ? (Navigateur conseillé pour mobile : Chrome, Safari)')){
        document.location.href = '<?php //echo $GAME_MOBILE; ?>';
    }
}*/

</script>
<script language="javascript" src="<?php echo $SERVER_URL; ?>tooltip.js"></script>


<div id="tooltip" class="toolTipHidden"></div>

<table class="header" cellspacing=0 cellpadding=0 border=0>
	<tr>
		<td width=50% rowspan=10></td>
		<td align=center width=965px>
			<table class="top">
				<tr>
					<td width=400px>
						<a href="http://www.viralgames.com" target=_blank ><img id="viral" src="<?php echo $IMAGES_DIR . "logoVG.GIF" ?>" alt="Agence Webmarketing Viralgames" title="Agence Webmarketing Viralgames"></a> <span>présente</span>
					</td>
					<?php include("login_box.inc"); ?>
				 </tr>
			</table>
		</td>
		<td width=50% rowspan=10></td>
	</tr>
	<tr>
		<td align=center>
			<div class="home">
				<a id="ktf_logo" href="<?php echo $sess->link3($LOGIN_PAGE,""); ?>"><img src="<?php echo $IMAGES_DIR . "ktf_logo.jpg"?>" alt="Jeu de pronostic gratuit Kestufoot" title="Jeu de pronostic gratuit Kestufoot"></a>
				<div id="menu">
<?php	include($GAME_DIR."menu.inc"); ?>		
				</div>
<?php
if( isset( $sub_header ) && !empty( $sub_header ) )
	include($GAME_DIR.$sub_header);
?>
			</div>
		</td>
	</tr>
	<tr>
		<td align=left>

