﻿// JavaScript Document
function hideError()
{
  document.getElementById("errors").style.display="none";
  return false;
}

 

function showImagePack(src,e)

 {

 var mouse=new Array();

 mouse=getMouse(e);

 if(!document.getElementById("divimagedetail"))

 {

   imagedetail=document.createElement("div");

       imagedetail.setAttribute("id","divimagedetail");

       imagedetail.setAttribute("class","imagedetail");

       image=document.createElement("img");

       image.setAttribute("src",src);

       image.setAttribute("id","imagedetailimg");

       

       imagedetail.appendChild(image);

       document.body.appendChild(imagedetail);

       document.getElementById("divimagedetail").style.position="absolute";

       imgwidth=document.getElementById("imagedetailimg").width/2;

       imgheight=document.getElementById("imagedetailimg").height/2;

       image.setAttribute("width",imgwidth);

       image.setAttribute("height",imgheight);

       document.getElementById("divimagedetail").style.top=(mouse[1]+20)+"px";

       document.getElementById("divimagedetail").style.left=(mouse[0]+20)+"px";

       }

       imgwidth=document.getElementById("imagedetailimg").width/2;

       document.getElementById("divimagedetail").style.top=(mouse[1]+20)+"px";

       document.getElementById("divimagedetail").style.left=(mouse[0]+20)+"px";

 }

function hideImagePack()

 {

       if(document.getElementById("divimagedetail"))

       {

       document.body.removeChild(document.getElementById("divimagedetail"));

       }

 }

 function getMouse(e) {

  if( !e ) {

    if( window.event ) {

      e = window.event;

    } else { return; }

  }

  if( typeof( e.pageX ) == 'number' ) {var xcoord = e.pageX;var ycoord = e.pageY;} else if( typeof( e.clientX ) == 'number' ) {

        var xcoord = e.clientX; var ycoord = e.clientY;var badOldBrowser = ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) ||( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || ( navigator.vendor == 'KDE' )

            if( !badOldBrowser ) {

              if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {xcoord += document.body.scrollLeft; ycoord += document.body.scrollTop;} 

              else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { xcoord += document.documentElement.scrollLeft; ycoord += document.documentElement.scrollTop;}

            }

  } else { return; }

  var mouse = new Array(); mouse[0]=xcoord; mouse[1]=ycoord; return mouse;

}


 

 

 



  
