﻿<!--
function trim(str){
if(typeof str!="string"){
return str;
}
var retValue=str;
var ch=retValue.substring(0,1);
while(ch==" "){
retValue=retValue.substring(1,retValue.length);
ch=retValue.substring(0,1);
}
ch=retValue.substring(retValue.length-1,retValue.length);
while(ch==" "){
retValue=retValue.substring(0,retValue.length-1);
ch=retValue.substring(retValue.length-1,retValue.length);
}
while(retValue.indexOf("  ")!=-1){
retValue=retValue.substring(0,retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1,retValue.length);
}
return retValue;
}
function SearchSubmit(){
var NKM=trim(document.SearchForm.Nkey.value);
var CNM=document.SearchForm.CN_Class.value;
if(NKM==""|CNM==""){
alert("提示：请输入关键字，并且选择要搜索的栏目。");
document.SearchForm.Nkey.select();
return false;
}
else{
if(CNM=="Job"|CNM=="Corporation"){
document.SearchForm.action="http://search.jxlh.org.cn/CN/MemberSearch.html?PostID=1ST0TZ9SSlmjVKPROkP&XNM=AD2US8EE"
}
else{
document.SearchForm.action="http://search.jxlh.org.cn/CN/?PostID=lmjVKPROkP1ST0TZ9SS&XNM=ST6US9SS"
}
document.SearchForm.submit();
}
}
function PageGo(N){
document.PageN.page.value=N;
document.PageN.submit();
}
function PageNB(){
var PV=parseInt(document.PageN.page.value);
var PSV=parseInt(document.PageN.Pages.value);
var PUV=document.PageN.PageURL.value;
var PNV=document.PageN.PageNM.value;
var PCV=document.PageN.ClassID.value;
if(PV==''||PV<1||PV>PSV){
alert('提示：输入的页数不正确。');
document.PageN.page.focus();
document.PageN.page.select();
return false;
}
else{
window.location.href=PUV+PV+PCV+PNV;
return false;
}
}


//add------2006/11/24-------start b
function ClassID(){
   var ss;                         // 声明变量。
   var s =document.getElementById("DataTB");
       ss =s.substring(16, 28);   // 取子字符串。
   return(ss);                     // 返回子字符串。
	}
//add-------------end

function HttpRequest(url){
var http_request=false;
try{
http_request=new XMLHttpRequest();
}
catch(IE6){
try{
http_request=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(IE5){
try{
http_request=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(failed){
http_request=false;
}
}
}
if(!http_request){
return false;
}
else{
http_request.open('GET',url,false);
http_request.send(null);
//alert(http_request.responseText);
return(http_request.responseText);
}
}
function PictureWidth(PicID,PicWidth,PicSrc){
var img=new Image();
img.src=PicSrc;
document.getElementById(PicID).width=img.width;
if(document.getElementById(PicID).width>PicWidth){
document.getElementById(PicID).width=PicWidth;
}
}
function ShowPicture(Pic){
window.open('http://www.jxlh.org.cn/ShowPicture/ShowPicture2.htm?Pic='+Pic,'ShowPicture2','resizable=yes,toolbar=no,scrollbars=yes,status:no')
}
function SMS(JM){
window.open('/http://sms.jxlh.org.cn/Info.html?TID='+JM,'SMS','width=477,height=260,toolbar=no,scrollbars=no,status=no');
}
function CompareClick(ND,ID){
if(ND.checked){
document.getElementById("TR"+ID).style.backgroundColor="#FEEEE0";
}
else{
document.getElementById("TR"+ID).style.backgroundColor="";
}
}
function ContactSG(){
window.location='http://info.jxlh.org.cn/Contact/Index.htm';
}
/*-------------
function HelpHY(){
window.open('/help/help_hangye.htm','help_hangye','width=560,height=365,toolbar=no,scrollbars=no,status=no');
}
function PriceSG(){
window.open('/About/Price.htm','PriceIndex','width=600,height=650,toolbar=no,scrollbars=yes,status=no');
}
function HelpX(C,W,H,A){
window.open(A,C,'width='+W+',height='+H+',toolbar=no,scrollbars=no,status=no');
}
--------*/
var divArray=new Array("card1","card2","card3","card4");
var iShow=1;
var iHide=0;
var timeCounter=0;
var waitTime=5*1000;
var swapTime=10;
function InitLayers(){
	for(var i=0;i<divArray.length;i++){
		var obj= document.all[divArray[i]];
		if(i==0){
			 obj.filters.alpha.opacity=100;}
		else{
			obj.filters.alpha.opacity=0;}
	}
}
function StopLayers(k){
document.all[k].filters.alpha.opacity=100;
}
function StopLayers(k){
document.all[k].filters.alpha.opacity=100;
}
function WaitStage(){
if(timeCounter==0) {
}else{
clearInterval(timeCounter);
iHide=iShow;
iShow=(iShow>=divArray.length-1)?0:iShow+1;
}
if(divArray.length>=2){
timeCounter=setInterval("SwapStage()",waitTime);
}
}
function SwapStage(){
	clearInterval(timeCounter);
	timeCounter=setInterval("SwapLayers()",swapTime);
}
function SwapLayers(){
	var objS=document.all[divArray[iShow]];
	var objH=document.all[divArray[iHide]];
	if(objS.filters.alpha.opacity<100){
		objS.filters.alpha.opacity+=5;
		objS.style.display="block";
		objH.filters.alpha.opacity-=5;
	}else{
		objS.filters.alpha.opacity=100;
		objH.filters.alpha.opacity=0;
		objH.style.display="none";
		WaitStage();
	}
}
function SearchX(ClassName){
var CN="";
var NV=document.SearchForm.Nkey.value;
if(ClassName!=="") CN="http://search.jxlh.org.cn/CN/"+ClassName+".html";
document.SearchForm.Nkey.value=trim(NV);
document.SearchForm.action=CN;
document.SearchForm.submit();
}
function trim(str){
while(str.indexOf("  ")!=-1){
str=str.replace("  "," ");
}
return str;
}

function DClick(DivID,i,WP,MID,LB){
var RSX2=HttpRequest(WP+"/Company.html?XID="+MID);
var RSX3=HttpRequest(WP+"/WS"+LB+"List.html?XID="+MID);
document.getElementById(DivID+"DIV").style.display="block";
switch(i){
case 1:
var DivID2=DivID.replace("1","2");
var DivID3=DivID.replace("1","3");
var DivID4=DivID.replace("1","4");
document.getElementById(DivID).className=DivID;
document.getElementById(DivID2).className=DivID2;
document.getElementById(DivID3).className=DivID3;
document.getElementById(DivID4).className=DivID4;
break;
case 2:
var DivID2=DivID.replace("2","1");
var DivID3=DivID.replace("2","3");
var DivID4=DivID.replace("2","4");
document.getElementById(DivID).className=DivID2;
document.getElementById(DivID+"DIV").innerHTML=RSX2;
document.getElementById(DivID2).className=DivID;
document.getElementById(DivID3).className=DivID3;
document.getElementById(DivID4).className=DivID4;
break;
case 3:
var DivID2=DivID.replace("3","1");
var DivID3=DivID.replace("3","2");
var DivID4=DivID.replace("3","4");
document.getElementById(DivID).className=DivID2;
document.getElementById(DivID+"DIV").innerHTML=RSX3;
document.getElementById(DivID2).className=DivID3;
document.getElementById(DivID3).className=DivID;
document.getElementById(DivID4).className=DivID4;
break;
case 4:
var DivID2=DivID.replace("4","1");
var DivID3=DivID.replace("4","2");
var DivID4=DivID.replace("4","3");
document.getElementById(DivID).className=DivID2;
document.getElementById(DivID2).className=DivID3;
document.getElementById(DivID3).className=DivID4;
document.getElementById(DivID4).className=DivID;
break;
}
document.getElementById(DivID2+"DIV").style.display="none";
document.getElementById(DivID3+"DIV").style.display="none";
document.getElementById(DivID4+"DIV").style.display="none";
}

function ShowHideX(objID,WP,MID){
var objDIV=document.getElementById(objID);
var RSX=HttpRequest(WP+"/ASKOnline.html?XID="+MID)
if(objDIV.style.display=='none'){
objDIV.style.display='block';
document.getElementById(objDIV).innerHTML=RSX;
}
else{
objDIV.style.display='none';
}
}

function trim(str){
while(str.indexOf("  ")!=-1){
str=str.replace("  "," ");
}
return str;
}
function SearchX(ClassName){
var CN="";
var NV=document.SearchForm.Nkey.value;
if(ClassName!=="") CN="http://search.jxlh.org.cn/CN/"+ClassName+".html";
document.SearchForm.Nkey.value=trim(NV);
document.SearchForm.action=CN;
document.SearchForm.submit();
}
//function ICompany(){
//document.getElementById("Company").style.height=CompanyList.document.body.scrollHeight+20+"px";
//}
//function IOther(){
//document.getElementById("Other").style.height=OtherList.document.body.scrollHeight+20+"px";
//}
function IASK(){
document.getElementById("ASKOnline").style.height=ASKOnlineList.document.body.scrollHeight+20+"px";
}
//-->
