<?php
    
/**
    * o------------------------------------------------------------------------------o
    * | This package is licensed under the Phpguru license. A quick summary is       |
    * | that for commercial use, there is a small one-time licensing fee to pay. For |
    * | registered charities and educational institutes there is a reduced license   |
    * | fee available. You can read more  at:                                        |
    * |                                                                              |
    * |                  http://www.phpguru.org/static/license.html                  |
    * o------------------------------------------------------------------------------o
    *
    * © Copyright 2008,2009 Richard Heyes
    */

    /**
    * This ouputs a simple search text box
    * 
    * @param string $default The default text in the search text
    */
    
function ShowSearchBox($default 'Search...')
    {
?><div style="position: relative">
    <img src="search.png" style="position: absolute; z-index: 1; top: 2px; left: 3px" />
    <form action="search.php" method="post">
        <input type="text" value="<?=htmlspecialchars($default)?>" onfocus="if (this.value == '<?=htmlspecialchars($default)?>') this.value = ''" onblur="if (this.value == '') this.value = '<?=htmlspecialchars($default)?>'" style="position: absolute; top: 0; border: 1px solid black; left: 25px; width: 150px" />
        <input type="submit" value="Search &raquo;" style="position: absolute; left: 179px; top: -2px" />
    </form>
</div><?php
    
}
    
    
ShowSearchBox();
?>

<br clear="all" />

<a href="index.phps">Source</a>