function ViewerDisplay(type, option, idx) {
   switch (type) {
      case 1:
         var flash  = "angle_viewer";
         var width  = 630;
         var height = 300;
         break;
      case 2:
         var flash  = "rectangle_viewer" + option;
         var width  = 630;
         var height = 300;
         break;
      case 3:
         var flash  = "relation_viewer" + option;
         var width  = 630;
         var height = 300;
         break;
      case 4:
         var flash  = "random_viewer";
         var width  = 629;
         var height = 465;
   }

   document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + width + "' height='" + height + "'>");
   document.write("<param name='allowScriptAccess' value='sameDomain'>");
   document.write("<param name='movie' value='/flash/" + flash + ".swf'>");
   document.write("<param name='quality' value='high'>");
   document.write("<param name='FlashVars' value='imageListFile=image_list.asp&idx=" + idx + "&option=" + option + "'>");
   document.write("<embed src='/flash/" + flash + ".swf' quality='high' flashvars='imageListFile=image_list.asp&idx=" + idx + "' width='" + width + "' height='" + height + "' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
   document.write("</object>");
}



