$(document).ready(function(){ showCertDesc(1); $("#tab1").removeClass('sel'); $("#tab7").addClass('sel'); $('#zhizhao_pic')[0].src=corp_license_pic; }); function changenavbg1(k) { if(k==1) {getObject1('top_1').className='navsel';} else {getObject1('top_1').className='';} for(i=1;i<=6;i++) {if(i==k) {getObject1('top_'+i).className='navsel';} else {getObject1('top_'+i).className='';} } } function getObject1(objectId) {if(document.getElementById && document.getElementById(objectId)) { return document.getElementById(objectId);} else if (document.all && document.all(objectId)) { return document.all(objectId);} else if (document.layers && document.layers[objectId]) { return document.layers[objectId];} else {return false;} } function smalltabs(n){ for(i=1;i<=imageshow_cnt;i++) { if(n==i) { document.getElementById("s_img"+i).className="smallddsel"; document.getElementById("bigimg"+i).style.display=""; document.getElementById("count").value=i; document.getElementById("currently").innerHTML=i; } else { document.getElementById("s_img"+i).className="smallnosel"; document.getElementById("bigimg"+i).style.display="none"; } } showCertDesc(n); } function smallback(){ var dlml=Number(document.getElementById("ones").style.marginLeft.replace(/px/g,'')); if(dlml==0) { return; } document.getElementById("ones").style.marginLeft=(dlml+120)+'px'; } function smallnext(){ var dlml=Number(document.getElementById("ones").style.marginLeft.replace(/px/g,'')); var ddnum=(0-($("dd","#ones").length-1)*120)+"px"; if($("#ones").css("margin-left")==ddnum) { return; } else{document.getElementById("ones").style.marginLeft=(dlml-120)+'px';} } function bigback() { var countvalues=Number(document.getElementById("count").value); showCertDesc(countvalues); if(countvalues < 2) { viewThumbs(1); return; } else{ for(i=1;i<=imageshow_cnt;i++) { if(countvalues-1==i) { document.getElementById("s_img"+i).className="smallddsel"; document.getElementById("bigimg"+i).style.display=""; document.getElementById("currently").innerHTML=countvalues-1; } else { document.getElementById("s_img"+i).className="smallnosel"; document.getElementById("bigimg"+i).style.display="none"; } } document.getElementById("count").value=countvalues-1; } } function bignext() { var countvalues=Number(document.getElementById("count").value); showCertDesc(countvalues); if(countvalues==imageshow_cnt) { viewThumbs(2); return; } else{ for(i=1;i<=imageshow_cnt;i++) { if(countvalues+1==i) { document.getElementById("s_img"+i).className="smallddsel"; document.getElementById("bigimg"+i).style.display=""; document.getElementById("currently").innerHTML=countvalues+1; } else { document.getElementById("s_img"+i).className="smallnosel"; document.getElementById("bigimg"+i).style.display="none"; } } document.getElementById("count").value=countvalues+1; } } function showCertDesc(n){ $('#show_cert_desc').html($('#hide_desc_'+n).html()); } function viewThumbs(s){ var tmp=tmp1=0; tmp1=parseInt($('#view').val()); if(s == 1){ tmp = tmp1-1; while(global_cnt[tmp]<=0 && tmp>=0){ tmp--; } } else{ tmp = tmp1+1; while(global_cnt[tmp]<=0 && tmp<=3){ tmp++; } } if(tmp<=3 && tmp>=0 && global_cnt[tmp]>0){ $('#view').val(tmp); location.href="?id="+corp_id+"&menuindex=25&view="+tmp; } } function addBookmark(title,url) { if (window.sidebar) { window.sidebar.addPanel(''+title, ''+url,""); } else if( document.all ) { window.external.AddFavorite(''+url, ''+title); } else if( window.opera && window.print ) { return true; } } function changeTabs(n){ $("#tab"+n).addClass("sel"); } function classOpen(n){ if($("img",$("#Class_"+n)).attr("src").indexOf("_-")!=-1) { $("img",$("#Class_"+n)).attr("src","../../images/shop/new_shop_2010/icon_+.jpg"); } else { $("img",$("#Class_"+n)).attr("src","../../images/shop/new_shop_2010/icon_-.jpg"); } $('[id^=Class_'+n+'_]').toggle(); } $(document).ready(function(){ $('.search_radio').click(function(){ if($(this)[0].id=='search_ic'){ $('form#frm_searchLeft').attr({ action:shop_site+'?id=33&menuindex=17&stype=search' }) }else{ $('form#frm_searchLeft').attr({ action:shop_site+'?id=33&menuindex=12&stype=search' }) } }); $('form#frm_searchLeft').submit(function(){ var __l = $.trim($('#q', $('#frm_searchLeft')).val()).replace(/[\u4e00-\u9fa5]/g,'aa').length; if($('#search_ic')[0].checked && __l<4){ alert('输入搜索内容不得小于4个字符。'); return false; }else if($('#search_nic')[0].checked && __l<3){ alert('输入搜索内容不得小于3个字符。'); return false; } }); $('.btn_search').click(function(){ var d = (typeof $('demand').val() != "undefined") ? $('demand').val() : 0; $('#frm_corp_search').attr({'action':shop_site+'?id=33&menuindex=7&demand='+d}) $('#frm_corp_search').submit(); }); $('#srch_type').change(function(){ if($(this).val()==1){ $('#q').val('请输入您要查找的IC型号').css({'color':'#A1A1A1'}); }else{ $('#q').val('请输入您要查找的产品名称或型号').css({'color':'#A1A1A1'}); } }); $('#q').focus(function(){ if($(this).val()=='请输入您要查找的IC型号' && $('#srch_type').val()==1){ $('#q').val('').css({'color':'#000'}); }else if($(this).val()=='请输入您要查找的产品名称或型号' && $('#srch_type').val()==2){ $('#q').val('').css({'color':'#000'}); } }); $('form[name="frm_corp_search"]').submit(function(){ var v = $('#q', $(this)).val() || ""; var vl = v.replace(/[\u4e00-\u9fa5]/g,"aa").length; if($('#srch_type').val()==1 && $('#q').val() == '请输入您要查找的IC型号'){ alert('请输入您要查找的产品!'); return false; }else if($('#srch_type').val()==2 && $('#q').val() == '请输入您要查找的产品名称或型号'){ alert('请输入您要查找的产品!'); return false; }else if(vl<1){ alert('请输入您要查找的产品!'); return false; }else if(vl<2 && $('#srch_type').val()==2){ alert('请输入至少2个字符!'); return false; }else if(vl<4 && $('#srch_type').val()==1){ alert('请输入至少4个字符!'); return false; } }); }); function showloginpop(str){ var browserName=navigator.userAgent.toLowerCase(); $("body").append("
"+ "
"+ "

"+ ""+ "我要投票

"+ "
") $("#bgloginpop").show() $("#bgloginpop").width($("body").width()) $("#bgloginpop").height($("body").height()) if(/chrome/i.test(browserName) && /webkit/i.test(browserName) && /mozilla/i.test(browserName)){ $("#loginpop").css({"top":(document.documentElement.clientHeight-$("#loginpop").height())/2+document.body.scrollTop,"left":($("body").width()/2-$("#loginpop").width()/2)+"px"}) } else { $("#loginpop").css({"top":(document.documentElement.clientHeight-$("#loginpop").height())/2+document.documentElement.scrollTop,"left":($("body").width()/2-$("#loginpop").width()/2)+"px"}) } } function closeloginpop(){ $("#loginpop").remove(); if(typeof s=='undefined') $('#bgloginpop').hide(); } function closeloginpop2(){ $("#loginpop").remove(); if(typeof s=='undefined') $('#bgloginpop').show(); } function showcjpop(s, sjt){ if(sjt) str = '商机通400 626 5285,邀请好友,返20分钟'; else str = '商机通400 626 5285,详情查看'; var browserName=navigator.userAgent.toLowerCase(); if(s == 3){ $('#cjpoptext').html('您今天已对此公司投过票,感谢您的参与!
' + str); $('#cjpopvote').hide(); } else if(s == 2){ $('#cjpoptext').html('投票成功,感谢您的参与!
' + str); $('#cjpopvote').hide(); }else if(s == 1){ $('#cjpoptext').html('投票成功,感谢您的参与!
' + str); $('#cjpopvote').show(); } else { $('#cjpoptext').html('您好!您的账号还未通过审核,
详情请联系400 626 5285 转618,
' + str); $('#cjpopvote').hide(); } $("#startcj").show(); $("#bgloginpop").show(); $("#bgloginpop").width($("body").width()) $("#bgloginpop").height($("body").height()) if(/chrome/i.test(browserName) && /webkit/i.test(browserName) && /mozilla/i.test(browserName)){ $("#startcj").css({"top":(document.documentElement.clientHeight-$("#startcj").height())/2+document.body.scrollTop,"left":($("body").width()/2-$("#startcj").width()/2)+"px"}) } else { $("#startcj").css({"top":(document.documentElement.clientHeight-$("#startcj").height())/2+document.documentElement.scrollTop,"left":($("body").width()/2-$("#startcj").width()/2)+"px"}) } } function closecjpop(s){ $("#startcj").hide(); $('#bgloginpop').hide(); location.reload(); } function clear(v){ $("#bgblack").remove(); $("#popwindow").remove(); if(v==1){ $('#btn_search').focus().select(); } } $(function(){ $('#btn_startv').click(function(){ $.get('/zt/pingxuan.php?action=login&mod=qiang&'+Math.random()*1000,function(ret){ ret = $.trim(ret); if(ret){ alert('恭喜您,中了'+ret+',\n抽奖所得奖品客服人员将于每周五统一为您发放,\n敬请期待!'); }else{ alert('谢谢您的参与,明天继续努力吧,大奖等您拿哦!'); } closecjpop(); }); }); }); function closeyqpop() { location.reload(); } function showsjt() { var url = '/member/adPhoneInvite.do'; $("#startcj").hide(); $("body").append(""); }