﻿////////////////////////////////////////////////////////////////////////////
//头部扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginHead(filePath)
{

	$.ajax({
		type:       "get",
		//dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/templates/"+filePath+"/extends/head/templates/head.htm",
		error: function(){
			//alert('Error loading JSON document头部');
		},
		success:function(d){
			$("#ajaxPluginHead").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/head/templates/head.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginHead").processTemplate(d);
		}
	});
}


////////////////////////////////////////////////////////////////////////////
//低部扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginBottom(filePath)
{

	$.ajax({
		type:       "get",
		//dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/templates/"+filePath+"/extends/bottom/templates/bottom.htm",
		error: function(){
			//alert('Error loading JSON document底部');
		},
		success:function(d){
			$("#ajaxPluginBottom").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/bottom/templates/bottom.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginBottom").processTemplate(d);
		}
	});
}


////////////////////////////////////////////////////////////////////////////
//友情链接扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginLink(id,filePath)
{
    var parentid="";
    if(id!=0)
        parentid="&parentid="+id;
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/extends/link/ajax.aspx?oper=list"+parentid,
		error: function(){
			alert('Error loading JSON document友情链接');
		},
		success:    function(d){
			$("#ajaxPluginLink").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/link/templates/_link.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginLink").processTemplate(d);
		}
	});
}

  //下拉表示友情链接
             function selectChange(url)
             {
             	if(url.indexOf("|")<1)
                    open(url.split('|')[0],'_blank');
             }
             function selectChangeUrl(url,id)
             {
                if(url==0||url=="")
                    return;
                $.ajax({
		        type:       "get",
		        data:       "parentList=parentList&pid="+url.split('|')[1]+"&time="+(new Date().getTime()),
		        url:        "/cmsfile/extends/link/ajax.aspx",
		        success:    function(d){
		            if(d.split("|")[0]!="1")
		            {
			            var channelName=d.split("|")[0];
			            var channelId=d.split("|")[1];
			            var channelNameList=channelName.split(",");
			            var channelIdList=channelId.split(",");   			 
			            for(var i=0;i<channelNameList.length;i++)
			            {
			                document.getElementById(id).options[i+1]=new Option(channelNameList[i],channelIdList[i]);
			            }
			        }
		        }
	                });             
             }
///////////////////////////////////////////////////////////////////////////
//投票调查扩展插件(num:获取数量,1表示单选,filepath:模板文件夹名称)
///////////////////////////////////////////////////////////////////////////
function ajaxPluginVote(num,filePath)
{
	if(PluginVote==null)
	{
		$("#ajaxPluginVote").hide();
		return;
	}
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/extends/vote/ajax.aspx?oper=ajaxPluginVote&num="+num,
		error: function(){
			alert('Error loading JSON 投票调查');
		},
		success:    function(d){
			$("#ajaxPluginVote").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/vote/templates/_vote.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginVote").processTemplate(d);
		}
	});
}
function ajaxPluginVoteList(num,filePath,id)
{  
    var strid="";
    if(id!="0")
        strid="&voteID="+id;
    else
        strid="";
	if(ajaxPluginVoteList==null)
	{
		$("#ajaxPluginVoteList").hide();
		return;
	}
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/extends/vote/ajax.aspx?oper=ajaxPluginVote&num="+num+strid,
		error: function(){
			alert('Error loading JSON 投票调查');
		},
		success:    function(d){
		    if(id!="0")
			    $("#ajaxPluginVoteList").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/vote/templates/_vote.htm?time="+(new Date().getTime()), null, {filter_data: true});
			else
			    $("#ajaxPluginVoteList").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/vote/templates/_votelist.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginVoteList").processTemplate(d);
		}
	});
}

function ajaxPluginVoteResult(id,filePath)
{
	if(PluginVote==null)
	{
		$("#ajaxPluginVote").hide();
		return;
	}
	$.ajax({
		type:       "get",
		//dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/extends/vote/index.aspx?Id="+id+"&filePath="+filePath,
		error: function(){
			//alert('Error loading JSON 投票调查');
		},
		success:    function(d){
		    document.getElementById('ajaxPluginVoteResult').innerHTML=d;
		}
	});
}

function ajaxPluginVoteAdd(id,mtype,btn,formName)
{
	btn="#"+btn;
	$(btn).attr("disabled","disabled");
	var voteValue;
	var rbVote=$("#"+formName+" input");
	for(var i=0;i<rbVote.length;i++)
	{
		if(rbVote[i].checked && (rbVote[i].type=="radio" || rbVote[i].type=="checkbox")){
			if(!voteValue)
				voteValue=rbVote[i].value;
			else
				voteValue += "," + rbVote[i].value;
		}
	}
	if(!voteValue){
		alert("请先选择一项!","0");
		$(btn).attr("disabled","");
		return;
	}
	$.ajax({
		type:       "get",
		dataType:   "html",
		data:       "id="+id+"&mtype="+mtype+"&voteValue="+voteValue+"&time="+(new Date().getTime()),
		url:        "/cmsfile/extends/vote/ajax.aspx?oper=ajaxPluginVoteAdd",
		error: function(){
			//alert('Error loading JSON document');
		},
		success:    function(d){
			if(d=="ok")
			{
				alert("成功,谢谢你的投票!","1");
				//location.href='/cmsfile/extends/vote/index.aspx?Id={$T.record.id}&filePath=qzf'
			}
			else
			{
				alert(d);
				$(btn).attr("disabled","");
			}
		}
	});
}

///////////////////////////////////////////////////////////////////////////
//内容评论扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginComment(ccid,id,filePath)
{ 
	if(PluginComment==null)
	{
		$("#ajaxPluginComment").hide();
		return;
	}
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginComment&id="+id+"&ccid="+ccid+"&time="+(new Date().getTime()),
		url:        "/cmsfile/extends/comment/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document评论');
		},
		success:    function(d){
			$("#ajaxPluginComment").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/comment/templates/_comment.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginComment").processTemplate(d);
		}
	});
}
function ajaxPluginCommentCount(ccid,id)
{
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginCommentCount&id="+id+"&ccid="+ccid+"&time="+(new Date().getTime()),
		url:        "/cmsfile/extends/comment/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document');
		},
		success:    function(d){
			$("#ajaxPluginCommentCount_"+id).text(d.count);
		}
	});
}
function ajaxPluginCommentAdd(ccid,id)
{
	var uName=$("#commentName").val();
	var code=$("#code").val();
	var parentid=$("#commentParentId").val();
	var content=$("#commentContent").val();
	if(parentid=="0")
	{
	    if(!uName) {
		    alert("用户名不能为空!","0");
		    return;
	    }
	    if(!code){
		    alert("验证码不能为空","0");
		    return;
	    }
	    if(uName.length>16){
		    alert("用户名太长!","0");
		    return;
	    }
	    if(!content || content.length<5) {
		    alert("评论字符太少!","0");
		    return;
	    }
	    if(content.length>200){
		    alert("评论字符太多!","0");
		    return;
	    }
	}	
	else
	{
	    if(!uName) {
		    alert("处理人不能为空!","0");
		    return;
	    }
	    if(!content || content.length<5) {
		    alert("评论字符不能少于5个字符!","0");
		    return;
	    }
	}
	$("#btnCommentAdd").attr("disabled","disabled");
	$.ajax({
		type:       "post",
		dataType:   "html",
		data:       "ccid="+ccid+"&id="+id+"&parentid="+parentid+"&name="+escape(uName)+"&content="+escape(content)+"&code="+code,
		url:        "/cmsfile/extends/comment/ajax.aspx?oper=ajaxPluginCommentAdd&time="+(new Date().getTime()),
		error: function(){
			//alert('Error loading JSON document发表评论');
		},
		success:    function(d){
			if(d=="ok")
			{
				$("#commentContent").val("");
				if(parentid=="0")
					alert("谢谢你的关注，你的评论必须通过管理员审核后才能发布","1");
				else
				{
					alert("成功回复评论","1");
					location.reload();
                }
                ajaxPluginCommentList(ccid,id,1);
			}
			else
			{
				alert(d,"0");
			}
			document.getElementById("setCode").src='/cmsfile/admin/otherpage/getcode.aspx?t='+(new Date().getTime());
		}
	});
}
function ajaxPluginCommentList(ccid,id,page)
{
	$.ajax({
		type:       "get",
		dataType:   "html",
		data:       "oper=ajaxPluginCommentList&ccid="+ccid+"&&id="+id+"&page="+page+"&time="+(new Date().getTime()),
		url:        "/cmsfile/extends/comment/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document评论列表');
		},
		success:    function(d){
			$("#ajaxPluginCommentList").html(d);
		}
	});
}
function ajaxPluginCommentReply2(parentid)
{
	$("#commentParentId").val(parentid);
	$("#commentContent").val("");
	$("#commentContent")[0].focus();
}
function ajaxPluginCommentUserInfo()
{
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginCommentUserInfo&time="+(new Date().getTime()),
		url:        "/cmsfile/extends/comment/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document');
		},
		success:    function(d){
			$("#commentName").val(d.username);
			if(d.username!="游客")
				$("#commentName").attr("disabled","disabled");
		}
	});
}



///////////////////////////////////////////////////////////////////////////
//网站公告扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginPlacard(filepath)
{
	if(PluginPlacard==null)
	{
		$("#ajaxPluginPlacard").hide();
		return;
	}	
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/extends/placard/index.aspx?placard=placard&siteid=2",
		error: function(){
			//alert('Error loading JSON document公告');
		},
		success:    function(d){
			$("#ajaxPluginPlacard").setTemplateURL("/cmsfile/templates/"+filepath+"/extends/placard/templates/_placard.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginPlacard").processTemplate(d);
		}
	});
}


///////////////////////////////////////////////////////////////////////////
//登录窗口扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginLoginBar(w,filePath)
{
	//参数说明:w=-1,0,1分别指"退出","初始化"和"登陆"
	var uName="";
	var uPass="";
	if(w==1)
	{
		uName=$("#loginBarName").val();
		uPass=$("#loginBarPass").val();
		if(!uName)
		{
			alert("请输入用户名!");
			return;
		}
		if(!uPass)
		{
			alert("请输入密码!");
			return;
		}
		$("btnLoginBar").attr("disabled","disabled");
	}
	$.ajax({
		type:       "post",
		dataType:   "json",
		data:       "name="+escape(uName)+"&pass="+escape(uPass)+"&state="+w,
		url:        "/cmsfile/ajaj/user.aspx?oper=ajaxPluginLoginBar&time="+(new Date().getTime()),
		error: function(){
			//alert('Error loading JSON document');
		},
		success:    function(d){
			if(d.result=="ok")
				ajaxPluginLoginBar(0,filePath);
			else if(d.result=="密码错误")
				alert("密码错误!");
			else if(d.result=="无此用户")
				alert("无此用户");
			else if(d.result=="禁止登录")
				alert("禁止登录");
			else
			{
				$("#ajaxPluginLoginBar").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/loginbar/templates/_loginbar.htm?time="+(new Date().getTime()), null, {filter_data: true});
				$("#ajaxPluginLoginBar").processTemplate(d);
			}
		}
	});	
}


///////////////////////////////////////////////////////////////////////////
//站内搜索扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginSearch(filePath)
{
	if(PluginSearch==null)
	{
		$("#ajaxPluginSearch").hide();
		return;
	}
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/extends/search/index.aspx?soft=soft",
		error: function(){
			//alert('Error loading JSON document搜索');
		},
		success:    function(d){
			$("#ajaxPluginSearch").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/search/templates/_search.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginSearch").processTemplate(d);
		}
	});
}
function ajaxPluginSearchCheckData(searchType,filePath)
{
	var type = "";
	$("input[@name='search_channeltype']").each(function() { 
		if($(this).attr("checked")==true)
			type = $(this).val();
        }); 
	if($("#search_keywords").val()=="")
	{
		alert("请输入关键字");
		return;
	}
	if(searchType=="")
        window.open('/cmsfile/extends/search/index.aspx?filePath='+filePath+'&type='+type+'&w=ss&k='+escape($("#search_keywords").val()));
    else
        window.open('/cmsfile/extends/search/index.aspx?filePath='+filePath+'&k='+escape($("#search_keywords").val()));
}

///////////////////////////////////////////////////////////////////////////
//根据证件编号和查询码 搜索扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginSearchBL(filePath)
{
	if(ajaxPluginSearchBL==null)
	{
		$("#ajaxPluginSearchBL").hide();
		return;
	}
	$.ajax({
		type:       "get",
		//dataType:   "json",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/templates/"+filePath+"/extends/search/templates/_searchbl.htm",
		error: function(){
			//alert('Error loading JSON document查询码搜索');
		},
		success:    function(d){
			$("#ajaxPluginSearchBL").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/search/templates/_searchbl.htm?time="+(new Date().getTime()), null, {filter_data: true});
			$("#ajaxPluginSearchBL").processTemplate(d);
		}
	});
}
function ajaxPluginSearchCheckDataBL(filePath)
{
	if($("#sNumber").val()==""||$("#sCode").val()=="")
	{
		alert("请输入证件编号或查询码");
		return;
	}
	 window.open('/cmsfile/extends/search/index.aspx?filePath='+filePath+'&oper=bl&snumber='+escape($("#sNumber").val())+'&scode='+escape($("#sCode").val()));
}



    function ajaxPluginSearchCheckToSP(filePath)
        {
        
            if($("#sapprove").val()=="")
            {
                alert("请输入审批编码");
                return;
            }
            var bm=$("#sapprove").val();
            window.open("/cmsfile/templates/"+filePath+"/extends/search/templates/indexsp.htm?bm="+bm);
        }
///////////////////////////////////////////////////////////////////////////
//留言 客户浏览扩展插件
///////////////////////////////////////////////////////////////////////////
function ajaxPluginFeedback(filePath)
{
	var oper=joinValue('source');
	oper=oper.replace('&source=','');
	if(oper=='jyxc')
		document.getElementById('txtTitle').innerHTML='建言献策';
	if(oper=='jzxx')
		document.getElementById('txtTitle').innerHTML='局长信箱';
	if(oper=='wsts')
		document.getElementById('txtTitle').innerHTML='网上投诉';
	if(oper=='wsdy')
		document.getElementById('txtTitle').innerHTML='网上答疑';

	$.ajax({
		type:       "get",
		dataType:   "html",
		data:       "time="+(new Date().getTime()),
		url:        "/cmsfile/templates/"+filePath+"/extends/feedback/templates/_feedback.htm",
		error: function(){
			//alert('Error loading JSON document');
		},
		success:    function(d){
			$("#ajaxPluginFeedback").html(d);
		}
	});
}
function ajaxPluginFeedbackAdd(filepath)
{
try{document.getElementById("feedbackContent").value=KE.util.getData('feedbackContent');}catch(err){}
	var oper=joinValue('source');
	var uName=$("#feedbackName").val();
	var phone=$("#txtPhone").val();
	var address=$("#txtAddress").val();
	var qq=$("#txtQQ").val();
	var email=$("#txtEmail").val();
	var tstype=$("#ddltsType").val();
	var parentid=$("#feedbackParentId").val();
	var showFlag=0;
	if(document.getElementById("ckbShowFlag")!=null)
		showFlag=document.getElementById("ckbShowFlag").checked?"1":"0";
	//alert(showFlag);
	var title=ajaxPluginFeedbackSiftSymbol($("#feedbackTitle").val());
	if(parentid!="0") title="";//表示回复
	var content=ajaxPluginFeedbackSiftSymbol($("#feedbackContent").val());
	if(parentid=="0")
	{
		if(!title)
		{
			alert("标题不能为空","0");
			return;
		}
		if(title.length<5)
		{
			alert("标题不能少于5个字符","0");
			return;
		}
		if(!uName) {
			alert("姓名不能为空!","0");
			return;
		}
		if(uName.length>16){
			alert("姓名名太长!","0");
			return;
		}
		if(!phone)
		{
			alert("联系电话不能为空","0");
			return;
		}
		if(phone.length>16){
			alert("联系电话太长!","0");
			return;
		}
		if(!address)
		{
			alert("地址不能为空","0");
			return;
		}
		if(address.length>90){
			alert("地址太长!","0");
			return;
		}
		if(!content || content.length<5) {
			alert("留言字符不能少于20个!","0");
			return;
		}
		
	}
	else
	{
	    var title=$("#feedbackTitle").val();
		oper="&source="+document.getElementById('source').value;
	    if(!content || content.length<20) {
			alert("回复内容不能少于20个字符!","0");
			return;
		}
		if(content.length3000){
			alert("回复内容!必须小于3000个字符","0");
			return;
		}
		if(!title)
		{
			alert("处理人不能为空","0");
			return;
		}
	}
	$("#btnFeedbackAdd").attr("disabled","disabled");
	if(document.getElementById('source')!=null)
	{
	    oper="&source="+document.getElementById('source').value;
	}
	var fromtable="";
	if(document.getElementById('form_feedback')!=null)
	    fromtable=document.getElementById('form_feedback').innerHTML;
	$.ajax({
		type:       "post",
		dataType:   "html",
		data:       "parentid="+parentid+"&name="+escape(uName)+"&title="+escape(title)+"&content="+escape(content)+"&phone="+escape(phone)+"&address="+escape(address)+"&qq="+escape(qq)+"&email="+escape(email)+"&tstype="+escape(tstype)+"&showflag="+escape(showFlag)+"&fromtable="+escape(fromtable),
		url:        "/cmsfile/extends/feedback/ajax.aspx?oper=ajaxPluginFeedbackAdd&time="+(new Date().getTime())+oper,
		error: function(){
			//alert('Error loading JSON document');
		},
		success:    function(d){
			if(d.split('|')[0]=="ok")
			{
			    $("#feedbackTitle").val("");
				$("#feedbackContent").val("");
				$("#feedbackName").val("");
				$("#txtAddress").val("");
				if(parentid=="0")
				{
				    alert("成功提交","1");
				    location.href='message.aspx?source=tjcg&scode='+d.split('|')[1]+'&snumber='+d.split('|')[2];
				    
				}
				else
				{
					alert("成功提交","1");
					location.reload();
				}
				ajaxPluginFeedbackList(1);
			}
			else
			{
				alert(d,"0");
			}
		}
	});
}
function ajaxPluginFeedbackList(page)
{
	var oper=joinValue('source');
	oper=oper.replace('&source=','');
	if(oper=='jyxc'){
		document.getElementById('txtTitle').innerHTML='建言献策';
		document.getElementById('txtTitle1').innerHTML='建言献策';}
	if(oper=='jzxx'){
		document.getElementById('txtTitle').innerHTML='局长信箱';
		document.getElementById('txtTitle1').innerHTML='局长信箱';}
	if(oper=='wsts'){
		document.getElementById('txtTitle').innerHTML='网上投诉';
		document.getElementById('txtTitle1').innerHTML='网上投诉';}
	if(oper=='wsdy'){
		document.getElementById('txtTitle').innerHTML='网上答疑';
		document.getElementById('txtTitle1').innerHTML='网上答疑';}
	$.ajax({
		type:       "get",
		dataType:   "html",
		data:       "oper=ajaxPluginFeedbackList&page="+page+"&time="+(new Date().getTime())+"&source="+oper,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document');
		},
		success:    function(d){
			$("#ajaxPluginFeedbackList").html(d);
		}
	});
}

function ajaxPluginFeedbackList(page,type,filepath)
{
	$.ajax({
		type:       "get",
		dataType:   "html",
		data:       "oper=ajaxPluginFeedbackList&page="+page+"&time="+(new Date().getTime())+"&source="+type+"&filepath="+filepath,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			alert('Error loading JSON document exi');
		},
		success:    function(d){
			$("#ajaxPluginFeedbackList").html(d);
			//alert(d);
		}
	});
}


function ajaxPluginYiShenQingList(page,filepath)
{
	$.ajax({
		type:       "get",
		dataType:   "html",
		data:       "oper=ajaxPluginYiShenQingList&page="+page+"&filepath="+filepath,
		url:        "/cmsfile/extends/YiShenQing/ajax.aspx",
		error: function(){
			alert('Error loading JSON document exi');
		},
		success:    function(d){
			$("#ajaxPluginYiShenQingList").html(d);
			//alert(d);
		}
	});
	
}

function ajaxPluginFeedbackListType220(page,type,filePath)
{
var templateFilePath="index.htm";
if(type=="sjxx")
templateFilePath="_index.htm";
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		    $("#ajaxPluginFeedbackListType56").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		    $("#ajaxPluginFeedbackListType56").processTemplate(d);
		}
	});
}



function ajaxPluginFeedbackListType(page,type,filePath)
{
var templateFilePath="index.htm";
if(type=="sjxx")
templateFilePath="_index.htm";
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		    $("#ajaxPluginFeedbackListType").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		    $("#ajaxPluginFeedbackListType").processTemplate(d);
		}
	});
}

function ajaxPluginFeedbackListType1(page,type,filePath)
{
var templateFilePath="index.htm";
if(type=="zxzx")
templateFilePath="_index.htm";
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		    $("#ajaxPluginFeedbackListType4").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		    $("#ajaxPluginFeedbackListType4").processTemplate(d);
		}
	});
}




function ajaxPluginFeedbackListType6(page,type,filePath)
{
var templateFilePath="index.htm";
if(type=="jyxc")
templateFilePath="_index.htm";
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		    $("#ajaxPluginFeedbackListType5").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		    $("#ajaxPluginFeedbackListType5").processTemplate(d);
		}
	});
}


function ajaxPluginFeedbackListType10(page,type,filePath)
{
var templateFilePath="index.htm";
if(type=="jdts")
templateFilePath="_index.htm";
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		    $("#ajaxPluginFeedbackListType3").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		    $("#ajaxPluginFeedbackListType3").processTemplate(d);
		}
	});
}


function ajaxPluginFeedbackListType20(page,type,filePath)
{
var templateFilePath="index.htm";
if(type=="wsxf")
templateFilePath="_index.htm";
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		    $("#ajaxPluginFeedbackListType02").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		    $("#ajaxPluginFeedbackListType02").processTemplate(d);
		}
	});
}




function ajaxPluginFeedbackListType320(page,type,filePath)
{
var templateFilePath="index.htm";
if(type=="qzxx")
templateFilePath="_index.htm";
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		    $("#ajaxPluginFeedbackListType023").setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		    $("#ajaxPluginFeedbackListType023").processTemplate(d);
		}
	});
}



// 为了能在一个页面多次使用此标签,传入元素ID
function ajaxPluginFeedbackListType2(page,type,filePath,elementID)
{
var templateFilePath="index3.htm";
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		     $("#"+elementID).setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		     $("#"+elementID).processTemplate(d);
		}
	});
}
// 为了能在一个页面多次使用此标签,传入元素ID
function ajaxPluginFeedbackListType3(page,type,filePath,elementID,templateFile)
{
var templateFilePath=templateFile;
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackListType&page="+page+"&time="+(new Date().getTime())+"&source="+type,
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document留言信箱列表');
		},
		success:    function(d){
		//alert(d);
		     $("#"+elementID).setTemplateURL("/cmsfile/templates/"+filePath+"/extends/feedback/templates/"+templateFilePath+"?time="+(new Date().getTime()), null, {filter_data: true});
		     $("#"+elementID).processTemplate(d);
		}
	});
}


function ajaxPluginFeedbackReply2(parentid,opertype)
{
	if(document.getElementById('huifu')!=null)
		document.getElementById('huifu').style.display='block';
	document.getElementById('source').value=opertype;
	$("#feedbackParentId").val(parentid);
	//$("#feedbackTitle").val("管理员回复 #"+parentid);
	document.getElementById("txtPhone").value="无";
	document.getElementById("txtAddress").value="无";
	$("#feedbackContent").val("");
	$("#feedbackContent")[0].focus();
}
function ajaxPluginFeedbackUserInfo()
{
	$.ajax({
		type:       "get",
		dataType:   "json",
		data:       "oper=ajaxPluginFeedbackUserInfo&time="+(new Date().getTime()),
		url:        "/cmsfile/extends/feedback/ajax.aspx",
		error: function(){
			//alert('Error loading JSON document');
		},
		success:    function(d){
			$("#feedbackName").val(d.username);
			if(d.username!="游客")
				$("#feedbackName").attr("disabled","disabled");
		}
	});
}
function ajaxPluginFeedbackSiftSymbol(str){ 
	str = str.replace(/[\-]{10}/g,"").replace(/[,]{10}/g,"").replace(/[\.]{10}/g,""); 
	return(str);
} 
//获取系统时间
function getDate()
{
    var now=new Date();
    
    var arr_week=new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
	var strWeek=arr_week[now.getDay()];

    var year=now.getYear();
    var month=parseInt(now.getMonth())+1;
    var day=now.getDate();
    var hours=now.getHours();
    var minutes=now.getMinutes();
    var seconds=now.getSeconds();
    document.getElementById('disTime').innerText=year+"年"+month+"月"+day+"日 "+strWeek;

     //一秒刷新一次显示时间 
    var timeID=setTimeout(getDate,1000);
}

//清除脚本错误
function killErrors() {
return true;
}
$(document).ready(function(){
window.onerror = killErrors;
}); 


//清除脚本错误
function killErrors() {
return true;
}
$(document).ready(function(){
window.onerror = killErrors;
}); 

window.onerror=function(){return true;}



    function ms(itself){
   
        	var headerBtns=document.getElementById("ulID").getElementsByTagName("li");
            for(var i=0;i<headerBtns.length;i++){
		        headerBtns[i].className="nav_Benli";
	        }
            
            itself.className="nav_Benli2";
    }

//Published 2009-7-1 11:13:59

