function load() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);
  }
}

function getParam( name )
{
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var urlstring = "[\\?&]"+name+"=([^&#]*)";
    var regexp = new RegExp( urlstring );
    var varArray = regexp.exec( window.location.href );
    if( varArray == null )
        return "";
    else
        return varArray[1];
}

function checkContactFields(){
  if(document.contactform.product_line.value == "Request a catalog"){
    var re1 = /\w+/; //match letters
    var re2 = /\d+/; //match numbers
    if(!(document.contactform.address1.value.match(re1))
       || !(document.contactform.city.value.match(re1)) 
       || !(document.contactform.state.value.match(re1)) 
       || !(document.contactform.postal.value.match(re2)) 
       ){
      alert("Please enter address, city, state, and postal code to receive a catalog");
      document.contactform.mailing_list.checked = true;
      showAddress();
      return false;
    }
  }
  return true;
}

function showAddressOnLoad(){
  var elem = document.getElementById("addressBlock");
  var elem2 = document.getElementById("addressBlockLabel");
  if (getParam('request') == 'catalog'){
    elem.style.display = "block";
    document.contactform.mailing_list.checked = true;
  }else{
    elem.style.display = "none";
    elem2.style.display = "inline";
  }
}

function showAddress(){
  var elem = document.getElementById("addressBlock");
  if (document.contactform.mailing_list.checked){
    elem.style.display = "block";
  }else{
    elem.style.display = "none";
  }
  return false;
}

function initialize() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map_canvas"));
    var latlng = new GLatLng(42.266555,-87.902019);
    map.setCenter(new GLatLng(42.1,-87.902019), 9); 
    //map.setCenter(latlng, 7);
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    map.addOverlay(new GMarker(latlng));
    //map.openInfoWindow(latlng,document.createTextNode("Hello, world"));
    GEvent.addListener(map, "click", function() {
	window.open('http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=27845+Irma+Lee+Circle,Lake+Forest,+IL+60045+&sll=37.0625,-95.677068&sspn=49.624204,79.101563&ie=UTF8&z=9&iwloc=A&iwstate1=dir','mywindow','width=800,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
      });

  }
}
function dophoto(country){
  var elem = document.getElementById("photodiv");
  elem.style.display = "block";
  var elem2 = document.getElementById("photocontainer");
  elem2.style.display = "block";
  var content = '';
  var terms = '';
  //var terms = "<p>Please read our <a href=\"terms.htm\" target=\"terms\">Terms and Conditions</a></p>";
  if(country == "argentina"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Argentina</b><br/><br/>Lab Systems S.A.<br/>Quesada 5916 Capital Federal<br/>CP C1431ADB<br/>ARGENTINA<p><b>Tel:</b> +5411-4574-3447<br/><b>Fax:</b> +5411-4572-8458</p><p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:adm_ventas@lab-systems.com.ar\">adm_ventas@lab-systems.com.ar</a><br/><b>Web:</b>  <a style="font-weight:bold;" href=\"http://www.lab-systems.com.ar\" target=\"_blank\">www.lab-systems.com.ar</a></p>'; 
  }
  else if(country == "australia"){
    elem.style.height = "390px";
    elem2.style.height = "450px";
    content = '<br/><br/><b>Australia and New Zealand</b><br/><br/>Australasian Cytometry Technologies<br/>(T/A Sitara Research Solutions)<br/>5A Grenville Street<br/>Box Hill North<br/>Australia<p>Sach Jayasinghe, BSc(Hons) AFAIM<br/>Managing Director</p><p><b>Tel:</b>+61 422 538 113</p><p><b>email:</b> <a style="font-weight:bold;" href=\"mailto:sach@treestar.com\" target=\"_blank\">sach@treestar.com</a></p><br/><br/>ProSciTech Pty Ltd<br/>PO Box 111<br/>Thuringowa QLD 4817<br/>Australia<p><b>Tel:</b> 61 7 4773 9444<br/><b>Fax:</b> 61 7 4773 2244<br/></p><p><a style="font-weight:bold;" href=\"http://www.proscitech.com\" target=\"_blank\">www.proscitech.com</a></p>';
  }
  else if(country == "brazil"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Brazil</b><br/><br/>DPM Diagnostica - Brazil<br/>Paulo Loria<br/>Rua Dr. Sardinha, 29<br/>Santa Rosa<br/>Niter&#243;i<br/>L0P 1E0<br/>RJ<br/>CEP: 24240-660<p><b>Tel:</b> 55 21 2711-0009</p><p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:DPMDIAGNOSTICA@DPMDIAGNOSTICA.COM.BR\">DPMDIAGNOSTICA@DPMDIAGNOSTICA.COM.BR</a><br/><b>Web:</b>  <a style="font-weight:bold;" href=\"http://www.dpmdiagnostica.com.br\" target=\"_blank\">www.dpmdiagnostica.com.br</a></p>';
  }
  else if(country == "canada"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Canada</b><br/><br/>CEDARLANE Laboratories Ltd.<br/>5516, 8th Line<br/>R.R.#2,<br/>Hornby, Ontario, Canada<br/>L0P 1E0<p><b>Tel:</b> 905 878-8891<br/><b>Fax:</b> 905 878-7800<br/></p><p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@cedarlanelabs.com\">info@cedarlanelabs.com</a></p>';
  }
  else if(country == "china"){
    elem.style.height = "440px";
    elem2.style.height = "500px";
    content = '<br/><br/><b>China</b><br/><br/>Multisciences(Lianke) Biotech, Co., Ltd.<br/>3F,36 Xiang Mao Road,Gongshu Sci-tech<br/>Industry Park, Hangzhou, Zhejiang,China , 310011<p><b>Tel:</b> +86-571-28828608<br/><b>Fax:</b> +86-571-28828618<br/><b>Toll Free:</b> 400 6721 600(China only)</p><p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:service@gotofcm.com\">service@gotofcm.com</a><br/> <a style="font-weight:bold;" href=\"http://www.gotofcm.com\" target=\"_blank\">www.gotofcm.com</a></p><p>Beijing Hualisentai Bioscienfic Co.,ltd<br/>Room 8E, Block B<br/>Guangxinjiayuan, 319# Guang\'anmennei Street<br/>Xicheng District<br/>Beijing, 100053<br/>China</p><p><b>Contact:</b>Lucy Shi<br/><b>Tel:</b> +86-10-83131250<br/><b>Fax:</b> +86-10-83560538<br/><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:hualisentai@163.com\">hualisentai@163.com</a><br/> <a style="font-weight:bold;" href=\"http://www.hualisentai.com/\" target=\"_blank\">www.hualisentai.com/</a></p>';

  }


  else if(country == "czech"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Czech and Slovak Republic</b><br/><br/>EXBIO Praha, a.s.<br/>Nad Safinou II 341<br/>252 42 Vestec<br/>Czech Republic<p><b>Tel:</b> +420 261 090 664<br/><b>Tel:</b> +420 261 090 666<br/><b>Fax:</b> +420 261090 660</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:exbio@exbio.cz\">exbio@exbio.cz</a><br/> <a style="font-weight:bold;" href=\"http://www.exbio.cz\" target=\"_blank\">www.exbio.cz</a>';
  }
  else if(country == "denmark"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Denmark</b><br/><br/>Nordic BioSite ApS<br/>Toldbodgade 18, 5<br/>DK-1253 Copenhagen<br/>Denmark<p><b>Tel:</b> +45 4240 8485<br/><b>Tel:</b> +45 2484 8485<br/><b>Fax:</b> +46 (0)8 756 94 90</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@nordicbiosite.dk\">info@nordicbiosite.dk</a><br/> <a style="font-weight:bold;" href=\"www.nordicbiosite.dk\" target=\"_blank\">www.nordicbiosite.dk</a>';
  }
  else if(country == "estonia"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Estonia</b><br/><br/>Nordic BioSite Oy<br/>Etelaesplanadi 24<br/>FIN-00130 Helsinki<br/>Finland<p><b>Free Phone:</b> 0800 11 13 33<br/><b>Fax:</b> +46 (0)8 756 94 90</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@biosite.fi\">info@biosite.fi</a><br/> <a style="font-weight:bold;" href=\"http://www.biosite.fi\" target=\"_blank\">www.biosite.fi</a>';
  }
  else if(country == "finland"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Finland</b><br/><br/>Nordic BioSite Oy<br/>Etelaesplanadi 24<br/>FIN-00130 Helsinki<br/>Finland<p><b>Free Phone:</b> 0800 11 13 33<br/><b>Fax:</b> +46 (0)8 756 94 90</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@biosite.fi\">info@biosite.fi</a><br/> <a style="font-weight:bold;" href=\"http://www.biosite.fi\" target=\"_blank\">www.biosite.fi</a>';
  }
  else if(country == "france"){
    elem.style.height = "360px";
    elem2.style.height = "420px";
    content = '<br/><br/><b>France and Benelux</b><p>Gentaur Molecular Products<br/>Avenue de L\'Armee 68/B4<br/>B-1040 Brussels<br/>Belgium</p><p><b>Tel:</b> 32 2 732 56 88<br/><b>Fax:</b> 32 2 73244 14<br/><b>Contact:</b> Lieven Gevaert<br/><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:LG@gentaur.com\">LG@gentaur.com</a></p><br/><br/>Interchim<br/>211 bis av JF Kennedy - BP1140<br/>03103 Montlucon cedex - France<p><b>Tel:</b> 33 (0)4 70 03 88 55<br/><b>Fax:</b> 33 (0)4 70 03 82 60<br/><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:interbiotech@interchim.com\">interbiotech@interchim.com</a><br/><a style="font-weight:bold;" href=\"http://www.interchim.com\" target="_blank">www.interchim.com</a></p>';
  }
  else if(country == "germany"){
    elem.style.height = "300px";
    elem2.style.height = "360px";
    content = '<br/><br/><b>Germany</b><br/><br/>Kisker Biotech GmbH & Co. KG<br/>Ochtruperstr. 18<br/>D-48565 Steinfurt<br/>Germany<p> <a style="font-weight:bold;" href=\"http://www.kisker-biotech.com\" target="_blank">www.kisker-biotech.com</a><br/><b>Tel:</b> +49-2551-864310<br/><b>Fax:</b> +49-2551-864312<br/><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:contact@kisker-biotech.com\">contact@kisker-biotech.com</a></p><b>Contact:</b> Wolfgang Kisker';
  }
  else if(country == "hongkong"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Hong Kong</b><br/><br/>Onwon Trading Limited<br/>Rm 1009, 10/F<br/>Fung Lee Commercial Bldg.<br/>6-8A Prat Ave,<br/>Tsim Sha Tsui, Kowloon<br/>Hong Kong<p><b>Tel:</b> 852 2796 6985<br/><b>Fax:</b> 852 2757 7211<br/><b>Contact:</b> Geoffrey Liu</p>';
  }
  else if(country == "iceland"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Iceland</b><br/><br/>Nordic BioSite AB<br/>Propellervagen 4A<br/>S-183 62 Taby<br/>Sweden<p><b>Tel:</b> +46 (0)8 54 44 33 40<br/><b>Fax:</b> +46 (0)8 756 94 90</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@biosite.se\">info@biosite.se</a><br/> <a style="font-weight:bold;" href=\"http://www.biosite.se\" target=\"_blank\">www.biosite.se</a>';
  }
  else if(country == "italy"){
    elem.style.height = "230px";
    elem2.style.height = "290px";
    content = '<br/><br/><b>Italy</b><br/><br/>SPACE Import-Export s.r.l.<br/>via Ranzato,12<br/>20128 Milano<br/>Italy<p><b>Tel:</b> +39 022 575 377<br/><b>Fax:</b> + 39 022 572 231<br/><b>Contact:</b> Luca Cicchetti</p>';
  }
  else if(country == "israel"){
    elem.style.height = "430px";
    elem2.style.height = "490px";
    content = '<br/><br/><b>Israel</b><br/><br/>N.B.T. New Biotechnology Ltd.<br/>P.O. Box 8662.<br/>3 Mekor Haim St<br/>Jerusalem 91086<br/>Israel<p><b>Tel:</b> 972-2-6732001<br/><b>Fax:</b> 972-2-6731611<br/><b>Contact:</b> Uri Schechter<br/><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:nbtsales@nbtltd.com\">nbtsales@nbtltd.com</a></p><p>Tarom Applied Technologies, Ltd.<br/>93 Jabotinsky St.<br/>Petach Tikva<br/>Israel</p><p><b>Tel:</b> 972 39214145<br/><b>Fax:</b> 972 3922214146<br/><b>Contact:</b> Zvi Barr<br/><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:zvi@tarom.co.il\">zvi@tarom.co.il</a></p>';
  }
  else if(country == "japan"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Japan</b><br/><br/>Cosmo Bio Co., Ltd.<br/>Toyo Ekimae Bldg.<br/>2-2-20, Toyp Koto-ku, Tokyo 135-0016<br/>Japan<p><b>Tel:</b> 81-3-5632-9622<br/><b>Fax:</b> 81-3-5632-9614<br/><b>Contact:</b> Mr. Norihiko Shibayama<br/><a style="font-weight:bold;" href=\"http://www.cosmobio.co.jp\" target=\"_blank\">www.cosmobio.co.jp</a></p>';
  }
  else if(country == "latvia"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Latvia</b><br/><br/>Nordic BioSite Oy<br/>Etelaesplanadi 24<br/>FIN-00130 Helsinki<br/>Finland<p><b>Free Phone:</b> 0800 11 13 33<br/><b>Fax:</b> +46 (0)8 756 94 90</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@biosite.fi\">info@biosite.fi</a><br/> <a style="font-weight:bold;" href=\"http://www.biosite.fi\" target=\"_blank\">www.biosite.fi</a>';
  }
  else if(country == "lithuania"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Lithuania</b><br/><br/>Nordic BioSite Oy<br/>Etelaesplanadi 24<br/>FIN-00130 Helsinki<br/>Finland<p><b>Free Phone:</b> 0800 11 13 33<br/><b>Fax:</b> +46 (0)8 756 94 90</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@biosite.fi\">info@biosite.fi</a><br/> <a style="font-weight:bold;" href=\"http://www.biosite.fi\" target=\"_blank\">www.biosite.fi</a>';
  }
  else if(country == "norway"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Norway</b><br/><br/>Nordic BioSite AS<br/>P.b 1681 Vika (Arbins gate 2)<br/>N-0253 Oslo<br/>Norway<p><b>Free Phone:</b> 800 10 301<br/><b>Fax:</b> +46 (0)8 756 94 90</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@biosite.no\">info@biosite.no</a><br/> <a style="font-weight:bold;" href=\"http://www.biosite.no\" target=\"_blank\">www.biosite.no</a>';
  }
  else if(country == "spain"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Spain</b><br/><br/>Cytognos<br/>Pol. La Sema, Nave 9<br/>37900 Santa Marta de Tormes<br/>Salamanca, SPAIN<p><b>Tel:</b> (+34) 923 125 067<br/><b>Fax:</b> (+34) 923 125 128<br/><a style="font-weight:bold;" href=\"http://www.cytognos.com\" target=\"_blank\">www.www.cytognos.com</a></p>';
  }
  else if(country == "southkorea"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>South Korea</b><br/><br/>iNexus, Inc.<br/>C-402, Pangyo-innovalley 621<br/>Sampyeong-dong,<br/>Bundang-gu,<br/>Seongnam-si,<br/>Gyeonggi-do 463-400, South Korea<p><b>Contact:</b> Ui-Whan, Kim (<a href="mailto:kuw@4science.net">kuw@4science.net</a>)<br/>Marketing Dept. /  Manager<br/><b>Tel:</b> 82-1644-4214<br/><b>Fax:</b> 82-2-921-0934<br/><br/><a style="font-weight:bold;" href=\"http://www.4science.net\" target=\"_blank\">www.4science.net</a></p>';
  }
  else if(country == "sweden"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Sweden</b><br/><br/>Nordic BioSite AB<br/>Propellervagen 4A<br/>S-183 62 Taby<br/>Sweden<p><b>Tel:</b> +46 (0)8 54 44 33 40<br/><b>Fax:</b> +46 (0)8 756 94 90</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@biosite.se\">info@biosite.se</a><br/> <a style="font-weight:bold;" href=\"http://www.biosite.se\" target=\"_blank\">www.biosite.se</a>';
  }
  else if(country == "switzerland"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>Switzerland</b><br/><br/>LucernaChem AG<br/>Abendweg 18<br/>CH-6006 Luzern<br/>Switzerland<p><b>Tel:</b> ++41 41-4209636<br/><b>Fax:</b> ++41 41-4209656</p><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:oliveri@lucerna-chem.ch\">oliveri@lucerna-chem.ch</a><br/> <a style="font-weight:bold;" href=\"http://www.lucerna-chem.ch\" target=\"_blank\">www.lucerna-chem.ch</a>';
  }
  else if(country == "unitedkingdom"){
    elem.style.height = "270px";
    elem2.style.height = "330px";
    content = '<br/><br/><b>United Kingdom</b><br/><br/>Saxon Europe<br/>Duncan House,<br/>Chalkheugh Terrace<br/>Kelso<br/>Scottish Borders<br/>TD5  7DX<br/>UK<p><b>Tel:</b> +44 1573 225682<br/><b>E-mail:</b> <a style="font-weight:bold;" href=\"mailto:info@saxoneurope.co.uk\">info@saxoneurope.co.uk</a><br/><b>Contact:</b> Dr. Jeff Slater</p>';
  }
  else if(country == "taiwan"){
    elem.style.height = "580px";
    elem2.style.height = "647px";
    elem.style.top = "130";
    elem2.style.top = "100";
    content = '<br/><br/><b>TAIWAN</b><br/><br/>AWTC, Inc.<br/>Floor 4, No. 14,<br/>Hoping Fast Road, Section 1<br/>Taipei  106,  Taiwan<p><b>Tel:</b> 886-2-23681696<br/><b>Fax:</b> 886-2-23684339<br/><b>Contact:</b> Simon Chen</p><p>Cell-Bio Biotechnology Corp.<br/>ER17, 17F., No. 3, Yuancyu St.,<br/>Nangang District<br/>Taipei City 115,  Taiwan</p><p><b>Tel:</b> 886-2-27855860<br/><b>Fax:</b> 886-2-27857237<br/> <a style="font-weight:bold;" href=\"http://www.cell-bio.com.tw\" target=\"_blank\">www.cell-bio.com.tw</a><br/><b>Contact:</b> Richard Huang</p><p>PEAK TECHNOLOGY CO., LTD.<br/>2F-4, NO. 106,<br/>Song Der Road<br/>Taipei 110,  Taiwan</p><p><b>Tel:</b> +886-2-2381-5966<br/><b>Fax:</b> +886-2-2381-5968<br/> <a style="font-weight:bold;" href=\"http://www.peakflow.com.tw/\" target=\"_blank\">www.peakflow.com.tw</a><br/><b>Contact:</b> Eugene Kuo</p>';
  }

  /*
	<br/><br/><b>Israel</b><br/><br/>N.B.T. New Biotechnology Ltd.<br/>P.O. Box 8662.<br/>3 Mekor Haim St<br/>Jerusalem 91086<br/>Israel<p>Tel: 972-2-6732001<br/>Fax: 972-2-6731611<br/><b>Contact:</b> Uri Schechter<br/>Email: <a href=\"mailto:nbtsales@nbtltd.com\">nbtsales@nbtltd.com</a></p><p>Tarom Applied Technologies, Ltd.<br/>93 Jabotinsky St.<br/>Petach Tikva<br/>Israel</p><p>Tel: 972 39214145<br/>Fax: 972 3922214146<br/><b>Contact:</b> Zvi Barr<br/>Email: <a href=\"mailto:zvi@tarom.co.il\">zvi@tarom.co.il</a></p> 

###########################


	<br/><br/><b>Japan</b><br/>Cosmo Bio Co., Ltd.<br/>Toyo Ekimae Bldg.<br/>2-2-20, Toyp Koto-ku, Tokyo 135-0016<br/>Japan<p>Tel: 81-3-5632-9622<br/>Fax: 81-3-5632-9614<br/><b>Contact:</b> Mr. Norihiko Shibayama<br/><a href=\"http://www.cosmobio.co.jp\" target=\"_blank\">www.cosmobio.co.jp</a></p>
###########################
<br/><br/><b>United Kingdom</b><br/>Saxon Europe<br/>Duncan House,<br/>Chalkheugh Terrace<br/>Kelso<br/>Scottish Borders<br/>TD5  7DX<br/>UK<p>Tel: +44 1573 225682<br/>email: <a href=\"mailto:info@saxoneurope.co.uk\">info@saxoneurope.co.uk</a><br/><b>Contact:</b> Dr. Jeff Slater</p>
###########################


	<br/><br/><b>TAIWAN</b><br/>AWTC, Inc.<br/>Floor 4, No. 14,<br/>Hoping Fast Road, Section 1<br/>Taipei  106,  Taiwan<p>Tel: 886-2-23681696<br/>Fax: 886-2-23684339<br/><b>Contact:</b> Simon Chen</p><p>Cell-Bio Biotechnology Corp.<br/>ER17, 17F., No. 3, Yuancyu St.,<br/>Nangang District<br/>Taipei City 115,  Taiwan</p><p>Tel: 886-2-27855860<br/>Fax: 886-2-27857237<br/>URL: <a href=\"http://www.cell-bio.com.tw\" target=\"_blank\">www.cell-bio.com.tw</a><br/><b>Contact:</b> Richard Huang</p><p>PEAK TECHNOLOGY CO., LTD.<br/>2F-4, NO. 106,<br/>Song Der Road<br/>Taipei 110,  Taiwan</p><p>Tel: 02-2345-0550<br/>Fax:02-2345-2915<br/>URL: <a href=\"http://www.peakflow.com.tw/\" target=\"_blank\">www.peakflow.com.tw</a><br/><b>Contact:</b> Eugene Kuo</p>

##################
  */
  elem.innerHTML =  "<div class=\"popup\">" + content + terms + "</div>";
  return false;

}

/*
function dummy(){
  return false;
}
*/
function dontphoto(){
  var elem = document.getElementById("photodiv");
  elem.style.display = "none";
  var elem2 = document.getElementById("photocontainer");
  elem2.style.display = "none";
  return false;
}


/* 42.268191;-87.901804 */

function checkForMessage(){
  var elem = document.getElementById("special_message");
  elem.style.display = "block";
}

function showAnswer(form_number){
  var formname = "beadform" + form_number;
  var form = document.getElementById(formname);
  var elem = document.getElementById("answer_container");
  var elem2 = document.getElementById("answer");
  var answer = "";
  if(form_number == 1){
    answer = ((6 / (3.14*Math.pow(form.diameter.value,3)*form.bead_type.value))*1000000000000).toPrecision(3);
    elem.style.top ='50px';
  }
  if(form_number == 2){
    answer = ((6*form.pct_solids.value / (3.14*Math.pow(form.diameter.value,3)*form.bead_type.value))*10000000000).toPrecision(3);
    elem.style.top ='200px';
  }
  if(form_number == 3){
    answer = ((6/(form.diameter.value*form.bead_type.value))*10000).toPrecision(3);
    elem.style.top ='350px';
  }

  if(form_number == 4){
    answer = ((6*form.pct_solids.value/(form.diameter.value*form.bead_type.value))*100).toPrecision(5);
    elem.style.top ='500px';
  }

  if(form_number == 5){
    answer = (1/(1.004*((20/(form.diameter.value/0.8))*(1.05)*form.diameter.value))*1000).toPrecision(5);
    elem.style.top ='680px';
  }
  if(form_number == 6){
    answer = (1/(1.004*((50/(form.diameter.value/0.8))*(1.05)*form.diameter.value))*1000).toPrecision(5);
    elem.style.top ='780px';
  }

  if(form_number == 7){
    answer = ((3.14*Math.pow(form.diameter.value,2)*100000000)/60).toPrecision(2);
    elem.style.top ='900px';
  }

  if(form_number == 8){
    answer = ((3.14*Math.pow(form.diameter.value,2)*100000000)/25).toPrecision(2);
    elem.style.top ='1000px';
  }
  if(form_number == 9){
    answer = (((100*0.8)/(form.diameter.value))*(form.mgml.value/0.5)).toPrecision(5);
    elem.style.top ='1100px';
  }
  if(form_number == 10){
    answer = (((form.binding.value*0.000000001)*6.023*Math.pow(10,23))/((1819.9/Math.pow(form.diameter.value,3))*1000000)/2).toPrecision(3);
    //answer = form.binding.value;
    elem.style.top ='1250px';
  }
  /* 
=((100*0.8)/(D53))*(F53/5)
=((C56*0.000000001)*6.023E+23)/((1819.9/(C57)^3)*1000000)/2
=(((C61*0.000001)/160500)*6.023E+23)/((1819.9/C62^3)*1000000)
=(((C66*0.000001)/ 60000)*6.023E+23)/((1819.9/C67^3)*1000000)

*/

  if(form_number == 11){
    answer = ((((form.binding.value*0.000001)/160500)*6.023*Math.pow(10,23))/((1819.9/Math.pow(form.diameter.value,3))*1000000)).toPrecision(3);
    elem.style.top ='1400px';
  }

  if(form_number == 12){
    answer = ((((form.binding.value*0.000001)/60000)*6.023*Math.pow(10,23))/((1819.9/Math.pow(form.diameter.value,3))*1000000)).toPrecision(3);
    elem.style.top ='1550px';
  }
  elem2.innerHTML = answer;
  elem.style.display = "block";
  return false;
}

function hideAnswer(){
  var elem = document.getElementById("answer_container");
  elem.style.display = "none";
  return false;
}




