function submitForm( mode ) {
    switch( mode ) {
        case 'cust':
            if( !document.siteForm.privacy.checked ) {
                alert('You must read the privacy policy to continue');
                return false;
            }
            break;
    }

    document.siteForm.submit();
}

function imagepopup( src, ratio, size ) { 
    document.getElementById('loadindicator').style.visibility = 'visible';
    document.getElementById('largeimage').src = src;
    
    pic = new Image();    
    pic.src = src;    

    if( pic.complete ) {
        imgswrap(pic);
    } else {
        t = setInterval( "ckLoaded()", 500 );
    }
} 

function ckLoaded() {
    if( pic.complete ) {
        clearInterval( t ); 
        imgswrap(pic);
   }
}

function imgswrap( pic ) { 
    loader =  document.getElementById('loadindicator');
    loader.style.visibility = 'hidden';
    
    curimage =  document.getElementById('largeimage');
    curimage.width = pic.width;
    curimage.height = pic.height;
    curimage.style.visibility = 'visible';
}

function closepopup() {
     curimage = document.images.largeimage;
        
     curimage.style.visibility = 'hidden';
     document.images.largeimage.src = '';
}