﻿  
     var loadinglayer;
   var loadingdiv;
  function AskPrice(id)
  {
      window.location.href = '/ForBuyer/Inquiry.aspx?Spid=' + id;
  }
//定制合成专用询价方法
  function synthesisAskPrice(formname,id) {
      G(id).checked = true;
      G(formname).submit();
     
  }
  
// JScript 文件
     function IsCasNo(casno) {
         casno = casno.replace(/^\s*/, "").replace(/\s*$/, "");//去左右空格
         var patncasno = /^[0-9]{2,7}-[0-9]{2}-[0-9]{1}$/;//基本验证
         if (!patncasno.test(casno)) {
             return false;
         }
         var cas2 = casno.toString().substring(0, casno.length - 2).replace("-", ""); //取前2部分，去掉-
         var ii = 1;
         var allcount = 0;//前2部分倒过来*1,2,3,4...总合
         for (var i = cas2.length - 1; i >= 0; i--) {
             allcount += cas2.charAt(i) * ii;
             ii++;
         }
         var lastchar = casno.substring(casno.length - 1, casno.length);   //最后一位
         var mod = allcount % 10; //总合除10的余数
         if (mod == lastchar) {        //余数与最后一位是否相等
             return true;
         }
         else {
             return false;
         }
     }
     function AddFavorite(sURL, sTitle) 
{ 
    try 
    { 
        window.external.addFavorite(sURL, sTitle); 
    } 
    catch (e) 
    { 
        try 
        { 
            window.sidebar.addPanel(sTitle, sURL, ""); 
        } 
        catch (e) 
        { 
          
        } 
    } 
} 
     function AddFavorites(title,memberid)
     {
                if(memberid==0)
                {
                    alert("please login first!")
                    window.location.href="/login.aspx?rurl="+window.location.pathname;
                    return;      
                }  
                showloading(true);   
                //创建浏览器兼容的XMLHttpRequest对象
                var xmlhttp1;
                try{
                    xmlhttp1= new ActiveXObject('Msxml2.XMLHTTP');
                }catch(e){
                    try{
                        xmlhttp1= new ActiveXObject('Microsoft.XMLHTTP');
                    }catch(e){
                        try{
                            xmlhttp1= new XMLHttpRequest();
                        }catch(e){}
                    }
                }
                //定义XMLHttpRequest对象的事件处理程序
                xmlhttp1.onreadystatechange=function(){
                    if(xmlhttp1.readyState==4){
                        //关闭显示条
                        showloading(false);   
                        if(xmlhttp1.status==200){
                            //当加载成功时将内容显示于页面
                            if(xmlhttp1.responseText==1)
                            {
                              alert("Add Success!")
                           
                            }
                            else {
                              alert("Add Failure!")
                            }
                          
                        }else{
                            //否则弹出错误信息
                             
                        }
                    }
                }
                //创建一个连接
                xmlhttp1.open("get","/server/AddFavorites.ashx?type=1&title="+title+"&UserId="+memberid+"&url="+window.location.pathname);
                //发送请求
                xmlhttp1.send(null);
     }

 //遮罩
function showloading(isdisplay) {
    if (isdisplay) {
                
         loadinglayer = document.createElement("div");
         document.body.appendChild(loadinglayer);
         loadinglayer.style.cssText="position:absolute;z-index:999;filter:alpha(opacity=75);background:#666;opacity: 0.5;-moz-opacity: 0.5;left:0;top:0;";
         loadingdiv = document.createElement("div");
        document.body.appendChild(loadingdiv);
        loadingdiv.style.cssText="color:#ff5500;font-weight: bold;padding-left: 190px;padding-right:20px;padding-top: 10px;padding-bottom:10px;background-image: url(/images/loading2.gif);background-repeat: no-repeat;background-position: 5px;border: #b2b1b1 solid 1px;height:58px;font-size: 10px;position: absolute; font-size:12px;z-index: 1000;"
       try
      {
      
        loadinglayer.style.display = "block";
        loadingdiv.style.display = "block";
 loadinglayer.style.width = document.documentElement.clientWidth + "px";
        loadinglayer.style.height =  document.documentElement.clientHeight + "px";
        loadingdiv.style.top = document.documentElement.scrollTop+"px";
        loadingdiv.style.left = (document.documentElement.clientWidth / 2 -100) + "px";

     }
      catch(e){}
    } else {
       try
      {
        document.body.removeChild(loadinglayer);
         document.body.removeChild(loadingdiv);

         }
       catch (e) { }
    }
}        function changeimg()
        {
            var img = document.getElementById("imgcountry");
              var obj = document.getElementById("cbmcountry");           
            img.src= "/images/country/" + obj.value.split("#")[0] +".gif";
             if(document.getElementById("cbmcountry").value!=0)
            {
                document.getElementById("phoneCountry").value = obj.value.split("#")[2];
                document.getElementById("phoneCountry1").value = obj.value.split("#")[2];
            }
             // alert(obj.value);
        }
        function showcontact(isdisplay) {
            var IfrRef = document.getElementById('DivShim');
            if (isdisplay) {
                    try{
                if (loadinglayer != null) {
                    document.getElementById("formsend").removeChild(loadinglayer);
                  
                }
                if (loadingdiv != null) {
                    document.getElementById("formsend").removeChild(loadingdiv);
                 
                }
                            }
                               catch(e){}
                loadinglayer = document.createElement("div");
                document.getElementById("formsend").appendChild(loadinglayer);
                loadinglayer.style.cssText = "position:absolute;z-index:999;filter:alpha(opacity=50);background:#000000;opacity: 0.1;-moz-opacity: 0.1;left:0;top:0;";
                loadingdiv = document.createElement("div");
                document.getElementById("formsend").appendChild(loadingdiv);
                loadingdiv.style.cssText = "z-index:1000; width:629px; border:12px #c8dfff solid; text-align:left; font-family:\"Tahoma\"; padding:0 0 30px 10px; POSITION: absolute;background:#FFFFFF;";

                var shtml = '<div class="lc_close" onmouseover="this.className=\'lc_close_hover\'" onmouseout="this.className=\'lc_close\'" onclick="showcontact(false);" style=\"cursor:pointer;\"><a>X Close</a></div>';


                shtml += ' <table width="90%" border="0" cellspacing="7" cellpadding="0"><tr><td height="58" colspan="2"  class="font1" style="padding-left:30px;"><strong>Add your Contact Detail to build trust with supplier(s)</strong></td></tr>';
                
                shtml += '<tr ><td align="right"><span class="r4">*</span>Email:</td><td><input readonly type="text" id="Email" name="Email" value="' + document.getElementById("txtemail").value + '"  style="width:200px;" class="inputStyle" /> </td></tr>';


                //注册密码
                shtml += '<tr ><td align="right"><span class="r4">*</span>Create password:</td><td><input type="password" id="txtregpsw" name="txtregpsw" onBlur="javascript:checkregpsw();" style="width:200px;" class="inputStyle" /><div class="C_Error" id="dtxtregpsw" style="display:none;">Please enter your password with 6 - 20 characters.</div> </td></tr>';
                shtml += '<tr><td align="right"><span class="r4">*</span>Re-enter password:</td><td><input type="password" id="txtregpsw1" name="txtregpsw1" onBlur="javascript:checkregpsw1();" style="width:200px;" class="inputStyle" /><div class="C_Error" id="detxtregpsw1" style="display:none;">Please Re-enter your password with 6 - 20 characters.</div> <div class="C_Error" id="detxtregpswsame" style="display:none;">Passwords are not the same.</div></td></tr>';

                shtml += '<tr><td width="25%" align="right"><span class="r4">*</span>Gender:</td><td width="75%">';

                shtml += '<input id="genderM" type="radio" checked="checked" value="Mr." name="gender" />Male';
                shtml += '<input id="genderF" type="radio"  value="Ms." name="gender" />FeMale<br></td> </tr>';
                shtml += '<tr ><td align="right"><span class="r4">*</span>Name:</td><td><input type="text" id="Name" name="Name" value="" maxlength="255" /><div id="Nameerr" style="display:none;" class="C_Error">please enter your name</div></td></tr>';

                shtml += '<tr ><td align="right">Position:</td><td><input type="text" id="txtPosition" name="txtPosition" value="" maxlength="100" /><div id="Positionerr" style="display:none;" class="C_Error">please enter your Position</div></td></tr>';
                
                shtml += '<tr ><td align="right"><span class="r4">*</span>Country/Region:</td><td><select name="cbmcountry" id="cbmcountry" onchange="changeimg();"><option value="0">Select your country</option></select>  <img id="imgcountry" src="/images/country/1.gif"  /><div class="C_Error" id="cbmcountryerr" style="display:none;">please select your country</div></td></tr>';
                shtml += '<tr ><td align="right"><span class="r4">*</span>Company Name:</td><td><input type="text" id="CompanyName" name="CompanyName" value="" maxlength="255" /><div class="C_Error" id="companynameerr" style="display:none;">please enter your company name</div></td></tr>';

                shtml += '<tr ><td align="right"><span class="r4">*</span>Tel:</td><td><input type="text" id="phoneCountry" name="phoneCountry" onchange="changeme(\'phoneCountry\',\'phoneCountry1\')" value="86" maxlength="8" style="width:50px;" /> <input type="text" id="phoneArea" name="phoneArea" onchange="changeme(\'phoneArea\',\'phoneArea1\')" value="Area" maxlength="8" size="9"  style="color:#919191;" onclick="clearboxphoneArea();"/> <input type="text" id="phoneNumber" name="phoneNumber" value="Local Number-Ext." maxlength="34" size="20" style="color:#919191;"  onclick="clearboxphoneNumber();"/><div id="phoneerr" style="display:none;" class="C_Error">please enter number,dash or space only</div></td></tr>';

                shtml += '<tr id="faxLayer"  ><td align="right" style="padding-right:8px;"> Fax:</td><td><input type="text" id="phoneCountry1" name="phoneCountry1"      value="86" onfocus="this.blur()" class="inputStyle"   maxlength="8" style="width:50px;" /> <input onfocus="this.blur()"  type="text"   id="phoneArea1" name="phoneArea1"     maxlength="8" size="9" class="inputStyle"  style="color:#919191;"  /> <input type="text" class="inputStyle" id="phoneNumber1" name="phoneNumber1"  maxlength="34" size="20"   /> </td></tr>';
                
                shtml += '<tr ><td align="right">MSN/Skype:</td><td><input type="text" id="MSN" name="MSN" value="" maxlength="255" /></td></tr>';

                shtml += '<tr ><td align="right"><span class="r4">*</span>Valid for:</td><td>  <input id="valid_0" type="radio" value="10" name="rblvaliddate" /> 10 Days';
                shtml +=' <input id="rblvaliddate_1" type="radio" value="20" name="rblvaliddate" /> 20 Days';
                shtml +='<input id="rblvaliddate_2" type="radio" value="30" name="rblvaliddate" /> 1 Month';
                shtml +='<input id="rblvaliddate_3" type="radio" checked="checked" value="90" name="rblvaliddate" /> 3 Month';
                shtml +='<input id="rblvaliddate_4" type="radio" value="180" name="rblvaliddate" /> 6 Month';
                shtml +='<input id="rblvaliddate_5" type="radio" value="365" name="rblvaliddate" />1 Year</td></tr>';

                shtml += '<tr ><td align="right" valign="top"  style="padding-right:0px;line-height:16px;" >Allow sellers to<br/> contact us by:</td><td style="line-height:16px; padding-bottom:8px;"> <span style=" color:#ff6600;">(Must select at least one to ensure the sellers can contact you)</span><br/>';
                shtml += ' <input type="checkbox" checked="checked" id="contacttype_1" name="contacttype" value="a"> Telephone/Fax ';
                shtml += '<input type="checkbox" id="contacttype_2" checked="checked" name="contacttype" value="b" > Email ';
                shtml += '<input type="checkbox" id="contacttype_3" checked="checked" name="contacttype" value="c" > MSN/Skype ';
                shtml += '<input type="checkbox" id="contacttype_4" checked="checked" name="contacttype" value="d" > LookChem Member Center</td></tr>';
                
                
                shtml += '<tr><td></td><td><input type="image" id="send" src="/images/Buyer.Seller/Send.gif" onclick="return checkshowcontact();" /></td></tr></table>';
                loadingdiv.innerHTML = shtml;
                addcountry();
                IfrRef.style.width = 663;
                IfrRef.style.height = 300;
                IfrRef.style.top = (document.documentElement.scrollTop + 100) + "px"
                IfrRef.style.left = (document.documentElement.clientWidth / 2 - 300) + "px";
                IfrRef.style.zIndex = loadingdiv.style.zIndex - 1;
                IfrRef.style.display = "block";
                try {
                    loadinglayer.style.width = document.documentElement.clientWidth + "px";
                    loadinglayer.style.height = (document.documentElement.scrollTop + document.documentElement.clientHeight) + "px";
                    loadingdiv.style.top = (document.documentElement.scrollTop + 100) + "px";
                    loadingdiv.style.left = (document.documentElement.clientWidth / 2 - 300) + "px";

                }
                catch (e) { }
            } else {

            try {
                var formsend = document.getElementById("formsend");
                formsend.removeChild(loadingdiv);
                formsend.removeChild(loadinglayer);
                IfrRef.style.display = "none";
              }
              catch (e) {
                  loadinglayer = null;
                  loadingdiv = null;
                  IfrRef.style.display = "none";
               }
            }
        }

        function showcontactmember(isdisplay) {
            var IfrRef = document.getElementById('DivShim');
            if (isdisplay) {
                try {
                    if (loadinglayer != null) {
                        document.getElementById("formsend").removeChild(loadinglayer);

                    }
                    if (loadingdiv != null) {
                        document.getElementById("formsend").removeChild(loadingdiv);

                    }
                }
                catch (e) { }
                loadinglayer = document.createElement("div");
                document.getElementById("formsend").appendChild(loadinglayer);
                loadinglayer.style.cssText = "position:absolute;z-index:999;filter:alpha(opacity=50);background:#000000;opacity: 0.1;-moz-opacity: 0.1;left:0;top:0;";
                loadingdiv = document.createElement("div");
                document.getElementById("formsend").appendChild(loadingdiv);
                loadingdiv.style.cssText = "z-index:1000; width:629px; border:12px #c8dfff solid; text-align:left; font-family:\"Tahoma\"; padding:0 0 30px 10px; POSITION: absolute;background:#FFFFFF;";

                var shtml = '<div class="lc_close" onmouseover="this.className=\'lc_close_hover\'" onmouseout="this.className=\'lc_close\'" onclick="showcontact(false);" style=\"cursor:pointer;\"><a>X Close</a></div>';


                shtml += ' <table width="80%" border="0" cellspacing="7" cellpadding="0"><tr><td height="58" colspan="2"  class="font1" style="padding-left:30px;"><strong>Add your Contact Detail to build trust with supplier(s)</strong></td></tr><tr><td width="31%" align="right"><span class="r4">*</span>Gender:</td><td width="69%">';

                shtml += '<input id="genderM" type="radio" checked="checked" value="Mr." name="gender" />Male';
                shtml += '<input id="genderF" type="radio"  value="Ms." name="gender" />FeMale<br></td> </tr>';
                shtml += '<tr ><td align="right"><span class="r4">*</span>Name:</td><td><input type="text" id="Name" name="Name" value="" maxlength="255" /><div id="Nameerr" style="display:none;" class="C_Error">please enter your name</div></td></tr>';
                shtml += '<tr ><td align="right"><span class="r4">*</span>Country/Region:</td><td><select name="cbmcountry" id="cbmcountry" onchange="changeimg();"><option value="0">Select your country</option></select>  <img id="imgcountry" src="/images/country/1.gif"  /><div class="C_Error" id="cbmcountryerr" style="display:none;">please select your country</div></td></tr>';
                shtml += '<tr ><td align="right"><span class="r4">*</span>Company Name:</td><td><input type="text" id="CompanyName" name="CompanyName" value="" maxlength="255" /><div class="C_Error" id="companynameerr" style="display:none;">please enter your company name</div>  </td></tr>';
                shtml += '<tr ><td align="right"><span class="r4">*</span>Your Login ID:</td><td><input type="text" id="txtemailno" name="txtemailno" value="' + document.getElementById("txtemail").value + '" maxlength="255" readonly/></td></tr>';
                shtml += '<tr ><td align="right"><span class="r4">*</span>Create your Password:</td><td><input class="input1" type="password" id="password1" name="password1" value="" maxlength="50" style="width:200px;" /><div id="password1err" style="display:none;" class="C_Error"> Please enter 6 - 20 characters (A-Z, a-z, 0-9 only).</div></td></tr>';
                shtml += '<tr ><td align="right"><span class="r4">*</span>Re-enter your Password:</td><td><input class="input1" type="password" id="password2" name="password2" value="" maxlength="50" style="width:200px;" /><div id="password2err" style="display:none;" class="C_Error"> Please enter 6 - 20 characters (A-Z, a-z, 0-9 only).</div><div class="C_Error" id="dpasswordsame"  style="display: none;">Passwords are not the same.</div></td></tr>';

                shtml += '<tr ><td align="right"><span class="r4">*</span>Tel:</td><td><input type="text" id="phoneCountry" name="phoneCountry" value="86" maxlength="8" style="width:50px;" /> <input type="text" id="phoneArea" name="phoneArea" value="Area" maxlength="8" size="9"  style="color:#919191;" onclick="clearboxphoneArea();"/> <input type="text" id="phoneNumber" name="phoneNumber" value="Local Number-Ext." maxlength="34" size="20" style="color:#919191;"  onclick="clearboxphoneNumber();"/><div id="phoneerr" style="display:none;" class="C_Error">please enter number,dash or space only</div></td></tr>';
                shtml += '<tr id="faxLayer" style="display:none;"><td align="right" style="padding-right:8px;"> Fax:</td><td><input type="text" class="inputStyle" id="phoneNumber1" name="phoneNumber1"  maxlength="34" size="20" style="color:#919191;"  /> </td></tr>';
                shtml += '<tr ><td align="right">MSN/Skype:</td><td><input type="text" id="MSN" name="MSN" value="" maxlength="255" /></td></tr>';
                shtml += '<tr><td></td><td><input type="image" id="send" src="/images/Buyer.Seller/Send.gif" onclick="return checkshowcontactmember();" /></td></tr></table>';
                loadingdiv.innerHTML = shtml;
                addcountry();
                IfrRef.style.width = 663;
                IfrRef.style.height = 300;
                IfrRef.style.top = (document.documentElement.scrollTop + 150) + "px"
                IfrRef.style.left = (document.documentElement.clientWidth / 2 - 300) + "px";
                IfrRef.style.zIndex = loadingdiv.style.zIndex - 1;
                IfrRef.style.display = "block";
                try {
                    loadinglayer.style.width = document.documentElement.clientWidth + "px";
                    loadinglayer.style.height = (document.documentElement.scrollTop + document.documentElement.clientHeight) + "px";
                    loadingdiv.style.top = (document.documentElement.scrollTop + 150) + "px";
                    loadingdiv.style.left = (document.documentElement.clientWidth / 2 - 300) + "px";

                }
                catch (e) { }
            } else {

               try {

                    document.getElementById("formsend").removeChild(loadinglayer);
                    document.getElementById("formsend").removeChild(loadingdiv);

                    IfrRef.style.display = "none";
                }
                catch (e) {

                    loadinglayer = null;
                    loadingdiv = null;
                    IfrRef.style.display = "none";

                }
            }

        }
   var IsClickphoneArea=false;
    var IsClickphoneNumber=false;
   function clearboxphoneArea()
{
    if(!IsClickphoneArea)
    {
    document.getElementById("phoneArea").value="";
     document.getElementById("phoneArea").style.cssText="color:#000000;"
    IsClickphoneArea=true;
    }
}
function clearboxphoneNumber()
{
    if(!IsClickphoneNumber)
    {
    document.getElementById("phoneNumber").value="";
       document.getElementById("phoneNumber").style.cssText="color:#000000;"
    IsClickphoneNumber=true;
    }
}
    function checkshowcontact()
    {
        var s = true;
        if (!checkregpsw()) {
            return false;
        }
        if (!checkregpsw1()) {
            return false;
        }
        if(document.getElementById("Name").value=='')
        {
           document.getElementById("Nameerr").style.display='';
          s=false;
        }
        else
        {
            document.getElementById("Nameerr").style.display='none';
        }

      
        
        if(document.getElementById("cbmcountry").value==0)
        {      
           document.getElementById("cbmcountryerr").style.display='';
          s=false;
        }
        else
        {
            document.getElementById("cbmcountryerr").style.display='none';
        }
         if(document.getElementById("CompanyName").value=='')
        {      
           document.getElementById("companynameerr").style.display='';
          s=false;
        }
        else
        {
            document.getElementById("companynameerr").style.display='none';
        }  
        if(document.getElementById("phoneArea").value==''||document.getElementById("phoneArea").value=='Area')
        {
           document.getElementById("phoneerr").style.display='';
          s=false;
        } else
        {
            document.getElementById("phoneerr").style.display='none';
        }
        if(document.getElementById("phoneNumber").value==''||document.getElementById("phoneNumber").value=='Local Number-Ext.')
        {
           document.getElementById("phoneerr").style.display='';
          s=false;
        } else
        {
            document.getElementById("phoneerr").style.display='none';
        } 
       
         return s;

     }
     
     function checkshowcontactmember() {
         var s = true;
         if (document.getElementById("Name").value == '') {
             document.getElementById("Nameerr").style.display = '';
             s = false;
         }
         else {
             document.getElementById("Nameerr").style.display = 'none';
         }
         if (document.getElementById("cbmcountry").value == 0) {
             document.getElementById("cbmcountryerr").style.display = '';
             s = false;
         }
         else {
             document.getElementById("cbmcountryerr").style.display = 'none';
         }
         if (document.getElementById("CompanyName").value == '') {
             document.getElementById("companynameerr").style.display = '';
             s = false;
         }
         else {
             document.getElementById("companynameerr").style.display = 'none';
         }
        
         var patn = /^.{6,20}$/;
         if (!patn.test(document.getElementById("password1").value)) {
             document.getElementById("password1err").style.display = '';
             s = false;
         }
         else {
             document.getElementById("password1err").style.display = 'none';
         }
         if (!patn.test(document.getElementById("password2").value)) {
             document.getElementById("password2err").style.display = '';
             s = false;
         }
         else {
             document.getElementById("password2err").style.display = 'none';
         }
         if (document.getElementById("password1").value.value != '' && document.getElementById("password1").value != document.getElementById("password2").value) {
             document.getElementById("dpasswordsame").style.display = '';
             s = false;
         }
         else {
             document.getElementById("dpasswordsame").style.display = 'none';
         }
         
         if (document.getElementById("phoneArea").value == '' || document.getElementById("phoneArea").value == 'Area') {
             document.getElementById("phoneerr").style.display = '';
             s = false;
         } else {
             document.getElementById("phoneerr").style.display = 'none';
         }
         if (document.getElementById("phoneNumber").value == '' || document.getElementById("phoneNumber").value == 'Local Number-Ext.') {
             document.getElementById("phoneerr").style.display = '';
             s = false;
         } else {
             document.getElementById("phoneerr").style.display = 'none';
         }


         return s;

     }
   function addcountry()
   {
    // JScript 文件

       var country = document.getElementById("cbmcountry");

       country.options.add(new Option('United States', '10#United States#1'));
       country.options.add(new Option('United Kingdom', '9#United Kingdom#1'));
       country.options.add(new Option('China (Mainland)', '1#China (Mainland)#86'));
       country.options.add(new Option('Korea', '5#Korea#82'));
       country.options.add(new Option('Italy', '111#Italy#39'));
       country.options.add(new Option('Germany', '89#Germany#49'));
       country.options.add(new Option('Pakistan', '166#Pakistan#92'));
country.options.add(new Option('Canada','2#Canada#1'));
country.options.add(new Option('Iran (Islamic Republic of)', '107#Iran (Islamic Republic of)#98'));
country.options.add(new Option('India', '106#India#91'));


country.options.add(new Option('Afghanistan','11#Afghanistan#93'));
country.options.add(new Option('Albania','12#Albania#355'));
country.options.add(new Option('Algeria','13#Algeria#213'));
country.options.add(new Option('American Samoa','14#American Samoa#'));
country.options.add(new Option('Andorra','15#Andorra#376'));
country.options.add(new Option('Angola','16#Angola#244'));
country.options.add(new Option('Anguilla','17#Anguilla#1264'));
country.options.add(new Option('Antarctica','18#Antarctica#'));
country.options.add(new Option('Antigua and Barbuda','19#Antigua and Barbuda#1268'));
country.options.add(new Option('Argentina','20#Argentina#54'));
country.options.add(new Option('Armenia','21#Armenia#374'));
country.options.add(new Option('Aruba','22#Aruba#'));
country.options.add(new Option('Australia','23#Australia#61'));
country.options.add(new Option('Austria','24#Austria#43'));
country.options.add(new Option('Azerbaijan','25#Azerbaijan#994'));
country.options.add(new Option('Bahamas','26#Bahamas#1242'));
country.options.add(new Option('Bahrain','27#Bahrain#973'));
country.options.add(new Option('Bangladesh','28#Bangladesh#880'));
country.options.add(new Option('Barbados','29#Barbados#1246'));
country.options.add(new Option('Belarus','30#Belarus#375'));
country.options.add(new Option('Belgium','31#Belgium#32'));
country.options.add(new Option('Belize','32#Belize#501'));
country.options.add(new Option('Benin','33#Benin#229'));
country.options.add(new Option('Bermuda','34#Bermuda#1441'));
country.options.add(new Option('Bhutan','35#Bhutan#'));
country.options.add(new Option('Bolivia','36#Bolivia#591'));
country.options.add(new Option('Bosnia and Herzegowina','37#Bosnia and Herzegowina#'));
country.options.add(new Option('Botswana','38#Botswana#267'));
country.options.add(new Option('Bouvet Island','39#Bouvet Island#'));
country.options.add(new Option('Brazil','40#Brazil#55'));
country.options.add(new Option('British Indian Ocean Territory','41#British Indian Ocean Territory#'));
country.options.add(new Option('Brunei Darussalam','42#Brunei Darussalam#673'));
country.options.add(new Option('Bulgaria','43#Bulgaria#359'));
country.options.add(new Option('Burkina Faso','44#Burkina Faso#226'));
country.options.add(new Option('Burundi', '45#Burundi#257'));
country.options.add(new Option('Canada', '2#Canada#1'));
country.options.add(new Option('Cambodia','46#Cambodia#855'));
country.options.add(new Option('Cameroon','47#Cameroon#237'));
country.options.add(new Option('Cape Verde','48#Cape Verde#'));
country.options.add(new Option('Cayman Islands','49#Cayman Islands#'));
country.options.add(new Option('Central African Republic','50#Central African Republic#236'));
country.options.add(new Option('Chad','51#Chad#235'));
country.options.add(new Option('Chile', '52#Chile#56'));
country.options.add(new Option('China (Mainland)', '1#China (Mainland)#86'));
country.options.add(new Option('China(Taiwan)', '8#China(Taiwan)#886'));
country.options.add(new Option('China(Hongkong)', '3#China(Hongkong)#852'));
country.options.add(new Option('Christmas Island','53#Christmas Island#'));
country.options.add(new Option('Cocos (Keeling) Islands','54#Cocos (Keeling) Islands#'));
country.options.add(new Option('Colombia','55#Colombia#57'));
country.options.add(new Option('Comoros','56#Comoros#'));
country.options.add(new Option('Congo','57#Congo#242'));
country.options.add(new Option('Cook Islands','58#Cook Islands#682'));
country.options.add(new Option('Costa Rica','59#Costa Rica#506'));
country.options.add(new Option('Cote D&amp;quot;Ivoire','60#Cote D&amp;quot;Ivoire#'));
country.options.add(new Option('Croatia (local name: Hrvatska)','61#Croatia (local name: Hrvatska)#'));
country.options.add(new Option('Cuba','62#Cuba#53'));
country.options.add(new Option('Cyprus','63#Cyprus#357'));
country.options.add(new Option('Czech Republic','64#Czech Republic#420'));
country.options.add(new Option('Denmark','65#Denmark#45'));
country.options.add(new Option('Djibouti','66#Djibouti#253'));
country.options.add(new Option('Dominica','67#Dominica#'));
country.options.add(new Option('Dominican Republic','68#Dominican Republic#1890'));
country.options.add(new Option('East Timor','69#East Timor#'));
country.options.add(new Option('Ecuador','70#Ecuador#593'));
country.options.add(new Option('Egypt','71#Egypt#20'));
country.options.add(new Option('El Salvador','72#El Salvador#503'));
country.options.add(new Option('Equatorial Guinea','73#Equatorial Guinea#'));
country.options.add(new Option('Eritrea','74#Eritrea#'));
country.options.add(new Option('Estonia','75#Estonia#372'));
country.options.add(new Option('Ethiopia','76#Ethiopia#251'));
country.options.add(new Option('Falkland Islands (Malvinas)','77#Falkland Islands (Malvinas)#'));
country.options.add(new Option('Faroe Islands','78#Faroe Islands#'));
country.options.add(new Option('Fiji','79#Fiji#679'));
country.options.add(new Option('Finland','80#Finland#358'));
country.options.add(new Option('France','81#France#33'));
country.options.add(new Option('France Metropolitan','82#France Metropolitan#'));
country.options.add(new Option('French Guiana','83#French Guiana#594'));
country.options.add(new Option('French Polynesia','84#French Polynesia#689'));
country.options.add(new Option('French Southern Territories','85#French Southern Territories#'));
country.options.add(new Option('Gabon','86#Gabon#241'));
country.options.add(new Option('Gambia','87#Gambia#220'));
country.options.add(new Option('Georgia','88#Georgia#995'));
country.options.add(new Option('Germany', '89#Germany#49'));
country.options.add(new Option('Ghana', '90#Ghana#233'));

country.options.add(new Option('Gibraltar','91#Gibraltar#350'));
country.options.add(new Option('Greece','92#Greece#30'));
country.options.add(new Option('Greenland','93#Greenland#'));
country.options.add(new Option('Grenada', '94#Grenada#1809'));

country.options.add(new Option('Guadeloupe','95#Guadeloupe#'));
country.options.add(new Option('Guam','96#Guam#1671'));
country.options.add(new Option('Guatemala','97#Guatemala#502'));
country.options.add(new Option('Guinea','98#Guinea#224'));
country.options.add(new Option('Guinea-Bissau','99#Guinea-Bissau#'));
country.options.add(new Option('Guyana','100#Guyana#592'));
country.options.add(new Option('Haiti','101#Haiti#509'));
country.options.add(new Option('Heard and Mc Donald Islands','102#Heard and Mc Donald Islands#'));
country.options.add(new Option('Honduras','103#Honduras#504'));
country.options.add(new Option('Hungary','104#Hungary#36'));
country.options.add(new Option('Iceland','105#Iceland#354'));
country.options.add(new Option('India', '106#India#91'));
country.options.add(new Option('Indonesia', '4#Indonesia#62'));

country.options.add(new Option('Iran (Islamic Republic of)', '107#Iran (Islamic Republic of)#98'));
country.options.add(new Option('Iraq','108#Iraq#964'));
country.options.add(new Option('Ireland','109#Ireland#353'));
country.options.add(new Option('Israel', '110#Israel#972'));
country.options.add(new Option('Italy', '111#Italy#39'));

country.options.add(new Option('Jamaica','112#Jamaica#1876'));
country.options.add(new Option('Japan','113#Japan#81'));
country.options.add(new Option('Jordan','114#Jordan#962'));
country.options.add(new Option('Kazakhstan','115#Kazakhstan#327'));
country.options.add(new Option('Kenya', '116#Kenya#254'));

country.options.add(new Option('Kiribati', '117#Kiribati#'));
country.options.add(new Option('Korea', '5#Korea#82'));
country.options.add(new Option('Kuwait','118#Kuwait#965'));
country.options.add(new Option('Kyrgyzstan','119#Kyrgyzstan#331'));
country.options.add(new Option('Lao Peoples Democratic Republic','120#Lao Peoples Democratic Republic#856'));
country.options.add(new Option('Latvia','121#Latvia#371'));
country.options.add(new Option('Lebanon','122#Lebanon#961'));
country.options.add(new Option('Lesotho','123#Lesotho#266'));
country.options.add(new Option('Liberia','124#Liberia#231'));
country.options.add(new Option('Libyan Arab Jamahiriya','125#Libyan Arab Jamahiriya#218'));
country.options.add(new Option('Liechtenstein','126#Liechtenstein#423'));
country.options.add(new Option('Lithuania','127#Lithuania#370'));
country.options.add(new Option('Luxembourg','128#Luxembourg#352'));
country.options.add(new Option('Macao','129#Macao#853'));
country.options.add(new Option('Macedonia','130#Macedonia#'));
country.options.add(new Option('Madagascar','131#Madagascar#261'));
country.options.add(new Option('Malawi', '132#Malawi#265'));
country.options.add(new Option('Malaysia', '6#Malaysia#60'));
country.options.add(new Option('Maldives','133#Maldives#960'));
country.options.add(new Option('Mali', '134#Mali#223'));
country.options.add(new Option('Malta','135#Malta#356'));
country.options.add(new Option('Marshall Islands','136#Marshall Islands#'));
country.options.add(new Option('Martinique','137#Martinique#'));
country.options.add(new Option('Mauritania','138#Mauritania#'));
country.options.add(new Option('Mauritius','139#Mauritius#230'));
country.options.add(new Option('Mayotte','140#Mayotte#'));
country.options.add(new Option('Mexico','141#Mexico#52'));
country.options.add(new Option('Micronesia','142#Micronesia#'));
country.options.add(new Option('Moldova','143#Moldova#373'));
country.options.add(new Option('Monaco','144#Monaco#377'));
country.options.add(new Option('Mongolia','145#Mongolia#976'));
country.options.add(new Option('Montserrat','146#Montserrat#1664'));
country.options.add(new Option('Morocco','147#Morocco#212'));
country.options.add(new Option('Mozambique','148#Mozambique#258'));
country.options.add(new Option('Myanmar','149#Myanmar#95'));
country.options.add(new Option('Namibia','150#Namibia#264'));
country.options.add(new Option('Nauru','151#Nauru#674'));
country.options.add(new Option('Nepal','152#Nepal#977'));
country.options.add(new Option('Netherlands','153#Netherlands#31'));
country.options.add(new Option('Netherlands Antilles','154#Netherlands Antilles#'));
country.options.add(new Option('New Caledonia','155#New Caledonia#'));
country.options.add(new Option('New Zealand','156#New Zealand#64'));
country.options.add(new Option('Nicaragua','157#Nicaragua#505'));
country.options.add(new Option('Niger','158#Niger#227'));
country.options.add(new Option('Nigeria','159#Nigeria#234'));
country.options.add(new Option('Niue','160#Niue#'));
country.options.add(new Option('Norfolk Island','161#Norfolk Island#'));
country.options.add(new Option('North Korea','162#North Korea#850'));
country.options.add(new Option('Northern Mariana Islands','163#Northern Mariana Islands#'));
country.options.add(new Option('Norway','164#Norway#47'));
country.options.add(new Option('Oman','165#Oman#968'));
country.options.add(new Option('Pakistan', '166#Pakistan#92'));
country.options.add(new Option('Palau','167#Palau#'));
country.options.add(new Option('Panama','168#Panama#507'));
country.options.add(new Option('Papua New Guinea', '169#Papua New Guinea#675'));

country.options.add(new Option('Paraguay','170#Paraguay#595'));
country.options.add(new Option('Peru','171#Peru#51'));
country.options.add(new Option('Philippines','172#Philippines#63'));
country.options.add(new Option('Pitcairn','173#Pitcairn#'));
country.options.add(new Option('Poland','174#Poland#48'));
country.options.add(new Option('Portugal','175#Portugal#351'));
country.options.add(new Option('Puerto Rico','176#Puerto Rico#1787'));
country.options.add(new Option('Qatar','177#Qatar#974'));
country.options.add(new Option('Reunion','178#Reunion#'));
country.options.add(new Option('Romania','179#Romania#40'));
country.options.add(new Option('Russian Federation','180#Russian Federation#7'));
country.options.add(new Option('Rwanda', '181#Rwanda#'));

country.options.add(new Option('Saint Kitts and Nevis','182#Saint Kitts and Nevis#'));
country.options.add(new Option('Saint Lucia','183#Saint Lucia#1758'));
country.options.add(new Option('Saint Vincent and the Grenadines','184#Saint Vincent and the Grenadines#1784'));
country.options.add(new Option('Samoa','185#Samoa#'));
country.options.add(new Option('San Marino','186#San Marino#378'));
country.options.add(new Option('Sao Tome and Principe','187#Sao Tome and Principe#239'));
country.options.add(new Option('Saudi Arabia','188#Saudi Arabia#966'));
country.options.add(new Option('Senegal', '189#Senegal#221'));
country.options.add(new Option('Serbia', '240#Serbia#381'));
country.options.add(new Option('Seychelles','190#Seychelles#248'));
country.options.add(new Option('Sierra Leone', '191#Sierra Leone#232'));
country.options.add(new Option('Singapore', '7#Singapore#65'));
country.options.add(new Option('Slovakia (Slovak Republic)','192#Slovakia (Slovak Republic)#421'));
country.options.add(new Option('Slovenia','193#Slovenia#386'));
country.options.add(new Option('Solomon Islands','194#Solomon Islands#677'));
country.options.add(new Option('Somalia','195#Somalia#252'));
country.options.add(new Option('South Africa','196#South Africa#27'));
country.options.add(new Option('Spain','197#Spain#34'));
country.options.add(new Option('Sri Lanka','198#Sri Lanka#94'));
country.options.add(new Option('St. Helena','199#St. Helena#'));
country.options.add(new Option('St. Pierre and Miquelon','200#St. Pierre and Miquelon#'));
country.options.add(new Option('Sudan','201#Sudan#249'));
country.options.add(new Option('Suriname','202#Suriname#597'));
country.options.add(new Option('Svalbard and Jan Mayen Islands','203#Svalbard and Jan Mayen Islands#'));
country.options.add(new Option('Swaziland','204#Swaziland#268'));
country.options.add(new Option('Sweden','205#Sweden#46'));
country.options.add(new Option('Switzerland','206#Switzerland#41'));
country.options.add(new Option('Syrian Arab Republic','207#Syrian Arab Republic#963'));
country.options.add(new Option('Tajikistan','208#Tajikistan#992'));
country.options.add(new Option('Tanzania','209#Tanzania#255'));
country.options.add(new Option('Thailand','210#Thailand#66'));
country.options.add(new Option('Togo','211#Togo#228'));
country.options.add(new Option('Tokelau','212#Tokelau#'));
country.options.add(new Option('Tonga','213#Tonga#676'));
country.options.add(new Option('Trinidad and Tobago','214#Trinidad and Tobago#1809'));
country.options.add(new Option('Tunisia','215#Tunisia#216'));
country.options.add(new Option('Turkey','216#Turkey#90'));
country.options.add(new Option('Turkmenistan','217#Turkmenistan#993'));
country.options.add(new Option('Turks and Caicos Islands','218#Turks and Caicos Islands#'));
country.options.add(new Option('Tuvalu','219#Tuvalu#'));
country.options.add(new Option('Uganda','220#Uganda#256'));
country.options.add(new Option('Ukraine', '221#Ukraine#380'));

country.options.add(new Option('United Arab Emirates', '222#United Arab Emirates#971'));
country.options.add(new Option('United Kingdom', '9#United Kingdom#'));
country.options.add(new Option('United States', '10#United States#1'));
country.options.add(new Option('United States Minor Outlying Islands','223#United States Minor Outlying Islands#'));
country.options.add(new Option('Uruguay','224#Uruguay#598'));
country.options.add(new Option('Uzbekistan','225#Uzbekistan#233'));
country.options.add(new Option('Vanuatu','226#Vanuatu#'));
country.options.add(new Option('Vatican City State (Holy See)','227#Vatican City State (Holy See)#'));
country.options.add(new Option('Venezuela','228#Venezuela#58'));
country.options.add(new Option('Vietnam','229#Vietnam#84'));
country.options.add(new Option('Virgin Islands (British)','230#Virgin Islands (British)#'));
country.options.add(new Option('Virgin Islands (U.S.)','231#Virgin Islands (U.S.)#'));
country.options.add(new Option('Wallis And Futuna Islands','232#Wallis And Futuna Islands#'));
country.options.add(new Option('Western Sahara','233#Western Sahara#'));
country.options.add(new Option('Yemen','234#Yemen#967'));
country.options.add(new Option('Yugoslavia','235#Yugoslavia#381'));
country.options.add(new Option('Congo, The Democratic Republic Of The','236#Congo, The Democratic Republic Of The#243'));
country.options.add(new Option('Zambia','237#Zambia#260'));
country.options.add(new Option('Zimbabwe','238#Zimbabwe#263'));
country.options.add(new Option('Other Country','239#Other Country#'));




  

   }
   function showall(isdisplay,shtml,height)
   {         var IfrRef = document.getElementById('DivShim');   
          if (isdisplay) {
          try{
                if(loadinglayer!=null)
                  document.body.removeChild(loadinglayer);
                  if(loadingdiv!=null)
                  document.body.removeChild(loadingdiv);
                  }
                  catch(e){}
         loadinglayer = document.createElement("div");
         document.body.appendChild(loadinglayer);
         loadinglayer.style.cssText="position:absolute;z-index:999;filter:alpha(opacity=10);background:#ffffff;opacity: 0.1;-moz-opacity: 0.1;left:0;top:0;";
         loadingdiv = document.createElement("div");
        document.body.appendChild(loadingdiv);
        loadingdiv.style.cssText="z-index:1000; width:629px; height:260px; border:12px #c8dfff solid; text-align:left; font-family:\"Tahoma\"; padding:0 0 30px 10px; POSITION: absolute;background:#FFFFFF;";

    
        loadingdiv.innerHTML=shtml;
        IfrRef.style.width =663;   
        IfrRef.style.height =height;   
         IfrRef.style.top = document.documentElement.scrollTop+"px"; 
IfrRef.style.left = (document.documentElement.clientWidth / 2 -300) + "px";  
IfrRef.style.zIndex = loadingdiv.style.zIndex - 1;   
IfrRef.style.display = "block"; 
       try
      {
        loadinglayer.style.width = document.documentElement.clientWidth + "px";
        loadinglayer.style.height =  document.documentElement.clientHeight + "px";
        loadingdiv.style.top = document.documentElement.scrollTop+"px";
        loadingdiv.style.left = (document.documentElement.clientWidth / 2 -300) + "px";

     }
      catch(e){}
    } else {
       try
      {
        document.body.removeChild(loadinglayer);
         document.body.removeChild(loadingdiv);
          IfrRef.style.display = "none"; 
         }
       catch (e) { }
    }
   }
   
     var html='<div class="lc left"><div class="left"><img src="/images/Buyer.Seller/lv.gif" /></div>';
	html+='<ul><li>15000+</li><li>8000-15000</li><li>4000-8000</li><li>2500-4000</li><li>1000-2500</li><li>200-1000</li></ul></div>';
    html+='<div class="right" style="width:388px; padding:0 0px 30px 0;"><div class="lc_close" onmouseover="this.className=\'lc_close_hover\'" onmouseout="this.className=\'lc_close\'" onclick=\"showpoint(false);\" style=\"cursor:pointer;\" ><a>X Close</a></div>';
      html+='<h1 class="lc_title" style="line-height:22px">What is LookChem Supplier Credit Point?</h1>';
      html+='<p>When the credit status reflecting a corporate credit situation is quantified as the specific value of credit point, plus the value of credit point accumulated in the course of longtime online trading, it is turned out to be the credit point for this company. <br />';
        html+='As a seller in the transaction, LookChem Supplier Credit Point can be indirectly taken as the standard measure of credit, the increase of credit rating is shown at the left side of the diagram.<br />  ';

    // html+='<iframe id="DivShim" src="javascript:false;" scrolling="no" frameborder="0" style="position:absolute; top:0px; left:0px; display:none;"></iframe>'
            var html1='<div class="lc left"><img src="/images/Buyer.Seller/lc.gif" width="134" height="148" /></div>';
           html1+='<div class="right" style="width:441px; padding-right:5px;">';
           html1+='<div class="lc_close" onmouseover="this.className=\'lc_close_hover\'" onmouseout="this.className=\'lc_close\'" onclick="showcertificatex(false);" style=\"cursor:pointer;\" ><a>X Close</a></div>';
           html1+='<h1 class="lc_title">When you make a purchase using lookchem.com.</h1>';
           html1+='<p>We immediately inform your chosen supplier and hold the payment until you receive your items correctly. <br />';
           html1+='The supplier must then safely prepare your items and ship them promptly to you. <br />';
           html1+='Track every step of your shipment online with the tracking code provided by the supplier. <br />';
           html1+='After delivery, check your items are safe and correct and inform us that your payment should be released to the supplier. </p></div>';
function showpoint(isdisplay) {
showall(isdisplay,html,314);
}
 
function showcertificatex(isdisplay) {

   showall(isdisplay,html1,313);

}
function topmuseover() {
    document.getElementById("navtitle").className = "navtitle1";
    document.getElementById("toplimylookchem").className = "menu2";
    document.getElementById("listtop").style.display = "";
}
function topmouseout() {
    document.getElementById("navtitle").className = "navtitle";
    document.getElementById("toplimylookchem").className = "menu1";
    document.getElementById("listtop").style.display = "none";
}
function btopmuseover() {
    document.getElementById("bnavtitle").className = "bnavtitle1";
    document.getElementById("topBuyOffers").className = "bmenu2";
    document.getElementById("blisttop").style.display = "";
}
function btopmouseout() {
    document.getElementById("bnavtitle").className = "bnavtitle";
    document.getElementById("topBuyOffers").className = "bmenu1";
    document.getElementById("blisttop").style.display = "none";

}
function setvalue(o) {
    document.getElementById("toplanguage_tm2008").value = o;
    if (o == "member") {
        document.getElementById("topselecttxt").value = "Members' buy offers";
    }
    else if (o == "nomember") {
        document.getElementById("topselecttxt").value = "Non-members' buy offers";
    }
    document.getElementById("topselectmenu").style.display = "none";

}
function setover(o) {
    document.getElementById("limember").className = "";
    document.getElementById("linomember").className = "";
    document.getElementById(o).className = "selectblueli";
}

function setKnowledgeVal(o) {
    document.getElementById("topknowledge_tm2008").value = o;
    if (o == "Encyclopedia") {
        document.getElementById("topknowledgeselecttxt").value = "Encyclopedia";
    }
    else if (o == "Answers") {
        document.getElementById("topknowledgeselecttxt").value = "Answers";
    }
    document.getElementById("topknowledgeselect").style.display = "none";

}

function setKnowledgeOver(o) {
    document.getElementById("knowledgeitem").className = "";
    document.getElementById("questionsitem").className = "";
    document.getElementById(o).className = "selectblueli";
}

function knowledgeSelectShow() {
    document.getElementById("topknowledgeselect").style.display = "";
}

function selectshow() {
    document.getElementById("topselectmenu").style.display = "";
}



