// JavaScript Document
function WebCAPS(user,ptypecode) {
  var parm2 = ptypecode ? ('&appl=' + ptypecode) : ''
  var url = 'http://net.grundfos.com/Appl/WebCAPS/custom?userid=' + user + parm2
  var winparm = 'width=780,height=540,status=no,toolbar=no,menubar=no,location=no,resizable=yes'
  window.open(url, '', winparm);
}

function WebCAPSmodule(user,module) {
  var parm2 = module ? ('-' + module) : ''
  var url = 'http://net.grundfos.com/Appl/WebCAPS/custom?userid=' + user + parm2
  var winparm = 'width=780,height=540,status=no,toolbar=no,menubar=no,location=no,resizable=yes'
  window.open(url, '', winparm);
}

function WebCAPSliterature(user,ptypecode) {
  var parm2 = ptypecode ? ('&appl=' + ptypecode) : ''
  var url = 'http://net.grundfos.com/Appl/WebCAPS/Literature?userid=' + user + parm2
  var winparm = 'width=780,height=540,left=40,top=20,status=no,toolbar=no,menubar=no,location=no,resizable=yes'
  window.open(url,'', winparm);
}

function WebCAPSpdf(pdfid) {
  var url = ''
  var winparm = ''
  if (pdfid) {
    url = 'http://net.grundfos.com/Appl/WebCAPS/Grundfosliterature-' + pdfid + '.pdf'
    winparm = 'width=780,height=540,left=20,top=40,status=no,toolbar=yes,menubar=yes,location=yes,resizable=yes'
    } else {
    url = 'http://net.grundfos.com/Appl/WebCAPS/Literature?userid=GMA'
    winparm = 'width=780,height=540,left=40,top=20,status=no,toolbar=no,menubar=no,location=no,resizable=yes'
    }
  window.open(url,'', winparm);
}
//Help (not shown on web):
//Function: WebCAPS
//Purpose: Open WebCAPS in a new window.
//Parameters: First parameter (required) is the user-id, which also determines language and pricelist.
//Second parameter may be a code for either Application or Product family.
//Examples:
//WebCAPS('GWS')
//WebCAPS('GFD','HEATING')
//WebCAPS('GMA','CLMFAM')  (Avoid extensive use of product family codes. They may not be consistent.)

//Function: WebCAPSmodule
//Purpose: Open WebCAPS in a new window in a certain module.
//Parameters: First parameter (required) is the user-id, which also determines language and pricelist.
//Second parameter may be a code determining which module to start.
//Modules to choose from: 1=Catalogue, 2=Replacement, 3=Product search, 4=Service.
//Examples:
//WebCAPS('GWS')
//WebCAPS('GFD','4')

//Function: WebCAPSliterature
//Purpose: Open WebCAPS Literature in a new window
//Examples:
//WebCAPSliterature('GWS')
//WebCAPSliterature('GFD','HEATING')
//WebCAPSliterature('GMA','CLMFAM')  (Avoid extensive use of product family codes. They may not be consistent.)

//Function: WebCAPSpdf
//Purpose: Open specific PDF file from WebCAPS Literature by PDF-id number.
//Example:
//WebCAPSpdf('1322')
//Help:
//To find the pdf-id number, surf WebCAPS to find the literature, click "Click here to download". A new window will pop up, and the number will be part of the URL, f.ex.: http://net.grundfos.com/Appl/WebCAPS/Grundfosliterature-1322.pdf
