<?php
    
/**
    * o------------------------------------------------------------------------------o
    * | This package is licensed under the Phpguru license 2008. A quick summary is  |
    * | that the code is free to use for non-commercial purposes. For commercial     |
    * | purposes of any kind there is a small license fee to pay. You can read more  |
    * | at:                                                                          |
    * |                  http://www.phpguru.org/static/license.html                  |
    * o------------------------------------------------------------------------------o
    *
    * © Copyright 2008 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>