I have done quite a lot of PHP but my javascript leaves a lot to be desired. I've been left in the lurch and need to get these google (etc) links,to open the main page first. Here is the code, for the files that should be involved, if you need any more, please ask.
main_index.php
<?php // Start_session, check if user is logged in or not, and connect to the database all in one included file
session_start();
// this sets variables in the session
$_SESSION['fromsite']='yes';
include_once( "checkuserlog.php" );
if ( isset( $_GET["country_id"] ) ) {
$country_id = intval( $_GET["country_id"] );
$_SESSION["Country"] = $_GET["country_id"];
}
include_once "scripts/side_ads.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<meta name="Description" content="<?php echo HEADER_DESCRIPTION ?>"></meta>
<meta name="Keywords" content="<?php echo HEADER_KEYWORDS ?>"></meta>
<meta name="google-site-verification" content="TzzcB9IyQKEzvQ7fLADTrvAbH7DQEqUHmbEVmBY6SNs"></meta>
<title>Find It F'ME <?php echo HOME_PAGE ?> <?php echo LANG_NAME ?></title>
<link rel="icon" href="favicon.ico" type="image/x-icon"></link>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"></link>
<link href="css/divloader2.css" rel="stylesheet" type="text/css"></link>
<link href="css/footer.css" rel="stylesheet" type="text/css"></link>
<link rel="stylesheet" type="text/css" href="css/fancybox/jquery.fancybox-1.3.4.css" media="screen"></link>
<link href="css/footer.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/main.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/header.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/buttons.css" rel="stylesheet" type="text/css" media="all" />
<script src="http://www.mysite.com/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="http://www.mysite.com/js/ajax_en_call.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">
if(!window.jQuery)
document.write('<script src="http://www.mysite.com/js/jquery-1.4.3.min.js" type="text/javascript"><\/script>');
</script>
<script type="text/javascript" src="http://www.mysite.com/js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="http://www.mysite.com/js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script language="JavaScript" src="http://www.mysite.com/js/buttonover.js" type="text/javascript" defer="defer"></script>
<script language="JavaScript" type="text/javascript">
$(document).ready(function()
{
$('a').filter(function() {
return this.id.match(/thumb[0-9]/);
}).fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'autoDimensions' : true
});
$('a').filter(function() {
return this.id.match(/more[0-9]/);
}).fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'width' : 640,
'height' : 940,
'type' : 'iframe'
});
$('a').filter(function() {
return this.id.match(/ajaxmore[0-9]/);
}).fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'width' : 640,
'height' : 940,
'type' : 'iframe'
});
$('a').filter(function() {
return this.id.match(/report[0-9]/);
}).fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'width' : 660,
'height' : 410,
'type' : 'iframe'
});
$('a').filter(function() {
return this.id.match(/ajaxreport[0-9]/);
}).fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'width' : 700,
'height' : 410,
'type' : 'iframe'
});
$('a').filter(function() {
return this.id.match(/side[0-9]/);
}).fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'width' : 660,
'height' : 800,
'type' : 'iframe'
});
$('a').filter(function() {
return this.id.match(/loaded[0-9]/);
}).fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'width' : 660,
'height' : 800,
'type' : 'iframe'
});
$("#login").fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'autoScale' : true,
'scrolling' : 'no',
'type' : 'iframe',
'autoDimensions' : false,
'width' : 440,
'height' : 400
});
$("a#register").fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.1,
'autoDimensions' : false,
'width' : 440,
'height' : 300
});
});
</script>
<style>
.magnifyglass {
cursor: url(images/magnify.cur), -moz-zoom-in;
}
</style>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-27275273-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body onLoad="dochange2('reset',0);dochange2('form',<?php echo isset( $_GET["country_id"] )?$_GET["country_id"]:0?>)">
<div class="page">
<?php include_once "header.php";
?>
<table width="900" align="center" background="images/body.jpg" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="732" rowspan="2" valign="top" ><font id="form"></font></th>
<th width="7"> </th>
<?php echo SITE_BOXES ?>
</tr>
<tr>
<th colspan="3" align="left" valign="top" style="padding-left:4px;" ><label>
<input type="button" onclick="dochange2('results' )" name="Go" id="Go" value="<?php echo GO ?>" />
<input type="button" name="Reset" id="Reset" value="<?php echo RESET ?>"OnClick="location.href='http://www.mysite.com/';">
</label>
</th>
</tr>
<tr>
<th colspan="4" valign="top" style="padding-top:4px; padding-bottom:4px;" ><div style="width:894px; height:40px; "><a href="http://www.groupfme.com" target="_blank"><img src="images/group_mainpage_ad.png" alt="Group F'ME" width="219" height="40" border="0" /></a> <a href="<?php /*?>http://www.planitfme.com<?php */?>" target="_blank"><img src="images/until_launch.png" alt="<?php /*?>Plan It F'ME<?php */?>" width="219" height="40" border="0" /></a> <a href="<?php /*?>http://www.sellitfme.com<?php */?>" target="_blank"><img src="images/until_launch.png" alt="<?php /*?>Sell It F'ME<?php */?>" width="219" height="40" border="0" /></a> <a href="<?php /*?>http://www.bookitfme.com<?php */?>" target="_blank"><img src="images/until_launch.png" alt="<?php /*?>Book It F'ME<?php */?>" width="219" height="40" border="0" /></a>
<div style="text-decoration: none; color: #00F; width:200px; height:20px; text-align:center; position:relative; left: 236px; top: -36px;"><a href="about_us.php" border="0" target="_top" style="text-decoration:none;"><?php echo ABOUT ?> Find It F'ME</a></div>
<div style="text-decoration: none; color: #00F; width:210px; height:20px; text-align:center; position:relative; left: 452px; top: -59px;"><a href="opportunities_at.php" border="0" target="_top" style="text-decoration:none;">Opportunities at Find It F'ME</a></div>
</div></th>
</tr>
<tr>
<td height="10" valign="top" style="padding-left: 4px;">
<script type="text/javascript" src="http://www.mysite.com/js/jquery._magnifier.js">
/***********************************************
* jQuery Image Magnify- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script><font id="results"></font>
<?php include "divloader3.php"?>
<br style="line-height:1px;"/></td>
<td colspan="3" valign="top" style="padding-left: 4px;"><?php include "side_divs.php"?></td>
</tr>
</table>
<?php include_once "footer.php";
?>
</div>
</body>
</html>