window.$ = function(id) {
return document.getElementById(id);
};
var mainhtm = '
';
function init()
{
if(c11==0)showtel1();
}
function Qpm()
{
return '&id='+escape(LR_websiteid)+'&sid='+escape(LR_sid)+'&cid='+escape(LR_cid)+'&lng='+escape(lng)+'&p='+escape(c50)+'&e='+escape(LR_ex)+'&un='+escape(LR_un)+'&ud='+escape(LR_ud)+'&on='+escape(c53);
}
function Trim(a)
{
return a.replace(/(^\s*)|(\s*$)/g, '');
}
function isTel(a)
{
if(lng!='cn')return true;
var isPhone = /^0([0-9]{2,3}-|[1-9]{2,3})?[0-9]{7,8}$/;
var isMob=/^((\+?86)|(\(\+86\)))?(1[345789][0123456789][0-9]{8})$/;
var isHKPhone = /^([\\+]852\s*[69]|(852)\s*[69]|[69])\d{3}\s*\d{4}$/;
var isTWPhone = /^(09)\d{8}$/;
var isTWTel = /^0([0-9]{1,2})([\\-]|\s*)\d{6,8}$/;
var isTGPhone = /^(0[89])([\\-]|\s*)\d{4}([\\-]|\s*)\d{4}$/;
var isTGTel = /^(0[23])([\\-]|\s*)\d{3}([\\-]|\s*)\d{4}$/;
var isYNPhone = /^0(9([\\-]|\s*)|1([\\-]|\s*)[0-9]{1})\d{8}$/;
var isYNTel = /^(04)([\\-]|\s*)\d{3}([\\-]|\s*)\d{4}$/;
return (isMob.test(a) || isPhone.test(a)||isHKPhone.test(a) ||isTWPhone.test(a) ||isTWTel.test(a)||isTGPhone.test(a)||isTGTel.test(a)||isYNPhone.test(a)||isYNTel.test(a));
}
function LY_check1(obj)
{
var tel=Trim(obj.value);if(tel==t3){LY_pmt_F1(t3);obj.focus();return;}
if(!isTel(tel))
{
LY_pmt_F1(c6[21]);obj.focus();
return;
}
var bb='tel='+escape(tel);
if($('ccode1'))bb+='&ccode='+escape(Trim($('ccode1').value));
bb+=Qpm();
LY_pmt_F1(c6[20],1);
LR_hcloopJS(LR_sysurl+'lr/sendnote160711.aspx',bb);
}
function LY_check()
{
var aa='ly_name|ly_phone|ly_email|ly_note|ccode|skid'.split('|');
var bb='';
for (i = 0; i < aa.length; i++)
{
var obj=$(aa[i]);if(!obj)continue;obj.value=Trim(obj.value);var b=getAttributeValue(obj,'defaultval');
if(aa[i]=='ly_email')
{
if(obj.value!='' && obj.value!=b && !is_email(obj.value))
{
LY_pmt_F(c6[8]);
obj.focus();
return;
}
}
else if(obj.value==b || obj.value=='')
{
if(aa[i]=='ccode')
{
if($('yzmtr').style.display!='')
continue;
b=c6[12];
}
LY_pmt_F(b);
obj.focus();
return;
}
else if(aa[i]=='ly_phone')
{
if(obj.value!='' && obj.value!=b && !isTel(obj.value))
{
LY_pmt_F(c6[21]);
obj.focus();
return;
}
}
bb+=aa[i]+'='+(obj.value==b?'':encodeURIComponent(obj.value))+'&';
}
bb+=Qpm();
LY_pmt_F(c6[16]);
LR_hcloopJS(LR_sysurl+'lr/sendnote160711.aspx',bb);
}
function updateIMg(a){if(a){ LY_pmt_F(c6[a]);}$('ly_note_td').style.height='82px';$('ly_note').style.height='64px';$('yzmtr').style.display='';$('yzmimg').src='CheckCode3.aspx?id=' + LR_siteid + '&sid=' + LR_sid + '&d=' + new Date().getTime();$('ccode').focus();}
function updateIMg1(a){if(a){LY_pmt_F1(c6[a]);}$('teltd').style.height='50px'; $('yzmtr1').style.display='';$('yzmimg1').src='CheckCode3.aspx?id=' + LR_siteid + '&sid=' + LR_sid + '&d=' + new Date().getTime();$('ccode1').focus();}
function inputfocus(obj,a)
{
if(obj.value==getAttributeValue(obj,'defaultval'))obj.value = "";
obj.style.color='black';
obj.style.fontSize='14px';
if(!a)obj.style.border = "2px solid #82C6ED";
}
function inputblur(obj,a)
{
if(obj.value=='')
{
obj.value = getAttributeValue(obj,'defaultval');
if(lng=='en')obj.style.fontSize='12px';
obj.style.color='rgb(153, 153, 153)';
}
if(!a){obj.style.border = "1px solid #D5D5D5";}
if($('LY_pmt') && $('li0').className=="cur1")$('LY_pmt').innerHTML=c6[1];
if($('tel_P') && $('li1') && $('li1').className=="cur1")$('tel_P').innerHTML=c6[13];
}
function LY_pmt_F(a)
{
$('LY_pmt').innerHTML=(a==0?c6[1]:'');
}
function showtel1(a)
{
show(1);hidli(0);
if(a)$('tel1').focus();
}
function LY_pmt_F1(a)
{
$('tel_P').innerHTML=(a==0?c6[13]:'');
}
function LY_end(a,b)
{
if(a==1){b?LY_pmt_F1(c6[22]):LY_pmt_F(c6[18]);return;}
if(a==0){b?LY_pmt_F1(n3):LY_pmt_F(c6[17]);return;}
}
function is_email(object_name)
{
var string;
string=new String(object_name);
var len=string.length;
if (string.indexOf('@',1)==-1||string.indexOf('.',1)==-1||string.length<7)
{
return false;
}
if (string.charAt(1)=='.'||string.charAt(1)=='@')
{
return false;
}
if (string.charAt(len-1)=='.'||string.charAt(len-1)=='@')
{
return false;
}
return true;
}
function show(a)
{
if($('li'+a))$('li'+a).className = "cur1";
$('d'+a).className = "cur1";
}
function hidli(a)
{
if($('li'+a))$('li'+a).className = "";
$('d'+a).className = "";
}
function getAttributeValue(o, a) {
if (!o.attributes) {
return null
}
var b = o.attributes;
for (var i = 0; i < b.length; i++) {
if (a.toLowerCase() == b[i].name.toLowerCase()) {
return b[i].value
}
}
return null;
}
function filter0(sobj) {
sobj.style.backgroundColor = "#45c01a";
}
function filter1(sobj) {
sobj.style.backgroundColor = v2;
}