<?php

function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
return $pageURL;

}
$form_url = curPageURL();

?>

<table width="100%" border="0" cellspacing="0" cellpadding="0" height="34" class="txt">

  <tr>

    <td bgcolor="#FFFFFF" valign="top" align="center">

		<?php		
$rest = substr($form_url, 0, -6);

	$test=substr_replace($form_url, '', -6, 2)  ;

	if ($test=='index.php') { 

	$lanlink='/';

	} else {

	$lanlink=substr_replace($form_url, '', -6, 2)  ;

	}

	?>

      <table width="760" border="0" cellspacing="0" cellpadding="0" class="txt" height="34">

        <tr>

          <td valign="bottom">&nbsp;&nbsp;Επιλογή γλώσσας : <a href="#" class="blue">Greek</a> 

            <a href="#"><img src="../lay_out/flaggr.gif" align="absmiddle" border="0" alt="Greek"></a> 

            <a href="<?PHP echo $lanlink ?>"><img src="../lay_out/flaguk.gif" width="20" height="13" align="absmiddle" border="0" alt="English"></a> 

            <a href="<?PHP echo $lanlink ?>" class="red"><font color="#FF0000">English</font></a> 

            <table width="150" border="0" cellspacing="0" cellpadding="0" class="txt" height="7">

              <tr>

    <td></td>

  </tr>

</table>

</td>

        </tr>

      </table>

    </td>

  </tr>

</table>

