/*
 Trigger created IN
 templates/tmpl_def/scripts/functions.php
 templates/tmpl_def/scripts/index.php
 templates/base/_footer.html
 inc/design.inc.php
*/

function ThumbnailZoomOn(url,profileID,e,type)
{
 var thumbnailzoom_box      = document.getElementById('thumbnailzoom_box');
 var thumbnailzoom_image      = document.getElementById('thumbnailzoom_image');

 thumbnailzoom_box.style.visibility="hidden";

 stop = document.body.scrollTop;
 if ( checkIE('IE') )
    {
    //tempX = event.clientX + document.body.scrollLeft;
    //tempY = event.clientY + document.body.scrollTop;
    //tempX = event.clientX + document.documentElement.scrollTop;
    //tempY = event.clientY + document.documentElement.scrollLeft;

    tempX = event.clientX ;
    tempY = event.clientY ;

    if ( document.body && ( document.body.scrollTop || document.body.scrollLeft ) && !( window.opera || window.debug || navigator.vendor == 'KDE' ) )
        {
          tempX += document.body.scrollLeft; tempY += document.body.scrollTop;
        }
        else if ( document.documentElement && ( document.documentElement.scrollTop || document.documentElement.scrollLeft ) && !( window.opera || window.debug || navigator.vendor == 'KDE' ) )
        {
          tempX += document.documentElement.scrollLeft; tempY += document.documentElement.scrollTop;
        }

    }
 else
    {
    tempX = e.pageX;
    tempY = e.pageY;
    }

tempX = tempX - 120;
tempY = tempY - 50;


thumbnailzoom_box.style.left= tempX +'px';
thumbnailzoom_box.style.top= tempY +'px';

if (type == "photo")
    thumbnailzoom_image.innerHTML='<a href="' + profileID + '"><img src="' + url + '" border="0" onmouseout="ThumbnailZoomClose()"></a>';
else
    thumbnailzoom_image.innerHTML='<a href="profile.php?ID=' + profileID + '"><img src="' + url + '" border="0" onmouseout="ThumbnailZoomClose()"></a>';
thumbnailzoom_box.style.visibility="visible";



}
function ThumbnailZoomOff()
{

}

function ThumbnailZoomClose()
{
 var thumbnailzoom_box = document.getElementById('thumbnailzoom_box');
 var thumbnailzoom_image      = document.getElementById('thumbnailzoom_image');
 thumbnailzoom_image.innerHTML='';
 thumbnailzoom_box.style.visibility="hidden";
}


function checkIE(iWant)
{
bName = navigator.appName; //1
bVer = parseInt(navigator.appVersion); //2
if (bName == "Netscape" && bVer >= 4 && iWant == 'NS')
   return true;
else if (bName == "Netscape" && bVer == 3)
   return true;
else if (bName == "Netscape" && bVer == 2) //3
   return true;
else if (bName == "Microsoft Internet Explorer" && bVer >= 4 && iWant == 'IE' )
   return true;
else if (bName == "Microsoft Internet Explorer")
   return true;
else
   return false;

}
