
function popupColors(articleId)
{
   // Set the site ID we're using
   siteID = '1453988';
   pageTitle = 'Available Colors';

   // Set the horizontal and vertical position for the popup

//   ColorPosX = 400;
//   ColorPosY = 100;

   if (parseInt(navigator.appVersion.charAt(0))>=4)
   {
      isNN=(navigator.appName=="Netscape")?1:0;
      isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
   }

   if(isNN)
   {
      ColorPosX = window.screenX + 600;
      ColorPosY = window.screenY + 100;
   }
   else
   {
      ColorPosX = window.screenLeft + 600;
      ColorPosY = window.screenTop + 50;
   }

   // Set these value approximately 20 pixels greater than the
   // size of the largest image to be used (needed for Netscape)

   colorWidth  = 220;
   colorHeight = 450;

   // Set autoclose true to have the window close automatically
   // Set autoclose false to allow multiple popup windows
   ColorAutoClose = true;

   // Set image path for the popup windows
   cssPATH = '/data/site'+siteID+'/css/';

//   alert(ColorPosY);
//   alert(ColorPosX);

   colorOptNN='scrollbars=yes,status=no,resizable=no,width='+colorWidth+',height='+colorHeight+',left='+ColorPosX+',top='+ColorPosY;
   colorOptIE='scrollbars=yes,status=no,resizable=no,width='+colorWidth+',height='+colorHeight+',left='+ColorPosX+',top='+ColorPosY;

   if (isNN) { colorWin=window.open('about:blank','',colorOptNN); }
   if (isIE) { colorWin=window.open('about:blank','',colorOptIE); }
   
   with (colorWin.document)
   {
      writeln('<html><head><title>Loading Please Wait.......</title><style>body{padding: 0px; margin:0px;}</style>');
      writeln('<link type="text/css" href="'+cssPATH+'color.css" rel="stylesheet">');
//      writeln('<scr'+'ipt language="javascript" src="/viewArticle?ID='+articleId+'&contentOnly=true&documentWrite=false&variable=colorHTML" />');
      writeln('<sc'+'ript>');
      writeln('var isNN,isIE;');
      writeln('if (parseInt(navigator.appVersion.charAt(0))>=4)');
      writeln('{');
      writeln('   isNN=(navigator.appName=="Netscape")?1:0;');
      writeln('   isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;');
      writeln('}');
      writeln('function doTitle()');
      writeln('{');
      writeln('   document.title="'+pageTitle+'";');
      writeln('}');

      writeln('function loadColorHTML()');
      writeln('{');
      writeln('   document.write(colorHTML);');
      writeln('   document.close();');
      writeln('}');

      writeln('</sc'+'ript>');

//      writeln('<scr'+'ipt language="javascript" src="/viewArticle?ID='+articleId+'&contentOnly=true"></scr'+'ipt>');
      write('</head><body ');
//      write('onload="document.write(colorHTML); document.close()"');
//      write('onload="window.location="/viewArticle?ID='+articleId+'&contentOnly=true"');
//      write('onload="document.write(colorHTML); document.close()"');
//      if (ColorAutoClose) 
//      {
//         write(' onblur="self.close()" ');
//      }
      writeln('>');
//      writeln('<scr'+'ipt language="javascript" src="/viewArticle?ID='+articleId+'&flashContentOnly=true"></scr'+'ipt>');

      writeln('<scr'+'ipt language="javascript">');
      writeln('<!--');
//      writeln('loadColorHTML();');
      writeln('window.location="/viewArticle?ID='+articleId+'&contentOnly=true&iframe=true"');
      writeln('//-->');
      writeln('</scr'+'ipt>');

      writeln('</body></html>');
      close();      
   }
}
