/* this is a dummy webfxlayout file to be used in download zip files */


/* Do includes */


// 从页面标签中取得Script文件目录baseDir BEG
var _baseDir="";
var _wwwBaseDir="";
var scripts = document.getElementsByTagName("SCRIPT");
for(var i=0;i<scripts.length;i++){
  var script=scripts[i];
  var src = script.src;
  if(src) {
    var index = src.indexOf("/gis9layout.js");
    if (index >= 0) {
      _baseDir = src.substring(0, index);
      _wwwBaseDir=_baseDir.substring(0, _baseDir.indexOf("/"));
      //alert(_baseDir+" < "+_wwwBaseDir);
      break;
    }
  }
}
//alert(_baseDir);
//// 从页面标签中取得Script文件目录baseDir END

if (window.pathToRoot == null)
	pathToRoot = "./";

document.write('<link type="text/css" rel="stylesheet" href="'+_baseDir+'/gis9layout.css">');
document.write('<script src="http://static.getclicky.com/6445.js" type="text/javascript"></script>');
//document.write('<noscript><p><img alt="Clicky" src="http://static.getclicky.com/6445ns.gif" /></p></noscript>');

webfxMenuDefaultImagePath = pathToRoot + "images/";

/* end includes */

/* set up browser checks and add a simple emulation for IE4 */

// check browsers
var op = /opera 5|opera\/5/i.test(navigator.userAgent);
var ie = !op && /msie/i.test(navigator.userAgent);	// preventing opera to be identified as ie
var mz = !op && /mozilla\/5/i.test(navigator.userAgent);	// preventing opera to be identified as mz

if (ie && document.getElementById == null) {	// ie4
	document.getElementById = function(sId) {
		return document.all[sId];
	};
}

/* end browser checks */

webfxLayout = {
	writeTitle		:	function (s, s2) {
		document.write("<div id='webfx-title-background'></div>");
		var wtb=document.getElementById('webfx-title-background');		
		if(wtb){			
			var i=new String(Math.random()).substr(6,1); 
			if(i>7) i=7;
			//var i=Math.floor(Math.random()*8);									
			wtb.style.background="url('"+_baseDir+"/title-background"+i+".jpg') no-repeat ";
			//alert(wtb.style.background);
		}

		if (op) {			
			document.write("<h1 id='webfx-title' style='top:9px;'>" + s + "</h1>");
		}
		else {
			document.write("<h1 id='webfx-title'>" + s + "</h1>");
		}

		if (s2 == null)
			s2 = "开发探索! - 源自 专注 专业 用心";//"oyzk - gis developer!";

		if (op) {
			document.write("<span id='webfx-sub-title' style='top:46px;'>" + s2 + "</span>");
		}
		else {
			document.write("<span id='webfx-sub-title'>" + s2 + "</span>");
		}
	},
	writeMainTitle	:	function () {
		this.writeTitle("GIS9.com", "开发探索! - 源自 专注 专业 用心");
	},
	writeTopMenuBar		:	function () {
		document.write("<div id='webfx-menu-bar-1'></div>");
		if (op) {
			document.write("<style>.webfx-menu-bar a {padding-top:3px;}</style>");
			document.write("<div id='webfx-menu-bar-2' style='height:2px;'></div>");
		}
		else
			document.write("<div id='webfx-menu-bar-2'></div>");
		document.write("<div id='webfx-menu-bar'>");// div is closed in writeBottomMenuBar
	},
	writeBottomMenuBar	:	function () {
		document.write("</div>");
		if (op)
			document.write("<div id='webfx-menu-bar-3' style='height:0px;'></div>");
		else
			document.write("<div id='webfx-menu-bar-3'></div>");
		document.write("<div id='webfx-menu-bar-4'></div>");
		document.write("<div id='webfx-menu-bar-5'></div>");
	},
	writeMenu			:	function () {
		this.writeTopMenuBar();
		/* 不显示菜单
		//document.write(webfxMenuBar);
		document.write("<div class='webfx-menu-bar'><a href='http://webfx.eae.net'>WebFX Home</a></div>");
		*/
		document.write("<div class='webfx-menu-bar'>~</div>");
		this.writeBottomMenuBar();
	},
	writeDesignedByEdger	:	function () {
		if (ie && document.body.currentStyle.writingMode != null)
			document.write("<div id='webfx-about'>Page designed and maintained by " +
					"<a href='mailto:gis9@163.com'>OUYOND</a> & " +
					"<a href='mailto:gis9@163.com'>JU</a>.</div>");
	}
};

if (ie && window.attachEvent) {
	window.attachEvent("onload", function () {
		var scrollBorderColor	=	"rgb(120,172,255)";
		var scrollFaceColor		=	"rgb(234,242,255)";
		with (document.body.style) {
			scrollbarDarkShadowColor	=	scrollBorderColor;
			scrollbar3dLightColor		=	scrollBorderColor;
			scrollbarArrowColor			=	"black";
			scrollbarBaseColor			=	scrollFaceColor;
			scrollbarFaceColor			=	scrollFaceColor;
			scrollbarHighlightColor		=	scrollFaceColor;
			scrollbarShadowColor		=	scrollFaceColor;
			scrollbarTrackColor			=	"white";
		}
	});
}

/* we also need some dummy constructors */
webfxMenuBar = {
	add : function () {}
};
function WebFXMenu() {
	this.add = function () {};
}
function WebFXMenuItem() {}
function WebFXMenuSeparator() {}
function WebFXMenuButton() {}
