function _checkPath( $path, $checkAdmin=1 )
{
$file = JPATH_SITE . $path;
if ($checkAdmin > -1 && file_exists( $file )) {
return $file;
} else if ($checkAdmin != 0) {
$file = JPATH_ADMINISTRATOR . $path;
if (file_exists( $file )) {
return $file;
}
}
return null;
}