
//==============
function Tmskhbh(id, daima, jc, qc, qtsm, lxr) {
	this.id = id;
	this.kehudaima = daima;
	this.kehujiancheng = jc;
	this.kehuquancheng = qc;
	this.tshxsqtsm = qtsm;
	this.lianxiren = lxr;
	this.getDM = function() {
		return this.kehudaima;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmskhbh(id, daima, jc, qc, qtsm, lxr) {
	var khbh = new Tmskhbh(id, daima, jc, qc, qtsm, lxr);
	return khbh;
}

function TmsCj(id, chejihao, simhao, key) {
	this.id = id;
	this.chejihao = chejihao;
	this.simhao = simhao;
	this.key = key;
}

function createTmsCj(id, chejihao, simhao, key) {
	var cj = new TmsCj(id, chejihao, simhao, key);
	return cj;
}

function onSearchCj() {
	var clbhMethod = arguments[0];
	var clbhParam = arguments[1];

	var params = getUrlParam(clbhMethod, clbhParam);

	openwindow("/base/CjSelectBrowse.do" + params);
	return false;
}

function Tmsclbh(id, daima, haoma, yinqinghaoma, clsb, glzx, gs, clzlsj,
		clzljf, cheji) {
	this.id = id;
	this.cheliangdaima = daima;
	this.chepaihaoma = haoma;
	this.yinqinghaoma = yinqinghaoma;
	this.cheliangshangbiao = clsb;
	this.ssGuanlizhongxin = glzx;
	this.ssGongsi = gs;
	this.clzlShiji = clzlsj;
	this.clzlJifei = clzljf;
	this.chejihaoma = cheji;
	this.getCheliangdaima = function() {
		return this.cheliangdaima;
	};
	this.getChepaihaoma = function() {
		return this.chepaihaoma;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsClbh(id, daima, haoma, yinqinghaoma, clsb, glzx, gs, clzlsj,
		clzljf, chejihaoma) {
	var clbh = new Tmsclbh(id, daima, haoma, yinqinghaoma, clsb, glzx, gs,
			clzlsj, clzljf, chejihaoma);
	return clbh;
}

function TmsSj(id, daima, xm, sfzh, jzzl) {
	this.id = id;
	this.sjDaima = daima;
	this.sjXingming = xm;
	this.sfzh = sfzh;
	this.jiazhaozhonglei = jzzl;
	this.getXM = function() {
		return this.sjXingming;
	};
	this.getSFZH = function() {
		return this.sfzh;
	};
	this.getDM = function() {
		return this.sjDaima;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsSj(id, daima, xm, sfzh, jzzl) {
	var sj = new TmsSj(id, daima, xm, sfzh, jzzl);
	return sj;
}

function TmsPcd(id, paichedan, chehao, sj) {
	this.id = id;
	this.pcdh = paichedan;
	this.chehao = chehao;
	this.sj = sj;
	this.getPCD = function() {
		return this.pcdh;
	};
	this.getCH = function() {
		return this.chehao;
	};
	this.getSJ = function() {
		return this.sj;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsPcd(id, paichedan, chehao, sj) {
	var pcd = new TmsPcd(id, paichedan, chehao, sj);
	return pcd;
}

function TmsTyd(id, tydh, zd, hwhm, khckbh, khbh) {
	this.id = id;
	this.tydh = tydh;
	this.zd = zd;
	this.hwhm = hwhm;
	this.khckbh = khckbh;
	this.khbh = khbh;
	this.getTYDH = function() {
		return this.tydh;
	};
	this.getZD = function() {
		return this.zd;
	};
	this.getKHBH = function() {
		return this.khbh;
	};
	this.getHWHM = function() {
		return this.hwhm;
	};
	this.getId = function() {
		return this.id;
	};
}

function TmsTyd(id, tydh, zd, hwhm, khbh) {
	this.id = id;
	this.tydh = tydh;
	this.zd = zd;
	this.hwhm = hwhm;
	this.khbh = khbh;
	this.getTYDH = function() {
		return this.tydh;
	};
	this.getZD = function() {
		return this.zd;
	};
	this.getKHBH = function() {
		return this.khbh;
	};
	this.getHWHM = function() {
		return this.hwhm;
	};
	this.getId = function() {
		return this.id;
	};
}
function createTmsTyd(id, paichedan, chehao, sj) {
	var tyd = new TmsTyd(id, paichedan, chehao, sj);
	return tyd;
}
function createTmsTyd(id, tydh, zd, hwhm, khbh) {
	var tyd = new TmsTyd(id, tydh, zd, hwhm, khbh);
	return tyd;
}

function TmsSdm(id, daima, mc) {
	this.id = id;
	this.daima = daima;
	this.mc = mc;
	this.getDM = function() {
		return this.daima;
	};
	this.getMC = function() {
		return this.mc;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsSdm(id, daima, mc) {
	var sdm = new TmsSdm(id, daima, mc);
	return sdm;
}

function TmsCkzl(id, ckdm, csdm, ckjc, ckqc, ckdz) {
	this.id = id;
	this.ckdm = ckdm;
	this.csdm = csdm;
	this.ckjc = ckjc;
	this.ckqc = ckqc;
	this.ckdz = ckdz;
	this.getCKDM = function() {
		return this.ckdm;
	};
	this.getCSDM = function() {
		return this.csdm;
	};
	this.getCKJC = function() {
		return this.ckjc;
	};
	this.getCSQC = function() {
		return this.ckqc;
	};
	this.getCKDZ = function() {
		return this.ckdz;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsCkzl(id, ckdm, csdm, ckjc, ckqc, ckdz) {
	var sdm = new TmsCkzl(id, ckdm, csdm, ckjc, ckqc, ckdz);
	return sdm;
}

function TmsCsdm(id, daima, mc, sdm) {
	this.id = id;
	this.daima = daima;
	this.mc = mc;
	this.sdm = sdm;
	this.getDM = function() {
		return this.daima;
	};
	this.getSDM = function() {
		return this.sdm;
	};
	this.getMC = function() {
		return this.mc;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsCsdm(id, daima, mc, sdm) {
	var sdm = new TmsCsdm(id, daima, mc, sdm);
	return sdm;
}

function TmsRenyuan(id, daima, xm, glzx) {
	this.id = id;
	this.daima = daima;
	this.xm = xm;
	this.glzx = glzx;
	this.getDM = function() {
		return this.daima;
	};
	this.getXM = function() {
		return this.xm;
	};
	this.getGLZX = function() {
		return this.glzx;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsRenyuan(id, daima, xm, glzx) {
	var sdm = new TmsRenyuan(id, daima, xm, glzx);
	return sdm;
}

function TmsGlzx(id, daima) {
	this.id = id;
	this.daima = daima;
	this.getDM = function() {
		return this.daima;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsGlzx(id, daima) {
	var glzx = new TmsGlzx(id, daima);
	return glzx;
}

function TmsClxx(id, chepaihao) {
	this.id = id;
	this.chepaihao = chepaihao;
	this.getCHEPAIHAO = function() {
		return this.chepaihao;
	};
	this.getId = function() {
		return this.id;
	};
}

function TmsClxx(id, chepaihao, chejixuliehao) {
	this.id = id;
	this.chepaihao = chepaihao;
	this.chejixuliehao = chejixuliehao;
	this.getCHEPAIHAO = function() {
		return this.chepaihao;
	};
	this.getId = function() {
		return this.id;
	};
	this.getCHEJIXULIEHAO = function() {
		return this.chejixuliehao;
	};
}

function createTmsClxx(id, chepaihao) {
	var clxx = new TmsClxx(id, chepaihao);
	return clxx;
}

function createTmsClxx(id, chepaihao, chejixuliehao) {
	var clxx = new TmsClxx(id, chepaihao, chejixuliehao);
	return clxx;
}

function onSearchClxx() {

	var clbhMethod = arguments[0];
	var clbhParam = arguments[1];

	var params = getUrlParam(clbhMethod, clbhParam);

	openwindow("/common/TmsclglclxxSelectBrowse.do" + params);

	return false;
}

function TmsXtglMobile(mobile) {

	this.mobile = mobile;
	this.getMobile = function() {
		return this.mobile;
	};

}

function createTmsXtglMobile(mobile) {
	var mobile = new TmsXtglMobile(mobile);
	return mobile;
}

function onSearchMobilePhone() {

	var clbhMethod = arguments[0];
	var clbhParam = arguments[1];
	// alert('getUrlParaming');
	var params = getUrlParam(clbhMethod, clbhParam);
	// alert('getUrlParamed');
	// alert('opening');
	openwindow("/common/TmsXtglMobilephoneSelectBrowse.do"
			+ params);
	// alert('opened');
	return false;
}

function TmsCeJi(id, serial) {
	this.id = id;
	this.serial = serial;
	this.getSERIAL = function() {
		return this.serial;
	};
	this.getId = function() {
		return this.id;
	};
}

function createTmsCeJi(id, serial) {
	var ceji = new TmsCeJi(id, serial);
	return ceji;
}

function onSearchCeJi() {

	var cejiMethod = arguments[0];
	var cejiParam = arguments[1];

	var params = getUrlParam(cejiMethod, cejiParam);

	openwindow("/common/CardeviceSelectBrowse.do" + params);

	return false;
}
function onSearchClbh() {

	var clbhMethod = arguments[0];
	var clbhParam = arguments[1];

	var params = getUrlParam(clbhMethod, clbhParam);
	openwindow("/common/TmsClbhSelectBrowse.do" + params);
	return false;
}

function onSearchZClbh() {

	var clbhMethod = arguments[0];
	var clbhParam = arguments[1];

	var params = getUrlParam(clbhMethod, clbhParam);
	openwindow("/common/TmsZClbhSelectBrowse.do" + params);
	return false;
}

function onSearchPccl() {

	var clbhMethod = arguments[0];
	var clbhParam = arguments[1];

	var params = getUrlParam(clbhMethod, clbhParam);
	openwindow("/common/TmsPcclSelectBrowse.do" + params);
	return false;
}

/*
 * function TmsPopup(method,param){ this.method = method; this.param = param;
 * this.getMethod = function(){return this.method;}; this.setMethod =
 * function(method){this.method = method;}; this.getParam = function(){return
 * this.param;}; this.setParam = function(param){this.param = param;}; }
 * 
 * function createTmsPopup(method,param){ var popup = new
 * TmsPopup(method,param); return popup; }
 * 
 * function TmsKhbhPopup(method,param){ this.method = method; this.param =
 * param; this.getMethod = function(){return this.method;}; this.setMethod =
 * function(method){this.method = method;}; this.getParam = function(){return
 * this.param;}; this.onSearchKhbh = function(){ var params
 * =getUrlParam(this.method,this.param);
 * 
 * window.open("/tms/common/TmsKhbhSelectBrowse.do" + params, "resourceTree",
 * "height=400, width=700, top=80, left=300, toolbar=no, menubar=no,
 * scrollbars=auto, resizable=yes,location=no, status=no");
 *  } }
 * 
 * function createTmsKhbhPopup(method,param){ var popup = new
 * TmsKhbhPopup(method,param); return popup; }
 * 
 */

function getUrlParam(clbhMethod, clbhParam) {
	var params = "";
	if (clbhMethod != null) {
		params = "?methodname=" + clbhMethod;
	}

	if (clbhParam != null && clbhParam.length > 0) {
		if (params.length > 0) {
			params += "&" + clbhParam;
		} else {
			params += "?" + clbhParam;
		}
	}
	return params;
}

function onSearchKhbh() {
	var clbhMethod = arguments[0];
	var clbhParam = arguments[1];

	var params = getUrlParam(clbhMethod, clbhParam);

	openwindow("/common/TmsKhbhSelectBrowse.do" + params);
	return false;
}

function onSearchCsdm() {
	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);

	openwindow("/common/TmsCsdmSelectBrowse.do" + params);
	return false;
}

function onRegionTree() {
	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);

	openwindow("/common/Regiontree.do" + params );
	return false;
}

function onSearchTYD() {
	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);
	openwindow("/common/TmsTydSelectBrowse.do" + params);

	return false;
}
function onSearchTYDOnline() {
	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);
	openwindow("/common/TmsTydOnlineSelectBrowse.do" + params);

	return false;
}
function onSearchSiji() {
	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);
	openwindow("/common/TmsSjSelectBrowse.do" + params);
	return false;
}

function onSearchRenyuan() {
	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);

	openwindow("/common/TmsRenyuanSelectBrowse.do" + params);

	return false;
}

function onSearchSdm() {

	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);

	openwindow("/common/TmsSdmSelectBrowse.do" + params);
	return false;
}

function onSearchGlzx() {

	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);

	openwindow("/common/TmsGlzxSelectBrowse.do" + params);

	return false;
}


function onSearchPcd() {

	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);

	openwindow("/common/TmsPcdSelectBrowse.do" + params);
	return false;
}

function onSearchCkzl() {

	var method = arguments[0];
	var param = arguments[1];
	var params = getUrlParam(method, param);

	openwindow("/common/TmsCkzlSelectBrowse.do" + params);

	return false;
}

function openwindow(openurl, popupname, hh, ww, scrollbar, resizable, params) {
	if (openurl.indexOf("#webappuri#") >= 0) {
		openurl = openurl.replace("#webappuri#", webappurl);
	}

	if (openurl.indexOf(webappurl) < 0) {
		openurl = webappurl + openurl;
	}

	if (popupname == null || popupname == "") {
		popupname = "tmspopup";
	}

	if (params == null || params == "") {
		if (hh == null || hh == "") {
			hh = "500";
		}

		if (ww == null || ww == "") {
			ww = "800";
		}
		scrollbar = "yes";
		if (scrollbar == null || scrollbar == "") {
			scrollbar = "no";
		}
		resizable = "yes";
		if (resizable == null || resizable == "") {
			resizable = "no";
		}

		var param = "height=" + hh + ", width=" + ww
				+ ", top=80, left=300, toolbar=no, menubar=no, scrollbars="
				+ scrollbar + ", resizable=" + resizable
				+ ",location=no, status=no";
	} else {
		param = params;
	}
	//alert(openurl);
	window.open(openurl, "popup", param);

}

function onSendCmd(obj, clid) {
	var url = "/base/TmsJbzlKhClTxjlBrowse.do?tmsjbzlkhclid="
			+ clid;
	obj.href = "#";

	openwindow(url, "eztms send cmd", "800", "600");

	return false;
}

function closeWindow() {
	window.close();
}

function clearForm(formName) {
	var formObj = null;
	if (formName != null && formName != "") {
		formObj = document.forms[formName];
	} else {
		formObj = document.forms[0]
	}
	var formEl = formObj.elements;
	for ( var i = 0; i < formEl.length; i++) {
		var element = formEl[i];
		if (element.type == 'submit') {
			continue;
		}
		if (element.type == 'reset') {
			continue;
		}
		if (element.type == 'button') {
			continue;
		}
		if (element.type == 'hidden') {
			element.value = '';
		}

		if (element.type == 'text') {
			element.value = '';
		}
		if (element.type == 'textarea') {
			element.value = '';
		}
		if (element.type == 'checkbox') {
			element.checked = false;
		}
		if (element.type == 'radio') {
			element.checked = false;
		}
		if (element.type == 'select-multiple') {
			element.selectedIndex = -1;
		}
		if (element.type == 'select-one') {
			element.selectedIndex = -1;
		}
	}
	formObj.submit();
}

function onAllTrack1() {
	var url = "/jsp/eztms/ezmap/CarRealTimeTrace.jsp";
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}

function onNewAllTrack() {
	var url = "/jsp/dhtml/RealTimeTrace.jsp";
	var w = screen.availWidth-10;
	var h=screen.availHeight-60;
		var param = "top=0, left=0,fullscreen=0, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no"+",width="+w+",height="+h;
	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}
function onAllTrack2(obj) {
	var url = "/ezmap_monitor/Province.do";
	obj.href = url;
	openwindow(url, "eztms track", "768", "1024", "yes", "yes");
	return true;
}
function onAllTrack3(obj) {
	var url = "/ezmap_monitor/City.do";
	obj.href = url;
	openwindow(url, "eztms track", "768", "1024", "yes", "yes");
	return true;
}
function onAllTrack4(obj) {
	var url = "/ezmap_monitor/Xunhuan.do";
	// return true;
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";
	window.open(url, "popup", param);
}
function onAllTrack5(obj) {
	var url = "/ezmap/RegionTree.do";
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";
	window.open(url, "popup", param);
}
function onTrackReview() {

	var url = "/ezmap/TraceReview.do";

	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}
function onPersonRealTimeTrace() {

	var url = "/jsp/eztms/ezlocation/RealTimeTrace.jsp";

	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}
function onPersonTraceReView() {

	var url = "/ezlocation/TraceReview.do";

	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}

function popupTrackBySerials(serials) {

	var url = "/ezmap/CarRealTimeTraceRight.do?serials=" + serials;

	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}

function popupTrackByCarids(carids) {

	var url = "/ezmap/CarRealTimeTraceRight.do?carids=" + carids;

	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}

function onMymarker() {
  var url = "/jsp/eztms/ezmap/Mymarker.jsp";
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	
 openwindow(url, "popup", "", "", "", "", param);
}

function onTraceLine() {
  var url = "/jsp/eztms/ezmap/TraceLine.jsp";
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	
 openwindow(url, "popup", "", "", "", "", param);
}


function StationlinepoiBylineid(lineid) {

	var url = "/jsp/eztms/ezmap/StationLinePoi.jsp?lineid="+lineid;
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";

	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}

//世盟物流功能函数
function onSearchDispatch() {
	openwindow("/ezmap/FenceAlarmOfDispatch.do");
	return false;
}

//035,036新轨迹回放====
//033,034实时跟踪

function parkDetailTrackBySerials(carid,latitude,longitude) {
	var url = "/jsp/eztms/ezmap/CarRealTimeTraceMapTabOfMapOfUser.jsp?carid=" + carid+"&latitude="+latitude+"&longitude="+longitude;
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";
	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}

function overSpeedBySerial(serial,begintime,endtime) {
	var url = "/ezmap/TraceReviewInterface.do?serial=" + serial+"&timeBefore="+begintime+"&timeAfter="+endtime;
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";
	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}

function overSpeedBySerialNew(serial,sendtime,begintime,endtime) {
	var url = "/ezmap/TraceReviewInterface.do?serial=" + serial+"&timeBefore="+sendtime+" "+begintime+"&timeAfter="+sendtime+" "+endtime;
	var param = "height=708, width=1016, top=1, left=1, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no";
	// window.open(url, "popup", param);
	openwindow(url, "popup", "", "", "", "", param);
}




