﻿// JScript File


function MouseClick(Source)
{
    document.getElementById('ctl00_ContentPlaceHolder1_txtImageDescription').value = '';
    document.getElementById('ctl00_ContentPlaceHolder1_txtImageDescription').value = Source.alt;;
    document.getElementById('ctl00_ContentPlaceHolder1_txtImageID').value = '';
    document.getElementById('ctl00_ContentPlaceHolder1_txtImageID').value = Source.id.replace('ctl00_ContentPlaceHolder1_','');
    var MainImage = document.getElementById('imgMainImage');
    if(Source!=null && Source.src != null)
    {
        MainImage.src = Source.src;
        if(Source.alt!=null)
            MainImage.alt = Source.alt;
    }
        
}
function DisableUpload(checkBox)
{
    document.getElementById('ctl00_ContentPlaceHolder1_fuFile').disabled = checkBox.checked;
}


function MouseOver(Source)
{  
    document.getElementById('ctl00_ContentPlaceHolder1_lblImageCaption').innerHTML = Source.title;
    var MainImage = document.getElementById('ctl00_ContentPlaceHolder1_imgMainImage');
    if(Source!=null)
    {
        MainImage.src = Source.src;
        if(Source.title!=null)
            MainImage.title = Source.title;
            MainImage.alt = Source.alt;
    }
        
}

function SelectCell(cell)
{
    cell.className = cell.className.replace("GallerySelected","") + " GallerySelected";
}

function DeSelectCell(cell)
{
    cell.className = cell.className.replace("GallerySelected","");
}

function ShowImage(Source)
{  
    var wn = window.open( Source.src, 'images', 'scrollbars=0,width=300,height=200' );
    wn.focus();
}

function AddEMail()
{  
    var EMailWindow = window.open( 'http://oi.vresp.com?fid=2b43f19668', 'vr_optin_popup', 'scrollbars=yes,width=600,height=450' );
    EMailWindow.focus(); 
    //alert(EMailWindow.email_address);//.Forms[0]["email_address"]);//.value = "test";
     
    return false;
}

function ShowNewImage()
{

    var MainImage = document.getElementById('imgMainImage');
    var fuImage = document.getElementById('ctl00_ContentPlaceHolder1_fuFile');
    if(fuImage.value != '')   
    {
        MainImage.src = fuImage.value
    }
    alert(MainImage.src);
}