﻿// JavaScript Document
/* Edited By KingsLee. QQ：124825655 , E_mail：1981kingslee@163.com*/
//*******************************************************************	
/*													 				*/
/*				---------analytical function of page driving---------	 				*/
/*													 				*/
//*******************************************************************	

//==================================================================
//页面初始化
function Page_Top(){
	var TPage_Top=document.getElementById("Page_Top");
	TPage_Top.innerHTML="<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='204'></td><td><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='right' class='h18'><a href='' id='setIndexPage' class='lv'></a></td></tr><tr><td align='right' class='h18'><a href='http://www.chinesefolkculture.com'><strong>Home</strong></a> | <a href='http://shop.chinesefolkculture.com/UserDoor.html'><strong>Your account</strong></a> | <a href='http://shop.chinesefolkculture.com/ShoppingCar.html'><strong>Cart</strong></a> | <a href='http://shop.chinesefolkculture.com/MyIndent.html'><strong>Your List</strong></a> | <a href='http://shop.chinesefolkculture.com/ContactUs.html' target='_blank'><strong>Contact Us</strong></a> | <a href='#'><strong>Help</strong></a> | <a href='http://www.folkw.cn' class='lv' target='_blank'>中文版</a></td></tr></table></td></tr></table>";
//	alert(document.getElementById("setIndexPage").id);
	document.getElementById("setIndexPage").onclick=function(){
		this.style.behavior="url(#default#homepage)";
		this.sethomepage("http://shop.chinesefolkculture.com/"); 
	}
	//ProSubName
	var OProSubName=new cXMLHttp();
	OProSubName.readMXL("Page_Loading","20","18","1","","","2_3","2_3");
	OProSubName=null;
	
	var ProKeywords=document.getElementById("ProKeywords");
	ProKeywords.style.width="107px";
	ProKeywords.onfocus=function(){
		this.select();
	}
}
function Page_TopSeaching(){
	var ProKeywords=document.getElementById("ProKeywords").value;
	var ProSubName= document.getElementById("ProSubName").value;
	window.open("ProList.html?ChnID="+Request("ChnID")+"&DataMode=8&wKindID="+ProSubName+"&ProKeywords="+ProKeywords);
}
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
function addNoteBook(wPage){		//用于各个页面的提交评论
//	notePeople
//	wSort
//	noteContent
//	thisProID
//	CodeNoteBook
	var wSortValue,thisProIDValue;
	var notePeople=document.getElementById("notePeople");
	var wSort=document.getElementById("wSort");
	var noteContent=document.getElementById("noteContent");
	var thisProID=document.getElementById("thisProID");
	var CodeNoteBook=document.getElementById("CodeNoteBook");
	
	var Page_Loading=document.getElementById("Page_Loading");
	Page_Loading.style.visibility="visible";
	
	var setThisBehave="";
	switch(wPage){
		case "1":
			setThisBehave="Insert14";
			wSortValue=getRadioValue("wSort");
			thisProIDValue=thisProID.value;
		break;
		
		case "2":
			setThisBehave="Insert14_1";
			wSortValue=wSort.value;
			thisProIDValue="0";
		break;
		
		case "3":
			setThisBehave="Insert14_2";
			wSortValue=getRadioValue("wSort");
			thisProIDValue=thisProID.value;
		break;
		
		default:
			setThisBehave="Insert14_1";
			wSortValue=wSort.value;
			thisProIDValue="0";
	}
	
	var thisString;
	thisString=notePeople.value+"|$@$|"+wSortValue+"|$@$|"+noteContent.value+"|$@$|"+thisProIDValue+"|$@$|"+CodeNoteBook.value;
	document.getElementById("BtNoteBook").disabled=true;
	var OaddNoteBook=new cXMLHttp();
	OaddNoteBook.readMXL("Page_Loading","1","6","1",Request("ProID"),thisString,"Insert17",setThisBehave);
	OaddNoteBook=null;
}
function Page_TopToChkKeywords(){	
}
/**********************************************************/
function Page_SiteLineBar(wChnNow){
	var SiteLineBar_Arr=[["Home","index.html"],["Folk Gifts","ChnSort.html?ChnID=02"],["Collection","ChnSort.html?ChnID=03"],["Accouterment","ChnSort.html?ChnID=04"],["Talisman","ChnSort.html?ChnID=05"],["CICH","ChnSort.html?ChnID=06"],["Folk Art","ChnSort.html?ChnID=07"],["Specialty","ChnSort.html?ChnID=08"],["Books&DVD","ChnSort.html?ChnID=09"],["Folk Gallery","ChnSort.html?ChnID=10"],["Folk Travel","ChnSort.html?ChnID=11"]];
//	var TPage_SiteLineBar=document.getElementById("Page_SiteLineBar");
	var _div=document.createElement("div");
	var _table=document.createElement("table");
	_table.setAttribute("border","0");
	_table.setAttribute("align","center");
	_table.setAttribute("cellpadding","0");
	_table.setAttribute("cellspacing","0");
	var _tr=document.createElement("tr");
	var _tdspace=document.createElement("td");
	_tdspace.setAttribute("width","3");
	for(var i=0;i<SiteLineBar_Arr.length;i++){
		var _td=document.createElement("td");
		if(wChnNow==i+1){
			var _t=document.createElement("span");
		}else{
			var _t=document.createElement("a");
			_t.setAttribute("href",SiteLineBar_Arr[i][1]);
		}
		_t.className="daohang";
		_t.innerHTML=SiteLineBar_Arr[i][0];
		_td.appendChild(_t);
		_tr.appendChild(_td);
		if(i<SiteLineBar_Arr.length-1){
			_tr.appendChild(_tdspace.cloneNode(true));
		}
	}
	_table.appendChild(_tr);
	_div.appendChild(_table);
//	TPage_SiteLineBar.appendChild(_table);
	document.write(_div.innerHTML)		//试了半天，也不能最后操作到页面中，只好用write大法了，郁闷ing...
}
function RefreshCodeImg(obj){
	obj.src=obj.src;
}
function RefreshThisCodeImg(objStr){
	var _obj=document.getElementById(objStr);
	RefreshCodeImg(_obj)
}
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
function Page_LoginArea(){				//用于用户登陆状态显示区域
	var OPage_LoginArea=new cXMLHttp();
	OPage_LoginArea.readMXL("Page_LoginArea","1","6","1","","","Insert3","Insert3");
	OPage_LoginArea=null;
}
function Page_LoginOut(){				//用户注销驱动
	var OPage_LoginOut=new cXMLHttp();
	OPage_LoginOut.readMXL("Page_LoginArea","1","6","1","","","Insert4","Insert4");
	OPage_LoginOut=null;
}
function Page_LoginIn(){				//用户登陆驱动
	var Page_Loading=document.getElementById("Page_Loading");
	Page_Loading.style.visibility="visible";
	var UserName=document.getElementById("UserName");
	var PassWord=document.getElementById("PassWord");
	var CodeLogin=document.getElementById("CodeLogin");
	var thisString;
	thisString=UserName.value+"|$@$|"+PassWord.value+"|$@$|"+CodeLogin.value;
	var OPage_LoginIn=new cXMLHttp();
	OPage_LoginIn.readMXL("Page_LoginArea","1","6","1","",thisString,"Insert5","Insert5");
	OPage_LoginIn=null;
}
function Page_Tail(){
	var TPage_Tail=document.getElementById("Page_Tail");
	TPage_Tail.innerHTML="<table width='879' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td bgcolor='#FFFFFF'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td height='26' colspan='2' align='center' class='index'><A href='http://corp.folkw.com/index.htm' target=_blank class='index'>about chinese folk culture.com</A> - <A href='http://corp.folkw.com/custom.htm' target=_blank class='index'>customer service</A> - <A href='http://corp.folkw.com/contact.htm' target=_blank class='index'>contact us</A> - <A href='http://corp.folkw.com/law.htm' target=_blank class='index'>relevant law</A> - <A href='http://corp.folkw.com/help.htm' target=_blank class='index'>help center</A></td></tr><tr><td width='100%' align='center' class='index'>Copyright 2007 www.folkw.com All Rights Reserved<br>shop.chinese folk culture.com copyright 陕ICP备<a href='http://www.miibeian.gov.cn' target='_blank'>07012381</a>号 </td></tr></table></td></tr></table>";
}
//用于购买
//==================================================================
function ToBuy(ProID,ProName){
	var ThisCProName="CProBuy"+ProID.toString();
	var ThisProBuy=getCookie(ThisCProName);		//获取这个产品的Cookie值（已订购的数量）
	if(ThisProBuy=="" || !IsNum(ThisProBuy)){	//如果Cookie中没有该值或该值不合法则添加该值
		addCookie(ThisCProName,"1",5);
	}else{
		addCookie(ThisCProName,(parseInt(ThisProBuy)+1).toString(),5);
	}
	alert("Ordered："+ProName+"，Quantity："+getCookie(ThisCProName));
}
//用于收藏
//==================================================================
function ToCollection(thisID,thisString){
	var Page_Collection=document.getElementById("Page_Collection");
	Page_Collection.style.visibility="visible";
	var OToCollection=new cXMLHttp();
	OToCollection.readMXL("Page_Collection","1","20","1",thisID,thisString,"Insert7","Insert7");
	OToCollection=null;
}
function ToCancelCollection(thisID,thisString){	
	var Page_Collection=document.getElementById("Page_Collection");
	Page_Collection.style.visibility="visible";
	var OToCancelCollection=new cXMLHttp();
	OToCancelCollection.readMXL("Page_Collection","1","20","1",thisID,thisString,"Insert8","Insert8");
	OToCancelCollection=null;
}
//index.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function index_information(){
	var Oindex_information=new cXMLHttp();
	Oindex_information.readMXL("index_information","7","11","1","","","1","1");
	Oindex_information=null;
}
function index_ChannelSortList(){
	var Oindex_ChannelSortList=new cXMLHttp();
	Oindex_ChannelSortList.readMXL("index_ChannelSortList","11","11","1","","","5_1","5_1");
	Oindex_ChannelSortList=null;
}
function index_NewProducts(){
	var Oindex_NewProducts=new cXMLHttp();
	Oindex_NewProducts.readMXL("index_NewProducts","4","8","1","","","2_index","2");
	Oindex_NewProducts=null;
}



function index_CommendProducts(){   //热卖函数
	var Oindex_CommendProducts=new cXMLHttp();
	Oindex_CommendProducts.readMXL("index_CommendProducts","8","8","1","","","2_0_1_index","2");
	Oindex_CommendProducts=null;
}



function index_Diaphanous(){    //首页  收藏精品信息表现函数
	var Oindex_Diaphanous=new cXMLHttp();
	Oindex_Diaphanous.readMXL("index_Diaphanous","8","8","1","","","2_0_2_index","2_0_2");
	Oindex_Diaphanous=null;
}
/*
function index_DollectionInfo(thisString){	//首页 收藏信息表现函数
	var Oindex_DollectionInfo=new cXMLHttp();
	Oindex_DollectionInfo.readMXL("index_DollectionInfo","13","20","1","",thisString,"1_1","1_1");
	Oindex_DollectionInfo=null;
}
*/
//ChnSort.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function ChnSort_SubList(thisString){
	thisString=((thisString=="" || thisString=="0")?"01":thisString)
	var OChnSort_SubList=new cXMLHttp();
	OChnSort_SubList.readMXL("ChnSort_SubList","50","20","1","",thisString,"4_1","4_1_1");
	OChnSort_SubList=null;
}
function ChnSort_NewProducts(thisString){
	thisString=((thisString=="" || thisString=="0")?"01":thisString)
	var OChnSort_NewProducts=new cXMLHttp();
	OChnSort_NewProducts.readMXL("ChnSort_NewProducts","4","20","1","",thisString,"2_1_0","2_1_0");
	OChnSort_NewProducts=null;
}
function ChnSort_CommendProducts(thisString){
	thisString=((thisString=="" || thisString=="0")?"01":thisString)
	var OChnSort_CommendProducts=new cXMLHttp();
	OChnSort_CommendProducts.readMXL("ChnSort_CommendProducts","4","20","1","",thisString,"2_1_1","2_1_1");
	OChnSort_CommendProducts=null;
}
//ProList.html页面
//==================================================================
function Change_SortMode(wValue,Mode){
	var ProList_t=document.getElementById("ProList_t");
	var ProList_m=document.getElementById("ProList_m");
	var ProList_Value_ShowMode=document.getElementById("ProList_Value_ShowMode");
	var ProList_Value_SortMode=document.getElementById("ProList_Value_SortMode");
	var ProList_Value_t_Position=document.getElementById("ProList_Value_t_Position");
	var ProList_Value_m_Position=document.getElementById("ProList_Value_m_Position");
	if(ProList_Value_SortMode.value==wValue){
		if(wValue=="1"){
			ProList_Value_t_Position.value=(ProList_Value_t_Position.value=="1"?"2":"1");
			ProList_t.src="Images/t_"+ProList_Value_t_Position.value+"_1.gif";
			ProList_m.src="Images/m_"+ProList_Value_m_Position.value+"_0.gif";
		}else{
			ProList_Value_m_Position.value=(ProList_Value_m_Position.value=="2"?"1":"2");
			ProList_m.src="Images/m_"+ProList_Value_m_Position.value+"_1.gif";
			ProList_t.src="Images/t_"+ProList_Value_t_Position.value+"_0.gif";
		}
	}else{
		if(wValue=="1"){
			ProList_Value_t_Position.value=(ProList_Value_t_Position.value=="1"?"1":"2");
			ProList_t.src="Images/t_"+ProList_Value_t_Position.value+"_1.gif";
			ProList_m.src="Images/m_"+ProList_Value_m_Position.value+"_0.gif";
		}else{
			ProList_Value_m_Position.value=(ProList_Value_m_Position.value=="1"?"1":"2");
			ProList_m.src="Images/m_"+ProList_Value_m_Position.value+"_1.gif";
			ProList_t.src="Images/t_"+ProList_Value_t_Position.value+"_0.gif";
		}
	}
	ProList_Value_SortMode.value=wValue;
	switch(Mode){
		case "AllPeople":
		ProListShow(Request("DataMode"),ProList_Value_ShowMode.value,Request("wKindID"),"1");
		break;
		
		case "Private":
		ProListShow("7","3","01","1");
		break;
	}
}
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//				DataMode	ShowMode	wKindID		SortMode
//最新商品		1			1/2			频道ID		1_1/1_2/2_1/2_2
//推荐商品		2			1/2			频道ID		1_1/1_2/2_1/2_2
//二级分类		3			1/2			类别ID		1_1/1_2/2_1/2_2
//收藏精品		4			1/2			频道ID		1_1/1_2/2_1/2_2
//个人收藏		7			3			为空		1_1/1_2/2_1/2_2
//类别搜索		8			1/2			类别ID		1_1/1_2/2_1/2_2
//==================================================================
function ProListShow(DataMode,ShowMode,wKindID,pageNow){
	var NowSeachKeyword=Request("ProKeywords");
	switch(DataMode){
		case "1":		//最新商品
		setThisData="2_1_0";
		break;
		
		case "2":		//推荐商品
		setThisData="2_1_1";
		break;
		
		case "3":		//二级分类
		setThisData="2_1";
		break;
		
		case "4":		//首页收藏精品的“更多”
		setThisData="2_0_2_1";
		break;
		
		case "5":		//首页热卖推荐的“更多”
		setThisData="2_0_1_1";
		break;
		
		case "6":		//首页最新商品的“更多”
		setThisData="2_0_0_1";
		break;
		
		case "7":		//仅用于个人收藏
		setThisData="7_1";
		break;
		
		case "8":		//二级分类的搜索
		setThisData="2_1_0_1";
		break;
		
		default:		//意外情况为：最新商品
		setThisData="2_1_0";
		DataMode="1";
		break;
	}
	if(ShowMode!="3"){
		var ProList_Simple=document.getElementById("ProList_Simple");		//简约的图标
		var ProList_Detailed=document.getElementById("ProList_Detailed");	//详细的图标
	}
	var ProList_Value_ShowMode=document.getElementById("ProList_Value_ShowMode");
	ProList_Value_ShowMode.value=ShowMode;								//保存显示方式的值
	switch(ShowMode){
		case "1":		//简约式显示
		setThisBehave="2_1_2";
		titleNum="16";
		ProList_Simple.src="Images/display_mode_grid_act.gif";
		ProList_Detailed.src="Images/display_mode_list.gif";
		break;
		
		case "2":		//详细式显示
		setThisBehave="2_1_3";
		titleNum="6";
		ProList_Simple.src="Images/display_mode_grid.gif";
		ProList_Detailed.src="Images/display_mode_list_act.gif";
		break;
		
		case "3":		//仅用于个人收藏
		setThisBehave="7_1";
		titleNum="6";
		break;
		
		default:	//意外情况为：简约式显示
		setThisBehave="2_1_2";
		titleNum="16";
		ShowMode="1";
		ProList_Simple.src="Images/display_mode_grid_act.gif";
		ProList_Detailed.src="Images/display_mode_list.gif";
		break;
	}
	var thisString;
	if(wKindID=="" || wKindID==null || wKindID=="0"){
		thisString="01";
		wKindID="01"
	}else{
		thisString=wKindID
	}
	if(pageNow=="" || pageNow==null || pageNow=="0"){
		pageNow="1";
	}
	var ProList_Value_SortMode=document.getElementById("ProList_Value_SortMode");
	var ProList_Value_t_Position=document.getElementById("ProList_Value_t_Position");
	var ProList_Value_m_Position=document.getElementById("ProList_Value_m_Position");
	if(ProList_Value_SortMode.value=="1"){
		SortMode=ProList_Value_SortMode.value+"_"+ProList_Value_t_Position.value;
	}else{
		SortMode=ProList_Value_SortMode.value+"_"+ProList_Value_m_Position.value;
	}
	var thisID=DataMode+"|"+ShowMode+"|"+wKindID+"|"+pageNow+"|"+SortMode+"|"+NowSeachKeyword;
	var OProListShow=new cXMLHttp();
	OProListShow.readMXL("ProListShow",titleNum,"20",pageNow,thisID,thisString,setThisData,setThisBehave);
	OProListShow=null;
}

//ProIntro.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function ProIntro_Loading(thisID){
	var TProIntro_Loading=document.getElementById("ProIntro_Loading");
//	alert(thisID);
	TProIntro_Loading.style.visibility="visible";
	var OProIntro_Loading=new cXMLHttp();
	OProIntro_Loading.readMXL("ProIntro_Loading","1","20","1",thisID,"","2_2_0","2_2_0");
	OProIntro_Loading=null;
}
function ProIntro_NoteBook(thisString){
	var OProIntro_NoteBook=new cXMLHttp();
	OProIntro_NoteBook.readMXL("ProIntro_NoteBook","4","20","1","",thisString,"6_0_1","6_0_1");
	OProIntro_NoteBook=null;
}
//UserDoor.html页面
//==================================================================
function UserDoor_LoginIn(){				//用户登陆驱动，专用于UserDoor.html页面
	var UserDoor_Loading=document.getElementById("UserDoor_Loading");
	UserDoor_Loading.style.visibility="visible";
	var UserName=document.getElementById("Door_UserName");
	var PassWord=document.getElementById("Door_PassWord");
	var CodeLogin=document.getElementById("CodeUserDoor");
	var thisString;
	thisString=UserName.value+"|$@$|"+PassWord.value+"|$@$|"+CodeLogin.value;
	var OUserDoor_LoginIn=new cXMLHttp();
	OUserDoor_LoginIn.readMXL("UserDoor_Loading","1","6","1","",thisString,"Insert6","Insert6");
	OUserDoor_LoginIn=null;
}
//Register.html页面
//==================================================================
function Register_ChkUserName(thisString){		//检测用户名是否存在
	var TRegister_Loading=document.getElementById("Register_Loading");
//	alert(thisString);
	TRegister_Loading.style.visibility="visible";
	var ORegister_ChkUserName=new cXMLHttp();
	ORegister_ChkUserName.readMXL("Register_Loading","1","20","1","",thisString,"3_1","3_1");
	ORegister_ChkUserName=null;
}
function Register_ChkEmail(thisString){		//检测用户名是否存在
	var TRegister_Loading=document.getElementById("Register_Loading");
//	alert(thisString);
	TRegister_Loading.style.visibility="visible";
	var ORegister_ChkEmail=new cXMLHttp();
	ORegister_ChkEmail.readMXL("Register_Loading","1","20","1","",thisString,"3_2","3_2");
	ORegister_ChkEmail=null;
}
function toChkRegisterData(){					//客户端初级验证
	var TUserName=document.getElementById("UserName");
	var TPassWord=document.getElementById("PassWord");
	var TRPassWord=document.getElementById("RPassWord");
	var TEmail=document.getElementById("Email");
	var TCode=document.getElementById("Code");
	var TErrUserName=document.getElementById("ErrUserName");
	var TErrEmail=document.getElementById("ErrEmail");
	
	var send = true;
	if(send && delSpace(TUserName.value)==""){
		send = false;
		alert("请输入您的用户名!");
		TUserName.value = "";
		TUserName.focus();
	}
	if(send && TUserName.value==TErrUserName.value){
		send = false;
		alert("please enter your registed user name!");
//		TUserName.value = "";
		TUserName.focus();
	}
	if(send && delSpace(TPassWord.value)==""){
		send = false;
		alert("please enter your passage word!");
		TPassWord.value = "";
		TPassWord.focus();
	}
	if(send && TPassWord.value!=TRPassWord.value){
		send = false;
		alert("the two passwords you entered don't match,pease enter it again!");
		TPassWord.value = "";
		TRPassWord.value = "";
		TPassWord.focus();
	}
	if(send && delSpace(TEmail.value)==""){
		send = false;
		alert("please enter your email!");
		TEmail.value = "";
		TEmail.focus();
	}
	if(send && TEmail.value==TErrEmail.value){
		send = false;
		alert("please retype you email!");
//		TEmail.value = "";
		TEmail.focus();
	}
	if(send && !isEmail(TEmail.value)){
		send = false;
		alert("your email adress is incorrect!");
		TEmail.value = "";
		TEmail.focus();
	}
	if(send && delSpace(TCode.value)==""){
		send = false;
		alert("please enter the verification !");
		TCode.value = "";
		TCode.focus();
	}
	if(send){ToRegisterData();}
	document.getElementById("CodeImg").src="Images/GetCode.asp";
}
function ToRegisterData(){						//提交新注册的用户信息
	if(document.getElementById("PassWord").value==document.getElementById("RPassWord").value){
		var TRegister_Loading=document.getElementById("Register_Loading");
//		alert(thisString);
		TRegister_Loading.style.visibility="visible";
		var thisString;
		thisString=document.getElementById("UserName").value+"|$@$|"+document.getElementById("PassWord").value;
		thisString+="|$@$|"+document.getElementById("Email").value+"|$@$|"+document.getElementById("Code").value;
		thisString+="|$@$|"+document.getElementById("PassQuestion").value+"|$@$|"+document.getElementById("PassKey").value;
		var OToRegisterData=new cXMLHttp();
//		alert("step1");
		OToRegisterData.readMXL("Register_Loading","1","20","1","",thisString,"Insert2","Insert2");
		OToRegisterData=null;
	}else{
		alert("the enteres passwords don't match ");
	}
	document.getElementById("CodeImg").src="Images/GetCode.asp";
}
//ShoppingCar.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function Shopping_Loading(pageNow){
	var thisString="0";
	var NowCookieArr=getCookieRrefix();
	for(var i=0;i<NowCookieArr.length;i++){		//获得当前Cookiee的订货情况
		if(i==0){
			thisString=NowCookieArr[i][0].replace("CProBuy","");
		}else{
			thisString+="|"+NowCookieArr[i][0].replace("CProBuy","");
		}
	}
	var TShopping_Loading=document.getElementById("Shopping_Loading");
	TShopping_Loading.style.visibility="visible";
	
	var OShopping_Loading=new cXMLHttp();
	OShopping_Loading.readMXL("Shopping_Loading","50","18",pageNow,"",thisString,"2_2_1","2_2_1");
	OShopping_Loading=null;
}
function CountTotal(){
	var ShoppingCar_total=document.getElementById("ShoppingCar_total");
	var ShoppingCookieArr=getCookieRrefix();
	var total=0;
	for(var i=0;i<ShoppingCookieArr.length;i++){
		if(document.getElementById("SubTotal"+ShoppingCookieArr[i][0].replace("CProBuy",""))!=null && isNumeric(document.getElementById("SubTotal"+ShoppingCookieArr[i][0].replace("CProBuy","")).innerHTML)){		//判断节点是否存在并且该节点的内容是否为数字
			total+=parseInt(document.getElementById("SubTotal"+ShoppingCookieArr[i][0].replace("CProBuy","")).innerHTML);
		}
	}
	ShoppingCar_total.innerHTML="total：$ "+total.toString()+"&nbsp;&nbsp;";
	return total;
}
function DeleteAllCargo(){
	deleteAllCargoCookie();
	var ShoppingCar_Cargo=document.getElementById("ShoppingCar_Cargo");
	ShoppingCar_Cargo.innerHTML="<A href='#' target='_blank' class='b lv'>you book none commodity for the moment！</A>";
	var ShoppingCar_total=document.getElementById("ShoppingCar_total");
	ShoppingCar_total.innerHTML="total：$ 0&nbsp;&nbsp;";
	document.getElementById("Button_CheckOut").disabled=true;
}
//ReceiptedInfo.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function ReceiptedInfo_Loading(){
	var ReceiptedInfo_Loading=document.getElementById("ReceiptedInfo_Loading");
	ReceiptedInfo_Loading.style.visibility="visible";
	var OShopping_Loading=new cXMLHttp();
	OShopping_Loading.readMXL("ReceiptedInfo_Loading","1","18","1","","","Insert9","Insert9");
	OShopping_Loading=null;
}
function GoToEnd(ChkMode){
	var province=document.getElementById("province");
	var city=document.getElementById("city");
	var Email=document.getElementById("Email");
	var ReUserName=document.getElementById("ReUserName");
	var Telphone1=document.getElementById("Telphone1");
	var Telphone2=document.getElementById("Telphone2");
	var Mobile=document.getElementById("Mobile");
	var GetMode=document.getElementById("GetMode");
	var Postalcode=document.getElementById("Postalcode");
	var Address=document.getElementById("Address");
	var Remark=document.getElementById("Remark");
	var TradeMode=document.getElementById("TradeMode");
	var BankCard=document.getElementById("BankCard");
	
	var send = true;//undefined
	if(send && (delSpace(province.value)=="" || delSpace(province.value)=="undefined")){
		send = false;
		alert("please select the province！");
		province.focus();
	}
	if(send && (delSpace(city.value)=="" || delSpace(city.value)=="undefined")){
		send = false;
		alert("please select the city！");
		city.focus();
	}
	if(send && (delSpace(Email.value)=="" || delSpace(Email.value)=="undefined")){
		send = false;
		alert("please enter the Email used for booking！");
		Email.focus();
	}
	if(send && (delSpace(ReUserName.value)=="" || delSpace(ReUserName.value)=="undefined")){
		send = false;
		alert("please enter the booking name！");
		ReUserName.focus();
	}
	if(send && ((delSpace(Mobile.value)=="" || delSpace(Mobile.value)=="undefined") && ((delSpace(Telphone1.value)=="" || delSpace(Telphone1.value)=="undefined") && (delSpace(Telphone2.value)=="" || delSpace(Telphone2.value)=="undefined")))){
		send = false;
		alert("please enter at least a phone No.！");
		Telphone1.focus();
	}else if(send && ((delSpace(Mobile.value)=="" || delSpace(Mobile.value)=="undefined") && ((delSpace(Telphone1.value)=="" || delSpace(Telphone1.value)=="undefined") || (delSpace(Telphone2.value)=="" || delSpace(Telphone2.value)=="undefined")))){
		send = false;
		alert("please enter the complete famlily No.！");
		if((delSpace(Telphone1.value)=="" || delSpace(Telphone1.value)=="undefined")){
			Telphone1.focus();
		}else{
			Telphone2.focus();
		}
	}
	if(send && (delSpace(getRadioValue("GetMode"))=="" || delSpace(getRadioValue("GetMode"))=="undefined")){
		send = false;
		alert("please select the mode of receiving shipping commodity！");
		GetMode.focus();
	}
	if(send && (delSpace(Postalcode.value)=="" || delSpace(Postalcode.value)=="undefined")){
		send = false;
		alert("please enter the zipcode！");
		Postalcode.focus();
	}
	if(send && (delSpace(Address.value)=="" || delSpace(Address.value)=="undefined")){
		send = false;
		alert("please enter the receiving adress so that the delivery can be sent correctly！");
		Address.focus();
	}
	if(send && (delSpace(Remark.value)=="" || delSpace(Remark.value)=="undefined")){
		alert("you'd better to enter some additional information for communication！");
	}
	if(send && (delSpace(TradeMode.value)=="" || delSpace(TradeMode.value)=="undefined")){
		send = false;
		alert("please enter the payment mode method！");
		TradeMode.focus();
	}
	if(send && delSpace(TradeMode.value)=="BankCardMode" && (delSpace(getRadioValue("BankCard"))=="" || delSpace(getRadioValue("BankCard"))=="undefined")){
		send = false;
		alert("please select the credit card for bank account transfering！");
		BankCard.focus();
	}

	var PostArea=province.options[province.options.selectedIndex].text+"$PostArea$"+city.value;
	var Telphone=Telphone1.value+"-"+Telphone2.value;
	
	if(send && ChkMode==1){
		//最后添加完成模式
		SetReceiptedCookie(PostArea,Email.value,ReUserName.value,Telphone,Mobile.value,getRadioValue("GetMode"),Postalcode.value,Address.value,Remark.value,TradeMode.value,getRadioValue("BankCard"));
	}else if(send && ChkMode==2){
		//最后修改完成模式
		MdyIndent_MdyOut();
	}
}
function ChangeTradeMode(){
	var TradeMode=document.getElementById("TradeMode");
	var BankCardArea=document.getElementById("BankCardArea");
	if(delSpace(TradeMode.value)=="BankCardMode"){
		BankCardArea.style.visibility="visible";
	}else{
		BankCardArea.style.visibility="hidden";
	}
}
function SetReceiptedCookie(PostArea,Email,ReUserName,Telphone,Mobile,GetMode,Postalcode,Address,Remark,TradeMode,BankCard){
	addCookie("PostArea",PostArea,5);
	addCookie("Email",Email,5);
	addCookie("ReUserName",ReUserName,5);
	addCookie("Telphone",Telphone,5);
	addCookie("Mobile",Mobile,5);
	addCookie("GetMode",GetMode,5);
	addCookie("Postalcode",Postalcode,5);
	addCookie("Address",Address,5);
	addCookie("Remark",Remark,5);
	addCookie("TradeMode",TradeMode,5);
	addCookie("BankCard",BankCard,5);
	alert("submit successfully！");
	window.location.assign("IndentFinish.html");
}
//IndentFinish.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
//function IndentFinish_Loading(){
//	var IndentFinish_Loading=document.getElementById("IndentFinish_Loading");
//	IndentFinish_Loading.style.visibility="visible";
//	var OIndentFinish_Loading=new cXMLHttp();
//	OIndentFinish_Loading.readMXL("IndentFinish_Loading","1","18","1","","","Insert9","Insert10");
//	OIndentFinish_Loading=null;
//}
function IndentFinish_Loading(pageNow){
	var thisString="0";
	var NowCookieArr=getCookieRrefix();
	for(var i=0;i<NowCookieArr.length;i++){		//获得当前Cookiee的订货情况
		if(i==0){
			thisString=NowCookieArr[i][0].replace("CProBuy","");
		}else{
			thisString+="|"+NowCookieArr[i][0].replace("CProBuy","");
		}
	}
	var TIndentFinish_Loading=document.getElementById("IndentFinish_Loading");
	TIndentFinish_Loading.style.visibility="visible";
	var OIndentFinish_Loading=new cXMLHttp();
	OIndentFinish_Loading.readMXL("IndentFinish_Loading","50","18",pageNow,"",thisString,"2_2_1","2_2_2");
	OIndentFinish_Loading=null;
}
function ToFinish(){								//提交最后表单的全部信息
	var CodeFinishImg=document.getElementById("CodeFinishImg");
	var thisShopping="0";
	var thisString="";
	var NowCookieArr=getCookieRrefix();
	for(var i=0;i<NowCookieArr.length;i++){		//获得当前Cookiee的订货情况
		if(i==0){
			thisShopping=NowCookieArr[i][0].replace("CProBuy","")+":"+NowCookieArr[i][1];
		}else{
			thisShopping+="|"+NowCookieArr[i][0].replace("CProBuy","")+":"+NowCookieArr[i][1];
		}
	}
//	alert(thisShopping);

	if(document.getElementById("CodeFinish").value!="" && document.getElementById("CodeFinish").value!=null && document.getElementById("CodeFinish").value!="undefined"){
		var TIndentFinish_Loading=document.getElementById("IndentFinish_Loading");
//		alert(thisString);
		TIndentFinish_Loading.style.visibility="visible";
		
		var NowCode=document.getElementById("NowCode").innerHTML;
		
		var PostArea=unescape(getCookie("PostArea"));
		var Email=unescape(getCookie("Email"));
		var ReUserName=unescape(getCookie("ReUserName"));
		var Telphone=unescape(getCookie("Telphone"));
		var Mobile=unescape(getCookie("Mobile"));
		var GetMode=unescape(getCookie("GetMode"));
		var Postalcode=unescape(getCookie("Postalcode"));
		var Address=unescape(getCookie("Address"));
		var Remark=unescape(getCookie("Remark"));
		var TradeMode=unescape(getCookie("TradeMode"));
		var BankCard=unescape(getCookie("BankCard"));
		
		var send = true;//undefined
		if(delSpace(thisShopping.replace("|",""))=="" || delSpace(thisShopping.replace("|",""))==null || delSpace(thisShopping.replace("|",""))=="undefined"){
			send = false;
			alert("you are not permited to submit because you book none commodity！");
			window.location.assign("ShoppingCar.html");
		}
		if(send && delSpace(NowCode)=="" || delSpace(NowCode)==null || delSpace(NowCode)=="undefined"){
			send = false;
			alert("the No.of the book sheet is incorrect,please try it again after refreshing！");
		}
		if(send && (delSpace(PostArea)=="" || delSpace(PostArea)==null || delSpace(PostArea)=="undefined")){
			send = false;
			alert("please rewrite it again because you entered unsafe information！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && (delSpace(Email)=="" || delSpace(Email)==null || delSpace(Email)=="undefined")){
			send = false;
			alert("you have not submit the email used for this booking！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && (delSpace(ReUserName)=="" || delSpace(ReUserName)==null || delSpace(ReUserName)=="undefined")){
			send = false;
			alert("you havn't entered the name for booking,please write it again！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && ((delSpace(Mobile)=="" || delSpace(Mobile)==null || delSpace(Mobile)=="undefined") && (delSpace(Telphone)=="" || delSpace(Telphone)==null || delSpace(Telphone)=="undefined"))){
			send = false;
			alert("please rewrite the No.  of your cell phone or family phone again！");
			window.location.assign("ReceiptedInfo.html");
		}else if(send && ((delSpace(Mobile)=="" || delSpace(Mobile)==null || delSpace(Mobile)=="undefined") && (delSpace(Telphone)=="" || delSpace(Telphone)==null || delSpace(Telphone)=="undefined"))){
			send = false;
			alert("please enter the complete family phone No. containing area code！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && (delSpace(GetMode)=="" || delSpace(GetMode)==null || delSpace(GetMode)=="undefined")){
			send = false;
			alert("you have not entered the mode manner of receiving shipping commodity,please enter it！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && (delSpace(Postalcode)=="" || delSpace(Postalcode)==null || delSpace(Postalcode)=="undefined")){
			send = false;
			alert("please enter the zipcode！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && (delSpace(Address)=="" || delSpace(Address)==null || delSpace(Address)=="undefined")){
			send = false;
			alert("please enter the receiver's address to make sure the delivery can be received！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && (delSpace(Remark)=="" || delSpace(Remark)==null || delSpace(Remark)=="undefined")){
			alert("you'd better to enter the additional information for communication！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && (delSpace(TradeMode)=="" || delSpace(TradeMode)==null || delSpace(TradeMode)=="undefined")){
			send = false;
			alert("please select the mode manner of payment！");
			window.location.assign("ReceiptedInfo.html");
		}
		if(send && delSpace(TradeMode)=="BankCardMode" && (delSpace(BankCard)=="" || delSpace(BankCard)==null || delSpace(BankCard)=="undefined")){
			send = false;
			alert("please select the bank card for transfer accounts！");
			window.location.assign("ReceiptedInfo.html");
		}
		
		if(send){
			document.getElementById("Button_JustFinish").disabled=true;
			thisString=PostArea+"|$@$|"+Email;
			thisString+="|$@$|"+ReUserName+"|$@$|"+Telphone;
			thisString+="|$@$|"+Mobile+"|$@$|"+GetMode;
			thisString+="|$@$|"+Postalcode+"|$@$|"+Address;
			thisString+="|$@$|"+Remark+"|$@$|"+TradeMode;
			thisString+="|$@$|"+BankCard+"|$@$|"+thisShopping;
			thisString+="|$@$|"+NowCode+"|$@$|"+document.getElementById("CodeFinish").value;
			//document.getElementById("CodeFinish").value
//			alert(thisString);
			var OToFinish=new cXMLHttp();
			OToFinish.readMXL("IndentFinish_Loading","1","20","1","",thisString,"Insert10","Insert10");
			OToFinish=null;
		}else{
			alert("your book information is incorrect,please check it and contact us！");
			window.location.assign("ShoppingCar.html");
		}
	}else{
		alert("please enter the verifacation correct！");
		CodeFinishImg.value="";
		CodeFinishImg.focus();
	}
	CodeFinishImg.src="Images/GetCodeFinish.asp";
}
//MyIndent.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function MyIndentArea(pageNow){
	var OMyIndentArea=new cXMLHttp();
	OMyIndentArea.readMXL("MyIndentArea","5","20",pageNow,"","","8_1","8_1");
	OMyIndentArea=null;
}
function ToCancelIndent(thisID,thisString){	
	var MyIndent_Loading=document.getElementById("MyIndent_Loading");
	MyIndent_Loading.style.visibility="visible";
	var OToCancelIndent=new cXMLHttp();
	OToCancelIndent.readMXL("MyIndent_Loading","1","20","1",thisID,thisString,"Insert11","Insert11");
	OToCancelIndent=null;
}
//IndentDetailed.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function IndentDetailed_Loading(thisID){
	var OIndentDetailed_Loading=new cXMLHttp();
	OIndentDetailed_Loading.readMXL("IndentDetailed_Loading","1","20","1",thisID,"","8_2","2_2_3");
	OIndentDetailed_Loading=null;
}
//MdyIndent.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function MdyIndent_Loading(thisID){
	var OMdyIndent_Loading=new cXMLHttp();
	OMdyIndent_Loading.readMXL("MdyIndent_Loading","1","20","1",thisID,"","8_2","2_2_4");
	OMdyIndent_Loading=null;
}
function MdyIndent_ToCount(){
	var thisPrice,thisTotal,thisAllTotal;
	thisAllTotal=0
	for(var i=0;i<MdyIndentProArr.length;i++){
		if(!IsNum(document.getElementById("PriceID"+MdyIndentProArr[i]).innerHTML)){
			document.getElementById("PriceID"+MdyIndentProArr[i]).innerHTML="0";
		}
		if(!IsNum(document.getElementById("ProTotalID"+MdyIndentProArr[i]).value)){
			document.getElementById("ProTotalID"+MdyIndentProArr[i]).value="0";
		}
		thisPrice=parseInt(document.getElementById("PriceID"+MdyIndentProArr[i]).innerHTML);
		thisTotal=parseInt(document.getElementById("ProTotalID"+MdyIndentProArr[i]).value);
		thisAllTotal+=thisPrice*thisTotal;
	}
	document.getElementById("ShoppingCar_total").innerHTML="total：$ "+thisAllTotal.toString()+"&nbsp;&nbsp;";
}
function MdyIndent_MdyOut(){						//提交最后修改表单的全部信息
	var CodeFinishMdyImg=document.getElementById("CodeFinishMdyImg");
	var thisShopping="0";
	var thisString="";
	for(var i=0;i<MdyIndentProArr.length;i++){		//获得当前的订货情况
		if(i==0){
			thisShopping=MdyIndentProArr[i]+":"+document.getElementById("ProTotalID"+MdyIndentProArr[i]).value;
		}else{
			thisShopping+="|"+MdyIndentProArr[i]+":"+document.getElementById("ProTotalID"+MdyIndentProArr[i]).value;
		}
	}
//	alert(thisShopping);

	if(document.getElementById("CodeMdy").value!="" && document.getElementById("CodeMdy").value!=null && document.getElementById("CodeMdy").value!="undefined"){
		var MdyIndent_Loading=document.getElementById("MdyIndent_Loading");
//		alert(thisString);
		MdyIndent_Loading.style.visibility="visible";
		
		var PostArea=province.options[province.options.selectedIndex].text+"$PostArea$"+document.getElementById("city").value;
		var Email=document.getElementById("Email").value;
		var ReUserName=document.getElementById("ReUserName").value;
		var Telphone=document.getElementById("Telphone1").value+"-"+document.getElementById("Telphone2").value;
		var Mobile=document.getElementById("Mobile").value;
		var GetMode=getRadioValue("GetMode");
		var Postalcode=document.getElementById("Postalcode").value;
		var Address=document.getElementById("Address").value;
		var Remark=document.getElementById("Remark").value;
		var TradeMode=document.getElementById("TradeMode").value;
		var BankCard=getRadioValue("BankCard");
		//具体订单号：thisString
		var NowId=document.getElementById("NowId").value;
		var CodeMdy=document.getElementById("CodeMdy").value
		
		var send = true;//undefined
	
		document.getElementById("Button_MdyOut").disabled=true;
		thisString=PostArea+"|$@$|"+Email;
		thisString+="|$@$|"+ReUserName+"|$@$|"+Telphone;
		thisString+="|$@$|"+Mobile+"|$@$|"+GetMode;
		thisString+="|$@$|"+Postalcode+"|$@$|"+Address;
		thisString+="|$@$|"+Remark+"|$@$|"+TradeMode;
		thisString+="|$@$|"+BankCard+"|$@$|"+thisShopping;
		thisString+="|$@$|"+NowId+"|$@$|"+CodeMdy;
//		document.write(thisString);
		var OMdyIndent_MdyOut=new cXMLHttp();
		OMdyIndent_MdyOut.readMXL("MdyIndent_Loading","1","20","1","",thisString,"Insert12","Insert12");
		OMdyIndent_MdyOut=null;
	}else{
		alert("please enter the correct verifacation！");
		document.getElementById("CodeMdy").value="";
		document.getElementById("CodeMdy").focus();
	}
	CodeFinishMdyImg.src="Images/GetCodeMdy.asp";
}
//MdData.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function MyData_Loading(){
	var MyData_Loading=document.getElementById("MyData_Loading");
	MyData_Loading.style.visibility="visible";
	var OMyData_Loading=new cXMLHttp();
	OMyData_Loading.readMXL("MyData_Loading","1","20","1","","","Insert13","3_3");
	OMyData_Loading=null;
}
function ToSubmitMyData(){
	var MyDataImg=document.getElementById("MyDataImg");
	var thisString="";
	var MyData_Loading=document.getElementById("MyData_Loading");
	if(document.getElementById("CodeMyData").value!="" && document.getElementById("CodeMyData").value!=null && document.getElementById("CodeMyData").value!="undefined"){
		var NowUserName=document.getElementById("NowUserName").innerHTML;
		var RePassWord=document.getElementById("RePassWord").value;
		var PostArea=province.options[province.options.selectedIndex].text+"$PostArea$"+document.getElementById("city").value;
		var Email=document.getElementById("Email").value;
		var ReRealName=document.getElementById("ReRealName").value;
		var Telphone=document.getElementById("Telphone1").value+"-"+document.getElementById("Telphone2").value;
		var Mobile=document.getElementById("Mobile").value;
		var Postalcode=document.getElementById("Postalcode").value;
		var Address=document.getElementById("Address").value;
		var PassQuestion=document.getElementById("PassQuestion").value;
		var PassKey=document.getElementById("PassKey").value;
		var CodeMyData=document.getElementById("CodeMyData").value;
		
		document.getElementById("ToSubmitMyData").disabled=true;
		thisString=NowUserName+"|$@$|"+RePassWord;
		thisString+="|$@$|"+PostArea+"|$@$|"+Email;
		thisString+="|$@$|"+ReRealName+"|$@$|"+Telphone;
		thisString+="|$@$|"+Mobile+"|$@$|"+Postalcode;
		thisString+="|$@$|"+Address+"|$@$|"+PassQuestion;
		thisString+="|$@$|"+PassKey+"|$@$|"+CodeMyData;
//		document.write(thisString);
//		alert(thisString);
		MyData_Loading.style.visibility="visible";
		var OToSubmitMyData=new cXMLHttp();
		OToSubmitMyData.readMXL("MyData_Loading","1","20","1","",thisString,"Insert14","Insert13");
		OToSubmitMyData=null;
	}else{
		alert("please enter the correct verifacation！");
		document.getElementById("CodeMyData").value="";
		document.getElementById("CodeMyData").focus();
		MyData_Loading.style.visibility="hidden";
	}
	MyDataImg.src="Images/MyData.asp";
}
//FindKey.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function FindKeySubmit(){
	var send=true;
	if(send && (delSpace(document.getElementById("NowUserName").value)=="" || delSpace(document.getElementById("NowUserName").value)==null)){
		send=false;
		alert("please enter the username for retaking your password！");
		document.getElementById("NowUserName").value="";
		document.getElementById("NowUserName").focus();
	}
	if(send && (delSpace(document.getElementById("NowUserName").value)=="" || delSpace(document.getElementById("NowUserName").value)==null)){
		send=false;
		alert("please enter the unser name for retaking your password！");
		document.getElementById("NowUserName").value="";
		document.getElementById("NowUserName").focus();
	}
	if(send && (delSpace(document.getElementById("CodeFindKey").value)=="" || delSpace(document.getElementById("CodeFindKey").value)==null)){
		send=false;
		alert("please enter the verification！");
		document.getElementById("CodeFindKey").value="";
		document.getElementById("CodeFindKey").focus();
	}
	if(send){
		addCookie("FindKeyNowUserName",document.getElementById("NowUserName").value,5);
		addCookie("FindKeyCodeFindKey",document.getElementById("CodeFindKey").value,5);
		window.location.assign("AnswerQ.html");
	}else{
		document.getElementById("ImgFindKey").src="images/FindKey.asp";
	}
}
//AnswerQ.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function AnswerQ_Loading(){
	var AnswerQ_Loading=document.getElementById("AnswerQ_Loading");
	AnswerQ_Loading.style.visibility="visible";
	var OAnswerQ_Loading=new cXMLHttp();
	OAnswerQ_Loading.readMXL("AnswerQ_Loading","1","20","1","",getCookie("FindKeyNowUserName")+"|$@$|"+getCookie("FindKeyCodeFindKey"),"Insert15","3_4");
	OAnswerQ_Loading=null;
}
function AQSubmit(){					//找回密码第二步，用户名|$@$|问题|$@$|答案|$@$|验证码
	var AnswerQ_Loading=document.getElementById("AnswerQ_Loading");
	AnswerQ_Loading.style.visibility="visible";
	var OAQSubmit=new cXMLHttp();
	OAQSubmit.readMXL("AnswerQ_Loading","1","20","1","",getCookie("FindKeyNowUserName")+"|$@$|"+getCookie("AnswerQNowQuestion")+"|$@$|"+document.getElementById("NowAnswer").value+"|$@$|"+document.getElementById("CodeAQ").value,"Insert16","3_5");
	OAQSubmit=null;
}
function FindeKeyEnding_Loading(){		//找回密码第三步
	document.getElementById("FindeKeyEnding_EndingText").innerHTML="<span class='ju b14'>congritulations："+getCookie("FindKeyNowUserName")+" you password retaking is successful！</span><br>your password is："+getCookie("AnswerQNowPassWord")+" please keep your user name and password。<br><a href='index.html' class='b'>back to the homepage</a>";
}
//ArticleList.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function ArticleList_List(pageNow,thisString){
	var OArticleList_List=new cXMLHttp();
	var setThisData="1";
	if(thisString=='0' || !IsNum(thisString)){
		setThisData="1";
	}else{
		setThisData="1_1";
	}
	OArticleList_List.readMXL("ArticleList_List","28","45",pageNow,"",thisString,setThisData,"1_2");
	OArticleList_List=null;
}
//ArticleContent.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function AC_SortAll(){
	var OAC_SortAll=new cXMLHttp();
	OAC_SortAll.readMXL("AC_SortAll","10","6","1","","","1_4","1_5");
	OAC_SortAll=null;
}
function ArticleContent_Loading(thisString){
	var ArticleContent_Loading=document.getElementById("ArticleContent_Loading");
	ArticleContent_Loading.style.visibility="visible";
	var OArticleContent_Loading=new cXMLHttp();
	if(thisString=='0' || !IsNum(thisString)){
		alert("the page parameter is incorrect,please back the previous page！");
		history.go(-1);
	}
	OArticleContent_Loading.readMXL("ArticleContent_Loading","1","1000","1","",thisString,"1_2","1_3");
	OArticleContent_Loading=null;
}
function AC_Com(){		//推荐文章列表
	var OAC_Com=new cXMLHttp();
	OAC_Com.readMXL("AC_Com","9","18","1","","","1_3","1_4");
	OAC_Com=null;
}
//MoreNoteBook.html页面
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
//==================================================================
function MoreNoteBookContent(pageNow,thisString){		//更多评论
	var OMoreNoteBookContent=new cXMLHttp();
	OMoreNoteBookContent.readMXL("MoreNoteBookContent","5","200",pageNow,"",thisString,"6_0_1","6_0_2");
	OMoreNoteBookContent=null;
}
//--------------------------------------------------
//频道类别联动的驱动函数，用于页面加载时初始化
//--------------------------------------------------
function LinkageSelect_Loading1(thisID,thisString){
	//参数thisID为将被选中的项目的ID值和二级类别菜单将被选中项目的ID值，参数thisString为需要传递到LinkageSelect_Loading2的wID
	//若该一级频道菜单是为了添加而用的（并非是要修改而用的，即初始化状态时），则不需要设置参数thisID和thisString
	var OLinkageSelect_Loading1=new cXMLHttp();
	OLinkageSelect_Loading1.readMXL("LinkageSelect_Loading1","100","18","1",thisID,thisString,"5","5");
	OLinkageSelect_Loading1=null;
}
//--------------------------------------------------
//频道类别联动的驱动函数，用于选择好频道类别并点了查询之后
//--------------------------------------------------
function LinkageSelect_Loading2(thisID,thisString){		//thisID为将被选中项目的ID值,thisString为一级频道菜单的ID标签
	var _toFindSelected=toFindSelected(thisString);
//	alert(toFindSelected(thisString));
	if(_toFindSelected.length>0){
		var OLinkageSelect_Loading2=new cXMLHttp();
		OLinkageSelect_Loading2.readMXL("LinkageSelect_Loading2","100","18","1",thisID,_toFindSelected,"4_1","4_1");
		OLinkageSelect_Loading2=null;
	}else{
		alert("please select at least ！");
	}
}
//---------------------------------------------------
//测试
//---------------------------------------------------
//readMXL:function(wId,titleNum,titleLength,pageNow,thisID,thisString,setThisData,setThisBehave)
function testid1(){	//测试Session，注册一个Session=Now()
	var Otestid1=new cXMLHttp();
	Otestid1.readMXL("testid1","1","","1","","","ForTest1_1","ForTest");
	Otestid1=null;
}
function testid2(){	//测试Session，显示已注册的Session
	var Otestid2=new cXMLHttp();
	Otestid2.readMXL("testid2","1","","1","","","ForTest1_2","ForTest");
	Otestid2=null;
}
