<?php // You are allowed to use this software for ANY purpose,
// if you send me a mail, telling me that you use it.
// info@w10.net
// Position anything between ObjPos(x,y) and OE()
// at any position on your web page.
// X = Position in pixels from left.
// Y = Position in pixels from top.
// Layername = The name of the new layer. function ObjPos($x=0,$y=0,$layername="n1")
{
if (Browser() == "NS")
{ echo "<layer id='$layername' left='$x' top='$y'>" ; return ; } else
{ echo "<div STYLE='position:absolute; left:$x; top:$y'>" ; return ; }
}
// Terminate positioning.. function OE()
{
if (Browser() == "NS")
{
echo "</layer>" ;
return ;
}
echo "</div>" ;
}
// Find out which browser the remote user has. function Browser()
{
global $HTTP_USER_AGENT ;
$Browser_Name = strtok($HTTP_USER_AGENT, "/");
if(ereg("MSIE", $HTTP_USER_AGENT)) return("IE") ;
if(ereg("Opera", $HTTP_USER_AGENT)) return("IE") ;
if(ereg("Netscape6", $HTTP_USER_AGENT)) return("IE") ;
if($Browser_Name == "Mozilla") return("NS") ;
}
?>
|
|