					var selectedValue1='';
					var selectedValue2='';
					var currency;
					var rate;
					$(document).ready(function(){
						var temp_color='"'+$("#dis_color").val()+'"';
						$("#color_selected").html(temp_color);
						selectedValue1=$("#dis_color option:selected").attr("id");
						var temp_size='"'+$("#dis_size").val()+'"';
						var sku_size_value_temp=parseInt($("#skusize").val());
						if(sku_size_value_temp>1){
							$("#size_selected").html(temp_size);
						}
						selectedValue2=$("#dis_size option:selected").attr("id");
						show_price_quantity();buy_sku_quantity();
						
					});
					$(document).ready(function(){
						$("#dis_color").change(function()
							{
							var temp_color='"'+$(this).val()+'"';
							$("#color_selected").html(temp_color);
							selectedValue1=$("#dis_color option:selected").attr("id");
							show_price_quantity();buy_sku_quantity();
						});
						
					});
					$(document).ready(function(){
						$("#dis_size").change(function(){
							var temp_size='"'+$(this).val()+'"';
							$("#size_selected").html(temp_size);
							selectedValue2=$("#dis_size option:selected").attr("id");
							show_price_quantity();
							buy_sku_quantity();
						});
					});
					$(function(){
						

					});
					function show_price_quantity(){
						var dis_id_sku=$("#idSkuPair").attr("value"); //skuId_销售属性组合
						var dis_id_property_quantity=$("#idPriceQuantity").attr("value");//skuId_数量_价格？ 组合
						
						var id_price_quantity=dis_id_property_quantity.split("?");
						var str_id_sku=dis_id_sku.split("?");
						var sku_size=$("#skusize").val();
						
						currency=$("#currency_js").val();
						rate=parseFloat($("#rate").val());
						if(sku_size==2){
							if(selectedValue1!='' &&selectedValue1!=null && selectedValue2!='' && selectedValue2!=null){
								var dis_property=$("#skuPropertyId").attr("value");//属性ID
								var dis_properties=$("#skuProperty_Id").attr("value");//属性ID
								var selected_sku=dis_property+":"+selectedValue1+";"+dis_properties+":"+selectedValue2;//销售属性组合
								display_sku_price_quanty(str_id_sku,selected_sku,id_price_quantity);
								}
						}else if(sku_size==1){

							if(selectedValue1!='' && selectedValue1!=null){ 
								var dis_property=$("#skuPropertyId").attr("value");//属性ID
								var selected_sku=dis_property+":"+selectedValue1;
								display_sku_price_quanty(str_id_sku,selected_sku,id_price_quantity);
							}else if(selectedValue2!='' && selectedValue2!=null){
								var dis_properties=$("#skuProperty_Id").attr("value");//属性ID
								var selected_sku=dis_properties+":"+selectedValue2;//销售属性组合
								display_sku_price_quanty(str_id_sku,selected_sku,id_price_quantity);
							}
						}
					}
					//Dight要格式化的 数字，How要保留的小数位数。
					function  ForDight(Dight,How)      
					  {      
					          Dight=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How);      
					          return  Dight;      
					  }     
					function display_sku_price_quanty(str_id_sku,selected_sku,id_price_quantity){
						for(var i=0;i<str_id_sku.length;i++){
									if(selected_sku.indexOf(";")>-1){
										var select_sku_id_str=selected_sku.split(";");
										if(str_id_sku[i].indexOf(select_sku_id_str[0])>-1 && str_id_sku[i].indexOf(select_sku_id_str[1])>-1){//找合适的skuId
											var aga_selected_sku=select_sku_id_str[1]+";"+select_sku_id_str[0];
											var aga_selected_sku1=select_sku_id_str[0]+";"+select_sku_id_str[1];
											var j;
												if(str_id_sku[i].indexOf(aga_selected_sku)>-1){
													j=str_id_sku[i].indexOf(aga_selected_sku);
												}
												if(str_id_sku[i].indexOf(aga_selected_sku1)>-1){
													j=str_id_sku[i].indexOf(aga_selected_sku1);
												}
												var sku_id=str_id_sku[i].substring(0,j-1);
												$("#cartSkuId").val(sku_id);
												for(var x=0;x<id_price_quantity.length;x++){
														var split_info=id_price_quantity[x].split("_");
														if(split_info[0].indexOf(sku_id)>-1){
															$("#sellingPrice").html(ForDight(split_info[1]*rate,2)+" "+currency);
															$("#itemquantity").html(split_info[2]);
															
														}
												}
										}
									}else{
										if(str_id_sku[i].indexOf(selected_sku)>-1){//找合适的skuId
										var j=str_id_sku[i].indexOf(selected_sku);
											
											var sku_id=str_id_sku[i].substring(0,j-1);
											$("#cartSkuId").val(sku_id);
											for(var x=0;x<id_price_quantity.length;x++){
													var split_info=id_price_quantity[x].split("_");
													if(split_info[0].indexOf(sku_id)>-1){
														$("#sellingPrice").html(ForDight(split_info[1]*rate,2)+"  "+currency);
														$("#itemquantity").html(split_info[2]);
													}
											}
										}
									}
									
								}
					}
					var right_marker='<img src="../images/login_gif_right.jpg" />'; 
					var false_marker='<img src="../images/login_gif_wrong.jpg" />';
					//var format_email=/^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2} |net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT|cn|CN)$/;
					var format_email=/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,4}){1,2})$/;
					//消息验证
					function validate_message(){
						var author=document.getElementById("author").value.replace(/^\s+|\s+$/g,"");
						var email=document.getElementById("email").value.replace(/^\s+|\s+$/g,"");
						var content=$("#message_content").attr("value");
						var author_length=author.replace(/[^\x00-\xff]/g, 'xx').length;
						var email_length=email.replace(/[^\x00-\xff]/g, 'xx').length;
						var content_length=content.replace(/[^\x00-\xff]/g, 'xx').length;
						if(author=='' || author==null){
							document.getElementById("author_note").innerHTML=false_marker;
							return false;
						}else if(author_length>15){
							document.getElementById("author_note").innerHTML=false_marker+"<font color='red'>The UserName should have 0-15 characters.</font>";
							return false;
						}else{
							document.getElementById("author_note").innerHTML="";
						}
						if(email=='' || email==null){
							document.getElementById("email_note").innerHTML=false_marker;
						}else  if(email.match(format_email)==null){
							document.getElementById("email_note").innerHTML=false_marker+"<font color='red'>The format of Email is wrong,please try again.</font>";
						}else if(email_length>50){
							document.getElementById("email_note").innerHTML=false_marker+"<font color='red'>The Email should have 6-50 characters.</font>";;
						}else{
							document.getElementById("email_note").innerHTML="";
						}
						
						if(content=='' || content==null){
							document.getElementById("content_note").innerHTML=false_marker;
							return false;
						}else if(content_length>400){
							document.getElementById("content_note").innerHTML=false_marker+"<font color='red'>The Message should have 0-400 characters.</font>";
							return false;
						}else{
							document.getElementById("content_note").innerHTML="";
						}
					}
					function validate_name(){
						var author=document.getElementById("author").value;
						var author_length=author.replace(/[^\x00-\xff]/g, 'xx').length;
						if(author=='' || author==null){
							document.getElementById("author_note").innerHTML=false_marker;
						}else if(author_length>15){
							document.getElementById("author_note").innerHTML=false_marker+"<font color='red'>The UserName should have 0-15 characters.</font>";
						}else{
							document.getElementById("author_note").innerHTML="";
						}
					}
					function validate_email(){
						var email=document.getElementById("email").value;
						var email_length=email.replace(/[^\x00-\xff]/g, 'xx').length;
						if(email=='' || email==null){
							document.getElementById("email_note").innerHTML=false_marker;
						}else  if(email.match(format_email)==null){
							document.getElementById("email_note").innerHTML=false_marker+"<font color='red'>The format of Email is wrong,please try again.</font>";
						}else if(email_length>50){
							document.getElementById("email_note").innerHTML=false_marker+"<font color='red'>The Email should have 6-50 characters.</font>";;
						}else{
							document.getElementById("email_note").innerHTML="";
						}
					}
					
					function validate_content(){
						var content=$("#message_content").attr("value");
						var content_length=content.replace(/[^\x00-\xff]/g, 'xx').length;
						if(content=='' || content==null){
							document.getElementById("content_note").innerHTML=false_marker;
							return false;
						}else if(content_length>400){
							document.getElementById("content_note").innerHTML=false_marker+"<font color='red'>The Message should have 0-400 characters.</font>";
							return false;
						}else{
							document.getElementById("content_note").innerHTML="";
						}
					}
				//商品detail页面,小图滑动切换图片
				$(function(){
					$(".imglist img").mousemove(function(){
						var small_image=$(this).attr("src");
						var format=small_image.substring(small_image.lastIndexOf("."),small_image.length);
						var other=small_image.substring(0,small_image.lastIndexOf("."));
						var other_url=small_image.substring(0,other.lastIndexOf("."));
						var middle_img=other_url+".350x350"+format;
						var jqzoom_img=other_url+format;
						$("#bigImg").attr({"src":middle_img});
						$("#bigImg").attr({"jqimg":jqzoom_img});
						});
			});
			$(function(){
						var $range =$('.pro_detail_right ul li a#p_range');
						var $price =$('.pricerange');
						var price_v = 15;
						var price_l = -2;
						var price_Y = $range.offset().top;
						var price_X = $range.offset().left;
						$range.hover(function(){
							$price.css("display","block").css({
							"top": (price_Y+price_v) + "px",
							"left": (price_X+price_l) + "px"
						});
						},function(){
							$price.css("display","none");
						});
						$price.hover(function(){
							$(this).css("display","block");
						},function(){
							$(this).css("display","none");
						});
					});
			$(function(){
				$("#p_range").click(function(){
					return false;
				});
			})
$(function(){
    var $li_a =$('.pro_detail_right ul li a.changecity');
    var $area =$('.fare_area');
	var $area_li = $ ('.fare_area li');
	var vertical = 17;
	var level = -2;
	var V_Y = $li_a.offset().top;
	var S_X = $li_a.offset().left;
    $li_a.hover(function(){
		$area.css("display","block").css({
			"top": (V_Y+vertical) + "px",
			"left": (S_X+level) + "px"
		});
    },function(){
		$area.css("display","none");
	});
    $area.hover(function(){
        $(this).css("display","block");
    },function(){
        $(this).css("display","none");
    });
    $area_li.click(function(){
        $area.css("display","none");
        if ($(this).is('.fare_area li:first-child'))
        {
			return true; 
		}else{
			return false;
		}
    });
});
$(function(){
					var $li_a =$('.pro_detail_right ul li a#p_range');
					var $area =$('.pro_detail_right > .pricerange');
					$area.hide();
					$li_a.mouseover(function(){
						$area.css("display","");
					});
					$li_a.mouseout(function(){
						$area.css("display","none");
					});
					$area.mouseover(function(){
						$(this).css("display","");
					});
					$area.mouseout(function(){
						$(this).css("display","none");
					});
				});
$(function(){
			var $div_li = $(".detail_tab li");
		$div_li.click (function(){
			var $parent = $(this).parents("div.detail_main");
			var $other = $parent.find("div.other_detail");
			if($(this).is(".detail_tab li:first-child"))
			{
				$other.eq(0).show();
				$other.eq(3).show();
				$other.eq(1).hide();
				$other.eq(2).hide();
			}
			else 
			{
				var index = $div_li.index(this);
				$other.eq(index).show().siblings(".other_detail").hide();
			}
			$(this).addClass("selected").siblings().removeClass("selected");
			return false;
		}).hover(function(){
			$(this).addClass("hover");
			},function(){
			$(this).removeClass("hover");
		});
	});
	function detailloginInfo(){
		var memberEmail=document.getElementById("detailloginMemberEmail").value.replace(/^\s+|\s+$/g,"");
		if(memberEmail=='' || memberEmail==null){
			document.getElementById("detailloginMemberEmail_note").innerHTML=false_marker;
			return false;
		}else  if(memberEmail.match(format_email)==null){
			document.getElementById("detailloginMemberEmail_note").innerHTML=false_marker;
			return false;
		}else if(memberEmail.length>50){
			document.getElementById("detailloginMemberEmail_note").innerHTML=false_marker;
			return false;
		}else{
			document.getElementById("detailloginMemberEmail_note").innerHTML="";
		}
		var password=document.getElementById("detailloginMemberPassword").value.replace(/^\s+|\s+$/g,"");
		if(password=='' || password==null){
			document.getElementById("detailloginMemberPassword_note").innerHTML=false_marker;
			return false;
		}else if(password.length<6 || password.length>16){
			document.getElementById("detailloginMemberPassword_note").innerHTML=false_marker;
			return false;
		}else{
			document.getElementById("detailloginMemberPassword_note").innerHTML="";
			return true;
		}
	}
	var number=/^\d+$/;

						$(document).ready(function(){
							$("#quantity").change(function(){
								buy_sku_quantity();
							});
						});
						function add_to_cart(){							
							var cart_sku_value='';
							
								if(parseInt($("#skusize").val())==2){
									if(selectedValue1=='' && selectedValue2!=''){
										cart_sku_value=$(".goods_attr dl dt").html().substring(0,$(".goods_attr dl dt").html().indexOf(":"));
									}else if(selectedValue2==''&& selectedValue1!=''){
										cart_sku_value=$(".goods_attr dl").eq(1).children().html().substring(0,$(".goods_attr dl").eq(1).children().html().indexOf(":"));
									}else if(selectedValue1=='' && selectedValue2==''){
										cart_sku_value=$(".goods_attr dl dt").html().substring(0,$(".goods_attr dl dt").html().indexOf(":"))+","+$(".goods_attr dl").eq(1).children().html().substring(0,$(".goods_attr dl").eq(1).children().html().indexOf(":"));
									}
									
								}else if(parseInt($("#skusize").val())==1){
									cart_sku_value=$(".goods_attr dl dt").html().substring(0,$(".goods_attr dl dt").html().indexOf(":"));
								}
								if(parseInt($("#skusize").val())>-1){
									if(parseInt($("#cartSkuId").val())==0){
									
										if($("#cartSkuId").val()==0){
											alert("请选择  "+cart_sku_value);
											return false;
										}else {
											return buy_sku_quantity();
										}	
									}else{
										return buy_sku_quantity();
									}
								}else if(parseInt($("#skusize").val())==-1){
								    return buy_sku_quantity();	
								}
								
						}
						
						function buy_sku_quantity(){
								var sku_id=parseInt($("#cartSkuId").val());
								var cartItemId=parseInt($("#cartItemId").val());
								if(document.getElementById("quantity").value!=null && document.getElementById("quantity").value!=''){
									if(!number.test(document.getElementById("quantity").value)){
										document.getElementById("order_tooltip_msg_id").style.display="block";
										$("#order_item_id").html("&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>Please input number.</font>");
										return false;
									}else if(parseInt($("#quantity").val())==0){
										document.getElementById("order_tooltip_msg_id").style.display="block";
										$("#order_item_id").html("&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>The quantity must be grate than zero.</font>");
										return false;
									}else if(parseInt($("#quantity").val())>parseInt($("#itemquantity").html())){
										var quantity_order=parseInt($("#quantity").val());
										var url="orderItem_"+cartItemId+"_"+sku_id+"_"+quantity_order+".html";
										document.getElementById("order_tooltip_msg_id").style.display="block";
										$("#order_item_id").html("Inadequate inventory,&nbsp;<a href="+url+">Please order. </a> ");
										return false;
									}else if(parseInt($("#quantity").val())<parseInt($("#minimum").val())){
										var quantity_order=parseInt($("#quantity").val());
										document.getElementById("order_tooltip_msg_id").style.display="block";
										$("#order_item_id").html("Minimum purchase quantity is ,&nbsp;"+$("#minimum").val());
										return false;
									}else{
										$("#order_item_id").html(" ");
										document.getElementById("order_tooltip_msg_id").style.display="none";
										return true;
									}
								}else{
									document.getElementById("order_tooltip_msg_id").style.display="block";
									$("#order_item_id").html("&nbsp;&nbsp;&nbsp;&nbsp;<font color='#FF0000'>The quantity must be grate than zero.</font>");
									return false;
								}
								
						}
						function buy_item(){
							var cart_sku_value='';
								if(parseInt($("#skusize").val())==2){
									cart_sku_value=$(".goods_attr dl dt").html().substring(0,$(".goods_attr dl dt").html().indexOf(":"))+","+$(".goods_attr dl").eq(1).children().html().substring(0,$(".goods_attr dl").eq(1).children().html().indexOf(":"));
								}else if(parseInt($("#skusize").val())==1){
									cart_sku_value=$(".goods_attr dl dt").html().substring(0,$(".goods_attr dl dt").html().indexOf(":"));
								}
								if(parseInt($("#skusize").val())>-1){
									if(parseInt($("#cartSkuId").val())==0){
										if($("#cartSkuId").val()==0){
											alert("Please choice "+cart_sku_value);
											return false;
										}else {
											return buy_sku_quantity();
										}	
									}else{
										return buy_sku_quantity();
									}
								}else if(parseInt($("#skusize").val())==-1){
								    return buy_sku_quantity();	
								}
									
						}
						$(document).ready(function(){
							 $("#detail_buy").click(function(){
							 if(buy_item()){
							 $.ajax({
									url:"checkout.html",
									type:"post",
									dataType:"text",
									data:"detailSellerId=",
									error:function(){
										$("#faqdiv").html("Loading data..., Please waite for a minute!");
									},
									success:function(data){
									if(data=="login"){
										if(buy_item()){
												$("#orderfrom").val(2);
												document.add_cart.action="./template/order/getOrderInfo.html";
												document.add_cart.submit();
										}
									}else{
										var $buy = $("#detail_buy");
										var h = -440;
										var s = -150;
										var Y = $buy.offset().top;
										var X = $buy.offset().left;
										$("#detail_login_form").css("display","block").css({
											"top": (Y+s) + "px",
											"left": (X+h) + "px"
										});
										if(data=="tourist"){	
											 $(".m_c").css("display","block");
										}
									}
								  }
								});
							 }
				 			return false;	
					 		});
						});
						$(function(){
							$(".m_c").click(function(){
								if(buy_item()){
												$("#orderfrom").val(2);
												document.add_cart.action="./template/order/getOrderInfo.html";
												document.add_cart.submit();
								};
								return false;
							});
						});
						$(function(){
   							$(".close").click(function(){
								$("#detail_login_form").css("display","none");
								return false;
							});			
						});	
						function detail_login_buy(){
							var itemId=$("#itemId").val();
							var skuId=$("#cartSkuId").val();
							var number=$("#quantity").val();
							var weight=$("#weight").val()
							var orderfrom=2;
							if(detailloginInfo()){
								document.detail_login_buy_form.action="detaillogin.html?itemId="+itemId+"&skuId="+skuId+"&orderfrom="+orderfrom+"&number="+number+"&weight="+weight;
								document.detail_login_buy_form.submit();
							}
						}	
						$(document).ready(function(){
							$("#check_out_register a").click(function(){
								var itemId=$("#itemId").val();
								var skuId=$("#cartSkuId").val();
								var number=$("#quantity").val()
								document.location.href="member_"+itemId+"_"+skuId+"_"+number+"_checkout.html";
								return false;
							});
						});
						$(document).ready(function(){
								$("#postage_address a").click(function(){
									
									$(".changecity").html($(this).html());
									    unit_address=$(this).html();
									   
										var unit_address;
										var temp;
										var temp_address;
										var postage_option;
										var postage_expense;
										var postage_unit;
										var postage_show_all='';

										var kuaidi_temp_count=0;
										var kuaidi_temp_num=0;
										for(var j=0;j<$(".option").length;j++){
											if($(".option").eq(j).html()=="快递"){
												kuaidi_temp_count=kuaidi_temp_count+1;
											}
										}
										for(var j=0;j<$(".option").length;j++){	
											if($(".option").eq(j).html()=="快递"){
												kuaidi_temp_num=j;
												break;
											}
										} 
										var kuaidi_boolean=true;	
										if(kuaidi_temp_count>0){
											for(var i=kuaidi_temp_num;i<kuaidi_temp_count+kuaidi_temp_num;i++){
											
												temp_address=$(".postage_each_address").eq(i).html();
												if(temp_address.indexOf(unit_address)>-1 || temp_address.indexOf("全国")>-1){
													postage_option=$(".postage_each_address").eq(i).parent().children().eq(0).html();
													postage_expense=$(".postage_each_address").eq(i).parent().children().eq(1).html();
													postage_unit=postage_option+": "+postage_expense;
													postage_show_all="";
													postage_show_all=postage_show_all+postage_unit+"    ";
													kuaidi_boolean=false;
												}else if(temp_address.indexOf("其他地区")>-1 && kuaidi_boolean ){
													postage_option=$(".postage_each_address").eq(i).parent().children().eq(0).html();
													postage_expense=$(".postage_each_address").eq(i).parent().children().eq(1).html();
													postage_unit=postage_option+": "+postage_expense;
													postage_show_all=postage_show_all+postage_unit+"    ";
												}
											}
										}
										var pingyou_temp_count=0;
										var pingyou_temp_num=0;
										for(var j=0;j<$(".option").length;j++){
											if($(".option").eq(j).html()=="平邮"){
												pingyou_temp_count=pingyou_temp_count+1;
											}
										}
										for(var j=0;j<$(".option").length;j++){	
											if($(".option").eq(j).html()=="平邮"){
												pingyou_temp_num=j;
												break;
											}
										}
										var pingyou_boolean=true;
										if(pingyou_temp_count>0){
											for(var i=pingyou_temp_num;i<pingyou_temp_count+pingyou_temp_num;i++){
												temp_address=$(".postage_each_address").eq(i).html();
												if(temp_address.indexOf(unit_address)>-1 || temp_address.indexOf("全国")>-1){	
													postage_option=$(".postage_each_address").eq(i).parent().children().eq(0).html();
													postage_expense=$(".postage_each_address").eq(i).parent().children().eq(1).html();
													postage_unit=postage_option+": "+postage_expense;
													if(postage_show_all.indexOf("平邮")>-1){
														postage_show_all=postage_show_all.substring(0,postage_show_all.indexOf("平邮"));
													}
													postage_show_all=postage_show_all+postage_unit+"    ";
													pingyou_boolean=false;
												}else if(temp_address.indexOf("其他地区")>-1 && pingyou_boolean){
													postage_option=$(".postage_each_address").eq(i).parent().children().eq(0).html();
													postage_expense=$(".postage_each_address").eq(i).parent().children().eq(1).html();
													postage_unit=postage_option+": "+postage_expense;
													postage_show_all=postage_show_all+postage_unit+"    ";
												}
											}
										}
										
										var ems_temp_count=0;
										var ems_temp_num=0;
										for(var j=0;j<$(".option").length;j++){
											if($(".option").eq(j).html()=="EMS"){
												ems_temp_count=ems_temp_count+1;
											}
										}
										for(var j=0;j<$(".option").length;j++){	
											if($(".option").eq(j).html()=="EMS"){
												ems_temp_num=j;
												break;
											}
										}
										var ems_boolean=true;
										if(ems_temp_count>0){
											for(var i=ems_temp_num;i<ems_temp_num+ems_temp_count;i++){
												temp_address=$(".postage_each_address").eq(i).html();
												if(temp_address.indexOf(unit_address)>-1 || temp_address.indexOf("全国")>-1){
													postage_option=$(".postage_each_address").eq(i).parent().children().eq(0).html();
													postage_expense=$(".postage_each_address").eq(i).parent().children().eq(1).html();
													postage_unit=postage_option+": "+postage_expense;
													if(postage_show_all.indexOf("EMS")>-1){
														postage_show_all=postage_show_all.substring(0,postage_show_all.indexOf("EMS"));
													}
													postage_show_all=postage_show_all+postage_unit+"    ";
													ems_boolean=false;
												}else if(temp_address.indexOf("其他地区")>-1 && ems_boolean){
													postage_option=$(".postage_each_address").eq(i).parent().children().eq(0).html();
													postage_expense=$(".postage_each_address").eq(i).parent().children().eq(1).html();
													postage_unit=postage_option+": "+postage_expense;
													postage_show_all=postage_show_all+postage_unit+"    ";
												}
											}
										}

									$("#postage_expense").html(postage_show_all);
								});
							});		
						//validate loginning form infomation
						function loginInfo_detail(){
							var memberEmail=document.getElementById("loginMemberEmail").value.replace(/^\s+|\s+$/g,"");
							if(memberEmail=='' || memberEmail==null){
								document.getElementById("memberEmail_note").innerHTML=false_marker;
								return false;
							}else  if(memberEmail.match(format_email)==null){
								document.getElementById("memberEmail_note").innerHTML=false_marker;
								return false;
							}else if(memberEmail.length>50){
								document.getElementById("memberEmail_note").innerHTML=false_marker;
								return false;
							}else{
								document.getElementById("memberEmail_note").innerHTML="";
							}
							var password=document.getElementById("loginMemberPassword").value.replace(/^\s+|\s+$/g,"");
							if(password=='' || password==null){
								document.getElementById("memberPassword_note").innerHTML=false_marker;
								return false;
							}else if(password.length<6 || password.length>16){
								document.getElementById("memberPassword_note").innerHTML=false_marker;
								return false;
							}else{
								document.getElementById("memberPassword_note").innerHTML="";
								return true;
							}
						}
							function login_other(){
								var itemId=$("#itemId").val();
								if(loginInfo_detail()){
									document.detail_login.action="otherlogin.html?itemId="+itemId;
									document.detail_login.submit();
								}
							}
							$(function(){
   		$(".close").click(function(){
				$("#faqdiv").css("display","none");
					return false;
				});			
	});				
							$(document).ready(function(){
								$(".but").click(function(){
									return false;
								});
							});
	$(document).ready(function(){
				var $but = $(".but");
				 $(".but").click(function(){
				 	$.ajax({
						url:"detailcollection.action",
						type:"post",
						dataType:"text",
						data:"itemId="+$("#itemId").val(),
						error:function(){
							$("#faqdiv").html("Loading data..., Please waite for a minute!");
						},
						success:function(data){
							if(data=="false"){
								var h = 140;
								var s = -150;
								var Y = $but.offset().top;
								var X = $but.offset().left;
								$("#faqdiv").css("display","block").css({
									"top": (Y+s) + "px",
									"left": (X+h) + "px"
								});
								return false;
							}else{
								alert(data);
							}
						}
					});
				 });

				});

$(document).ready(function(){
	if(($('.jqzoom').is(':visible')) &&($.browser.msie&&($.browser.version == "6.0")&&!$.support.style)){
	$(".jqzoom").hover(function(){
		$(".pro_detail_right select").css("display","none").parent().css("height", "22px")
	},function(){
		$(".pro_detail_right select").css("display","inline")}
	);
	}
});
$(document).ready(function(){
	if($.browser.msie&&($.browser.version == "6.0")&&!$.support.style){
	$("#p_range").hover(function(){
		$(".pro_detail_right #country").css("display","none").parent().css("height", "22px")
	},function(){
		$(".pro_detail_right select").css("display","inline")}
	);
	$(".pricerange").hover (function(){
		$(".pro_detail_right #country").css("display","none").parent().css("height", "22px")
	},function(){
		$(".pro_detail_right #country").css("display","inline")}
	);
	}
});
