﻿var url = "http://www.lookchem.com/";
//var url = "http://192.168.19.223:81/";

var loadinglayer;
   var loadingdiv;
  function AskPrice(id)
  {
  window.location.href='/Product_Inquiry.aspx?Spid='+id;
  }
// 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 $(id){
    return document.getElementById(id);
}

function showDetails(){
//    var productname = document.getElementById("txtsubject");
//    if (productname.value.length == 0){
//        alert("Please enter product name.");
//        productname.focus();
//        return false;
//    }
//    var email = document.getElementById("txtemail");
//    var patn = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
//    if (!patn.test(email.value)){
//        alert("Please enter a valid email address.");
//        email.focus();
//        return false;
//    }
//    if (document.getElementById("txtDesc").value.length < 10){
//        alert("Your message must be between 10-1000 characters");
//        return false;
//    }
    showcontact(true);
}

function helloWorld(){
    alert("hello");
}

     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= "http://www.lookchem.com/images/country/" + obj.value.split("#")[0] +".gif";
             if(document.getElementById("cbmcountry").value!=0)
            {
                document.getElementById("tel").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 40px 10px; POSITION: absolute;background:#FFFFFF; dispaly:table;";

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="58px" colspan="2" style="padding-left:30px;"><strong>New User? Enter your contact details below.</strong></td></tr>';

shtml+='<tr><td  align="right" style="line-height:24px;padding-right:8px;"><span class="r4">*</span>Your Country/Region:</td><td><select name="cbmcountry" id="cbmcountry" onchange="changeimg();"><option value="0">Select your country</option></select><img id="imgcountry" style="margin:0 0 0 5px;" src="http://www.lookchem.com/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" style="line-height:24px; padding-right:8px;"><span class="r4">*</span>Your company:</td><td><input type="text" id="companyname" name="companyname" value="" maxlength="255" /><div id="companynameerr" style="display:none;" class="C_Error">please enter company name.</div></td></tr>';

shtml+='<tr><td align="right" style="line-height:24px; padding-right:8px;"><span class="r4">*</span>Create password:</td><td><input type="password" id="cpassword" name="cpassword" value="" maxlength="255" /><div id="cpassworderr" 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" style="line-height:24px; padding-right:8px;" ><span class="r4">*</span>Re-enter password:</td><td><input type="password" id="cpassword1" name="cpassword1" value="" maxlength="255" /><div id="cpassword1err" style="display:none;" class="C_Error">Please enter 6 - 20 characters (A-Z, a-z, 0-9 only).</div><div id="cpasswordsame" style="display:none;" class="C_Error">Passwords are not the same.</div></td></tr>';

shtml+='<tr><td align="right" style="line-height:24px; padding-right:8px;" ><span class="r4">*</span>Your Name:</td><td><input type="text" id="realname" name="realname" value="" maxlength="255" />&nbsp;<input id="genderM" type="radio" checked="checked" value="Mr." name="gender" />Male'; 
shtml+='&nbsp;&nbsp;<input id="genderF" type="radio"  value="Ms." name="gender" />FeMale<div id="nameerr" style="display:none;" class="C_Error">please enter your name</div></td></tr>';

shtml += '<tr><td align="right" style="line-height:24px; padding-right:8px;"><span class="r4">*</span>Position:</td><td><input type="text" id="position" name="position" value="" maxlength="255" /><div id="positionerr" style="display:none;" class="C_Error">please enter Position.</div></td></tr>';


shtml+='<tr><td align="right" style="line-height:24px; padding-right:8px;" ><span class="r4">*</span>Tel:</td><td><input type="text" id="tel" name="tel" value="" maxlength="255" />&nbsp;e.g.+86-571-12345678 <div id="telerr" style="display:none;" class="C_Error">Please enter a valid telephone number. </div></td></tr>';

shtml+='<tr><td align="right" style="line-height:28px; padding-right:8px;">Fax:</td><td><input type="text" id="fax" name="fax" value="" maxlength="255" />&nbsp;e.g.+86-571-12345678</td></tr>';




shtml+='<td></td><td>';
//<input type="image" id="send" src="/company/images/Send.gif" onclick="checkshowcontact();" />
shtml+='<a href="javascript:checkshowcontact();"><img src="/company/images/Send.gif" /></a></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";
        //documentElement.clientHeight屏幕高度
        //documentElement.scrollTop浏览器高度
        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) { }
    }
    
   }
   function request(id, url) {
       oScript = document.getElementById(id);
       var head = document.getElementsByTagName("head").item(0);
       if (oScript) {
           head.removeChild(oScript);
       }
       oScript = document.createElement("script");
       oScript.setAttribute("src", url);
       oScript.setAttribute("id", id);
       oScript.setAttribute("type", "text/javascript");
       oScript.setAttribute("language", "javascript");
       head.appendChild(oScript);
       return oScript;
   }
   function emailexists() {

       alert("This email already exists ");
       return;
   }
   function sendsuccess() {
       addMessage(memberid);
       alert("Thank you! Your message has been sent!");
       location.href = "http://www.lookchem.com/member/";
   }
   function emailnull() {
       alert("Please enter a valid email address.");
       return;
   }
   function isnullcompanyname() {
       alert("Please enter company name.");
       return;
   }
   function passwordlength() {
       alert("Please enter 6 - 20 characters (A-Z, a-z, 0-9 only).");
       return;
   }
   function passwordnotsame() {
       alert("Passwords are not the same.");
       return;
   }
   function isnullname() {
       alert("Please enter your name.");
       return;
   }
   function telnumerr() {
       alert("Please enter a valid telephone number.");
       return;
   }
   function selectcounty() {
       alert("please select your country");
       return;
   }
   function positionerr() {
       alert("please enter position");
       return;
   }
function checkshowcontact()
{
    var ecompanyname = document.getElementById("companyname");
    if(ecompanyname.value.length < 2 ) 
    {           
        document.getElementById("companynameerr").style.display="";
        return;
    }
    else
    {
         document.getElementById("companynameerr").style.display="none";
    }

    var patn = /^.{6,20}$/;
    var ecpassword = document.getElementById("cpassword");
    if(!patn.test(ecpassword.value)) 
    {           
        document.getElementById("cpassworderr").style.display="";    
        return;
    }
    else
    {
        document.getElementById("cpassworderr").style.display="none";
    }
    var ecpassword1 = document.getElementById("cpassword1");
    if(ecpassword.value != '' && ecpassword.value != ecpassword1.value)
    {
        document.getElementById("cpasswordsame").style.display=""; 
        return;
    }  
    else
    {
        document.getElementById("cpasswordsame").style.display="none";
    }

    var ename = document.getElementById("realname");
    var patn = /^[a-zA-Z ._-]{1,50}$/;
    if (!patn.test(ename.value)){         
        document.getElementById("nameerr").style.display="";
        err = false;
        return;
    }
    else{
        document.getElementById("nameerr").style.display="none";       
    }     
    
    var etel = document.getElementById("tel");
    if (etel.value == "")
    {           
        document.getElementById("telerr").style.display="";
        return;
    }
    else
    {
        document.getElementById("telerr").style.display="none";
    }
    var ecountry = document.getElementById("cbmcountry");
    if(ecountry.value==0)
    {      
        document.getElementById("cbmcountryerr").style.display='';
        return;
    }
    else
    {
        document.getElementById("cbmcountryerr").style.display='none';
    }
    
    var gender;
    
    for (var i = 0; i < document.getElementsByName("gender").length; i++) {
        if (document.getElementsByName("gender")[i].checked == true) {
            gender = document.getElementsByName("gender")[i].value;
        }
    }

    request('testid', url + "/Server/Member.aspx?type=1&email=" + window.frames["frmInquiry"].document.getElementById("email").value + "&companyname=" + ecompanyname.value + "&password=" + ecpassword.value + "&password1=" + ecpassword1.value + "&contact=" + ename.value + "&tel=" + URLencode(etel.value) + "&countryId=" + escape(ecountry.options[ecountry.selectedIndex].value) + "&fax=" + URLencode(document.getElementById("fax").value) + "&gender=" + gender + "&dt=" + new Date() + "&position=" + document.getElementById("position").value); 
//    ajaxPostsloading(url+"/Server/Member.aspx?type=1&email=" + window.frames["frmInquiry"].document.getElementById("email").value + "&companyname=" + ecompanyname.value + "&password=" + ecpassword.value + "&password1=" + ecpassword1.value + "&contact=" + ename.value + "&tel=" + URLencode(etel.value) + "&countryId=" + escape(ecountry.options[ecountry.selectedIndex].value) + "&fax=" + URLencode(document.getElementById("fax").value) + "&gender=" + gender, function(callback){
//        if (/^[0-9]+$/.test(callback)){
//            //添加留言信息
////            if (addMessage(callback) > 0){
////                
////            }
//            addMessage(callback);
//            alert("Thank you! Your message has been sent!");
//            location.href = "http://www.lookchem.com/member/";
//            
//        }else{
//            alert(callback);
//        }
//    });
}
 
function URLencode(sStr)
{
    //return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27').replace(/\//g,'%2F');
    return escape(sStr).replace(/\+/g, '%2B');
}

function addMessage(memberid) {
    ajaxPostsloading("/Server/M_Message.ashx?memberid=" + memberid + "&type=1&subject=" + window.frames["frmInquiry"].document.getElementById("subject").value + "&message=" + window.frames["frmInquiry"].document.getElementById("message").value + "&cid=" + window.frames["frmInquiry"].document.getElementById("cid").value + "&dt=" + new Date(), function(callback) {
//        if (callback > 0){
//            //alert("");
//            alert("");
//        }
            return callback;
    });
}
    
var err = true; 

function checkcompanyname(obj)
{
    if(obj.companyname.value.length < 2 ) 
    {           
        document.getElementById("companynameerr").style.display="";
        err = false;
    }
    else
    {
         document.getElementById("companynameerr").style.display="none";
    }
}

function checkname(obj)
{
    if(obj.name.value.length < 2 ) 
    {           
        document.getElementById("nameerr").style.display="";
        err = false;
    }
    else
    {
         document.getElementById("nameerr").style.display="none";
    }
}

   
function checkregpsw1(obj)
{
    var patn = /^.{6,20}$/;
    if(!patn.test(obj.cpassword.value)) 
    {           
        document.getElementById("cpassworderr").style.display="";    
        err = false;
    }
    else
    {
        document.getElementById("cpassworderr").style.display="none";
    }
    if(obj.cpassword.value != '' && obj.cpassword.value != obj.cpassword1.value )
    {
        document.getElementById("cpasswordsame").style.display=""; 
        err = false;
    }  
    else
    {
        document.getElementById("cpasswordsame").style.display="none";
    }
}
 
function checktel(obj)
{
    if (obj.tel.value == "")
    {           
        document.getElementById("telerr").style.display="";	           
       // obj.txtphone.focus();
        err = false;
    }
    else
    {
        document.getElementById("telerr").style.display="none";
    }
} 
  
function Showmsg(result)
{       
    var dpl=document.getElementById("demailexist");
    if ( result == 'true')
    {       
       // dpl.innerHTML = result; 
        document.getElementById("demailexist").style.display="";
        err = false;
    }
 }
 
function TimeOutHandler(result)
{
    alert("Timeout :" + result);
}

function ErrorHandler(result)
{
    var msg=result.get_exceptionType() + "\r\n";
    msg += result.get_message() + "\r\n";
    msg += result.get_stackTrace();
    alert(msg);
}
    
   function addcountry()
   {
    // JScript 文件
alert('1');
var country =   document.getElementById("cbmcountry");
country.options.add(new Option('China (Mainland)','1#China (Mainland)#86'));
country.options.add(new Option('Canada','2#Canada#1'));
country.options.add(new Option('China(Hongkong)','3#China(Hongkong)#852'));
country.options.add(new Option('Indonesia','4#Indonesia#62'));
country.options.add(new Option('Korea','5#Korea#82'));
country.options.add(new Option('Malaysia','6#Malaysia#60'));
country.options.add(new Option('Singapore','7#Singapore#65'));
country.options.add(new Option('China(Taiwan)','8#China(Taiwan)#886'));
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('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('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('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('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('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('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('Seychelles','190#Seychelles#248'));
country.options.add(new Option('Sierra Leone','191#Sierra Leone#232'));
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 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);
}
