$(function (){ if($('#pane2').length>0) { $("#pane2 span").css("white-space", "normal"); $('#pane2').jscrollpane(); $(".jscrollpanedrag").css("top","15px"); } if ($('.pane3').length > 0) { $('.pane3').jscrollpane(); $(".jscrollpanedrag").css("top", "5px"); } var imagewidth = 1660; var imageheight = 840; var fullscreenroptions = { width: imagewidth, height: imageheight, bgid: '.image' }; jquery.fn.fullscreenr(fullscreenroptions); $(".rcon_1 dt li").click( function () { $(this).siblings().removeclass("hover"); $(this).addclass("hover"); var index=$(this).index(); $(".con_1").hide(); $(".con_1").eq(index).show(); if ($('#pane2').length > 0) { $('#pane2').jscrollpane(); $(".jscrollpanedrag").css("top", "15px"); } }); $(".r1 dt li p a").click(function () { var txt = $(this).text(); var filed = $(this).attr("file"); $("#" + filed).val($(this).attr("rel")) $(this).parent().prev().text(txt); $("#prosubmit").click(); }); $(".showroll li a").click( function () { $(".leftpic dt img").attr("src",this.rev); }); $(".rimg li a").click( function () { $(".show2 dt img").attr("src",this.rev); }); }); (function($){ $.fn.fullscreenr = function(options) { $(document).ready(function() { $(options.bgid).fullscreenrresizer(options); }); $(window).bind("resize", function() { $(options.bgid).fullscreenrresizer(options); }); return this; }; $.fn.fullscreenrresizer = function(options) { var ratio = options.height / options.width; var browserwidth = $(window).width(); var browserheight = $(window).height(); if (browserheight < 700)//1336*768 { $(".leftpic dt,.leftpic dt img").height(250); $(".rtitle").css({ "font-size": "20px", "line-height": "20px" }); $(".r1").height(5); $(".rbtn2").css({ paddingtop: "8px" }).find("img").height(30); $(".prolist").height(120); $(".prolist ul li").height(120); $(".prolist ul li a").css({ paddingtop: 10 }); $(".prolist ul li img").css({ width: 80, height: 80 }); $(".prolist ul li span").css({ fontsize: 14 }); $(".prolist .showprev2,.prolist .shownext2").css({ top: 35 }); $(".homemenu").addclass("homemenu_min"); $(".videot,#myelement_wrapper").height(360); $(".main").css({ margin: "0 auto 0" }); $(".banner").css({ margin: "0 auto 0" }); $(".jszc").css({ margin: "50 auto 0" }); }else if(browserheight<900)//1440*900 { $(".leftpic dt,.leftpic dt img").height(290); $(".rtitle").css({ "font-size": "30px", "line-height": "30px" }); $(".r1").height(38); $(".rbtn2").css({ paddingtop: 22 }).find("img").height(37); $(".prolist").height(185); $(".prolist ul li").height(185); $(".prolist ul li a").css({ paddingtop: 52 }); $(".prolist ul li img").css({ width: 100, height: 100 }); $(".prolist ul li span").css({ fontsize: 16 }); $(".prolist .showprev2,.prolist .shownext2").css({ top: 62 }); $(".homemenu").removeclass("homemenu_min"); $(".videot,#myelement_wrapper").height(360); $(".main").css({ margin: "0 auto 0" }); $(".banner").css({ margin: "0 auto 0" }); } else//>1440*900 { $(".leftpic dt,.leftpic dt img").height(362); $(".rtitle").css({"font-size":"44px","line-height":"50px"}); $(".r1").height(88); $(".rbtn2").css({ paddingtop:22}).find("img").height(37); $(".prolist").height(192); $(".prolist ul li").height(190); $(".prolist ul li a").css({ paddingtop: 54 }); $(".prolist ul li img").css({ width: 100, height: 100 }); $(".prolist ul li span").css({ fontsize: 16 }); $(".prolist .showprev2,.prolist .shownext2").css({ top: 62 }); $(".homemenu").removeclass("homemenu_min"); $(".videot,#myelement_wrapper").height(469); $(".main").css({ margin: "50px auto 0" }); $(".banner").css({ margin: "62px auto 0" }); $(".jszc").css({ margin: "132px auto 0" }); } // 让浏览器窗口大小 if ((browserheight/browserwidth) > ratio){ $(this).height(browserheight); $(this).width(browserheight / ratio); } else { $(this).width(browserwidth); $(this).height(browserwidth * ratio); } $(this).css('left', (browserwidth - $(this).width())/2); $(this).css('top', (browserheight - $(this).height()) / 2); return this; }; })(jquery); function getattributevalue(o, key) { if (!o.attributes) return null; var attr = o.attributes; for (var i = 0; i < attr.length; i++) { if (key.tolowercase() == attr[i].name.tolowercase()) return attr[i].value; } return null; } function focusinputele(o) { if (o.value == getattributevalue(o, 'defaultval')) { o.value = ''; //o.style.color = "#3b8dd0"; } } function blurinputele(o) { if (o.value == '') { o.value = getattributevalue(o, 'defaultval'); //o.style.color = "#3b8dd0"; } } function leftmenunav(obj, classname) { var targetobj = $(obj); if (undefined != targetobj) targetobj.addclass(classname); } //搜索 function vdlsearch() { var name = $("#key"); if (name.val() == "" || name.val() == "请输入关键字") { alert("请输入关键字") return false; } else { var special_str = "[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]%^"; for (i = 0; i < name.val().length; i++) if (special_str.indexof(name.val().charat(i)) != -1) { alert("不能输入非法字符 (" + name.val().charat(i) + ")!"); name.focus(); name.select(); return false; } } return true; } //搜索 function vdlsearch_en() { var name = $("#key"); if (name.val() == "" || name.val() == "keyword") { alert("please enter a keyword") return false; } else { var special_str = "[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]%^"; for (i = 0; i < name.val().length; i++) if (special_str.indexof(name.val().charat(i)) != -1) { alert("you can not enter an illegal character (" + name.val().charat(i) + ")!"); name.focus(); name.select(); return false; } } return true; } function vdlsearchpro() { var name = $("#key_pro"); if (name.val() == "" || name.val() == "请输入关键字") { alert("请输入关键字") return false; } else { var special_str = "[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]%^"; for (i = 0; i < name.val().length; i++) if (special_str.indexof(name.val().charat(i)) != -1) { alert("不能输入非法字符 (" + name.val().charat(i) + ")!"); name.focus(); name.select(); return false; } } return true; } function setcookie(name, value)//两个参数,一个是cookie的名子,一个是值 { var days = 1; //此 cookie 将被保存 30 天 var exp = new date(); //new date("december 31, 9998"); exp.settime(exp.gettime() + days * 24 * 60 * 60 * 1000); document.cookie = name + "=" + escape(value) + ";expires=" + exp.togmtstring(); } function getcookie(name)//取cookies函数 { var arr = document.cookie.match(new regexp("(^| )" + name + "=([^;]*)(;|$)")); if (arr != null) return unescape(arr[2]); return null; }