function initBrowser(){var a="css/";-1!=window.location.pathname.indexOf("/cc/")&&(a="../../css/");$.browser.msie?9==parseInt($.browser.version)?($("head").append("<link>"),css=$("head").children(":last"),css.attr({rel:"stylesheet",type:"text/css",href:a+"senegence_ie9.css"})):($("head").append("<link>"),css=$("head").children(":last"),css.attr({rel:"stylesheet",type:"text/css",href:a+"senegence_ie8.css"})):$.browser.mozilla?-1!=navigator.appVersion.indexOf("Mac")?($("head").append("<link>"),css= $("head").children(":last"),css.attr({rel:"stylesheet",type:"text/css",href:a+"senegence_ff_mac.css"})):($("head").append("<link>"),css=$("head").children(":last"),css.attr({rel:"stylesheet",type:"text/css",href:a+"senegence_ff.css"})):$.browser.safari&&($("head").append("<link>"),css=$("head").children(":last"),css.attr({rel:"stylesheet",type:"text/css",href:a+"senegence_sa.css"}));$("#txt_cur_year").html((new Date).getFullYear());$("#lnk_sign_up").mouseover(function(){$("#btn_sign_up").hide();$("#btn_sign_up_hover").show()}).mouseout(function(){$("#btn_sign_up").show(); $("#btn_sign_up_hover").hide()});curURL=$(location).attr("href");if("US"!=getCountryCode()&&(-1<curURL.indexOf("cdo_program.aspx")||-1<curURL.indexOf("customerAutoShip.aspx")||-1<curURL.indexOf("customerAutoShipFAQ.aspx")))window.location.href="default.aspx"} function load_distribuor_inquiry(){customURL=-1!=$(location).attr("href").indexOf("/cc/")?"../../images/":"images/";$("#pop_distributor_inquiry").html("<a href='javascript:void(0);' id='dif_lnk_close'><img src='"+customURL+"close_icon.gif' alt='Close' id='dif_img_close_icon' title='Close' /></a><h1>Distributor Inquiry Form</h1><div id='dif_company_info'><h3>Company Information</h3><p>Company Name:</p> <input type='text' size='20' id='dif_company_name' /><p>Country:</p><select name='dif_company_country' id='dif_company_country'><option value='0'>Select your country</option></select><p>City:</p> <input type='text' size='20' id='dif_company_city' /><p>State:</p><select name='dif_company_state' id='dif_company_state'><option value='0'>Select your state</option></select><p>Zip Code:</p> <input type='text' size='20' id='dif_company_zip' /><p>Website:</p> <input type='text' size='20' id='dif_company_website' value='http://www.' /></div><div id='dif_contact_info'><h3>Contact Information <span id='dif_lbl_required'><font color='#F30' id='required_color'>*</font> marked are required</span></h3><p>Name:<span class='dif_requied'>*</span></p> <input type='text' size='20' id='dif_contact_name' /><p>Phone:<span class='dif_requied'>*</span></p> <input type='text' size='20' id='dif_contact_phone' /><p>Email:<span class='dif_requied'>*</span></p> <input type='text' size='20' id='dif_contact_email' /><p>Type of Distribution Interested in:</p><p><input id='dif_type_intl' type='radio' name='Distribution_Type' value='International' /> International (outside USA)</p><p><input id='dif_type_usa' type='radio' name='Distribution_Type' value='Domestic' /> Domestic (within USA)</p></div><p id='dif_text_reason'>Reason for contacting us:</p><textarea rows='1' cols='90' id='dif_txt_area'></textarea><p id='dif_text_catalog'><input type='checkbox' name='Catalog' value='Yes' id='dif_catalog' />Request a catalog (US only)</p><p><input type='button' value='' style='background:url("+customURL+ "btn_submit.png) no-repeat' id='dif_btn_submit' /></p><p id='dif_invalid'></p>");load_inquiry_country();$("#dif_img_close_icon").click(function(){is_cc_inquiry=$.cookie("cc_inquiry");$("#pop_distributor_inquiry").hide("slow");if("No"==is_cc_inquiry){$("#header").fadeTo("slow",1);$("#navigation").fadeTo("slow",1);$("#main_section").fadeTo("slow",1);$("#box_section").fadeTo("slow",1);$("#footer").fadeTo("slow",1);$("#logo").fadeTo("slow",1);$("#menu").fadeTo("slow",1);$("#main_section_cc").fadeTo("slow", 1);var a=$.cookie("myCountry"),b=$.cookie("myCountry_name");"International Inquiries"==b&&(b="United States");$("#curCountry").html(b);$("#imgFlag").attr("src",customURL+"flags/"+a.toLowerCase()+"_flag.png")}});$("#dif_company_country").change(function(){iso_country_code=$(this).val();load_inquiry_state(iso_country_code)});$("#dif_btn_submit").click(function(){if(""==$("#dif_contact_name").val())return $("#dif_invalid").html("Please input Name in Contact Information"),$("#dif_invalid").show("slow"), !1;if(""==$("#dif_contact_phone").val())return $("#dif_invalid").html("Please input Phone in Contact Information"),$("#dif_invalid").show("slow"),!1;if(""==$("#dif_contact_email").val())return $("#dif_invalid").html("Please input Email in Contact Information"),$("#dif_invalid").show("slow"),!1;if(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/.test($("#dif_contact_email").val())){var a;$.getJSON("http://h3manth.com/ip.php?callback=?",function(b){a=b.ip}).complete(function(){var b="No";$("#dif_catalog").is(":checked")&& (b="Yes");emailBody="<h2>Distributor Inquiry Form</h2><strong>Company Name:</strong> "+$("#dif_company_name").val()+"<br /><strong>Country:</strong> "+$("#dif_company_country option:selected").text()+"<br /><strong>City:</strong> "+$("#dif_company_city").val()+"<br /><strong>State:</strong> "+$("#dif_company_state option:selected").text()+"<br /><strong>Zip Code:</strong> "+$("#dif_company_zip").val()+"<br /><strong>Website:</strong> "+$("#dif_company_website").val()+"<br /><br /><strong>Name:</strong> "+ $("#dif_contact_name").val()+"<br /><strong>Phone:</strong> "+$("#dif_contact_phone").val()+"<br /><strong>Email:</strong> "+$("#dif_contact_email").val()+"<br /><strong>Type of Distribution Interested in:</strong> "+$("input[name='Distribution_Type']:checked").val()+"<br /><strong>Reason for contacting us:</strong><br /><br />"+$("#dif_txt_area").val()+"<br /><br /><strong>Request a catalog (US only):</strong> "+b+'<br /><strong>IP Address:</strong> <a href="http://whatismyipaddress.com/ip/'+a+'">'+ a+"</a>";customURL=-1!=$(location).attr("href").indexOf("/cc/")?"../../default.aspx/CustomerService":"default.aspx/CustomerService";b="internationalinquiries@senegence.com";"United States"==$("#dif_company_country option:selected").text()&&(b="info@senegence.com");$.ajax({type:"POST",url:customURL,data:"{To:'"+b+"',Subject:'Distributor Inquiry Form',Body:'"+emailBody+"'}",contentType:"application/json; charset=utf-8",dataType:"json",error:function(a,b){alert(b)},success:function(){alert("Thank you for your inquiry!"); $("#dif_img_close_icon").click()}})})}else return $("#dif_invalid").html("Please enter valid Email address"),$("#dif_invalid").show("slow"),!1})} function load_inquiry_country(){var a="xml/inquiry_country.xml",a=-1!=$(location).attr("href").indexOf("/cc/")?"../../xml/inquiry_country.xml":"xml/inquiry_country.xml",b="840",d=$.cookie("myCountry");d||(d="US");$.ajax({type:"GET",url:a,dataType:"xml",success:function(a){a=$(a).find("country").get().sort(function(a,b){var c=$(a).find("country").text(),d=$(b).find("country").text();return c<d?-1:c==d?0:1});$(a).each(function(){$(this).attr("code")==d?(b=$(this).attr("iso"),$("#dif_company_country").append("<option selected=selected' value='"+ b+"'>"+$(this).text()+"</option>")):$("#dif_company_country").append("<option value='"+$(this).attr("iso")+"'>"+$(this).text()+"</option>")});load_inquiry_state(b)}})} function load_inquiry_state(a){var b;switch(a){case "840":b=1;break;case "124":b=2;break;case "36":b=3}a="xml/states.xml";a=-1!=$(location).attr("href").indexOf("/cc/")?"../../xml/states.xml":"xml/states.xml";$("#dif_company_state").html("<option value='0'>Select your state</option>");$.ajax({type:"GET",url:a,dataType:"xml",success:function(a){a=$(a).find("state").get().sort(function(a,b){var d=$(a).find("CountryStateName").text(),g=$(b).find("CountryStateName").text();return d<g?-1:d==g?0:1});$(a).each(function(){$(this).find("CountryId").text()== b&&$("#dif_company_state").append("<option value='"+$(this).find("Id").text()+"'>"+$(this).find("CountryStateName").text()+"</option>")})}});return!0} function replaceWord(a){$.ajax({type:"GET",url:"xml/word_replace.xml",dataType:"xml",success:function(b){$(b).find("word").each(function(){var b=getCountryCode();content=$(a).html();var c=RegExp($(this).find("find").text(),"g");switch(b){case "CA":content=content.replace(c,$(this).find("canada").text());break;case "AU":content=content.replace(c,$(this).find("australia").text())}$(a).html(content)})}})}function isASPage(){$(location).attr("href").indexOf(".aspx");return!0} function meeboTop(){$.cookie("show_meebo")&&(window.Meebo||function(a){function b(){return["<",k,' onload="var d=',i,";d.getElementsByTagName('head')[0].",l,"(d.",j,"('script')).",m,"='//cim.meebo.com/cim?iv=",c.v,"&",r,"=",a[r],a[n]?"&"+n+"="+a[n]:"",a[h]?"&"+h+"="+a[h]:"","'\"></",k,">"].join("")}var d=window,c=d.Meebo=d.Meebo||function(){(c._=c._||[]).push(arguments)},f=document,k="body",g=f[k],q;if(!g)return q=arguments.callee,setTimeout(function(){q(a)},100);c.$={"0":+new Date};c.T=function(a){c.$[a]= new Date-c.$[0]};c.v=5;var l="appendChild",j="createElement",m="src",n="lang",r="network",h="domain",o=f[j]("div"),u=o[l](f[j]("m")),e=f[j]("iframe"),i="document",p,s=function(){c.T("load");c("load")};d.addEventListener?d.addEventListener("load",s,!1):d.attachEvent("onload",s);o.style.display="none";g.insertBefore(o,g.firstChild).id="meebo";e.frameBorder="0";e.name=e.id="meebo-iframe";e.allowTransparency="true";u[l](e);try{e.contentWindow[i].open()}catch(v){a[h]=f[h],p="javascript:var d="+i+".open();d.domain='"+ f.domain+"';",e[m]=p+"void(0);"}try{var t=e.contentWindow[i];t.write(b());t.close()}catch(w){e[m]=p+'d.write("'+b().replace(/"/g,'\\"')+'");d.close();'}c.T(1)}({network:"senegence_ro97gi"}))} function meeboEnd(){$.cookie("show_meebo")?Meebo("domReady"):($("body").append("<div id='meebo_bar'><a href='javascript:void(0);' id='mbb_lnk_display'><span id='mbb_label'>Click to Display Meebo Bar</span></a></div>"),$("#mbb_lnk_display").click(function(){$.cookie("show_meebo","Yes");$("#meebo_bar").hide();meeboTop();meeboEnd()}))} function getCountryID(){var a="US",b=1;$.cookie("myCountry")?a=$.cookie("myCountry"):$.getJSON("http://api.wipmania.com/jsonp?callback=?","",function(b){a=b.address.country_code});switch(a){case "US":b=1;break;case "CA":b=2;break;case "AU":b=3;break;default:b=1}return b}function getCountryCode(){var a="US";$.cookie("myCountry")?a=$.cookie("myCountry"):$.getJSON("http://api.wipmania.com/jsonp?callback=?","",function(b){a=b.address.country_code});return a} function getUrlVars(){for(var a=[],b,d=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),c=0;c<d.length;c++)b=d[c].split("="),a.push(b[0]),a[b[0]]=b[1];return a}function getASPResultVars(a){for(var b=[],d=a.split("///"),c=0;c<d.length;c++)a=d[c].split("==="),b.push(a[0]),b[a[0]]=a[1];return b}$(document).ready(function(){initBrowser()});
