﻿var m, orial,_t1,_t2;
$(document).ready (function() 
		 {
		    var allPID = "";
		    $("span[@class='_sprice']").each(function() {	 allPID +=  "'" + this.id.replace('sp','') + "', ";       });        
		    var ds = e2688.web.Class.eAjaxMethod.GetPricePrice(allPID).value;	
		    if (ds != null)		    
		    {
		        for (var i=0; i < ds.Tables[0].Rows.length; i++)  
			    {			
				     var pid =  ds.Tables[0].Rows[i].productid.replace(/(^\s+)|\s+$/g,"");
				     var innerhtml = "<DIV id='Price'>市场价：￥" + ds.Tables[0].Rows[i].price + "元</DIV><DIV id='PriceSale'>2688价：<span class='priceSale'>￥" + ds.Tables[0].Rows[i].outprice + "</span><span class='priceText'>元</span></div>"; 				 
    				 $(document.getElementById('sp' + pid + "") ).append( innerhtml ); 
			    }
			} 
		    $("span[@class='_spricearea']").each(function() {	 allPID +=  "'" + this.id.replace('sp','') + "', ";       });        
		    var ds = e2688.web.Class.eAjaxMethod.GetPriceArea(allPID).value;	
		    if (ds != null)		    
		    {
		        for (var i=0; i < ds.Tables[0].Rows.length; i++)  
			    {			
				     var pid =  ds.Tables[0].Rows[i].productid.replace(/(^\s+)|\s+$/g,"");
				     var innerhtml = "<DIV id='Price'>市场价：￥" + ds.Tables[0].Rows[i].price + "元</DIV><DIV id='PriceSale'>2688价：<span class='priceSale'>￥" + ds.Tables[0].Rows[i].outprice + "</span><span class='priceText'>元</span></div>";  
    				 $(document.getElementById('sp' + pid + "") ).append( innerhtml ); 
			    }
			} 
			
		
			     
 
		  }
);
		
 
