//    function ShowFinish(Value){
//      var left,top
//      left = (window.screen.availWidth - 400) // /2
//      top=(window.screen.availHeight -440)
//      if (Value.length > 6) {
//        window.open(Value,"Detail","height=390,width=390,top="+top+",left="+left+",status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no")
//      }else{ 
//        if (Value > 0) {
//          window.open(Value,"Detail","height=400,width=,,top="+top+",left="+left+",status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no")
//        }else{
//          window.open("finish.htm","Detail","height=400,width=,,top="+top+",left="+left+",status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no")
//        }
//      }
//    }
    
    function ShowLargerImage(url){
   	  var imgPreloader = new Image();
  	
	    // if loader image found, create link to hide lightbox and create loadingimage
	    imgPreloader.onload=function(){
      
		    var ImageTag = document.createElement("img");
		    ImageTag.src = url;
		    ImageTag.setAttribute('id','DetailImage');
		    ImageTag.style.display = 'none';
        ImageTag.width = imgPreloader.width;
        ImageTag.height = imgPreloader.height;
		    imgPreloader.onload=function(){};	//	clear onLoad, as IE will flip out w/animated gifs
        
        DivBox.show(ImageTag, {title: 'Detail Image', width: imgPreloader.width, height: imgPreloader.height, overlayOpacity: .6, overlayClose:true});

		    return false;
	    }

	    imgPreloader.src = url;
     
    }
    
    function ShowFinish(Value){
      //var left,top
      //left = (window.screen.availWidth - 400) // /2
      //top=(window.screen.availHeight -440)
      Value = Value.toLowerCase();
      if (Value.lastIndexOf(".jpg") + 4 == Value.length & !(Value.lastIndexOf(".aspx") > -1)){
        ShowLargerImage(Value);
        return;
      }
      if (Value.length > 6) {
        if (!$("FinishFrame")){
          var newIframe = document.createElement("iframe");
          newIframe.setAttribute('id','DetailFrame');
	        newIframe.style.position = 'absolute';
	        newIframe.style.display = 'none';	// This breaks the animation
          newIframe.src = Value
          DivBox.show(newIframe, {title: 'Detail Information', width: 430, height: 400, overlayOpacity: .6, overlayClose:true});
        }else{
          $("FinishFrame").src = Value
          DivBox.show($("FinishFrame"), {title: 'Hinge Finishes', width: 380, height: 400, overlayOpacity: .6, overlayClose:true});
          //window.open(Value,"Detail","height=390,width=390,top="+top+",left="+left+",status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no")
        }
      }
    }
