
// Whenever possible, use the SAME timestampString as the TOP in order to use the already browser CACHED contents
	var timestampString = (top == window) ? new Date().getTime() + '' : top.timestampString

	function writeLoadJs (theName) {
		document.write('<script type="text/javascript" src="'+theName+'.js?'+timestampString+'"><\/script>')
	}

	function writeLoadJsSupport (theName) {
		writeLoadJs('support/'+theName)
	}

	function writeLoadCss (theName, theId) {
		document.write('<link id="'+theId+'" name="'+theId+'" rel="stylesheet" href="'+theName+'.css?'+timestampString+'" type="text/css">')
	}

	function urlAddTimestamp (theParam) {
		var url = theParam
		if (url.indexOf('?') < 0) { url += '?' }
		else { url += '&' }
		url += 'timestamp=' + timestampString
		return url
	}

	function getServerBooleanField (theField) {
		var base = top.BbServer
		return base && (base[theField])
	}

	function isDataXLoaded () { return getServerBooleanField('dataXLoaded') }
	function isWebsitePostLoaded () { return getServerBooleanField('websitePostLoaded') }

	function basicValidateLoaded (theFunction) {
		var result = window[theFunction]()
		if (!result) { top.replaceAppForward(theFunction) }
		return result
	}

	function validateDataXLoaded () { return basicValidateLoaded('isDataXLoaded') }
	function validateWebsitePostLoaded () { return basicValidateLoaded('isWebsitePostLoaded') }

	writeLoadJs('Support')
	writeLoadJs('ProductSearch')
	writeLoadJs('Environment')
	writeLoadJs('Environment_extra')

	writeLoadJsSupport('AjaxRequest')
	writeLoadJsSupport('bbAjax')

	writeLoadCss('style','style1')
