$(document).ready(function(){
	correctPNG();
	queryHDPicture();//初始化高清图片栏
	leisureReady();//初始化休闲信息栏
	golfTeachingReady();//初始化教学模块栏
	queryCourt();//初始化球场模块栏
	brilliantTopic();//初始化精彩专题模块栏
	ad();//广告
	init_indexLgsc();//初始化乐购商城模块栏
	fjgolfZx();
	indexInformationPhoto();
});

/***************************************************************
 *  Golf资讯
 ***************************************************************/
function fjgolfZx(){
	indexInformation();
	indexHeroPosts();
}

function indexInformation(){//资讯
	var URL = 'json?action=QUERY_T_INFOMATIONBY_PAGER_ACTION';
	$.post(URL,{
		PAGE_SIZE:4,
		CURRENT_PAGE:1
	},function(data){
		if(data.success){
			if(data.root.T_INFOMATION){
				var myData = data.root.T_INFOMATION.rs;
				$.each(myData,function(i,v){
						if(i==0){
							$("#info_h1").attr("href","info/info_golf_file.html?PK_INFOMATION="+v.PK_INFOMATION)
							.attr("title",v.TITLE)
							.html(pcs.common2.getHertSubStringCH(v.TITLE,30));
						}else{
							var sb = new StringBuffer();
							sb.append('<li>');
							if(i==1){
								sb.append('<span><img src="images/new.gif" /></span>');
							}
							sb.append('• &nbsp;&nbsp;  <a href="info/info_golf_file.html?PK_INFOMATION=');
							sb.append(v.PK_INFOMATION);
							sb.append('" title="')
							sb.append(v.TITLE);
							sb.append('" >')
							sb.append(pcs.common2.getHertSubStringCH(v.TITLE,30));
							sb.append('</a></li>');
							$('#infoList').append(sb.toString());
						}
				});
			}
		}//else{
//			pcs.common.showDialog(data.errors.errmsg,{height:200,xtype:'error'});
//		}
	},'json');
}

function indexHeroPosts(){//英雄贴
	var URL = 'json?action=QUERY_T_HERO_POSTSBY_PAGER_ACTION';
	$.post(URL,{
		PAGE_SIZE:6,
		CURRENT_PAGE:1
	},function(data){
		if(data.success){
			if(data.root.T_HERO_POSTS){
				var myData = data.root.T_HERO_POSTS.rs;
				$.each(myData,function(i,v){
						var sb = new StringBuffer();
						sb.append('<p><a href="info/info_yxt_file.html?PK_HERO_POSTS=');
						sb.append(v.PK_HERO_POSTS);
						sb.append('&USER_ID='+v.CREATE_BY)
						sb.append('" >• ')
						sb.append(pcs.common2.getHertSubStringCH(v.TITLE,30));
						sb.append('</a></p>');
						$('#a1').append(sb.toString());
				});
				boxmove("a","a1","a2",1);
			}
		}//else{
//			pcs.common.showDialog(data.errors.errmsg,{height:200,xtype:'error'});
//		}
	},'json');
}

function boxmove(d1, d2, d3, e, obj) {// 自动滚动
	var speed = 50;
	var demo = document.getElementById(d1);
	var demo1 = document.getElementById(d2);
	var demo2 = document.getElementById(d3);
	demo2.innerHTML = demo1.innerHTML;
	function boxTop() {
		if (demo2.offsetTop - demo.scrollTop <= 0) {
			demo.scrollTop -= demo1.offsetHeight
		} else {
			demo.scrollTop++
		}
	}// 自动向上滚动

	if (e == 1) {
		var MoveTop = setInterval(boxTop, speed);
		demo.onmouseover = function() {
			clearInterval(MoveTop);
		}
		demo.onmouseout = function() {
			MoveTop = setInterval(boxTop, speed)
		}
	}// 自动向上滚
}

/***************************************************************
 *  乐购商城
 ***************************************************************/
function init_indexLgsc(){
	index_equipment();//装备资讯
	index_products();
}

function index_products(){
	var URL = 'json?action=QUERY_T_PRODUCTSBY_PAGER_ACTION';
	$.post(URL,{
		PAGE_SIZE:3,
		CURRENT_PAGE:1
	},function(data){
		if(data.success){
			if(data.root.T_PRODUCTS){
				var myData = data.root.T_PRODUCTS.rs;
				$.each(myData,function(i,v){
					$("#yh_key_"+i + " #yh_img").attr("href","equipment/equipment_lg_file.html?PK_PRODUCTS="+v.PK_PRODUCTS)
					.find("img").attr("src",v.PHOTO_PATH?v.PHOTO_PATH:'images/zwtp.jpg');
					$("#yh_key_"+i + " #yh_title").attr("href","equipment/equipment_lg_file.html?PK_PRODUCTS="+v.PK_PRODUCTS)
					.html(pcs.common2.getHertSubStringCH(v.PRODUCTS_NAME,14));
					$("#yh_key_"+i + " #yh_scj").html(v.PRICE);
					$("#yh_key_"+i + " #yh_hyj").html(v.MEMBER_PRICE?v.MEMBER_PRICE:v.PRICE);
				});
			}
		}//else{
//			pcs.common.showDialog(data.errors.errmsg,{height:200,xtype:'error'});
//		}
	},'json');
}

function index_equipment(){
	var URL = 'json?action=QUERY_T_EQUIPMENT_INFOBY_PAGER_ACTION';
	$.post(URL,{
		PAGE_SIZE:6,
		CURRENT_PAGE:1
	},function(data){
		if(data.success){
			if(data.root.T_EQUIPMENT_INFO){
				var myData = data.root.T_EQUIPMENT_INFO.rs;
				$.each(myData,function(i,v){
					if(i==0){
						$("#equipment_h2").attr("href","equipment/equipment_zx_file.html?PK_EQUIPMENT_INFO="+v.PK_EQUIPMENT_INFO)
						.attr("title",v.TITLE)
						.html(pcs.common2.getHertSubStringCH(v.TITLE,24))
					}else{
						var sb = new StringBuffer();
						sb.append('<li><a class="font01">[');
						sb.append(v.EQUIPMENT_TYPE_NAME);
						sb.append(']</a>&nbsp;<a href="equipment/equipment_zx_file.html?PK_EQUIPMENT_INFO=');
						sb.append(v.PK_EQUIPMENT_INFO);
						sb.append('" title="')
						sb.append(v.TITLE);
						sb.append('" >')
						sb.append(pcs.common2.getHertSubStringCH(v.TITLE,32));
						sb.append('</a></li>');
						$('#zbzxList').append(sb.toString());
					}
				});
			}
		}//else{
//			pcs.common.showDialog(data.errors.errmsg,{height:200,xtype:'error'});
//		}
	},'json');
}

/***************************************************************
 *  首页搜索
 ***************************************************************/
function doSearch(){
	var searchStr = $.trim($("#searchStr").val());
	if(searchStr.length==0){
		alert("对不起，搜索条件不能为空！");
		return null; 
	}
	var page = $("input[name=searchRadio]:radio:checked").val();
	location.href = page+'?searchStr='+searchStr;
}

//PNG图片校正
function correctPNG() {
	for (var i = 0; i < document.images.length; i++) {
		var img = document.images[i]
		var imgName = img.src.toUpperCase()
		if (imgName.substring(imgName.length - 3, imgName.length) == "PNG") {
			var imgID = (img.id) ? "id='" + img.id + "' " : ""
			var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			var imgStyle = "display:inline-block;" + img.style.cssText
			if (img.align == "left")
				imgStyle = "float:left;" + imgStyle
			if (img.align == "right")
				imgStyle = "float:right;" + imgStyle
			if (img.parentElement.href)
				imgStyle = "cursor:hand;" + imgStyle
			var strNewHTML = "<span "
					+ imgID
					+ imgClass
					+ imgTitle
					+ " style=\""
					+ "width:"
					+ img.width
					+ "px; height:"
					+ img.height
					+ "px;"
					+ imgStyle
					+ ";"
					+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
					+ "(src=\'" + img.src
					+ "\', sizingMethod='scale');\"></span>"
			img.outerHTML = strNewHTML
			i = i - 1
		}
	}
}

/***************************************************************
 *  精彩专题
 ***************************************************************/
function brilliantTopic(){
	var URL = 'json?action=QUERY_T_BRILLIANT_TOPICBY_ON_INDEX_ACTION';
	$.post(URL,{
		SOME:6
	},function(data){
		if(data.success){
			if(data.root.T_BRILLIANT_TOPIC){
				var myData = data.root.T_BRILLIANT_TOPIC.rs;
				$.each(myData,function(i,v){
					if(i<2){
						var sb = new StringBuffer();
						sb.append('<li><a href="topic/topic_file.html?id=');
						sb.append(v.PK_BRILLIANT_TOPIC);
						sb.append('">');
//						sb.append('<img src="');
//						sb.append(v.PHOTOsmall_?v.PHOTOsmall_:'images/zwtp.jpg');
//						sb.append('" border="0" width="140" height="99"/>');
						sb.append('<span id="brilliantTopic'+i+'"></span>');
						sb.append('</a></li>');
						sb.append('<li style="text-indent:30px;"><strong><a href="topic/topic_file.html?id=');
						sb.append(v.PK_BRILLIANT_TOPIC);
						sb.append('">');
						sb.append(pcs.common2.getHertSubStringCH(v.TITLE,14));
						sb.append('</a></strong></li>');
						$('#topic_ct_'+i).append(sb.toString());
//						$("#gqrw_ai").attr('href','topic/topic_golfpeople_mdm.html?id='+myData.PK_BRILLIANT_TOPIC);
//						$("#gqrw_ai img").attr('src',v.PHOTOsmall_?v.PHOTOsmall_:'images/zwtp.jpg');
						$("#brilliantTopic"+i).todooimg_resize({
							      "tsrc": v.PHOTOsmall_?v.PHOTOsmall_:'images/zwtp.jpg',//图片地址
								   "twidth":140,
									"theigth":99,
									"diystr":'<a href="topic/topic_file.html?id='+v.PK_BRILLIANT_TOPIC+'">[img]</a>'//代替换字符串，[img]为图片标签
						});
					}else{
						var sb = new StringBuffer();
						sb.append('<li><a href="topic/topic_file.html?id=');
						sb.append(v.PK_BRILLIANT_TOPIC);
						sb.append('">• ');
						sb.append(pcs.common2.getHertSubStringCH(v.TITLE,20));
						sb.append('</a></li>');
						$('#topic_ct_2').append(sb.toString());
					}
				});
				$('#topic_ct_2').append('<div class="clear"></div>');
			}
			if(data.root.T_GOLE_STAR){
				var myData = data.root.T_GOLE_STAR.rs[0];
				if(myData){
					$("#gqrw_ai").attr('href','topic/topic_golfpeople_mdm.html?id='+myData.PK_GOLF_STAR);
					$("#gqrw_ai img").attr('src',myData.PHOTOsmall_?myData.PHOTOsmall_:'images/zwtp.jpg');
				}
			}
		}//else{
//			pcs.common.showDialog(data.errors.errmsg,{height:200,xtype:'error'});
//		}
	},'json');
}

/***************************************************************
 *  高尔夫教学
 ***************************************************************/
function golfTeachingReady(){
	showGolfTeachingList(pcs.common.path+'json?action=QUERY_TGOLFTEACHING_BY_PAGER_ACTION');
	getCoachInfo();//教练
}
function showGolfTeachingList(url){
	url=encodeURI(url);
	var xmlname='T_GOLF_TEACHING';
	var result='#GOLF_TEACHING_RL';
	var pageSize=8;//每页的大小
	var pagePanel = '#PX_PAGE_GT';
	var defaultHtml='<li>暂无golf教学文章</li>';	
	pcs.common.changePage(url,pageSize,xmlname,result,callGolfTeachingBackFun, pagePanel,defaultHtml);
}

//回调方法
function callGolfTeachingBackFun(myData,result,key){
	var stringBuffer = new StringBuffer();
	stringBuffer.append('<li>• &nbsp;<a href="');
	switch(myData.TEACHING_TYPE){
		case 500053:stringBuffer.append('teaching/teaching_golf_gz.html');break;
		case 500054:stringBuffer.append('teaching/teaching_golf_ly.html');break;
		case 500055:stringBuffer.append('teaching/teaching_golf_jzs.html');break;
	}
	stringBuffer.append('" class="font01">[');
	stringBuffer.append(myData.TEACHING_TYPE_NAME);
	stringBuffer.append(']</a>&nbsp;&nbsp;  <a href="');
	switch(myData.TEACHING_TYPE){
		case 500053:stringBuffer.append('teaching/teaching_golf_gz_file.html?PK_GOLF_TEACHING=');break;
		case 500054:stringBuffer.append('teaching/teaching_golf_ly_file.html?PK_GOLF_TEACHING=');break;
		case 500055:stringBuffer.append('teaching/teaching_golf_jzs_file.html?PK_GOLF_TEACHING=');break;
	}
	stringBuffer.append(myData.PK_GOLF_TEACHING);
	stringBuffer.append('" title="');
	stringBuffer.append(myData.TITLE);
	stringBuffer.append('">');
	stringBuffer.append(pcs.common2.getHertSubString(myData.TITLE,25));
	stringBuffer.append('</a></li>');
	$(result).append(stringBuffer.toString());
}

function getCoachInfo(){
	var url=encodeURI(pcs.common.path+'json?action=QUERY_T_INSTRUCTORBY_PAGER_ACTION');
	var xmlname='T_INSTRUCTOR';
	var result='#corch_on_index';
	var pageSize=2;//每页的大小
	var pagePanel='#px_Page';
	var defaultHtml='';	
	pcs.common.changePage(url,pageSize,xmlname,result,queryCoachCb, pagePanel,defaultHtml);
}
//回调方法
function queryCoachCb(myData,result,key){
	var stringBuffer = new StringBuffer();
	stringBuffer.append('<ul><a href="teaching/teaching_coach_file.html?PK_INSTRUCTOR=');
	stringBuffer.append(myData.PK_INSTRUCTOR);
	stringBuffer.append('">');
//	stringBuffer.append('<img src="');
//	stringBuffer.append(myData.PHOTO_PATH==''?'images/zwtp.jpg':myData.PHOTO_PATH);
//	stringBuffer.append('" border="0"  style="width:85px;height:85px;" />');
	stringBuffer.append('<span id="CoachCb'+key+'"></span>');
	stringBuffer.append('</a><li>姓  名：');
	stringBuffer.append(myData.INSTRUCTOR_NAME);
	stringBuffer.append(' </li><li>等  级：');
	stringBuffer.append(myData.GOLF_AGE);
	stringBuffer.append(' </li><li>差  点：');
	stringBuffer.append(myData.ALMOST);
	stringBuffer.append(' </li><li>成  绩：');
	stringBuffer.append(myData.BEST_RESULTS);
	stringBuffer.append('</li></ul>');
	if(key%2==0){
		stringBuffer.append('<div class="dashed"></div>');
	}
	$(result).append(stringBuffer.toString());
	$("#CoachCb"+key).todooimg_resize({
		      "tsrc": myData.PHOTO_PATH==''?'images/zwtp.jpg':myData.PHOTO_PATH,//图片地址
			   "twidth":85,
				"theigth":85,
				"diystr":'<a href="teaching/teaching_coach_file.html?PK_INSTRUCTOR='+myData.PK_INSTRUCTOR+'">[img]</a>'//代替换字符串，[img]为图片标签
	});
}


/***************************************************************
 *  高清图片模块
 ***************************************************************/
function highDefinitionPicture(speed) {
	var tab = document.getElementById("HDPicture");
	var tab1 = document.getElementById("HDPicture1");
	var tab2 = document.getElementById("HDPicture2");
	tab2.innerHTML = tab1.innerHTML;
	function Marquee() {
		if (tab2.offsetWidth - tab.scrollLeft <= 0)
			tab.scrollLeft -= tab1.offsetWidth
		else {
			tab.scrollLeft++;
		}
 
	}
	var MyMar = setInterval(Marquee, speed);
	tab.onmouseover = function() {
		clearInterval(MyMar)
	};
	tab.onmouseout = function() {
		MyMar = setInterval(Marquee, speed)
	};
} 

function queryHDPicture(){
	var rowNum = 12;//指定总共显示多少张图片，默认显示前12张
	var URL = 'json?action=QUERY_T_PHOTO_USE_LIST_ACTION';
	$.post(URL,{
		ROWNUM:rowNum
	},function(data){
		if(data.success){
			if(data.root.T_PHOTO_USE){
				var myData = data.root.T_PHOTO_USE.rs[0];
				$.each(myData,function(i,v){
					var sb = new StringBuffer();
					sb.append('<li><a href="picture/picture_file.html?id=');
					sb.append(v.PK_PHOTO_USE);
					sb.append('">');
//					sb.append('<img src="');
//					sb.append(v.PHOTO_PATH);//PHOTO_PATH
//					sb.append('" width="121" height="76" border="0" />');
					sb.append('<div id="HDPicture_panel'+i+'"></div>');
					sb.append('</a><p>');
					sb.append('<span> <a href="picture/picture_file.html?id='+v.PK_PHOTO_USE+'">');
					sb.append(pcs.common2.getHertSubString(v.PHOTO_KEY,10));
					sb.append('</span></a></p></li>');
					$("#HDPicture1 ul").append(sb.toString());
					$("#HDPicture_panel"+i).todooimg_resize({
						      "tsrc": v.PHOTO_PATH,//图片地址
							   "twidth":121,
								"theigth":76,
								"diystr":'<a href="picture/picture_file.html?id='+v.PK_PHOTO_USE+'">[img]</a>'//代替换字符串，[img]为图片标签
					});
				});
				if(myData.length>5){
					highDefinitionPicture(20);//高清图片模块滚动以及事件
				}
			}
		}//else{
//			pcs.common.showDialog(data.errors.errmsg,{height:200,xtype:'error'});
//		}
	},'json');
}

/***************************************************************
 *  球场
 ***************************************************************/
function queryCourt(){
	var rowNum = 8;//指定总共显示多少张图片，默认显示前9张
	var URL = 'json?action=QUERY_T_GOLF_COURT_LIST_ACTION';
	$.post(URL,{
		ROWNUM:rowNum
	},function(data){
		if(data.success){
			if(data.root.T_GOLF_COURT){
				var myData = data.root.T_GOLF_COURT.rs[0];
				$.each(myData,function(i,v){
					var sb = new StringBuffer();
					sb.append('<li><a href="course/course_qc_fzfile_fzwq.html?PK_GOLF_COURT='+v.PK_GOLF_COURT+'">');
					sb.append('<img src="');
					sb.append(v.PHOTO_PATH?v.PHOTO_PATH:'images/zwtp.jpg');
					sb.append('" width="130" height="50" border="0" alt="'+v.COURT_NAME+'"/>');
					sb.append('</a><p>');
					sb.append('<a href="course/course_qc_fzfile_fzwq.html?PK_GOLF_COURT='+v.PK_GOLF_COURT+'">');
					sb.append(pcs.common2.getHertSubString(v.COURT_NAME,10));
					sb.append('</a></p></li>');
					$("#qc_result").append(sb.toString());
				});		
      			$("#qc_result").append('<li><a href="course/course_qc.html"><img src="images/index_couse_pic.gif" border="0" /></a><p><a href="course/course_qc.html">练习场</a></p></li>');
				var qczx = data.root.QCZX.rs[0];
				if(qczx[0]){
					$("#qczx").attr('href','course/course_zx_file.html?PK_STADIUM='+qczx[0].PK_STADIUM).attr('title',qczx[0].TITLE).html(pcs.common2.getHertSubString(qczx[0].TITLE,10));
				}
				var lxczx = data.root.LXCZX.rs[0];
				if(lxczx[0]){
					$("#lxczx").attr('href','course/course_zx_file.html?PK_STADIUM='+lxczx[0].PK_STADIUM).attr('title',lxczx[0].TITLE).html(pcs.common2.getHertSubString(lxczx[0].TITLE,10));
				}
			}
		}//else{
//			pcs.common.showDialog(data.errors.errmsg,{height:200,xtype:'error'});
//		}
	},'json');
}

/***************************************************************
 *  休闲模块
 ***************************************************************/
function leisureReady(){
	queryLeisure(500059,2,printData);
	queryLeisure(500060,4,printData2);
	queryLeisure(500061,2,printData);
	queryLeisure(500062,4,printData2);
	queryLeisure(500063,4,printData2);
	queryLeisure(500064,4,printData2);
}

function queryLeisure(type,rowNum,fun){
//	var rowNum = 8;//指定总共显示多少条记录，默认显示前8条
	var URL = pcs.common.path+'/json?action=QUERY_T_LEISURE_LIST_ACTION';
	$.post(URL,{
		PAGE_SIZE:rowNum,
		ITEM_TYPE:type
	},function(data){
		if(data.success){
			if(data.root.T_LEISURE){
				var myData = data.root.T_LEISURE.rs;
				fun(type,myData);
			}
		}//else{
//			pcs.common.showDialog(data.errors.errmsg,{height:200,xtype:'error'});
//		}
	},'json');
}

function printData(type,myData){
	$.each(myData,function(i,v){
		var sb = new StringBuffer();
		sb.append('<li>');
//		sb.append('<img src="');
//		sb.append(v.PHOTO_PATH);
//		sb.append('" border="0" width="92px" height="62px" />');
		sb.append('<span id="LP_'+type+i+'"></span>');
		sb.append('<p><a href="leisure/leisure_file.html?PK_LEISURE=');
		sb.append(v.PK_LEISURE);
		sb.append('" title="');
		sb.append(v.TITLE);
		sb.append('">');
		sb.append(pcs.common2.getHertSubStringCH(v.TITLE,14));
		sb.append('</a></p></li>');
		$("#ID_"+type).append(sb.toString());
		$("#LP_"+type+i).todooimg_resize({
			      "tsrc": v.PHOTO_PATH,//图片地址
				   "twidth":92,
					"theigth":62,
					"diystr":'<a href="leisure/leisure_file.html?PK_LEISURE='+v.PK_LEISURE+'">[img]</a>'//代替换字符串，[img]为图片标签
		});
	});
	$("#ID_"+type+" .todooflyout").each(function (i,n) {							 
    	$(this).flyout({loadingSrc:'',inEase:'easeInBack'});
	});
}

function printData2(type,myData){
	$.each(myData,function(i,v){
		var sb = new StringBuffer();
		sb.append('<li><a href="leisure/leisure_file.html?PK_LEISURE=');
		sb.append(v.PK_LEISURE);
		sb.append('" title="');
		sb.append(v.TITLE);
		sb.append('">【');
		sb.append(v.BASE_INFO_NAME);
		sb.append('】');
		sb.append(pcs.common2.getHertSubStringCH(v.TITLE,14));
		sb.append('</a></li>');
		$("#ID_"+type).append(sb.toString());
	});
}

/***************************************************************
 *  广告
 ***************************************************************/
function ad()
	{
		var url=pcs.common.path+'json?action=QUERY_T_AD_BY_SPACE_ACTION&SPACE=A';
		url=encodeURI(url);
		$.post(url,{},function(data){
				if(data.success)
				{	
					if(data.root.T_AD!=null&&data.root.T_AD!=undefined)
					{
						$.each(data.root.T_AD.rs,function(i,n){
						var str = '';
						
							var PHOTO_PATH=""
							if(this.PHOTO_PATH==''||this.PHOTO_PATH==null||this.PHOTO_PATH==undefined)
							{
								PHOTO_PATH="images/banner_01.gif";
							}
							else
							{
								PHOTO_PATH = this.PHOTO_PATH;
							}
						
							str+='<div id="adP'+i+'" width="897" height="87">';
							//str+='<img src="" id="add'+i+'"/>';
							str+='</div>'
							if(this.AD_SPACE=='A1')
							{
								$('#ad1').html(str);
							}
							else
							{
								$('#ad2').html(str);
							}
							
							$("#adP"+i).todooimg_resize({
						      "tsrc": PHOTO_PATH,//图片地址
							   "twidth":897,
								"theigth":87,
								"diystr":'<a href="'+this.AD_LINKS_ADDRESS+'">[img]</a>'//代替换字符串，[img]为图片标签
					          });
							/*
							$("#add"+i).loadthumb({
				            "src": PHOTO_PATH,//图片地址
				            "imgId":"#add"+i,//图片ID
				            "parentId":"#adP"+i,//容器ID
							"border":0//当图片本身有边框时，设置其大小。
			              	});
			              	$("#add"+i).show();		
			              	*/	
						});
					}
				}
				}
				,'json');
	}

	
function indexInformationPhoto(){//资讯图片
	var URL = 'json?action=QUERY_T_INFOMATIONBY_PAGER_ACTION';
	$.post(URL,{
		PAGE_SIZE:4,
		CURRENT_PAGE:1
	},function(data){
		if(data.success){
			if(data.root.T_INFOMATION){
				var myData = data.root.T_INFOMATION.rs;
				$.each(myData,function(i,v){
				var pics='';
				if(v.PHOTO_PATH==null||v.PHOTO_PATH==''||v.PHOTO_PATH==undefined)
				{
					pics='images/zxmr.jpg';
				}
				else
				{
					pics=v.PHOTO_PATH;
				}				
				$('#Pic'+(i+1)+'Link').html('<div id="zxPs'+i+'"></div>');
				$('#Pic'+(i+1)+'content').html('<div id="text"><a href="info/info_golf_file.html?PK_INFOMATION='+v.PK_INFOMATION+'" target="_blank">'+pcs.common2.getHertSubStringCH(v.TITLE,12)+'</a></div>');
				
				$("#zxPs"+i).todooimg_resize({
						      "tsrc": pics,//图片地址
							   "twidth":295,
								"theigth":225,
								"diystr":'<a href="info/info_golf_file.html?PK_INFOMATION='+v.PK_INFOMATION+'" target="_blank">[img]</a>'//代替换字符串，[img]为图片标签
				});
			    
			    //alert($('#Pic'+(i+1)+'Link').html())
			    //alert("#zxPs"+i+':'+$("#zxPs"+i).width());
				//alert(pics);
				//alert($('#Pic'+(i+1)+'Link').html());
				
				});
			}
			}
	},'json');
}