var engineurl ='http://lspengine.go2map.com/WebSite/Engine';//"http://10.1.99.55:8080/detail/Engine";// 'http://10.1.99.17/WebSite/Engine';//"http://10.1.99.55:8080/detail/Engine";// 
var headJsSrc = 'inc/CHeader2.js';//'http://10.1.99.18/2006/CHeader.js';//

var liburl='http://key.go2map.com/lib/js/k.js';//"http://10.1.99.18/client/rt";//
var modules='mapspec=3.0,component=3.0,entiremap=3.0,panbone=3.03,zoomin=2.0,zoomout=2.0,highlight=2.0,ruler=3.0';
var imageRoot='http://pic1.go2map.com/seamless/';
var libpath='./lib/style/';
var logUrl='http://log2.lsp.go2map.com/map_sogou_com.gif';
var appid='1817';
var ad_url='http://mappage.go2map.com/sogou/detail2.html?2';
var ff=false;
if(navigator.userAgent.indexOf("Firefox")>0)ff=true;
var _el=document.getElementById;

function _splitResult(a,b,c)
{
	var d=_splitBy(a,b);
	var e=_getItemArrayFromRet(d,c);
	return e;
}
function _splitBy( a, b )
{
	return a.split(b);
}
function _getItemArrayFromRet( a, b ) 
{
	var c;
	var d=[];
	if(a.length<=0) return '';
	for(var i=0;i<a.length;++i ) 
	{
	
		c=a[i].split( b );
		d[c[0]]=c[1];
	}
	return d;
}

var _wls=window.location.search;

_wls=_wls.replace(/[?]/g,'');
_wls=_splitResult(_wls,"&","=");
function setCookie2(name,value)
{
    var Days = 30;
    var exp  = new Date();
        exp.setTime(exp.getTime() + Days*24*60*60*1000);
        document.cookie = name + '=' + escape (value) + ';expires=' + exp.toGMTString() + ';path=' + '/';
}
function getCookie(name)
{
    var arr,reg=new RegExp('(^| )'+name+'=([^;]*)(;|$)');
        if(arr=document.cookie.match(reg)) return unescape(arr[2]);
        else return null;
}
function Gomaps()
{
setCookie2("rx","0");
window.location.href='maps.htm';
}


if( document.implementation.hasFeature("XPath", "3.0") )
{
// prototying the XMLDocument
XMLDocument.prototype.selectNodes = function(cXPathString, xNode)
{
if( !xNode ) { xNode = this; } 
var oNSResolver = this.createNSResolver(this.documentElement)
var aItems = this.evaluate(cXPathString, xNode, oNSResolver, 
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
var aResult = [];
for( var i = 0; i < aItems.snapshotLength; i++)
{
aResult[i] = aItems.snapshotItem(i);
}
return aResult;
}

// prototying the Element
Element.prototype.selectNodes = function(cXPathString)
{
if(this.ownerDocument.selectNodes)
{
   return this.ownerDocument.selectNodes(cXPathString, this);
}
else{throw "For XML Elements Only";}
}
}

// check for XPath implementation
if( document.implementation.hasFeature("XPath", "3.0") )
{
// prototying the XMLDocument
XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)
{
if( !xNode ) { xNode = this; } 
var xItems = this.selectNodes(cXPathString, xNode);
if( xItems.length > 0 )
{
return xItems[0];
}
else
{
return null;
}
}

// prototying the Element
Element.prototype.selectSingleNode = function(cXPathString)
{ 
if(this.ownerDocument.selectSingleNode)
{
return this.ownerDocument.selectSingleNode(cXPathString, this);
}
else{throw "For XML Elements Only";}
}
}
