 var VrxStudiosPopUp;
       var VrxStudiosFramePopUp;
      function PopUpStill(urlstr, height, width)
      {
       PopUp(urlstr, height, width);
      }
      function PopUpVirtualTour(urlstr, height, width)
      {
       PopUp(urlstr, height, width);
      }
      function PopUpFrame(urlstr, width)
      {
       var options = 'height=530,width=' + width + ',toolbar=no,menubar=no,scrollbars=1,resizable=no,status=no,location=no,z-lock=yes,left=5,top=5';
       VrxStudiosFramePopUp = window.open(urlstr, 'VrxStudiosFramePopUp', options); 
       VrxStudiosFramePopUp.focus();
      }
      function PopUp(urlstr, height, width)
      {
       var options = 'height=' + height + ',width=' + width + ',toolbar=no,menubar=no,scrollbars=no,resizable=no,status=no,location=no,z-lock=yes,left=5,top=5';
       VrxStudiosPopUp = window.open(urlstr, 'VrxStudiosPopUp', options); 
       VrxStudiosPopUp.focus();
      }
 var specialcase = ((navigator.userAgent.indexOf('Mac') != -1) || document.all);
     var flag = 0;
     var copyAttempt;
     function CopyrightInit(OnlyJPGs)
     {
      if (!(document.getElementById || document.all || document.layers))
      {
       return;
      }
      if (specialcase && document.layers)
      {
       document.captureEvents(Event.MOUSEMOVE);
       document.onmousemove = SpecialMouseMove;
      }
      document.onmousedown = ClearCopyright;
      for (i = 0; i<document.images.length; i++)
      {
       if (OnlyJPGs)
       {
        if (-1 != document.images[i].src.indexOf('.jpg'))
        {
         document.images[i].oncontextmenu = ReturnFalse;
         document.images[i].onmouseup = CheckMouseClick;
         if (specialcase)
         {
          document.images[i].onmousemove = SpecialMouseMove;
          document.images[i].onclick = ClearCopyright;
         }
        }
       }
       else
       {
        document.images[i].oncontextmenu = ReturnFalse;
        document.images[i].onmouseup = CheckMouseClick;
        if (specialcase)
        {
         document.images[i].onmousemove = SpecialMouseMove;
         document.images[i].onclick = ClearCopyright;
        }
       }
      }
     } 
 function CheckMouseClick(e)
      {
       copyAttempt = 0;
       if (window.Event) //Mozilla
       {
        if (e.which == 3)
        {
         document.oncontextmenu = ReturnFalse;
         copyAttempt = 1;
         flag = 0;
         document.getElementById('CPLayer').style.top = e.pageY;
         document.getElementById('CPLayer').style.left = e.pageX;
         document.getElementById('CPLayer').style.visibility = 'visible';
         return false; // NN4 only
        }
       }
       else if (window.event && window.event.button == 2) //IE
       {
        copyAttempt = 1;
        flag = 0;
        document.getElementById('CPLayer').style.top = document.body.scrollTop + window.event.y;
        document.getElementById('CPLayer').style.left = document.body.scrollLeft + window.event.x;
        document.getElementById('CPLayer').style.visibility = 'visible';
        return false; // NN4 only
       }
       if (specialcase)
       {
        flag = 1;
        return false;
       }
      } 
 function ReturnFalse(){return false;} 
 function ClearCopyright()
      {
       flag = 0;
       if (copyAttempt)
       {
        document.getElementById('CPLayer').style.visibility = 'hidden';
        copyAttempt = 0;
       return false;
       }
      } 
 function SpecialMouseMove(e)
      {
       var x1,
        y1;
       theObj = '';
       if (window.Event)
       {
        x1 = e.screenX;
        y1 = e.screenY;
        if (e.target.parentNode)
        {
         theObj = e.target.parentNode.tagName;
        }
       }
       else if(window.event)
       {
        x1 = window.event.clientX;
        y1 = window.event.clientY;
        theObj = window.event.srcElement.parentElement.tagName;
       }
       var x,
        y;
       if (window.Event && e.which == 3)
       {
        y = document.body.scrollTop + e.screenY;
        x = document.body.scrollLeft + e.screenX;
       }
       else if (window.event && window.event.button == 2)
       {
        y = document.body.scrollTop + window.event.y;
        x = document.body.scrollLeft + window.event.x;
       }
       var isLink = (theObj == 'A');
       if (flag && (!isLink || ((Math.abs(x - x1) > 10) || (Math.abs(y - y1) > 10))))
       {
        copyAttempt = 1;
        flag = 0;
        document.getElementById('CPLayer').style.top = y1;
        document.getElementById('CPLayer').style.left = x1;
        document.getElementById('CPLayer').style.visibility = 'visible';
       return false;
       }
      } 

