<!-- 
function killErrors() {
return true;
}
window.onerror = killErrors;

function oCopy(str)
{
var clipBoardContent=str;
window.clipboardData.setData("Text",clipBoardContent);
alert("复制成功，您可以粘贴到你的 MSN/QQ/Blog/BBS 上推荐给你的好友");
}

//图片处理 Begin ===========================================
var flag=false; 
function DrawImage(ImgD,w,h){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= w/h){ 
    if(image.width>w){ 
      ImgD.width=w; 
      ImgD.height=(image.height*w)/image.width; 
    }else{ 
      ImgD.width=image.width; 
      ImgD.height=image.height; 
    } 
  }else{ 
    if(image.height>h){ 
      ImgD.height=h; 
      ImgD.width=(image.width*h)/image.height; 
    }else{ 
      ImgD.width=image.width; 
      ImgD.height=image.height; 
    } 
  } 
} 
} 

//改变图片大小
function resizepic(thispic)
{if(thispic.width>500) thispic.width=500;}
//图片处理 End ===========================================

function textLimitCheck(thisArea, maxLength){
  if (thisArea.value.length > maxLength){
    alert('限 '+maxLength + ' 个字符. \r超出的部分将自动去除.');
    thisArea.value = thisArea.value.substring(0, maxLength);
    thisArea.focus();
  }
}

function isNumberString(InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++)  {
	TempChar= InString.substring (Count, Count+1);
	if (RefString.indexOf (TempChar, 0)==1)  
	return (false);
}
return (true);
}

//更改字体大小 Begin =============================================
function doZoom(size,height){
	//alert(document.getElementById('id_topicreply'));		
	try{
		document.getElementById('contents').style.fontSize=size+'px';
		//document.getElementById('id_topictail').style.fontSize=size+'px';
	}catch(e){
	}
	for(i=0;i<50;i++){
		try{
			document.getElementById('id_topicreply'+i).style.fontSize=size+'px';
		}catch(e){
		}
	}
}//更改字体大小 End =============================================

//检查内容是否过期 =============================================
function GetIsOver(str){
 if(str != ""){
   var vd = new Date(str);
   var xc = Math.floor((vd-new Date()) / (1000 * 60 *60 *24 ));
   if(vd<new Date()){
   isover.innerHTML="<font color=#FF0000>此信息已过期</font>";
   }else{
     if (xc==0){
	   isover.innerHTML="<font color=#FF00FF>此信息即将过期</font>";
	 }else{
	   isover.innerHTML="<font color=#0000FF>还有"+xc+"天过期</font>";
	 }
   }
 }
}

//当前时间 =============================================
function CalConv()
 {
	FIRSTYEAR = 1998;
	LASTYEAR = 2031;

	today = new Date();
	SolarYear = today.getFullYear();
	SolarMonth = today.getMonth() + 1;
	SolarDate = today.getDate();
	Weekday = today.getDay();
	LunarCal = [
 new tagLunarCal( 27, 5, 3, 43, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1 ),
 new tagLunarCal( 46, 0, 4, 48, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ), /* 88 */
 new tagLunarCal( 35, 0, 5, 53, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ), /* 89 */
 new tagLunarCal( 23, 4, 0, 59, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
 new tagLunarCal( 42, 0, 1, 4, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
 new tagLunarCal( 31, 0, 2, 9, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ),
 new tagLunarCal( 21, 2, 3, 14, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ), /* 93 */
 new tagLunarCal( 39, 0, 5, 20, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ),
 new tagLunarCal( 28, 7, 6, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ),
 new tagLunarCal( 48, 0, 0, 30, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ),
 new tagLunarCal( 37, 0, 1, 35, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ), /* 97 */
 new tagLunarCal( 25, 5, 3, 41, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
 new tagLunarCal( 44, 0, 4, 46, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
 new tagLunarCal( 33, 0, 5, 51, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
 new tagLunarCal( 22, 4, 6, 56, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ), /* 101 */
 new tagLunarCal( 40, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),
 new tagLunarCal( 30, 9, 2, 7, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
 new tagLunarCal( 49, 0, 3, 12, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 ),
 new tagLunarCal( 38, 0, 4, 17, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ), /* 105 */
 new tagLunarCal( 27, 6, 6, 23, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ),
 new tagLunarCal( 46, 0, 0, 28, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0 ),
 new tagLunarCal( 35, 0, 1, 33, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),
 new tagLunarCal( 24, 4, 2, 38, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ), /* 109 */
 new tagLunarCal( 42, 0, 4, 44, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),
 new tagLunarCal( 31, 0, 5, 49, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ),
 new tagLunarCal( 21, 2, 6, 54, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
 new tagLunarCal( 40, 0, 0, 59, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), /* 113 */
 new tagLunarCal( 28, 6, 2, 5, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ),
 new tagLunarCal( 47, 0, 3, 10, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1 ),
 new tagLunarCal( 36, 0, 4, 15, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ),
 new tagLunarCal( 25, 5, 5, 20, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ), /* 117 */
 new tagLunarCal( 43, 0, 0, 26, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ),
 new tagLunarCal( 32, 0, 1, 31, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0 ),
 new tagLunarCal( 22, 3, 2, 36, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ) ];
 /* 民国年月日 Codes by http://www.codefans.net */
 SolarCal = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
SolarDays = [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 397 ];
	
	
	if ( SolarYear <= FIRSTYEAR || SolarYear > LASTYEAR ) return 1;
	sm = SolarMonth - 1;
		if ( sm < 0 || sm > 11 ) return 2;
		leap = GetLeap( SolarYear );
	if ( sm == 1 )
		d = leap + 28;
	else
		d = SolarCal[sm];
	if ( SolarDate < 1 || SolarDate > d ) return 3;
	y = SolarYear - FIRSTYEAR;
	acc = SolarDays[ leap*14 + sm ] + SolarDate;
	kc = acc + LunarCal[y].BaseKanChih;
	Kan = kc % 10;
	Chih = kc % 12;
	
	Age = kc % 60;
	if ( Age < 22 )
		Age = 22 - Age;
	else
		Age = 82 - Age;
	
	if ( acc <= LunarCal[y].BaseDays ) {
		y--;
		LunarYear = SolarYear - 1;
		leap = GetLeap( LunarYear );
		sm += 12;
		acc = SolarDays[leap*14 + sm] + SolarDate;
	 }
	else
		LunarYear = SolarYear;
			l1 = LunarCal[y].BaseDays;
	for ( i=0; i<13; i++ ) {
		l2 = l1 + LunarCal[y].MonthDays[i] + 29;
		if ( acc <= l2 ) break;
		l1 = l2;
	 }
	LunarMonth = i + 1;
	LunarDate = acc - l1;
	im = LunarCal[y].Intercalation;
	if ( im != 0 && LunarMonth > im ) {
		LunarMonth--;
		if ( LunarMonth == im ) LunarMonth = -im;
	 }
	if ( LunarMonth > 12 ) LunarMonth -= 12;
 today=new Date();
 function initArray(){
 this.length=initArray.arguments.length
 for(var i=0;i<this.length;i++)
 this[i+1]=initArray.arguments[i] }
 var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
 document.write("", today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日&nbsp;",d[today.getDay()+1],"");
 
 months = ["一","二","三","四","五","六","七","八","九","十","十一","十二"];
 
 days = ["初一","初二","初三","初四","初五","初六","初七","初八","初九","初十","十一","十二","十三","十四","十五","十六","十七","十八","十九","二十","廿一","廿二","廿三","廿四","廿五","廿六","廿七","廿八","廿九","三十"];
 document.write( "&nbsp;农历"+months[LunarMonth-1]+"月" + days[LunarDate-1] + "");
 return 0; 
}
 /* 是否有闰年, 0 平年, 1 闰年 */
function GetLeap( year )
 {
 if ( year % 400 == 0 )
 return 1;
 else if ( year % 100 == 0 )
 return 0;
 else if ( year % 4 == 0 )
 return 1;
 else
 return 0;
 }
function tagLunarCal( d, i, w, k, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13) {
 this.BaseDays = d; 
 this.Intercalation = i; /* 0代表此年沒有闰月 */
 this.BaseWeekday = w; /* 民国1月1日星期減 1 */
 this.BaseKanChih = k; /* 民国1月1日干支序号减 1 */
 this.MonthDays = [ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ]; /* 此農曆年每月之大小, 0==小月(29日), 1==大月(30日) */
}

//密码强度检测 Begin =======================
function CharMode(iN){
	if (iN>=48 && iN <=57) //数字
		return 1; 
	if (iN>=65 && iN <=90) //大写字母
		return 2;
	if (iN>=97 && iN <=122) //小写
		return 4;
	else
		return 8; //特殊字符
}

function checkStrong(sPW){
	if (sPW.length<=4)
		return 0;  //密码太短
	Modes=0;
	for (i=0;i<sPW.length;i++){
		Modes|=CharMode(sPW.charCodeAt(i));
	}
	return bitTotal(Modes);
}	

function bitTotal(num){
	modes=0;
	for (i=0;i<4;i++){
		if (num & 1) modes++;
		num>>>=1;
	}
	return modes;
}

function pwStrength(pwd){
	O_color="#eeeeee";
	L_color="#FF0000";
	M_color="#FF9900";
	H_color="#33CC00";
	if (pwd==null||pwd==''){
		Lcolor=Mcolor=Hcolor=O_color;
		Text_L="弱";
		Text_M="中";
		Text_H="强";
	}	
	else{
		S_level=checkStrong(pwd);
		switch(S_level)	 {
			case 0:
			case 1:
				Lcolor=L_color;
				Mcolor=Hcolor=O_color;
				Text_L="弱";
				Text_M="&nbsp;";
				Text_H="&nbsp;";
				break;
			case 2:
				Lcolor=Mcolor=M_color;
				Hcolor=O_color;
				Text_L="&nbsp;";
				Text_M="中";
				Text_H="&nbsp;";
				break;
			default:
				Text_L="&nbsp;";
				Text_M="&nbsp;";
				Text_H="强";
				Lcolor=Mcolor=Hcolor=H_color;
				}
	 }	
	document.getElementById("strength_L").style.background=Lcolor;
	document.getElementById("strength_M").style.background=Mcolor;
	document.getElementById("strength_H").style.background=Hcolor;
	document.getElementById("strength_L").innerHTML=Text_L;
	document.getElementById("strength_M").innerHTML=Text_M;
	document.getElementById("strength_H").innerHTML=Text_H;
	return;
}
//密码强度检测 End =======================

// 显示无模式对话框
function ShowDialog(url, width, height) {
	var arr = showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:no;status:no");
}

//居中打开窗口
function openwindow( url, winName, width, height) {
xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 )){
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;}
theproperty= "width=" + width + "," 
+ "height=" + height + "," 
+ "location=0," 
+ "menubar=0,"
+ "resizable=1,"
+ "scrollbars=0,"
+ "status=0," 
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //仅适用于Netscape
+ "screeny=" + yposition + "," //仅适用于Netscape
+ "left=" + xposition + "," //IE
+ "top=" + yposition; //IE 
window.open( url,winName,theproperty );
}
	
//表单提交
function Ctlent(){
//ctrl + Enter
if(event.ctrlKey && window.event.keyCode==13){
  if(ClcKcntr()){
    this.document.addform.submit();
  }
}
//ctrl + s
if(event.ctrlKey && window.event.keyCode==83){
  if(ClcKcntr()){
    this.document.addform.submit();
  }
}
}
clckcnt=0;
function ClcKcntr(){
  clckcnt++;
  if(clckcnt > 1){
    alert('请求已经发出，请等待片刻！\n\n'+'不要重复提交，谢谢！');
	return false;
  }
  return true;
}

//ajax提示框========================================
function openWithIframe(tit,url,w,h){
	var sWidth,sHeight;
	sWidth=document.body.clientWidth;
	sHeight=document.body.scrollHeight;
	if(sHeight<window.screen.height){sHeight=window.screen.height;}
	var bgObj=document.createElement("div");
	bgObj.setAttribute('id','bgDiv');
	bgObj.style.position="absolute";
	bgObj.style.top="0";
	bgObj.style.background="#000000";
	bgObj.style.filter="Alpha(Opacity=30);";
	bgObj.style.left="0";
	bgObj.style.width=sWidth + "px";
	bgObj.style.height=sHeight + "px";
	bgObj.style.zIndex = "10000";
    document.body.appendChild(bgObj);

    massage_box.style.left = (document.body.clientWidth - w) / 2;
    massage_box.style.top = (screen.height - h) / 2-80;
    massage_box.style.screenx = (document.body.clientWidth - w) / 2;//仅适用于Netscape
    massage_box.style.screeny = (screen.height - h) / 2-80;//仅适用于Netscape
    massage_box.style.width = w+"px";
    massage_box.style.height = h+"px";
    pop_title.innerHTML=tit;
    massage_box.style.display=''
    var popiframe='<iframe src="'+url+'" width="'+(w-11)+'px"  height="'+(h-36)+'px" frameborder=0 scrolling=no></iframe>';
    pop_iframe.innerHTML=popiframe;
}
function closeWithIframe(){
    massage_box.style.display="none";
    document.body.removeChild(document.getElementById("bgDiv"));
}
document.write('<div id="massage_box" style="position:absolute; FILTER: progid:DXImageTransform.Microsoft.DropShadow();z-index:10001;display:none">');
document.write('<div style="border-width:1 1 3 1; width:100%; height:100%; background:#fff; color:#666666; font-size:12px; line-height:150%">');
document.write('<div onmousedown=MDown(massage_box) style="background:#666666; height:20px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#fff;cursor:move;padding:0 0 4px 0">');
document.write('<div style="display:inline; width:200px; position:absolute;padding:3px 0 0 5px" id=pop_title></div>');
document.write('<span onClick="closeWithIframe()" style="float:right; display:inline; cursor:pointer;padding:3px 5px 0 0;font-size:12px">关闭</span>');
document.write('</div>');
document.write('<div style="padding:5px" id=pop_iframe></div>');
document.write('</div>');
document.write('</div>');
//ajax提示框功能 End ========================================

function InitAjax(){
var ajax=false; 
try { ajax = new ActiveXObject("Msxml2.XMLHTTP"); } 
catch (e) { try { ajax = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { ajax = false; } }
if (!ajax && typeof XMLHttpRequest!='undefined') { ajax = new XMLHttpRequest(); } 
return ajax;}
//公用ajax
function ToAjax(url,Post){
	if (url!=""){
		var getinfo = "";
		var ajax = InitAjax();
		ajax.open("POST", url, true); 
		ajax.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded; charset=GB2312"); 
		ajax.send(Post);
	    ajax.onreadystatechange = function(){
		  if (ajax.readyState == 4){getinfo = ajax.responseText;}
	      AjaxShow.innerHTML = getinfo;
		  }
	}
}

//AJAX投诉等功能 Begin ========================================
function show_number(obj,obj1){
	$.ajax({
		type:"GET",
		url:"/ajax/jubao.asp?action=show",
		data:"ShengfenPY="+obj+"&Company_ID="+obj1+"",
		success:function(data){
			showResponse(data);
		}
	});
}
function modify_number(obj,obj1,obj2){
	$.ajax({
		type:"GET",
		url:"/ajax/jubao.asp?action=gengxin",
		data:"ShengfenPY="+obj+"&Company_ID="+obj1+"&obj="+obj2+"",
		success:function(data){
			showResponse(data);
		}
	});
}
function showResponse(data){
	var arrstr = data.split('|');
	$("#show_report").html(arrstr[1]);
	$("#show_complaints").html(arrstr[0]);
	$("#show_recommended").html(arrstr[2]);
	$("#show_companyCount").html(arrstr[3]);
	$("#xmlcontact").html(arrstr[4]);
}
//AJAX投诉等功能 End ========================================

//间隔滚动  Begin ========================================
$(document).ready(function(){
	var scrollGalleryObj=$("div.scrollGallery");
	scrollGalleryObj.each(function(i){
		var parentObj=$(this);
		var obj=$(this).find(".scroll");
		if(obj[0]==null){return true;}
		obj[0].scrollTop=0;
		//设置当前索引位置，从1开始的
		obj.attr("currentIndex","1");
		//获取li的个数
		var liLength=obj.find("li").length;
		var delay=parseInt(obj.attr("delay"),10);
		var step=parseInt(obj.attr("step"),10);
		if(isNaN(delay) || isNaN(step)){return true;}
		//根据传递进来的参数进行注册
		function foo(obj,delay,step){window.setInterval(function(){interalRun(obj,step);},delay);}
		//执行滚动
		function startScroll(num,where){
			//先移除可能存在的动画队列
			obj.dequeue();
			//如果where=true，则滚动到顶部，否则+=step
			if(where==true){
				obj.attr("currentIndex","1");
				obj.animate({ scrollTop:"0" },600);
			}else if(where==false){
				var i=parseInt(obj.attr("currentIndex"),10);
				if(i==liLength){i=0}
				obj.attr("currentIndex",(i+1));
				obj.animate({scrollTop:"+="+step+""},600);
			}
			//如果num不为空，那么说明是鼠标hover了
			if(num!=null){
				var h=(num-1)*step;
				obj.attr("currentIndex",num.toString());
 				obj.animate({scrollTop:h},300);
			}
			selectCurrent();
		}
		//根据滚动条位置来决定是继续向上还是向下
		function interalRun(obj,step){
			if(parentObj.attr("scroll")=="false"){return;}
			var n1 = parseInt(obj[0].scrollTop);
			var n2 = parseInt(obj[0].clientHeight);
			var n3 = parseInt(obj[0].scrollHeight);
			/*
				第一个参数：是在鼠标事件中才有意义的，这里是自动执行，因此设置为null
				第二个参数：startScroll根据这个布尔值决定是向上还是向下
			*/
			n1+n2==n3?startScroll(null,true):startScroll(null,false);
		}
		if(delay>0){foo(obj,delay,step)};
		//当鼠标移上的时候，设置一个属性scroll,为false是，interalRun方法就不会执行（return）;
		parentObj.bind("mouseover",function(event){parentObj.attr("scroll","false");})
		parentObj.bind("mouseout",function(event,obj,delay,step){parentObj.removeAttr("scroll","false");})
		//现在做锚点
		if(parentObj[0].className.indexOf("photo")>=0){
			//先获取li的数量 
			var ulObj=document.createElement("ul");
			ulObj.className="scrollNum";
			for(var i=0;i<liLength;i++){
				var liNode=document.createElement("li");
				var textNode=document.createTextNode(i+1);
				liNode.setAttribute("title",i+1);
				liNode.appendChild(textNode);
				if(i==0){liNode.className="current";}
				//给liNode添加事件
				$(liNode).bind("mouseover",function(){
					var num=parseInt($(this).attr("title"),10);
					if(isNaN(num)){return;}
					//跳至对应位置
					startScroll(num);
				});
				ulObj.appendChild(liNode);
				$(ulObj).hide();
			}
			$(ulObj).fadeIn("slow");
			parentObj[0].appendChild(ulObj);
		}
		//此方法的作用是“选中”的li
		function selectCurrent(){
			var scrollNumObj=parentObj.find("ul.scrollNum");
			if(scrollNumObj[0]==null){return;}
			var currentNum=parseInt(obj.attr("currentIndex"),10)-1;
			scrollNumObj.find("li").each(function(){
				$(this).removeClass("current");
			});
			scrollNumObj.find("li").eq(currentNum).addClass("current");
		}
		//判断是否有“上一个”或“下一个的功能”
		var prevNextObj=parentObj.find(".prevNext");
		if(prevNextObj[0]!=null){
			var prevObj=prevNextObj.find(".prev");
			var nextObj=prevNextObj.find(".next");
			if(prevObj[0]!=null){
				prevObj.bind("focus",function(){this.blur();return false;});
				prevObj.bind("click",function(){prevOrNext(true);});
			}
			if(nextObj[0]!=null){
				nextObj.bind("focus",function(){this.blur();return false;});
				nextObj.bind("click",function(){prevOrNext(false);});
			}
		}
		//上一个,接受一个参数，如果为true，表示上一个，反之下一个
		function prevOrNext(prevNext){
			var currentIndex=parseInt(obj.attr("currentIndex"),10);
			if(prevNext){
				if(currentIndex==1){currentIndex=liLength;}else{currentIndex=currentIndex-1};
			}else{
				if(currentIndex==liLength){currentIndex=1;}else{currentIndex=currentIndex+1};
			}
			startScroll(currentIndex)
		}
	})
});
//间隔滚动  End ========================================

//XML做菜单 ============
$(function(){
	$.ajax({
    url: 'menu.xml',
    type: 'GET',
    dataType: 'xml',
    error: function(){
        alert('Error loading XML document');
    },
    success: function(xml){
    $(xml).find("menus > menu").each(function(){
        var temp_str;
        temp_str="<li><a href="+$(this).attr("link")+">"+$(this).attr("name")+"</a>"
        if($(this).find("submenu").size()>0){
            temp_str+="<ul class='submenu'>"
            $(this).find("submenu").each(function(){
                temp_str+="<li><a href="+$(this).attr("link")+">"+$(this).attr("name")+"</a></li>"
            });
            temp_str+="</ul>"
        }
        temp_str+="</li>";
        $(temp_str).appendTo("#menu");
    });
	$("#menu li").each(function(){
		$(this).hover(
		function(){
			$(this).children("ul.submenu").show();
		},
		function(){
			$(this).children("ul.submenu").hide();
		});
	});
	}
	});
});
$(function(){
	var timeBegin=new Date();
	initMenu("menu.xml");
	var timeEnd=new Date();
	$("#scriptExeTime").html(timeEnd-timeBegin);
});
//XML做菜单 ============

//菜单弹出效果 =========
$(function(){
	$("#productleft li").each(function(){
		if ($(this).text() == $.cookie('productleftLevel1'))
		{
			//if it is in cookies, it will collapse
			$(this).children("ul.submenu").toggle();
		}//if
		$(this).click(function(){
			$.cookie('productleftLevel1',null);
			$(this).children("ul.submenu").toggle();
			$.cookie('productleftLevel1',$(this).text());
		});
	});
});
//菜单弹出效果 =========

// -->
