﻿// JScript File

								    								
    function showImg(imgName, thisDesc)
        {
            imgOn = (imgName);
            document.getElementById('imgLarge').filters[0].Apply();
            //imgLarge.filters[0].Apply();
            document.getElementById('imgLarge').src = imgOn;
            //imgLarge.src = imgOn;
            // unused hdr.innerHTML=imgName; ctl00_ContentPlaceHolder1_FormView1_imgLarge
            document.getElementById('imgLarge').filters[0].Play();
            //imgLarge.filters[0].Play();
            getImageDimension(imgOn)
            
            //My experiment...Anvar
            document.getElementById('desc26').innerHTML = thisDesc
                                                      
        }
        
        function clickImg(imgName, thisDesc)
            {
                imgOn = ("" + imgName);
                //document.getElementById('imgLarge').filters[0].Apply();
                //imgLarge.filters[0].Apply();
                document.getElementById('imgLarge').src = imgOn;
                //imgLarge.src = imgOn;
                // unused hdr.innerHTML=imgName; ctl00_ContentPlaceHolder1_FormView1_imgLarge
                //document.getElementById('imgLarge').filters[0].Play();
                //imgLarge.filters[0].Play();
                getImageDimension(imgOn)
                
                 //My experiment...Anvar
            document.getElementById('desc26').innerHTML = thisDesc
                                                          
            }
        
    function getImageDimension (imgURL) 
        {
              var img = new Image();
              if (document.layers 
                  && location.protocol.toLowerCase() != 'file:' 
                  && navigator.javaEnabled())
                netscape.security.PrivilegeManager.enablePrivilege(
                  'UniversalFileRead'
                );
              img.src = imgURL;
              var w;
              var h;
              var webscale;
              //alert(img.width + 'x' + img.height);
              if (img.height > img.width)
                {
                //image has vertical orientation, scale the image to format for web and thumbnail
                    h = 450;
                    webscale = h/img.height;
                    w = webscale*img.width;
                    //alert('vertical orientation height = ' + h + ' width = ' + w + '');
                }
              else
                {
                //image has horizontal orientation, scale the image to format for web and thumbnail
                    w = 450;
                    webscale = w/img.width;
                    h = webscale*img.height;
                    //alert('horizontal orientation width = ' + w + ' height = ' + h + '');                                                        
                }
              //*****Comment out the next two lines and the image will remain its original 
              //*****size.
              document.getElementById('imgLarge').width = w;
              document.getElementById('imgLarge').height = h;
              //alert('width = ' + document.getElementById('ctl00_ContentPlaceHolder1_FormView1_imgLarge').width + ' x height = ' + document.getElementById('ctl00_ContentPlaceHolder1_FormView1_imgLarge').height);
                                                                   
        }
        
        

    function fade()
        {
            // unused document.imgLarge.filters[0].Apply();
            document.getElementById('imgLarge').src = document.imgLarge.src;
            //imgLarge.src = document.imgLarge.src;
            document.getElementById('imgLarge').filters[0].Play();
            //imgLarge.filters[0].Play();
    	
        }				


