<!-- Hide from non-JavaScript Browsers

  preload1 = new Image();
  preload2 = new Image();
  preload3 = new Image();
  preload4 = new Image();
  preload5 = new Image();
  preload6 = new Image();
  preload7 = new Image();
  preload8 = new Image();
  preload9 = new Image();
  preload10 = new Image();
  preload11 = new Image();

  preload1.src = "/images/fashion_beautyR.gif"
  preload2.src = "/images/contactR.gif"
  preload3.src = "/images/featureR.gif"
  preload4.src = "/images/homeR.gif"
  preload5.src = "/images/studio_completeR.gif"
  preload6.src = "/images/studio_latestR.gif"
  preload7.src = "/images/view_selectedR.gif"
  preload8.src = "/images/helpR.gif"
  preload9.src = "/images/papparazziR.gif"
  preload10.src = "/images/stock_agencyR.gif"
  preload11.src = "/images/hollywood_archiveR.gif"

function SwitchImg()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data;
    for (rem=0; rem < (SwitchImg.arguments.length-2); rem+=3) {
    	store = SwitchImg.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
   	   switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = SwitchImg.arguments[rem+2];
  } }
  document.Data = switcher;
} //end

function RestoreImg()
{ //start
  if (document.Data != null)
    for (var rem=0; rem<(document.Data.length-1); rem+=2)
      document.Data[rem].src=document.Data[rem+1];
} //end

function CheckBoxClicked (name, value)
{
   if (read_cookie(name)==null)
   {	
       write_cookie(name, value);
   }
   else
   {
       delete_cookie(name);
   }
}

function write_cookie (name, value)
{
	var cookie_string = "" + document.cookie;
        var cookie_array = cookie_string.split("; ");
	var cookieName = "checkbox" + name.substring(3);


	if ((cookie_string.length>=3300) || (cookie_array.length>=20))
	{
	   alert("Your shopping cart is full. You must remove an item from the cart, or order the current shopping cart, before adding more images."); 
	   eval("document.selectboxes."+cookieName+".checked=false");
	}
	else
	{
	   var expiration_date = new Date ();
           expiration_date . setTime (expiration_date . getTime() + 4*3600000);
           expiration_date = expiration_date . toGMTString ();

           var cookie_string = escape (name) + "=" + value +
                               "; expires=" + expiration_date;

           document . cookie = cookie_string;

	}
}


function read_cookie (key)
{

        var cookie_string = "" + document . cookie;
        var cookie_array = cookie_string . split ("; ");

        for (var i = 0; i < cookie_array . length; ++ i)
        {
                var single_cookie = cookie_array [i] . split ("=");
                if (single_cookie . length != 2)
                        continue;
                var name  = unescape (single_cookie [0]);
                var value = single_cookie [1];


                if (key == name)
                        return value;
        }

        return null;
}


function delete_cookie (name)
{
        var expiration_date = new Date ();
        expiration_date = expiration_date . toGMTString ();

        var cookie_string = escape (name) + "=; expires=" + expiration_date;

        document . cookie = cookie_string;
}

function delete_all_cookies ()
{
        var cookie_string = "" + document.cookie;
        var cookie_array = cookie_string.split("; ");
        for (var i=0; i < cookie_array.length; ++ i)
        {
             var single_cookie = cookie_array[i].split("=");
             if (single_cookie.length != 2)
                  continue;
             var name = unescape(single_cookie[0]);
             if ((name.substring(0,3) == "fea") ||
                 (name.substring(0,3) == "pap") ||
		 (name.substring(0,3) == "lat") ||
		 (name.substring(0,3) == "bea")) 
             delete_cookie(name);
        }
}

function ClearCart()
{
        if (confirm("Are you sure you want to clear all items from the cart?"))
        {
             delete_all_cookies();
             document.clear.submit();
        }
}

function openMe(where,what,how)
{
        window.open(where,what,how)
}

function submitdownload()
{
	//usage = prompt("Please specify issue date and size " +
	//	       "of usage\n (e.g. March Issue, Full Page).", "");

	usage = prompt("Attention!  Proceeding to download the chosen image will result " +
		       "in a minimum fee of $160.  Please specify issue date and size " +
		       "of usage:", "");

	if (usage!=null)
	{
		if (usage.length>=2)
		{
			document.download.sUsage.value = usage;
			document.download.submit()
		}
		else
			alert("Please enter issue date and size of usage.");
	}
}

 // -->