
  var lookTimeoutID = null;

  function showLookInside(){
    go('look1');
  }

  function go(id) {
    if (typeof myLytebox != 'undefined') {
      myLytebox.borderSize = ( myLytebox.ie ? 2 : 0 );
      myLytebox.start(document.getElementById(id),false,true);
      $('#lbIframe').load(function(){ 
	  //Prevent Firefox from showing blank screen - close show instead
	  var doc2 = $(this).attr('contentDocument');
	  if (doc2!= undefined && doc2.URL == "about:blank"){ 
	       myLytebox.end();
	  };
          //This gets the document in IE
          /* var doc = $(this).attr('document');
             if (doc!= undefined ){ alert(doc.URL) };   */
			      
      });
    } 
    else {
      if (lookTimeoutID) { clearTimeout(lookTimeoutID); }
      lookTimeoutID = setTimeout('go("'+id+'");', 100);
    }
  }

  /* Called when the iframe loads - updates the slide number. (Enables back button navigation) */
  function updateShowHeader( num ){
    myLytebox.activeFrame = num;
    $('#lbPrev,#lbPrev2,#lbPrev2_Off,#lbNext,#lbNext2,#lbNext2_Off').css('display','none');//reset nav buttons
    myLytebox.updateDetails();
    myLytebox.updateNav();
  }


  $(function() {
    var locArr = document.location.toString().split('#');
    var showNow = locArr[1] == "lookinside";
    var num = locArr[2];
    if ( showNow ){
        if ( parseInt(num) != NaN && document.getElementById('look'+num) != null ){
	    go('look'+locArr[2]);
	}
	else {
            go('look1');  
	}
    }
  });
