<?php

    include "library.php";

    $cxn = start_code();
    
    $city = val( $_SESSION, "splash_city" );

    $city_filename = val( $_SESSION, "splash_city_filename" );



        // put the page heading information before the redirect
        
    echo "<head><title>".sitename." - ".$city."</title>";
    echo "<meta name='viewport' content='width=device-width, initial-scale=1.0'>";
	echo "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";

    echo "<meta name='keywords' content='".sitename.",Business,Listing,Listings,Sale,Australia,".$city."'>";    
        

        // don't show the same description for all pages
            
    echo "<meta name='description' content='".sitename." is a free site for listing businesses for sale in Australia including ".$city.".'>";

    echo "<style>";
    
	write_common_styles();
		
	$data = define_styles( true );

    echo "</style>";
    
	echo "</head>";


//	if (val( $_GET, "screen_width" ) == "" && val( $_SESSION, "screen_width" ) == "")
//	{
//	            // city page
//	            
//	    if (isset( $city ))    
//    		echo "<script language='JavaScript'> document.location=\"/city/".$city_filename."?screen_width=\"+screen.width+\"&screen_height=\"+screen.height; </script>";
//    	else
//    		echo "<script language='JavaScript'> document.location=\"/index.php?screen_width=\"+screen.width+\"&screen_height=\"+screen.height; </script>";
//
//		exit();
//	}
//	
//	if (val( $_GET, "screen_width" ) != "" && val( $_SESSION, "screen_width" ) == "")
//	{
//		$_SESSION['screen_width'] = $_GET['screen_width'];
//		$_SESSION['screen_height'] = $_GET['screen_height'];		
//	}


    if (! low_res_screen())
    {
		echo "<style> html, body {";
		echo "margin-top:0;";
		echo "margin-left:0;";
		echo "margin-right:0;";
    	echo "padding:0;";
		echo "}";
		echo "</style>";

    	echo "<body>";
    	

        if ($city != "")
            $heading = sitename." (".$city.")";
        else
            $heading = sitename;


		echo "<table cellpadding='0' cellspacing='0' width='100%'><tr><td width='100%' style='line-height: 46px; font-family: Calibri; font-size: 20pt; color: #ffffff; opacity: 1; background-color: #008500;' align='center'>".$heading."</td>";


            // #004499 
            
//		echo "<table cellpadding='0' cellspacing='0' width='100%'><tr><td style='line-height: 45px; font-family: Calibri; font-size: 20pt; color: #ffffff; opacity: 0.85; background-color: #007500' align='center'>".sitename."</td></tr></table>";

//		echo "<table cellpadding='0' cellspacing='0' width='100%'><tr><td width='15%' style='background: #008500'>&nbsp;</td><td width='70%' style='line-height: 46px; font-family: Calibri; font-size: 20pt; color: #ffffff; opacity: 1; background-color: #008500;' align='center'>".$heading."</td>";

//        show_google_translate( "#008500" );

        echo "</tr></table>";

    }
    else
    {
    	echo "<style> html, body {";
		echo "margin-top:0;";
		echo "margin-left:0;";
		echo "margin-right:0;";
		echo "padding:0;";
		echo "}";
		echo "</style>";

	    echo "<body>";
	    

        if ($city != "")
            $heading = sitename." (".$city.")";
        else
            $heading = sitename;


		echo "<table cellspacing='0' width='100%'><tr><td style='padding-top: 3; padding-bottom: 3; font-family: Calibri; font-size: 14pt; color: #ffffff; opacity: 0.9; background-color: #004499' valign='middle' align='center'>".$heading."<td></tr></table>";

//		echo "<table cellspacing='0' width='100%'><tr><td style='padding-top: 3; padding-bottom: 3; font-family: Calibri; font-size: 13pt; color: #ffffff; background-color: #004499' valign='middle' align='center'>".$heading."</td></tr></table>";
    }
    
    
    if (! low_res_screen())
        echo "<br><br>";

    echo "<br><br>";

	$image = "images/melbourne_skyline_narrow.jpg";

    echo "<table width='100%'><tr><td width='5%'></td><td width='10%' align='center' valign='top'>";
    
    
    if (! low_res_screen())
        echo show_image2( pathroot."/".$image, "/".$image, 180 );
    else
        echo show_image2( pathroot."/".$image, "/".$image, 120 );


    echo "</td><td width='5%'></td><td width='80%' valign='top'>";
	    
    echo black( sitename." is a free site for listing businesses for sale in Australia including ".$city.".<br><br>" );

    echo black( "The site is completely free to use.<br><br>" );

    echo black( "List your business for sale on this site and get nation-wide exposure for your sale.<br><br>" );

    echo black( "To start please go to the " );
    
    echo "<a href='/' class='glink'>Home Page</a><br><br>";


    echo "</td></tr></table>";
    

//    if (low_res_screen())

    echo "<br><br><br><br>";
        

	echo "&nbsp;&nbsp;<span class='pgheading'>Recent listings</span><br><br>";


    show_latest_listings( $cxn );
    
    
?>
