/*
POPUPS

author: Jens Brueckmann
        http://www.j-a-b.net/

      created: 2004-06-13
last modified: 2004-07-25
________________________________________________________________________________
This script is published under a Creative Commons License. For more information
about this license visit http://creativecommons.org/licenses/by-sa/2.0/
________________________________________________________________________________
Comments are welcome :-) Use contact form or mail me at jens[at]j-a-b.net
________________________________________________________________________________
*/

var popup;
var newWindow;
var srcRoot;
var popupSize;
var popupSrc;
var popupProperties = 'left=30,top=30, resizable=yes, location=yes, scrollbars=yes, status=yes, menubar=yes, toolbar=yes';

function popUp(newWindow,srcRoot) {

  switch (newWindow) {

/*__ ~impressum __*/
    case 'ccLicense':
      popupSrc  = 'creative-commons';
      popupSize = 'width=700,height=600,';
      break;

/*__ ~web/numbersystem ~web/char/char-ascii ~web/char/char-unicode-bmp __*/
    case 'converter':
      popupSrc  = 'web/popup/popdohb';
      popupSize = 'width=485,height=500,';
      break;

/*__ ~web/char/char-general __*/
    case 'GAF':
      popupSrc  = 'web/char/popup/popgaf';
      popupSize = 'width=360,height=350,';
      break;

/*__ ~web/char/codepage-test __*/
    case 'brokenLayout':
      popupSrc  = 'web/char/popup/popxlay';
      popupSize = 'width=550,height=500,';
      break;

/*__ ~web/char/char-specials __*/
    case 'softHyphen':
      popupSrc  = 'web/char/popup/popshydemo';
      popupSize = 'width=740,height=590,';
      break;

/*__ ~web/char/char-specials __*/
    case 'jensArab':
      popupSrc  = 'web/char/popup/popjensarabic';
      popupSize = 'width=360,height=240,';
      break;

/*__ ~web/char/char-specials __*/
    case 'specChar':
      popupSrc  = 'web/char/popup/popspecchar';
      popupSize = 'width=360,height=370,';
      break;

/*__ ~web/char/font-general __*/
    case 'typewriter':
      popupSrc  = 'web/char/popup/poptypewriter';
      popupSize = 'width=360,height=540,';
      break;

/*__ ~web/graf/graf_compare __*/
    case 'interlaced':
      popupSrc  = 'web/graf/popup/poplaced';
      popupSize = 'width=680,height=370,';
      break;

/*__ ~web/hue/color-system __*/
    case 'systemColors':
      popupSrc  = 'web/hue/popup/popsys';
      popupSize = 'width=240,height=370,';
      break;

/*__ ~web/hue/color-test __*/
    case 'colorPicker':
      popupSrc  = 'web/hue/popup/popcolor';
      popupSize = 'width=360,height=290,';
      break;

/*__ ~info/info __*/
    case 'jsInfo':
      popupSrc  = 'info/popup/popjsinfo';
      popupSize = 'width=220,height=370,';
      break;

    default:
      popupSrc  = '404';
      popupSize = 'width=600,height=330,';
      break;
  }

  popupSrc        = srcRoot   + popupSrc;
  popupProperties = popupSize + popupProperties;
  popup           = window.open(popupSrc,newWindow,popupProperties);

}

