﻿function jsAuto(instanceName,objID){
	this._msg = [];
	this._x = null;
	this._o = document.getElementById(objID);//获取suggest对象
	if (!this._o) return;
	this._f = null;
	this._i = instanceName;
	this._r = null;
	this._c = 0;
	this._s = false;
	this._v = null;
	//this._o.style.visibility = "hidden";
	this._o.style.position = "absolute";
	this._o.style.zIndex = "9999";
	return this;
};

//键盘事件
jsAuto.prototype.directionKey=function(){ with (this)
	{
	var e = _e.keyCode ? _e.keyCode : _e.which;
	var l = _o.childNodes.length;
	(_c>l-1 || _c<0) ? _s=false : "";	
	if( e==40 && _s ){
		_o.childNodes[_c].className="mouseout";
		(_c >= l-1) ? _c=0 : _c ++;
		_o.childNodes[_c].className="mouseover";
	 }
	 if( e==38 && _s ){
		_o.childNodes[_c].className="mouseout";
		_c--<=0 ? _c = _o.childNodes.length-1 : "";
		_o.childNodes[_c].className="mouseover";
	 }
	 if( e==13 ){//回车键
		if(_o.childNodes[_c] && _o.style.visibility=="visible"){
			_r.value = _x[_c];
			_o.style.visibility = "hidden";
		}
	 }
	 if( !_s ){
	  _c = 0;
	  _o.childNodes[_c].className="mouseover";
	  _s = true;
	 }
	}
};


// mouseEvent.
jsAuto.prototype.domouseover=function(obj) { with (this){
	_o.childNodes[_c].className = "mouseout";
	_c = 0;
	obj.tagName=="DIV" ? obj.className="mouseover" : obj.parentElement.className="mouseover";
}};

jsAuto.prototype.domouseout=function(obj){
	obj.tagName=="DIV" ? obj.className="mouseout" : obj.parentElement.className="mouseout";
};

jsAuto.prototype.doclick=function(msg) { with (this){
	if(_r){
		_r.value = msg;
		_o.style.visibility = "hidden";
	}
	else{
		alert("javascript autocomplete ERROR :\n\n can not get return object.");
	return;
	}
}};

// object method;
jsAuto.prototype.item=function(msg){//装入数据
	if( msg.indexOf("|")>0 ){
		var arrMsg=msg.split("|");
		for(var i=0; i<arrMsg.length; i++){
			arrMsg[i] ? this._msg.push(arrMsg[i]) : "";
		}
	}
	else{
		this._msg.push(msg);
	}
	this._msg.sort();
};

jsAuto.prototype.append=function(msg) { with (this){
	_i ? "" : _i = eval(_i);
	_x.push(msg);
	var div = document.createElement("DIV");
	//bind event to object.
	div.onmouseover = function(){_i.domouseover(this)};
	div.onmouseout = function(){_i.domouseout(this)};
	div.onclick = function(){_i.doclick(msg)};
	var re  = new RegExp("(" + _v + ")","i");
	div.style.lineHeight="140%";
	div.className = "mouseout";
	if(_v){
		div.innerHTML = msg.replace(re , "<strong class='doaa'>$1</strong>");
	}
	div.style.fontFamily = "verdana";
	_o.appendChild(div);
}};
jsAuto.prototype.GetAbsoluteLocationEx=function(element) { with (this)
						{ 
							if ( arguments.length != 1 || element == null ) 
							{ 
								return null; 
							} 
							var elmt = element; 
							var offsetTop = elmt.offsetTop; 
							var offsetLeft = elmt.offsetLeft; 
							var offsetWidth = elmt.offsetWidth; 
							var offsetHeight = elmt.offsetHeight; 
							while( elmt = elmt.offsetParent ) 
							{ 
								  // add this judge 
								if ( elmt.style.position == 'absolute' || elmt.style.position == 'relative'  
									|| ( elmt.style.overflow != 'visible' && elmt.style.overflow != '' ) ) 
								{ 
									break; 
								}  
								offsetTop += elmt.offsetTop; 
								offsetLeft += elmt.offsetLeft; 
							} 
							return { absoluteTop: offsetTop, absoluteLeft: offsetLeft, 
								offsetWidth: offsetWidth, offsetHeight: offsetHeight }; 
						}};

jsAuto.prototype.display=function() { with(this){
	
	if(_f&&(_v!="")){
		_ixy=_i.GetAbsoluteLocationEx(_r);
		if(document.all){//当为IE时
		_o.style.left = _ixy.absoluteLeft;
		_o.style.top = _ixy.absoluteTop+_r.clientHeight;
		_o.style.width = _ixy.offsetWidth+12;//控件宽度,-2是去掉边框
		}
		else{//当为FF时,FF一定要加单位‘px’
		_o.style.left = eval('"'+_ixy.offsetLeft+'px"');
		_o.style.top = eval('"'+(_ixy.offsetTop+_r.clientHeight)+'px"');
		_o.style.width = eval('"'+(_ixy.offsetWidth-2)+'px"');//控件宽度,-2是去掉边框		
		}
		_o.style.visibility = "visible";
		
	}
	else{
		_o.style.visibility="hidden";
	}
}};

jsAuto.prototype.handleEvent=function(fValue,fID,event) { with (this){
	//if(!document.all){return;}//非ie浏览器，阻止执行本函数
	if (fValue!=""){//当输入的关键字不为空
		var re;
		_e = event;
		var e = _e.keyCode ? _e.keyCode : _e.which;
		_x = [];
		_f = false;
		_r = (typeof fID=="object")?fID:document.getElementById( fID );//得到输入框对象
		_v = fValue;//alert(_i);
		_i = eval(_i);
		re = new RegExp(fValue, "i");//匹配关键字
		_o.innerHTML="";//alert(_msg);
		for(var i=0; i<_msg.length; i++){
			if(re.test(_msg[i])){
				_i.append(_msg[i]);
				_f = true;
			}
			//if(i>10){break;}//跳出关键字
		}	
		
		_i ? _i.display() : alert("can not get instance");	
		if(_f){
			if((e==38 || e==40 || e==13)){
				_i.directionKey();
			}
			else{
				_c=0;
				_o.childNodes[_c].className = "mouseover";
				_s=true;
			}
		}
 	}
	else{
		_o.style.visibility = "hidden";
	}//if结束
}};

jsAuto.prototype.hidden=function() { with (this){//隐藏建议列表
	//if(!document.all){return;}//非ie浏览器，阻止执行本函数
 	_o.style.visibility = "hidden";
}};





function jsAuto_stopshow_map(instanceName,objID){
	this._msg = [];
	this._x = null;
	this._o = _cqh_map.document.getElementById(objID);//获取suggest对象
	if (!this._o) return;
	this._f = null;
	this._i = instanceName;
	this._r = null;
	this._c = 0;
	this._s = false;
	this._v = null;
	//this._o.style.visibility = "hidden";
	this._o.style.position = "absolute";
	this._o.style.zIndex = "9999";
	/*
	this._o.style.height = "100px";
	this._o.style.overflowY  = "auto";
	*/
	return this;
};

//键盘事件
jsAuto_stopshow_map.prototype.directionKey=function(){ with (this)
	{
	var e = _e.keyCode ? _e.keyCode : _e.which;
	var l = _o.childNodes.length;
	(_c>l-1 || _c<0) ? _s=false : "";	
	if( e==40 && _s ){
		_o.childNodes[_c].className="mouseout";
		(_c >= l-1) ? _c=0 : _c ++;
		_o.childNodes[_c].className="mouseover";
	 }
	 if( e==38 && _s ){
		_o.childNodes[_c].className="mouseout";
		_c--<=0 ? _c = _o.childNodes.length-1 : "";
		_o.childNodes[_c].className="mouseover";
	 }
	 if( e==13 ){//回车键
		if(_o.childNodes[_c] && _o.style.visibility=="visible"){
			_r.value = _x[_c];
			_o.style.visibility = "hidden";
		}
	 }
	 if( !_s ){
	  _c = 0;
	  _o.childNodes[_c].className="mouseover";
	  _s = true;
	 }
	}
};


// mouseEvent.
jsAuto_stopshow_map.prototype.domouseover=function(obj) { with (this){
	_o.childNodes[_c].className = "mouseout";
	_c = 0;
	obj.tagName=="DIV" ? obj.className="mouseover" : obj.parentElement.className="mouseover";
}};

jsAuto_stopshow_map.prototype.domouseout=function(obj){
	obj.tagName=="DIV" ? obj.className="mouseout" : obj.parentElement.className="mouseout";
};

jsAuto_stopshow_map.prototype.doclick=function(msg) { with (this){
	if(_r){
		_r.value = msg;
		_o.style.visibility = "hidden";
	}
	else{
		alert("javascript autocomplete ERROR :\n\n can not get return object.");
	return;
	}
}};

// object method;
jsAuto_stopshow_map.prototype.item=function(msg){//装入数据
	if( msg.indexOf("|")>0 ){
		var arrMsg=msg.split("|");
		for(var i=0; i<arrMsg.length; i++){
			arrMsg[i] ? this._msg.push(arrMsg[i]) : "";
		}
	}
	else{
		this._msg.push(msg);
	}
	this._msg.sort();
};

jsAuto_stopshow_map.prototype.append=function(msg) { with (this){
	_i ? "" : _i = eval(_i);
	//if(cqsubStr)msg=cqsubStr(msg,16);
	_x.push(msg);
	var div = _cqh_map.document.createElement("DIV");
	//bind event to object.
	div.onmouseover = function(){_i.domouseover(this)};
	div.onmouseout = function(){_i.domouseout(this)};
	div.onclick = function(){_i.doclick(msg)};
	var re  = new RegExp("(" + _v + ")","i");
	div.style.lineHeight="140%";
	div.className = "mouseout";
	if(_v){
		div.innerHTML = msg.replace(re , "<strong class='doaa'>$1</strong>");
	}
	div.style.fontFamily = "verdana";
	_o.appendChild(div);
}};
jsAuto_stopshow_map.prototype.GetAbsoluteLocationEx=function(element) { with (this)
						{ 
							if ( arguments.length != 1 || element == null ) 
							{ 
								return null; 
							} 
							var elmt = element; 
							var offsetTop = elmt.offsetTop; 
							var offsetLeft = elmt.offsetLeft; 
							var offsetWidth = elmt.offsetWidth; 
							var offsetHeight = elmt.offsetHeight; 
							while( elmt = elmt.offsetParent ) 
							{ 
								  // add this judge 
								if ( elmt.style.position == 'absolute' || elmt.style.position == 'relative'  
									|| ( elmt.style.overflow != 'visible' && elmt.style.overflow != '' ) ) 
								{ 
									break; 
								}  
								offsetTop += elmt.offsetTop; 
								offsetLeft += elmt.offsetLeft; 
							} 
							return { absoluteTop: offsetTop, absoluteLeft: offsetLeft, 
								offsetWidth: offsetWidth, offsetHeight: offsetHeight }; 
						}};

jsAuto_stopshow_map.prototype.display=function() { with(this){
	
	if(_f&&(_v!="")){
		_ixy=_i.GetAbsoluteLocationEx(_r);
		_o.style.left = "64px";
		
		_o.style.overflowY  = "auto";		
		var _otop=_x.length*12+36;
		_otop=_otop<256?_otop:256;
		_o.style.height =_otop+"px";
		_o.style.top ="165px";	
		_o.style.overflow="hidden";
		_o.style.whiteSpace="nowrap";
		if(_cqh_map.document.all){//当为IE时
		/*
		_o.style.left = _ixy.absoluteLeft;
		_o.style.top = _ixy.absoluteTop+_r.clientHeight;
		_o.style.width = _ixy.offsetWidth+12;//控件宽度,-2是去掉边框
		*/
		_o.style.width =_ixy.offsetWidth+60;//控件宽度,-2是去掉边框		
		}
		else{//当为FF时,FF一定要加单位‘px’
		/*
		_o.style.left = eval('"'+_ixy.offsetLeft+'px"');
		_o.style.top = eval('"'+(_ixy.offsetTop+_r.clientHeight)+'px"');
		*/
		_o.style.width = eval('"'+(_ixy.offsetWidth-2)+'px"');//控件宽度,-2是去掉边框		
		}
		_o.style.visibility = "visible";
		
	}
	else{
		_o.style.visibility="hidden";
	}
}};

jsAuto_stopshow_map.prototype.handleEvent=function(fValue,fID,event) {
	
	with (this){
	//if(!_cqh_map.document.all){return;}//非ie浏览器，阻止执行本函数
	if (fValue!=""){//当输入的关键字不为空
		var re;
		_e = event;
		var e = _e.keyCode ? _e.keyCode : _e.which;
		_x = [];
		_f = false;
		_r = (typeof fID=="object")?fID:_cqh_map.document.getElementById( fID );//得到输入框对象
		
		_v = fValue;
		
		_i = eval(_i);
		re = new RegExp(fValue, "i");//匹配关键字
		_o.innerHTML="";//alert(_msg);
		for(var i=0; i<_msg.length; i++){
			if(re.test(_msg[i])){
				_i.append(_msg[i]);
				_f = true;
			}
			//if(i>10){break;}//跳出关键字
		}	
		
		_i ? _i.display() : alert("can not get instance");	
		if(_f){
			if((e==38 || e==40 || e==13)){
				_i.directionKey();
			}
			else{
				_c=0;
				_o.childNodes[_c].className = "mouseover";
				_s=true;
			}
		}
 	}
	else{
		_o.style.visibility = "hidden";
	}//if结束
}};

jsAuto_stopshow_map.prototype.hidden=function() { with (this){//隐藏建议列表
	//if(!_cqh_map.document.all){return;}//非ie浏览器，阻止执行本函数
 	_o.style.visibility = "hidden";
}};




window.onerror=new Function("return true;");//消除错误
/*创建新项目
var jsAutoInstance = new jsAuto("jsAutoInstance","suggest");//suggest为建议下拉菜单所在的层
stops=_lineClass.split("|");//从“_lineData.js”引入变量_lineClass的站点分类数组值
for (i=0;i<stops.length; i++){ 
	jsAutoInstance.item(eval("_line"+stops[i]));
}
*/

//////选择字符母分类建议/////////////////

function showDns(){//显示线路分类
	dnsSelect=document.getElementById("dns");
	dnsSelect.options[0] = new Option("线路分类","");
	dnsdata=_dns.split("|");//从“_lineData.js”引入变量_lineClass的站点分类数组值
	for (i=0;i<dnsdata.length; i++){ 
		dnsSelect.options[i+1] = new Option(dnsdata[i],i+1);
	}		
}

function changeDns(id,name){//改变线路分类
	dnsss=document.getElementById("dnss");
	if (id==""){
		dnsss.options.length = 1;
		dnsss.options[0] = new Option("<-|选择线路分类","");		
	}
	else{
		dnsss.options[0] = new Option(name,"");
		lines=eval("_dns_"+id);
		lines=lines.split("|");
		for (i=0;i<lines.length; i++){ 
			dnsss.options[i+1] = new Option(lines[i],lines[i]);
		}
	}
}

function abc(letter){//自动生成分类字母
	letter=document.getElementById(letter);
	letter.options[0] = new Option("分类","");
	lines=_lineClass.split("|");//从“_lineData.js”引入变量_lineClass的站点分类数组值
	lines=lines.sort();//重新排序
	for (i=0;i<lines.length; i++){ 
		letter.options[i+1] = new Option(lines[i],lines[i]);
	}
}
function changelocation(id,line){
	line=document.getElementById(line);
	if (id==""){
		line.options.length = 1;
		line.options[0] = new Option("<-|请先选择分类","");		
	}
	else{
		line.options[0] = new Option("选择站点["+id+"]","");
		stops=eval("_line"+id);
		stops=stops.split("|");
		for (i=0;i<stops.length; i++){ 
			line.options[i+1] = new Option(stops[i],stops[i]);
		}
	}          
}
////////////检验提交表单的函数/////////////////////////
function so1(auto,action){
	if(action=='banner')
	{
	var A=document.getElementById('sA');
	var B=document.getElementById('sB');		
	}else if(action=='banner_cqjob')
	{
		
		var A=_cqh_map.document.getElementById('sA');
		var B=_cqh_map.document.getElementById('select_cqjob');		
	}else
	{
		var A=document.getElementById('A');
		var B=document.getElementById('B');
	}
	if(A.value ==""){
		alert("请输入起点名称！");
		A.focus();
		return false;
	}
	if(B.value ==""){
		alert("请输入终点名称！");
		B.focus();
		return false;
	}
	if(A.value == B.value){
		alert("起点名称和终点名称不允许相同！");
		B.focus();
		return false;
	}
	if (checksite(A.value)==false){
		A.focus();
		return false;
	}
	if (checksite(B.value)==false){
		B.focus();
		return false;
	}
	if(auto=="auto"){
		//window.location.href="bus/so.php?A="+A.value+"&B="+B.value;
		
		DoSo(A.value,B.value);
	}
	else{
		window.location.href="bus/so.php?so=1&A="+A.value+"&B="+B.value;
	
	}
}
function so2(action){
	if(action=='banner')
		var L=document.getElementById('sL');
	else
		var L=document.getElementById('L');
	if(L.value==""){
		alert("请输入查询线路名称！");
		L.focus();
		return false;
	}
	if (checkline(L.value)==false){
		L.focus();
		return false;
	}
	//window.location.href="sl.php?L="+L.value;
	DoLine(L.value);
}

function so3(){
	var C=document.getElementById('C');
	if(C.value ==""){
		alert("请输入查询站点名称！");
		C.focus();
		return false;
	}
	if (checksite(C.value)==false){
		C.focus();
		return false;
	}
	window.location.href="ss.php?C="+C.value;
}

function checksite(site){//检查表单是否存在
	var f=false;
	var msg=jsAutoInstance._msg;
	for(var i=0; i<msg.length; i++){
		if(site==msg[i]){
			f=true;
			break;
		}
	}
	if (f==false){
		alert("站点《"+site+"》不存在!\n请你重新输入或选择站点!!");
		return false;
	}
	else{
		return true;	
	}
}

function checkline(line){//检查线路是否
	var f=false;
	var msg=suggest2._msg;
	for(var i=0; i<msg.length; i++){
		if(line==msg[i]){
			f=true;
			break;
		}
	}
	if (f==false){
		alert("线路《"+line+"》不存在!\n请你重新输入或选择线路!!");
		return false;
	}
	else{
		return true;	
	}
}

function addFavorite(){//加入收藏夹
	window.external.addFavorite(window.location.href,document.title);	
}

//////////////自动函数//////////////////////////////////
function doo(){//页页自动加载本函数
	//lineName();
	alert(1111);
	showDns();
	abc("letterA");	
	abc("letterB");	
	abc("letterC");	
}
/*********************************
查询公交数据
作者:zky
日期:2008-1-4
版本:1.0
**********************************/
function DoSo(A,B)
{
	var phpbase="http://www.d2d.cn";
	var url=phpbase+"/bus/so.php";
	var strhtml='';
	$.ajax({
 			type: "POST",
 			url: url,
 			data: "A="+A+"&B="+B,
		     success: function(msg){
				 //alert(msg);
				 $("#BusLineBlock").html(msg);
				 $("#line_1").click();
				 return;
			if(msg==-1)
			{
//	strhtml='<BR>抱歉,没有找到相关的内容<BR><BR>';
			$("#LWMorePage").hide();
		     return;
			}
			else
			{
			$("#LWMorePage").show();
			}
									var ob;
									var ob0;
									var Name="";
									try{eval("ob=" +msg);} catch(e){}
									if(ob){
										pageinfo=ob['pageinfo'];
										contents=ob['contents'];
									for(i=0, counter=contents.length;i<counter;i++)//分解JSON数据
										{
											strhtml=strhtml+'<ul><li id="NewThreadLw'+i+'"> <span>[<img src="images/titletype_'+contents[i].icontype+'.gif">]</span>';
											strhtml=strhtml+'<a href="javascript:"  onclick=\'posinfoapi('+contents[i].JosnValue+');\'  title='+contents[i].Titles+' target="_self">'+contents[i].Title+'</a>';
											strhtml=strhtml+'<span>['+formatDate(contents[i].Time)+']</span><span>';
											if(contents[i].isPic>0) strhtml=strhtml+'<img src="../images/img.gif"> ';
											if(contents[i].isVideo>0) strhtml=strhtml+'<img src="../images/video.gif">';
											strhtml=strhtml+'</span></li></ul>';
											
										}
										pagecount=ob['pageinfo']['pagecount'];
										$("#LwtotalPage").text('共'+pagecount+'页');
										page=ob['pageinfo']['pagenow'];
										$("#Threadsleaveword").html(strhtml);//把数据加载到页0页
										$("#Lwupdataup").unbind();
										$("#Lwnextdataup").unbind();
										$("#Lwupdataup").bind("click", function() {PaginationLwList(parseInt(page)-1)});
										$("#Lwnextdataup").bind("click", function() {PaginationLwList(parseInt(page)+1)});
										var curPages=$("#LwcurPageSpan");
										option='<select id="LwcurPage" onchange="PaginationLwList($(this).val())" name="curPage" class="f12">';
										for (i=1; i<=pagecount; i++){
											if (i==page){
												option=option+'<option value="'+i+'"  selected="selected">'+i+'页</option>';
											}else{
												option=option+'<option value="'+i+'">'+i+'页</option>';
											}
										}
										
										curPages.html(option);
									}

									
								  } 
		});
}
/*********************************
查询公交数据
作者:zky
日期:2008-1-4
版本:1.0
**********************************/
function DoLine(L)
{
	var phpbase="http://www.d2d.cn";
	var url=phpbase+"/bus/so.php";
	var strhtml='';
	$.ajax({
 			type: "POST",
 			url: url,
 			data: "L="+L,
		     success: function(msg){
				 //alert(msg);
				 //$("#BusLineBlock").html(msg);
				 //return;
			if(msg==-1)
			{
//	strhtml='<BR>抱歉,没有找到相关的内容<BR><BR>';
			$("#LWMorePage").hide();
		     return;
			}
			else
			{
			$("#LWMorePage").show();
			}
									var ob;
									var ob0;
									var Name="";
									try{eval("ob=" +msg);} catch(e){}
									if(ob){
										pageinfo=ob['pageinfo'];
										contents=ob['contents'];
									for(i=0, counter=contents.length;i<counter;i++)//分解JSON数据
										{
											if(contents[i].SXName=='s')
												Name="上行";
											else if(contents[i].SXName=='x')
												Name="下行";
											
											strhtml=strhtml+'<ul class="BusLineNoBlock BusLineOnclick"><li class="BusLineNo" id="BusLine_'+i+'" onclick=\'parent.Map_Line.showapi('+contents[i].JsValue+',\"hide\")\'><span >[ '+Name+' ]</span><a href="'+phpbase+'/bus/lines/'+contents[i].Mark+'.html" target="_blank">'+contents[i].ID+'路</a> 公交车';
											strhtml=strhtml+'<li class="BusRouteNoMoreInfo"><div id="BusRouteNoInfoBlock">';
											strhtml=strhtml+'<ul><li class="BusLineNoGo"><span class="color_3 bf">上车地点：</span><span class="color_6">'+contents[i].Sstop+'</span>';
											strhtml=strhtml+'<li class="BusLineNoStop"><span class="color_3 bf">目的地点：</span><span class="color_6">'+contents[i].Xstop+'</span>';
											strhtml=strhtml+'<li style="text-align:right;"><label><input type="checkbox" name="hide" id="checkboxline_'+i+'" value="show" onclick="parent.Map_Line.Isstopshow($(this).val());var tsw=$(this).val();$(this).val($(this).attr(\'name\'));$(this).attr(\'name\',tsw);" /> 显示全部站点</label></ul></div></ul><br />';
																						
										}
										strhtml=strhtml+'<ul class="BusLineNoBlock BusLineOnclick"><li class="BusLineNo">详细信息';
          strhtml=strhtml+'<li class="BusRouteNoMoreInfo"><div id="BusRouteNoInfoBlock" class="list_h21"><ul><li><span class="color_3 bf">全程票价：</span>'+contents[0].Prices+'元<li><span class="color_3 bf">所属公司：</span>'+contents[0].Company+'<li><span class="color_3 bf">是否IC卡：</span>'+contents[0].Cards;
               strhtml=strhtml+'<li><span class="color_3 bf">线路区域：</span>'+contents[0].Dn+'</ul></div></ul>';
										//pagecount=ob['pageinfo']['pagecount'];
										//$("#LwtotalPage").text('共'+pagecount+'页');
										//page=ob['pageinfo']['pagenow'];
										//alert(strhtml);
										$("#BusRouteInfoBlock").html(strhtml);//把数据加载到页0页
										$("#BusLine_0").click();
										//$("#Lwupdataup").unbind();
										//$("#Lwnextdataup").unbind();
										//$("#Lwupdataup").bind("click", function() {PaginationLwList(parseInt(page)-1)});
										//$("#Lwnextdataup").bind("click", function() {PaginationLwList(parseInt(page)+1)});
									}

									
								  } 
		});
}
//-------------------index.js move to this----------------------
function drop_mouseover(pos){
 try{window.clearTimeout(timer);}catch(e){}
}
function drop_mouseout(pos){
 var posSel=document.getElementById(pos+"Sel").style.display;
 if(posSel=="block"){
  timer = setTimeout("drop_hide('"+pos+"')", 1000);
 }
}
function drop_hide(pos){
 document.getElementById(pos+"Sel").style.display="none";
}
function search_show(pos,searchType,href){
    document.getElementById(pos+"SearchType").value=searchType;
    document.getElementById(pos+"Sel").style.display="none";
    document.getElementById(pos+"Slected").innerHTML=href.innerHTML;
    document.getElementById(pos+'q').focus();
    var sE = document.getElementById("searchExtend");
    if(sE != undefined  &&  searchType == "bar"){
     sE.style.display="block";
    }else if(sE != undefined){
     sE.style.display="none";
    }
 try{window.clearTimeout(timer);}catch(e){}
 return false;
}


function scrollDoor(){
}
scrollDoor.prototype = {
 sd : function(menus,divs,openClass,closeClass){
  var _this = this;
  if(menus.length != divs.length)
  {
   alert("菜单层数量和内容层数量不一样!");
   return false;
  }    
  for(var i = 0 ; i < menus.length ; i++)
  { 
   _this.$(menus[i]).value = i;    
   _this.$(menus[i]).onmouseover = function(){
     
    for(var j = 0 ; j < menus.length ; j++)
    {      
     _this.$(menus[j]).className = closeClass;
     _this.$(divs[j]).style.display = "none";
    }
    _this.$(menus[this.value]).className = openClass; 
    _this.$(divs[this.value]).style.display = "block";    
   }
  }
  },
 $ : function(oid){
  if(typeof(oid) == "string")
  return document.getElementById(oid);
  return oid;
 }
}
//清除表单内初始数据函数
function clstxt(){
  $("input").click( function(){
	//alert("asdf")
	$(this).attr("value","");
  });
}
/**
*描述：打开新窗口方法
**/
open1=function(url,target,method)
{
	if(typeof(target)=="undefined")
		target="_blank"
	if(typeof(method)=="undefined")
		method="GET"	
	var frm=document.createElement("form");
		frm.method=method;
		frm.target=target;//"_blank";_self
		frm.action=url;
		document.body.appendChild(frm);
		frm.submit();
}
window.onload = function(){
 var SDmodel = new scrollDoor();
 SDmodel.sd(["m01","m02","m03","m04"],["c01","c02","c03","c04"],"sd01","sd02");
 SDmodel.sd(["mm01","mm02","mm03","mm04"],["cc01","cc02","cc03","cc04"],"sd01","sd02");
 SDmodel.sd(["mmm01","mmm02","mmm03","mmm04"],["ccc01","ccc02","ccc03","ccc04"],"sd01","sd02");
 SDmodel.sd(["mmmm01","mmmm02","mmmm03","mmmm04"],["cccc01","cccc02","cccc03","cccc04"],"sd01","sd02");
 SDmodel.sd(["b01","b02","b03"],["q01","q02","q03"],"sd01_b","sd02_b");
 SDmodel.sd(["e01","e02","e03"],["w01","w02","w03"],"sd01_c","sd02_c");
 SDmodel.sd(["t01","t02"],["r01","r02"],"sd01_d","sd02_d");
 doo;
}
//window.onload=doo;
