Cabin
2080 single cab or 1880mm cabin ,
Send Inquiry to This Supplier
document.write(unescape(“%3Cspan id=’cnzz_stat_icon_1279815760’%3E%3C/span%3E%3Cscript src=’https://s4.cnzz.com/stat.php%3Fid%3D1279815760%26show%3Dpic’ type=’text/javascript’%3E%3C/script%3E”));
function urlParam() {
var param, url = location.search, theRequest = {};
if (url.indexOf(“?”) != -1) {
var str = url.substr(1);
strs = str.split(“&”);
for (var i = 0, len = strs.length; i < len; i++) {
param = strs[i].split("=");
theRequest[param[0]] = decodeURIComponent(param[1]);
}
}
return theRequest;
};
$(window).load(function () {
var tempParam = urlParam();
if (tempParam.title != undefined) {
document.getElementById("txtTitle").value = tempParam.title;
}
$(".sp-slide").click(function () {
var _this = $(this).find("img").eq(0); //将当前的pimg元素作为_this传入函数
imgShow(_this);
});
initLinkEvent();
});
function initLinkEvent() {
var str_url = escape(window.location.href);
var favLink = $("#fav_link");
var ajax = new Ajax("xy0230", "&Module=offer&InfoId=" + document.getElementById("_param_userinfo_infoid").value + "&UserId=" + document.getElementById("curLoginUserCode").value);
ajax.onSuccess = function () {
if (!isNaN(ajax.data.content)) {
if (parseInt(ajax.data.content) == 0) {
favLink.unbind('click').click(function () {
addFavorite(favLink);
});
}
else {
favLink.html('Add Favorites ‘);
favLink.addClass(“check”);
favLink.unbind(‘click’).click(function () {
removeFavorite(parseInt(ajax.data.content), favLink);
});
}
}
else {
if (ajax.data.content == “nologin”) {
favLink.unbind(‘click’).click(function () {
showLoginDialog(“”, function () {
LoginUpdate(); updateLoginInfo();
}, false, null);
});
}
else if (ajax.data.content == “ok”) {
favLink.unbind(‘click’).click(function () {
$(“.re_ok”).hide();
$(“.re_close”).hide();
showMessage(‘Add Favorites Successfully !’);
setTimeout(function () { $(“.requ_fu”).fadeOut().hide(); }, 3000);
});
}
else if (ajax.data.content == “err”) {
favLink.unbind(‘click’).click(function () {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘Favorite Failed’);
});
}
else if (ajax.data.content == “exis”) {
favLink.unbind(‘click’).click(function () {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘The information collection’);
});
}
else if (ajax.data.content == “nomessage”) {
favLink.unbind(‘click’).click(function () {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘You Can not favorite your own information’);
});
}
}
}
$(“.libottom_chat”).each(function () {
var infoid = $(this).data(“infocode”);
var infotype = $(this).data(“infotype”);
var touser = $(this).data(“touser”);
var str_url = escape(window.location.href);
var chatLink = $(this);
if (touser == “”) {
var ajax = new Ajax(“xy800”, “&infoid=” + infoid + “&infotype=” + infotype);
ajax.onSuccess = function () {
if (parseInt(ajax.data.UserCode) > 0) {
chatLink.data(“touser”, parseInt(ajax.data.UserCode));
chatLink.show();
$(“#chat_line”).show();
if ($(“#hidLinkManID”).val() == “” || $(“#hidLinkManID”).val() == “-1”) {
chatLink.unbind(‘click’).click(function () {
showLoginDialog(“”, function () {
LoginUpdate(); updateLoginInfo();
}, false, null);
});
}
else {
//chatLink.attr(“href”, “/common/im.ashx?ac=check&from=” + $(“#hidLinkManID”).val() + “&to=” + chatLink.data(“touser”) + “&lang=en”).attr(“target”, “_blank”);
chatLink.unbind(‘click’).click(function () {
queryUserState(chatLink);
});
}
}
}
}
else {
if ($(“#hidLinkManID”).val() == “” || $(“#hidLinkManID”).val() == “-1”) {
chatLink.unbind(‘click’).click(function () {
showLoginDialog(“”, function () {
LoginUpdate(); updateLoginInfo();
}, false, null);
});
}
else {
//chatLink.attr(“href”, “/common/im.ashx?ac=check&from=” + $(“#hidLinkManID”).val() + “&to=” + touser + “&lang=en”).attr(“target”, “_blank”);
chatLink.unbind(‘click’).click(function () {
queryUserState(chatLink);
});
}
}
});
}
function queryUserState(link) {
var touser = link.data(“touser”);
jQuery.ajax({
type: “POST”,
dataType: ‘text’,
contentType: “application/x-www-form-urlencoded; charset=utf-8”,
url: “/Common/im.ashx”,
data: {
ac: “querystate”,
id: touser,
timestamp: Math.round(new Date().getTime() / 1000).toString()
},
success: function (data) {
var resultData = eval(“(” + data + “)”);
if (resultData.status == 200) {
if (resultData.data == “Online”) {//用户在线
link.unbind(“click”).attr(“href”, “/common/im.ashx?ac=check&from=” + $(“#hidLinkManID”).val() + “&to=” + touser + “&lang=en”).attr(“target”, “_blank”).find(“img”).trigger(‘click’);
}
else {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘This Supplier is not online, you can send an inquiry.’, function (r) {
link.unbind(“click”).attr(“href”, “#enquiry”).find(“img”).trigger(‘click’);
});
}
}
},
error: function (errData) {
//console.log(JSON.stringify(errData));
}
});
}
function updateLoginInfo() {
jQuery.getJSON(‘/common/GetLogin.ashx?callback=?’, ”, function (data) {
if (data[‘islogin’] == “True”) {
$(“#curLoginUserCode”).val(data[“UserId”]);
$(“#hidLinkManID”).val(data[“LinkManCode”]);
initLinkEvent();
if ($(“#fromUserEmail”) != undefined) {
$(“#fromUserEmail”).parent().append(‘
‘ + data[“email”] + ‘
‘);
$(“#fromUserEmail”).remove();
}
}
});
}
function showdetail(t, v) {
if (v == 0) {
$(t).parent().find(“li”).removeClass(“on”);
$(t).addClass(“on”);
$(“#productDetails”).show();
$(“#companyProfile”).hide();
} else {
$(t).parent().find(“li”).removeClass(“on”);
$(t).addClass(“on”);
$(“#productDetails”).hide();
$(“#companyProfile”).show();
}
}
function checkEmail() {
$(“#fromUserEmail”).parent().find(“.valid_message”).remove();
var val = document.getElementById(“fromUserEmail”).value;
if (ValidateEmail(val)) {
if (val == ‘alex@cnhuawin.com’) {
$(“#fromUserEmail”).parent().append(‘Sorry, you can’t message to yourself. ‘);
$(“#fromUserEmail”).focus();
} else {
validateemail(val);
}
} else {
$(“#fromUserEmail”).parent().append(‘Please enter a valid Business Email. ‘);
//$(“#fromUserEmail”).focus();
}
}
//验证邮件
function validateemail(email) {
var ajax = new Ajax(“XY017”, “&email=” + email);
ajax.onSuccess = function () {
if (ajax.state.result == 0) {
// var url = config.WebURL + ‘login.’ + config.Suffix + ‘?surl=’ + escape(window.location.href) + (document.getElementById(“txtTitle”).value != “” ? “&title=” + encodeURIComponent(document.getElementById(“txtTitle”).value) : “”) + “&email=” + encodeURIComponent(email);
// var html_A = “Please sign in frist!Sign In Now “;
// jAlert(html_A);
showLoginDialog(email, function () {
LoginUpdate(); updateLoginInfo();
}, false, null);
}
else {
var url = config.WebURL + ‘join.’ + config.Suffix + ‘?surl=’ + escape(window.location.href) + “&email=” + email;
var html_A = “This email address has not been registered, please register first.Register Now>> .”;
jAlert(html_A);
}
}
}
function checkusermessageJQuery() {
if (document.getElementById(“fromUserEmail”) != undefined && document.getElementById(“fromUserEmail”).value == “”) {
$(“#fromUserEmail”).parent().append(‘Please enter a valid Business Email. ‘);
$(“#fromUserEmail”).focus();
return false;
}
if (document.getElementById(“fromUserEmail”) != undefined && document.getElementById(“fromUserEmail”).value != “”) {
checkEmail();
return;
}
if (document.getElementById(“txtContent”).value == “”) {
$(“#txtContent”).parent().append(‘Please enter your message! ‘);
$(“#txtContent”).focus();
return false;
} else if (document.getElementById(“txtContent”).value.length > 3000) {
$(“#txtContent”).parent().append(‘Your message must be between 1-3000 characters ‘);
$(“#txtContent”).focus();
return false;
}
if (document.getElementById(“txtQuantity”).value == “”) {
$(“#txtQuantity”).parent().append(‘Please enter Minimum Order Quantity! ‘);
$(“#txtQuantity”).focus();
return false;
}
if (document.getElementById(“txtCode”).value == “”) {
$(“#txtCode”).parent().append(‘Please enter Verification Code! ‘);
$(“#txtCode”).focus();
return false;
}
showConfirmMessage({ ConfirmText: “Submit”, msg: “If this supplier does not reply to you within 3 days, we may send your inquiry and contact information to relevant suppliers recommended by CCCME.”
, IsShowInqueryAccept: true, AcceptMsg: “I accept the above terms”, confirmCallBack: postInquryData
});
}
function postInquryData() {
var str_url = escape(window.location.href);
var title = document.getElementById(“txtTitle”).value;
var type = document.getElementById(“_param_userinfo_parent_module”).value;
var ids = document.getElementById(“_param_userinfo_infoid”).value;
var uids = document.getElementById(“_param_userinfo_userid”).value;
var contents = document.getElementById(“txtContent”).value;
var code = document.getElementById(“txtCode”).value;
var quantity = document.getElementById(“txtQuantity”).value;
var unit = document.getElementById(“txtUnit”).options[document.getElementById(“txtUnit”).selectedIndex].text;
var othersupper = “Y”;
var isopencontact = document.getElementById(“cbInqueryOpenContact”).checked == true ? 1 : 0;
$(“#sub”).attr(“disabled”, true).css(“background”, “rgba(0, 72, 152,0.4)”);
jQuery.ajax({
type: “POST”,
dataType: ‘text’,
contentType: “application/x-www-form-urlencoded; charset=utf-8”,
url: “../../../Common/XYAjax.ashx?ac=xy012jquerynew&t=” + Math.round(new Date().getTime() / 1000).toString(),
data: {
content: encodeURIComponent(contents),
title: encodeURIComponent(title),
type: type,
ids: ids,
uids: uids,
code: code,
othersupper: othersupper,
quantity: quantity,
unit: unit,
isopencontact: isopencontact
},
success: function (data) {
var result = data.split(‘|’);
if (result[0] == “ok”) {
showMessage(“Thank you! Your message has been successfully sent to the supplier!”, function () {
$(“html,body”).animate({ scrollTop: 0 }, 800);
});
document.getElementById(“txtContent”).value = “”;
document.getElementById(“txtTitle”).value = document.getElementById(“hidInfoTitle”).value;
document.getElementById(“txtCode”).value = “”;
document.getElementById(“txtQuantity”).value = “”;
document.getElementById(“txtUnit”).value = “4”;
document.getElementById(‘siimage’).src = ‘/Common/ValidateCode.ashx?=’ + Math.random();
$(“#sub”).css(“background”, “#004898”);
$(“#sub”).removeAttr(“disabled”);
}
else if (data == “nologin”) {
showLoginDialog(“”, function () {
LoginUpdate(); updateLoginInfo();
}, false, null);
}
else if (data == “err” || data == “nomessage”) {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘Your message failed to send!’);
$(“#sub”).css(“background”, “#004898”);
$(“#sub”).removeAttr(“disabled”);
}
else if (data == “codeErr”) {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(“Type the characters you see in the picture!”);
$(“#sub”).css(“background”, “#004898”);
$(“#sub”).removeAttr(“disabled”);
}
else if (data == “counterr”) {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(“The platform is only allowed to send 50 inquiry messages per day, and you have exceeded the sending limit.”);
$(“#sub”).css(“background”, “#004898”);
$(“#sub”).removeAttr(“disabled”);
}
}
});
}
////==========================================================================
//// 收藏信息 开始
////==========================================================================
function addFavorite(linkbox) {
var str_url = escape(window.location.href);
var ajax = new Ajax(“xy0231”, “&Module=” + $F(“_param_userinfo_parent_module”) + “&InfoId=” + $F(“_param_userinfo_infoid”) + “&UserId=” + $F(“_param_userinfo_userid”));
ajax.onSuccess = function () {
if (ajax.state.result == “1”) {
if (ajax.data.content.indexOf(“ok”) > -1) {
var code = ajax.data.content.split(‘|’)[1];
$(linkbox).html(‘Add Favorites ‘);
$(linkbox).unbind(‘click’).click(function () {
removeFavorite(code, linkbox);
});
$(“.re_ok”).hide();
$(“.re_close”).hide();
showMessage(‘Add Favorites Successfully !’);
setTimeout(function () { $(“.requ_fu”).fadeOut().hide(); }, 3000);
}
else if (ajax.data.content == “nologin”) {
showLoginDialog(“”, function () {
LoginUpdate(); updateLoginInfo();
}, false, null);
}
else if (ajax.data.content == “err”) {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘Favorite Failed’);
}
else if (ajax.data.content == “exis”) {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘The information collection’);
}
else if (ajax.data.content == “nomessage”) {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘You Can not favorite your own information’);
}
else {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘System abnormalities. Please try again later!’);
}
}
}
}
function removeFavorite(id, linkbox) {
var str_url = escape(window.location.href);
var ajax = new Ajax(“xy0232”, “&FaCode=” + id + “&UserId=” + +$F(“_param_userinfo_userid”));
ajax.onSuccess = function () {
if (ajax.data.content == “ok”) {
$(linkbox).html(‘Add Favorites ‘);
$(linkbox).unbind(‘click’).click(function () {
addFavorite(linkbox);
});
}
else if (ajax.data.content == “nologin”) {
linkbox.unbind(‘click’).click(function () {
showLoginDialog(“”, function () {
LoginUpdate(); updateLoginInfo();
}, false, null);
});
}
else if (ajax.data.content == “err”) {
linkbox.unbind(‘click’).click(function () {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘Favorite Failed’);
});
}
else if (ajax.data.content == “exis”) {
linkbox.unbind(‘click’).click(function () {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘The information collection’);
});
}
else if (ajax.data.content == “nomessage”) {
linkbox.unbind(‘click’).click(function () {
$(“.re_ok”).show();
$(“.re_close”).show();
showMessage(‘You Can not favorite your own information’);
});
}
}
}
////==========================================================================
//// 收藏信息 结束
////==========================================================================
function imgShow(_this) {
var src = _this.attr(“src”); //获取当前点击的pimg元素中的src属性
var imgList = $(“#hidBigImages”).val().split(‘,’);
var index = _this.data(“index”);
if (index – 1 < imgList.length) {
src = imgList[index – 1];
}
$("#bigimg").attr("src", src); //设置#bigimg元素的src属性
/*获取当前点击图片的真实大小,并显示弹出层及大图*/
$(" “).attr(“src”, src).load(function () {
var windowW = $(window).width(); //获取当前窗口宽度
var windowH = $(window).height(); //获取当前窗口高度
var realWidth = this.width; //获取图片真实宽度
var realHeight = this.height; //获取图片真实高度
var imgWidth, imgHeight;
var scale = 0.8; //缩放尺寸,当图片真实宽度和高度大于窗口宽度和高度时进行缩放
if (realHeight > windowH * scale) {//判断图片高度
imgHeight = windowH * scale; //如大于窗口高度,图片高度进行缩放
imgWidth = imgHeight / realHeight * realWidth; //等比例缩放宽度
if (imgWidth > windowW * scale) {//如宽度扔大于窗口宽度
imgWidth = windowW * scale; //再对宽度进行缩放
}
} else if (realWidth > windowW * scale) {//如图片高度合适,判断图片宽度
imgWidth = windowW * scale; //如大于窗口宽度,图片宽度进行缩放
imgHeight = imgWidth / realWidth * realHeight; //等比例缩放高度
} else {//如果图片真实高度和宽度都符合要求,高宽不变
imgWidth = realWidth;
imgHeight = realHeight;
}
$(“#bigimg”).css(“width”, imgWidth); //以最终的宽度对图片缩放
// var w = (windowW – imgWidth) / 2; //计算图片与窗口左边距
// var h = (windowH – imgHeight) / 2; //计算图片与窗口上边距
// $(“#big-image-box”).css({ “top”: h, “left”: w }); //设置#innerdiv的top和left属性
$(“#big-image-bg”).fadeIn(“fast”); //淡入显示#outerdiv及.pimg
});
$(“#big-image-bg”).click(function () {//再次点击淡出消失弹出层
$(this).fadeOut(“fast”);
});
}