function qpic()
{ 
  var testi=document.topform.myinterest.value
  if (testi.indexOf("KWHX")>-1)
  {  testi="?kwhx"
  }
  var godosent="GPPFPGPPSPGPPMTNGPPPFGPPUTGPPGigawattGPPMegawattGPPKilowattGPPPOAGPPSolar FarmGPPHydroelectric ProjectGPPGeothermal Project GPPOcean Wave GeneratingGPPInvestingGPPEmploymentGPPBrokerGPPLANDTEAMSGPPUtilGPPAffGPPEM"
  if (godosent.indexOf(testi)>-1)
  {  dosent=true
  }
  var testil=testi.toLowerCase()
  var aipic="detailland.jpg"
  var pichit=0
  var qrside2="?"+qrsidel
  for (ip=0; ip<allimg.length; ip++)
  {   var aimg=allimg[ip]
      aisplit=aimg.split(sep)
      var laside=aisplit[0]
      var lasidel=laside.toLowerCase()
      var raside=aisplit[1]
      if (pichit==0)
      {  if (testil.indexOf(lasidel)>-1 || qrside2==lasidel)
         {  aipic=raside
            pichit=1
         }
      }
  }
  document.detailpic.src=aipic
}

function valid2()
{ var test=document.topform.mydetails.value
  if (test.length<10)
  {  alert("Please provide more details to help us better answer your questions.")
     document.topform.mydetails.focus()
     return
  }
  if (areasxtra!="")
  {  ckareas()
     if (!areasok)
     {  return
     }
     var test=document.topform.mydetails.value
     var test2=document.topform.myareas.value
     test=test+" "+test2
     document.topform.mydetails.value=test
  }
  if (test.length>499)
  {  alert("Your details exceed the maximum length of 500 characters.\n\nPlease correct this and shorten it.")
     var t=test.substr(0,500)
     document.topform.mydetails.value=t
     document.topform.mydetails.focus()
     return
  }
  diddetails=true
  valid()
}

var starttime = new Date( )
var ayear = new Date( )
ayear.setTime(starttime.getTime( ) + 1000*60*60*24*365)

function setCookiec(cookLbl, value, expire) 
{  document.cookie=cookLbl + "=" + escape(value) 
   + ((expire==null) ? "" : ("; expires=" + expire.toGMTString( )))
}

function getCookie(cookLbl) 
{  var search=cookLbl + "="
   if (document.cookie.length>0)
   {  offset=document.cookie.indexOf(search)
      if (offset!=-1) 
      {  offset +=search.length
         end=document.cookie.indexOf(";",offset)
         if (end==-1)
            end=document.cookie.length
            return unescape(document.cookie.substring(offset, end))       
       }
   }
}

function setdet()
{  var ok=getCookie("myregion")
   if (!ok || ok.length<2)
   {  var ok=""
   }  else
   {  document.topform.mydetails.value="Regions and Projects of Interest: "+ok
      document.topform.myinterest.value="GPPInvesting"
   }
   if (qrsidel=="invest" || qrsidel=="gppgo" || qrsidel=="gppma" || qrsidel=="gold")
   {  document.topform.myinterest.value="GPPInvesting"
   }
   if (qrsidel.indexOf("certflaw")>-1)
   {  valid()
      return
   }
   qpic()
}

var isrep=getCookie("lastinterest")

if (!isrep)
{  diddetails=false
}  else
{  if (isrep=="RegRep" || isrep=="Free WindGenZen Website")
   {  window.open('newrep.html','','toolbar=no, scrollbars=yes, location=no, resizeable=yes, height=600 width=400')
   }
}
var vericode="<input name=\"autoveri\" id=\"autoveri\" size=6 maxlength=6 onFocus=\"verinow()\"><br>"
vericode+="<font face=\"verdana, arial, helvetica\" size=\"0\" color=\"#FFFFFF\" class=\"thtcolor\">"
vericode+="To prevent spam, please enter the code above in the box below.<br>"
vericode+="<input name=\"vericode\" id=\"vericode\" size=6 maxlength=6><p>"
