var rootDirectory = "";
defaultStatus = "";
function PINT_GetEventSource(e)
{
return ( 
(e && e.target) || 
(window && window.event && window.event.srcElement)
);	
}
function PINT_GetElementById(idname)
{
var handle;

if (document.getElementById) {
handle = document.getElementById(idname);
if (handle) return handle;
}

if (document.getElementByName) {
handle = document.getElementByName(idname)[0];
if (handle) return handle;
}

handle = document[idname];
if (handle) return handle;

if (document.all) {
handle = document.all[idname];
if (handle) return handle;
}

if (document.anchors) {
handle = document.anchors[idname];
if (handle) return handle;
}

if (document.links) {
handle = document.links[idname];
if (handle) return handle;
}

if (document.images) {
handle = document.images[idname];
if (handle) return handle;
}

if (document.embeds) {
handle = document.embeds[idname];
if (handle) return handle;
}

return handle;
}
function PINT_GetIdByElement(element)
{
if (!(element)) return undefined;
if (element.id) return element.id;
if (element.name) return element.name;
return undefined;
}
function PINT_ChangePageTitle( pageTitle )
{
if(document.title.readOnly == true) document.title = pageTitle;
} 	
function PINT_GetCurrentFileName()
{
var URL = unescape( window.location.pathname );
var start = URL.lastIndexOf( "/" ) + 1;
var end = ( URL.indexOf( "?" ) > 0 ) ? URL.indexOf( "?" ) : URL.length;
return( URL.substring( start, end ) );
}	
function PINT_GetCurrentFilePath()
{
var URL = unescape( window.location.pathname );
var start = URL.lastIndexOf( "/" );
return( URL.substring( 0, start ) );
}
function PINT_GetCurrentDirectory()
{
var filePath = PINT_GetCurrentFilePath();
var directories = filePath.split("/");
return directories.length && directories[ directories.length-1 ] != "" ? directories[ directories.length-1 ] : "";
}
function PINT_IsRootDirectory( directory )
{
return directory == rootDirectory ? true : false;
}
function PINT_FirstFocus()	
{
var elementref;
var i=0;
if (!(elementref = PINT_FirstFocus.arguments[0]))
{
if (!(document.forms[0])) return false;
while ((elementref = document.forms[0].elements[i++]) && (elementref.type == 'hidden')) {};
}
if (!(elementref)) return false;
elementref.focus();
return true;
}
