var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
String.prototype.trim = function () {
return this.replace(/^\s\s*/, '' ).replace(/\s\s*$/, '' );
}
function change_menu_bg(i){
document.getElementById('menu_'+i).style.background = '#019be1';
}
function change_tab(str,id,total){
for(i = 1; i <= total; i++){
document.getElementById(str + i).style.display = 'none';
}
document.getElementById(str + (parseInt(id) + 1)).style.display = 'block';
for(i=0; i < total; i++){
document.getElementById("class_title_" + i).style.borderTop = 'none';
document.getElementById("class_title_" + i).style.background = 'none';
document.getElementById("class_title_" + i).style.color = '#999';
}
document.getElementById("class_title_" + id).style.borderTop = '2px solid #FF6100';
document.getElementById("class_title_" + id).style.color = '#333';
document.getElementById("class_title_" + id).style.background = '#FFFFFF';
}
/客户端判断
function check_agent() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
var flag = 'pc';
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = 'mobile';
return flag;
break;
}
}
return flag;
}
/banner切换(三个参数分别为图片地址、宽度、高度。其中图片地址为字符串,用‘|’把单个图片地址连接起来形成的字符串。)
function banner_flash( imgurl_str, width, height){
if(imgurl_str.substr(imgurl_str.length-1,1)=='|'){
imgurl_str = imgurl_str.substr(0,imgurl_str.length-1);
}
if(width == '100%'){
width = document.body.clientWidth;
}
var focus_width = width;
var focus_height = height;
var text_height = 0;
var swf_height = focus_height + text_height;
var pics = imgurl_str;
var links = '';
var texts = '';
var flashCode = '';
document.write(flashCode);
}
/表单必填项检查
function check_notnull(id_str,lang){
id_array = id_str.split(',');
for( i = 0; i < id_array.length; i++ ){
var str = document.getElementById(id_array[i]).value;
if(str==""){
if(lang == '_2'){
alert("Submit failure required (red * flag) cannot be empty.");
}else{
alert("提交失败,必填项(带红*标志的)不能为空。");
}
document.getElementById(id_array[i]).focus();
return false;
}
}
return true;
}
/图片重绘
function imageSizeAuto(imageObj,iwidth,iheight){
/参数(图片,允许的宽度,允许的高度)
var image=new Image();
image.src=imageObj.src;
if(image.width>0 && image.height>0){
if(image.width/image.height>= iwidth/iheight){
if(image.width>iwidth){
imageObj.width=iwidth;
imageObj.height=(image.height*iwidth)/image.width;
}else{
imageObj.width=image.width;
imageObj.height=image.height;
}
var mtop = Math.ceil((iheight - imageObj.height)/2);
imageObj.style.marginTop = mtop + 'px';
}else{
if(image.height>iheight){
imageObj.height=iheight;
imageObj.width=(image.width*iheight)/image.height;
imageObj.style.margin = 'auto';
}else{
imageObj.width=image.width;
imageObj.height=image.height;
imageObj.style.margin = 'auto';
var mtop = Math.ceil((iheight - imageObj.height)/2);
imageObj.style.marginTop = mtop + 'px';
}
}
}
}
/图片重绘
function imageSizeAuto2(imageObj,iwidth,iheight){
/参数(图片,允许的宽度,允许的高度)
var image=new Image();
image.src=imageObj.src;
if(image.width>0 && image.height>0){
if(image.width/image.height >= iwidth/iheight){
imageObj.height = iheight;
imageObj.width = (image.width * iheight)/image.height;
var mleft = Math.ceil((iwidth - imageObj.width)/2);
imageObj.style.marginLeft = mleft + 'px';
}else{
imageObj.width = iwidth;
imageObj.height = (image.height * iwidth)/image.width;
var mtop = Math.ceil((iheight - imageObj.height)/2);
imageObj.style.marginTop = mtop + 'px';
}
}
}
/图片自动缩小(主要用于产品展示页(pro_content.php)和图片展示页(pic_content.php))
function imageChangeWidth(imageObj,widthValue){
var img = new Image();
img.src = imageObj.src;
var w = img.width;
var h = img.height;
var rate = 1;
if(img.width > 0 && img.height > 0){
if(w > widthValue){
rate = w/widthValue;
w = widthValue;
h = h/rate;
}
imageObj.width = w;
imageObj.height = h;
}
}
/在线留言表单
function check_post(){
var not_num_result = check_notnull('name,mobile,title,message_content,code');
if(!not_num_result){return not_num_result;}
/姓名必须为汉字
var str = document.getElementById("name").value;
var result = checkChinese(str);
if(!result){
alert("姓名必须为汉字");
return false;
}
/联系方式是否正确
var str = document.getElementById("mobile").value;
var result_tel = checkTel(str);
var result_mobile = checkMobile(str);
if(!result_tel && !result_mobile){
alert("联系方式不正确,请填写11位手机号码或者带区号的固定电话号码");
return false;
}
/验证码是否为数字
var str = document.getElementById("code").value;
var result = checkNum(str);
if(!result){
alert("验证码必须为数字");
return false;
}
return true;
}
/========================================================================================
/是否全为汉字检查
/*正则表达式判断法
function checkChinese(str){
var reg = new RegExp("[\\u4E00-\\u9FFF]+","g");
return reg.test(str);
}
*/
/unicode 判断法
function checkChinese(str){
for(i=0; i 255){
return true;
}else{
return false;
}
}
}
/是否为数字检查
function checkNum(str){
var reg = /^[0-9]*$/;
var flag = reg.test(str);
if(!flag){
return false;
}else{
return true;
}
}
/*判断IP的函数*/
function checkIP(str){
var pattern=/^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$/;
var flag_ip=pattern.test(str);
if(!flag_ip){
return false;
}else{
return true;
}
}
/*判断域名的函数*/
function checkDomain(str){
var doname = /^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn)|(mobi)|(name)|(sh)|(ac)| (io)|(tw)|(com\.tw)|(hk)|(com\.hk)|(ws)|(travel)|(us)|(tm)|(la)|(me\.uk)|(org\.uk)|(ltd\.uk)|(plc\.uk)|(in)|(eu)|(it)|(jp))$/;
var flag_domain = doname.test(str);
if(!flag_domain){
return false;
}else{
return true;
}
}
/判断是否为电话号码
function checkTel(str){
var reg = /^0[\d]{2,3}-[\d]{7,8}$/;
var flag = reg.test(str);
if(!flag){
return false;
}else{
return true;
}
}
/判断手机号码是否正确
function checkMobile(str){
var reg = /^1[3,5,8]\d{9}$/;
var flag = reg.test(str);
if(!flag){
return false;
}else{
return true;
}
}
/关闭窗口
function closeCurrentPage(){
if (navigator.userAgent.indexOf("MSIE") > 0) {
if (navigator.userAgent.indexOf("MSIE 6.0") > 0) {
window.opener = null;
window.close();
} else {
window.open('', '_top');
window.top.close();
}
}else if (navigator.userAgent.indexOf("Firefox") > 0) {
window.close();
} else {
window.opener = null;
window.open('', '_self', '');
window.close();
}
}
/加入购物车
function add_to_cart(id, name, icon){
var ajax;
if(window.XMLHttpRequest){
ajax = new XMLHttpRequest();
}else{
ajax = new ActiveXObject("Microsoft.XMLHTTP");
}
ajax.onreadystatechange = function(){
if(ajax.readyState == 4 && ajax.status == 200){
alert(ajax.responseText);
}
}
var url = 'simple_cart.php?action=add&infoid=' + id + '&name=' + name + '&icon=' + icon;
ajax.open('GET',url);
ajax.send();
}
/移出购物车
function remove_from_cart(id){
var ajax;
if(window.XMLHttpRequest){
ajax = new XMLHttpRequest();
}else{
ajax = new ActiveXObject('Microsoft.XMLHTTP');
}
ajax.onreadystatechange = function(){
if(ajax.readyState == 4 && ajax.status == 200){
alert(ajax.responseText);
document.getElementById('line_' + id).style.display = 'none';
}
}
var url = 'simple_cart.php?action=delete&infoid=' + id;
ajax.open('GET',url);
ajax.send();
}
}
/*
FILE ARCHIVED ON 02:21:08 Aug 16, 2018 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 09:22:47 Apr 10, 2025.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
captures_list: 0.606
exclusion.robots: 0.03
exclusion.robots.policy: 0.017
esindex: 0.013
cdx.remote: 260.428
LoadShardBlock: 98.659 (3)
PetaboxLoader3.datanode: 76.32 (4)
PetaboxLoader3.resolve: 318.526 (2)
load_resource: 303.607
*/