function addToPriceQuoteRequest() {
                                  var newpqaddwindow ;
                                  var i ;
                                  var pqlist = document.getElementsByTagName("select") ;
                                  var pcount = 0 ;
                                  var url = "pqmadd.php" ;
                                  var errormsg = "Elige una cantidad de uno o varios productos, por favor." ;
				  for (i = 0; i < pqlist.length; i++)
                                      {
                                      if (pqlist[i].value > 0)
                                         {
                                         pcount++ ;
                                         if (pcount == 1)
                                            {
                                            url += "?add=" ;
                                            }
                                         else
                                            {
                                            url += "," ;
                                            }
                                         url += pqlist[i].id + "," + pqlist[i].value ;
                                         }
                                      } ;
                                  if (pcount >= 1)
                                     {
                                     newpqaddwindow = window.open (url,"pqmadd","height=100,width=460,left=0,top=0,screenX=0,screenY=0") ;
                                     if (window.focus)
                                        {
                                        newpqaddwindow.focus() ;
                                        } ;
                                     }
                                  else
                                     {
                                     alert (errormsg) ;
                                     } ;
                                  } ;

function viewPriceQuoteRequest() {
                                 var newpqviewwindow ;
                                 var url = "pqmview.php?mode=view_only" ;
                                 newpqviewwindow = window.open (url,"pqmview","height=100,width=100,left=0,top=0,screenX=0,screenY=0,resizeable=yes,scrollbars=yes") ;
                                 if (window.focus)
                                    {
                                    newpqviewwindow.focus() ;
                                    } ;
                                 } ;

function eliminatePriceQuoteRequest() {
                                      var newpqeliminatewindow ;
                                      var url = "pqmeliminate.php" ;
                                      newpqeliminatewindow = window.open (url,"pqmeliminate","height=100,width=360,left=0,top=0,screenX=0,screenY=0") ;
                                      if (window.focus)
                                         {
                                         newpqeliminatewindow.focus() ;
                                         } ;
                                       } ;

function sendPriceQuoteRequest() {
                                 var newpqsendwindow ;
                                 var url = "pqmsend.php" ;
                                 newpqsendwindow = window.open (url,"pqmsend","height=440,width=900,left=0,top=0,screenX=0,screenY=0") ;
                                 if (window.focus)
                                    {
                                    newpqsendwindow.focus() ;
                                    } ;
                                 } ;

function setHeight() {
                     var windowH = getWindowheight () ;
		     var pqmcontrolsH = document.getElementById("pqmcontrols").style.height ;
		     pqmcontrolsH = pqmcontrolsH.replace(/px/i, "") ;
		     var pt = document.getElementById("pqmcontrols").style.paddingTop ;
		     pt = pt.replace(/px/i, "") ;
                     var newheight = (windowH - pqmcontrolsH - pt) + "px" ;
                     document.getElementById("productsWrapper").style.height = newheight ;
                     } ;

function resetQuantityDropDowns() {
                                  var pqlist = document.getElementsByTagName("select") ;
                                  for (i = 0; i < pqlist.length; i++)
                                      {
                                      pqlist[i].value = 0 ;
                                      } ;
                                  } ;

function showTipClickTnToEnlarge() {
                                   alert("Si deseas, haz clic sobre un producto para maximizar el imagen y ver una descripción del producto.") ;
                                   } ;
