function showPage(c,p,x,y,o){
if(c==company_no && p==product_no){
$('#coll .box .cnt p').removeClass('chkd');
o.addClass('chkd');
setPropertyInfo();
$.post(root+'?c=bike&a=ajax',{company_no:c,product_no:p,x:x,y:y},showPageBack);
}else
goUrl(root+'?c=bike&company_no='+c+'&product_no='+p+'&x='+x+'&y='+y);
}
function showPageBack(t){
if(!isNull(t)){
//$('.showpageload').fadeOut("fast");
//$('.showpageload').fadeIn('slow');
var s = [],p = [];
$('.slaveproducts input:checked').each(function(i){
s[i] = $(this).val();
p[i] = $('input[name="propertys['+$(this).val()+']"]:checked').val();
});
$('#ajaxinfo').html(t);
$('.slaveproducts input').each(function(){if($.inArray($(this).val(),s)>=0){$(this).attr('checked','checked');}});
$.each(s,function(j,v){$('input[name="propertys['+v+']"]').each(function(){if($.inArray($(this).val(),p)>=0){$(this).attr('checked','checked');}})});
document.title = $('input[name="title"]').val();
if($('#pro_pic').html()){
$('#banner_list').html($('#pro_pic').html());
$('#banner').html($('#pro_banner').html());
count=$("#banner_list span").length;
$("#banner_list span:not(:first-child)").hide();
$("#banner li").click(function() {
var i = $(this).text() - 1;//获取Li元素内的值,即1,2,3,4
n = i;
if (i >= count) return;
$("#banner_list span").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
document.getElementById("banner").style.background="";
$(this).toggleClass("on");
$(this).siblings().removeAttr("class");
});
}
}
}
function setPropertyInfo(){
var i=1;
if($('.propertyinfo').get(0)){
var t=$('.propertyinfo').html().split('-');
$('.propertyinfo').html(t[0]+'-'+$('#coll .box .cnt p.chkd').text()+'');
i=0;
}
var co={color:'#0000ff',border:'1px solid #FF00FF',padding:'5px 3px'};
var ca={color:'#0000ff',border:'1px solid #FF00FF',padding:'2px 2px'};
$('#coll .box .cnt p a').css('color','#333333');
$('#coll .box .cnt p a span').css({border:'0',color:'#333333'});
var ph=$('#coll .box .cnt p.chkd a');
if(/bs/.test(ph.attr('href'))){
ph.css({color:'#0000ff'});
}else{
ph.html(''+ph.text()+'');
ph.find('span').css(ca);
}
var fh=$('#coll .box .cnt p.chkd').parents('.box').eq(0).find('h2');
fh.html(''+fh.text()+'');
fh.find('span').css(co);
$('#coll .box .cnt p.chkd').parents('.box').eq(0).find('.h2').eq(i).css('color','#0000ff');
}
function doOrder(){
showLogin();
}