function click(e) {

         if (event.button == 2) {
             alert('The images on this page are subject to copyright, please contact us if you would like to use any of these images.');
             }
         }

document.onmousedown=click;

if (document.cookie) {
    } else {
      document.cookie = 'Lightbox=; expires=Friday, 31-Dec-2010 08:00:00 GMT; path=/';
    }

theUrl = 'http://www.subject2light.com';

function addBookmark() {
        if (document.all) {
                window.external.AddFavorite(theUrl,'Subject2Light');
                } else {
                alert('Press CTRL and D to add a bookmark to:\n"'+theUrl+'".');
                }
        }


function sendMail() {
         thesubject=escape('New Stock Photo Source');
         themessage=escape('Thought that you would be interested in this new stock photo source - '+theUrl);
         fullmail="?subject="+thesubject+"&body="+themessage;
         window.location.href="mailto:"+fullmail;
         }


function MM_goToURL() { //v3.0
         var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
         for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
         }

function clearLightbox() {
         document.cookie = 'Lightbox=; expires=Friday, 31-Dec-2010 08:00:00 GMT; path=/';
         document.location.reload();
         }



		 
function addImage(newReference,basketPath) {

         if (document.cookie) {
             index = document.cookie.indexOf("Lightbox");
             if (index != -1) {
                 liststart = (document.cookie.indexOf("=", index) + 1);
                 listend = document.cookie.indexOf(";", index);
                 if (listend == -1) {
                     listend = document.cookie.length;
                     }
                 thelist = document.cookie.substring(liststart, listend);
                 }
             }
			 
		var selectedSize = "";

		for (i = 0; i < 4; i++){
			
		if (document.lightbox.size[i].checked == true){
			selectedSize = document.lightbox.size[i].value; }
			}

         addImage = "[" + newReference + "_" + selectedSize + "]";

         document.cookie="Lightbox=" + thelist + addImage + "; expires=Monday, 04-Apr-2010 05:00:00 GMT; path=/";
		 
         self.location = basketPath;

         }	 
		 

function getLightbox() {

         itemcount = '0';

         if (document.cookie) {
             index = document.cookie.indexOf("Lightbox");
             if (index != -1) {
                 liststart = (document.cookie.indexOf("=", index) + 1);
                 listend = document.cookie.indexOf(";", index);
                 if (listend == -1) {
                     listend = document.cookie.length;
                     }
                 thelist = document.cookie.substring(liststart, listend);
                 }

             for (var i=0; i<=thelist.length; i++) {
                  if (thelist.substring(i,i+1)=='_') {
                      itemcount++;
                      }
                  }

             }

         if (itemcount == 1) {
             document.writeln(" (" + itemcount + " Image)");
             } else {
             document.writeln(" (" + itemcount + " Images)");
             }
         }
		 


function launchPad(theURL) {
         newWindow=window.open(theURL,'launchPad','width=480,height=640,top=30,left=30,directories=no,menubar=no,location=no,copyhistory=no,scrollbars=yes');
         newWindow.focus();
        }

function launchNote(theURL) {
         newWindow=window.open(theURL,'launchPad','width=280,height=360,top=30,left=30,directories=no,menubar=no,location=no,copyhistory=no,scrollbars=yes');
         newWindow.focus();
        }

function launchURL(theURL) {
         newWindow=window.open(theURL,'launchPad','width=480,height=360,top=30,left=30,menubar=yes,location=yes,copyhistory=no,resizable=yes,scrollbars=yes');
         newWindow.focus();
        }