/* set up browser checks */

// check browsers
var ua		= navigator.userAgent;
var opera	= /opera [56789]|opera\/[56789]/i.test(ua);
var ie		= !opera && /msie [56789]/i.test(ua);		// preventing opera to be identified as ie
var moz		= !opera && /mozilla\/[56789]/i.test(ua);	// preventing opera to be identified as mz
/* end browser checks */
/* Do includes */

if (window.pathToRoot == null)
	pathToRoot = "/";

if (ie)
document.write('<script type="text/javascript" src="js/cssexpr/cssexpr.js"><\/script>');
document.write('<link type="text/css" rel="StyleSheet" href="js/webfxlayout.css">');
document.write('<link type="text/css" rel="StyleSheet" href="js/xmenu/xmenu.css"><\/script>');
document.write('<script type="text/javascript" src="js/xmenu/xmenu.js"><\/script>');
document.write('<script type="text/javascript" src="inet_en.txt"><\/script>');

// later
//webfxMenuImagePath = pathToRoot + "images/";


/* end includes */



webfxLayout = {
/*	writeTitle		:	function (s, s2) {
		document.write("<div id='webfx-title-background'></div>");
		if (opera) {
			document.write("<h1 id='webfx-title' style='top:9px;'>" + s + "</h1>");
		}
		else {
			document.write("<h1 id='webfx-title'>" + s + "</h1>");
		}

		if (s2 == null)
			s2 = "WebFX - What you never thought possible!";
		
		if (opera) {
			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("WebFX", "What you never thought possible!");	
	}, */
	writeTopMenuBar		:	function () {
		document.write("<div id='webfx-menu-bar-1'></div>");
		if (opera) {
			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 (opera)
			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 () {
		if (ie || moz || opera) {
			if (ie)
				simplifyCSSExpression();
			webfxMenuImagePath ="js/xmenu/";
			this.writeTopMenuBar();
			document.write(webfxMenuBar);
			this.writeBottomMenuBar();
		}
		else {
			document.write(
				"<div id='webfx-menu-bar'>&nbsp;" +
				"<a href='/'>Home</a> " +
			//	"<a href='" + pathToRoot + "?action=sitemap'>Site Map</a> " +
			//	"<a href='/webboard'>WebFX Webboard</a> " +
				"</div>" +
				
				"<p class='warning' style='width: 500px'>" +
				"This site will look much better in a browser that supports " +
				"<a href='http://www.webstandards.org/upgrade/' " +
				"title='Download a browser that complies with Web standards.'>" +
				"web standards</a>, " +
				"but it is accessible to any browser or Internet device." +				
				"</p>"
			);
		}
	}/*,
	writeMade	:	function () {
		//if (ie && document.body.currentStyle && document.body.currentStyle.writingMode != null)
			// IE55+
			document.write("<div id='made-about'>Site made by " +
					"<a href='http://www.programming-pool.com' target='_blank'>Programming-Pool Romania</a>" +
					".</div>");
	} */
};


if (ie && window.attachEvent) {
	window.attachEvent("onload", function () {
		var scrollBorderColor	=	"rgb(153,102,51)"; /*#996633       "rgb(120,172,255)";*/
		var scrollFaceColor		=	"rgb(255,255,255)"; /*#FFFFFF      "rgb(234,242,255)";*/
		with (document.body.style) {
			scrollbarDarkShadowColor	=	scrollBorderColor;
			scrollbar3dLightColor		=	scrollBorderColor;
			scrollbarArrowColor			=	"rgb(153,102,51)";    /*"black";*/
			scrollbarBaseColor			=	scrollFaceColor;
			scrollbarFaceColor			=	scrollFaceColor;
			scrollbarHighlightColor		=	scrollFaceColor;
			scrollbarShadowColor		=	scrollFaceColor;
			scrollbarTrackColor			=	"white";
		}
	});
}