﻿//=================================

//=================================

//菜单
var menuOffX=0	//菜单距连接文字最左端距离
var menuOffY=42	//菜单距连接文字顶端距离

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
function ShowMenu(e,vmenu,mod){
	which=vmenu
	menuobj=document.getElementById("popmenu")
	menuobj.thestyle=menuobj.style
	menuobj.innerHTML=which
	menuobj.contentwidth=menuobj.offsetWidth
	eventX=e.clientX
	eventY=e.clientY
	var rightedge=document.body.clientWidth-eventX
	var bottomedge=document.body.clientHeight-eventY

		if (rightedge<menuobj.contentwidth)
			menuobj.thestyle.left=document.body.scrollLeft+eventX-menuobj.contentwidth+menuOffX
		else
			menuobj.thestyle.left=ie4? ie_x(event.srcElement)+menuOffX : ns6? window.pageXOffset+eventX : eventX
		
		if (bottomedge<menuobj.contentheight&&mod!=0)
			menuobj.thestyle.top=document.body.scrollTop+eventY-menuobj.contentheight-event.offsetY+menuOffY-23
		else
			menuobj.thestyle.top=ie4? ie_y(event.srcElement)+menuOffY : ns6? window.pageYOffset+eventY+10 : eventY

	menuobj.thestyle.visibility="visible"
}


function ie_y(e){  
	var t=e.offsetTop;  
	while(e=e.offsetParent){  
		t+=e.offsetTop;  
	}  
	return t;  
}  
function ie_x(e){  
	var l=e.offsetLeft;  
	while(e=e.offsetParent){  
		l+=e.offsetLeft;  
	}  
	return l;  
}

function highlightmenu(e,state){
	if (document.all)
		source_el=event.srcElement
		while(source_el.id!="popmenu"){
			source_el=document.getElementById? source_el.parentNode : source_el.parentElement
			if (source_el.className=="menuitems"){
				source_el.id=(state=="on")? "mouseoverstyle" : ""
		}
	}
}
function hidemenu(){if (window.menuobj)menuobj.thestyle.visibility="hidden"}
function dynamichide(e){if ((ie4||ns6)&&!menuobj.contains(e.toElement))hidemenu()}
document.onclick=hidemenu
document.write("<div style='position:absolute; z-index:100' class=menuskin id=popmenu onmouseover=highlightmenu(event,'on') onmouseout=highlightmenu(event,'off');dynamichide(event)></div>");
//菜单END
//cn

var news='<div class=menuitems><a href=\"NewsList.asp?SortID=28&SortPath=0,28,\">Company News</a></div><div class=menuitems><a href=\"NewsList.asp?SortID=30&SortPath=0,30,\">Trade News</a></div>'

var product='<div class=menuitems00><a href=\"productList.asp?SortID=133&SortPath=0,133,\">MDVR</a></div><div class=menuitems><a href=\"productList.asp?SortID=136&SortPath=0,133,136,\">1 Series</a></div><div class=menuitems><a href=\"productList.asp?SortID=137&SortPath=0,133,137,\">3 Series</a></div><div class=menuitems><a href=\"productList.asp?SortID=138&SortPath=0,133,138,\">11 Series</a></div><div class=menuitems><a href=\"productList.asp?SortID=178&SortPath=0,133,178,\">5 Series</a></div><div class=menuitems><a href=\"productList.asp?SortID=139&SortPath=0,133,139,\">A Series</a></div><div class=menuitems00><a href=\"productList.asp?SortID=156&SortPath=0,156,\">Standalone DVR</a></div><div class=menuitems><a href=\"productList.asp?SortID=157&SortPath=0,156,157,\">88 series</a></div><div class=menuitems><a href=\"productList.asp?SortID=158&SortPath=0,156,158,\">85 series</a></div><div class=menuitems><a href=\"productList.asp?SortID=161&SortPath=0,156,161,\">83 series</a></div><div class=menuitems><a href=\"productList.asp?SortID=172&SortPath=0,156,172,\">81 series</a></div><div class=menuitems><a href=\"productList.asp?SortID=175&SortPath=0,156,175,\">70 series</a></div><div class=menuitems><a href=\"ProductView.asp?ID=199&SortID=176\">DVR ONLINE DEMO</a></div><div class=menuitems00><a href=\"productList.asp?SortID=162&SortPath=0,162,\">System Platform Management Software</a></div><div class=menuitems><a href=\"productList.asp?SortID=163&SortPath=0,162,163,\">CMS (Center Management Software)</a></div><div class=menuitems><a href=\"productList.asp?SortID=164&SortPath=0,162,164,\">Multi-client Software</a></div><div class=menuitems><a href=\"productList.asp?SortID=171&SortPath=0,162,171,\">Playback Analysis Software</a></div><div class=menuitems00><a href=\"productList.asp?SortID=165&SortPath=0,165,\">Accessories Product</a></div>'

var fangan='<div class=menuitems><a href=\"fanganList.asp?SortID=36&SortPath=0,36,\">Public bus</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=38&SortPath=0,38,\">3G transmission and ITS system</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=39&SortPath=0,39,\">Total Solution for Bus Monitoring System</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=40&SortPath=0,40,\">Police Car Monitoring System</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=42&SortPath=0,42,\">School Bus Monitoring System</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=47&SortPath=0,47,\">Logistics Vehicle Monitoring System</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=48&SortPath=0,48,\">Oil Tank Truck Monitoring System</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=49&SortPath=0,49,\">Supermarket Security Monitoring System</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=50&SortPath=0,50,\">Chain Hotels Monitoring System</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=51&SortPath=0,51,\">Large Internet Cafe Monitoring System</a></div><div class=menuitems><a href=\"fanganList.asp?SortID=52&SortPath=0,52,\">Power Communication Monitoring System</a></div>'

var service='<div class=menuitems><a href=\"downlist.asp\">Download</a></div><div class=menuitems><a href=\"WenTiList.asp\">FAQ</a></div><div class=menuitems><a href=\"zhence.asp\">Service Policy</a></div><div class=menuitems><a href=\"wangdian.asp\">Service Networks</a></div><div class=menuitems><a href=\"messagewrite.asp\">Message</a></div>'


var about='<div class=menuitems><a href=\"About.asp?ID=43\">Company</a></div><div class=menuitems><a href=\"about.asp?ID=44\"> R & D</a></div><div class=menuitems><a href=\"about.asp?ID=49\">Manufacturer</a></div><div class=menuitems><a href=\"about.asp?ID=48\">Factory Snapshot</a></div><div class=menuitems><a href=\"about.asp?ID=31\">Patent & Certificate</a></div><div class=menuitems><a href=\"about.asp?ID=45\">Contact Us</a></div>'


