////////////////////////////////////////////////////////////////////////////////////
//  Megapublic JavaScript library 1.2
//  Copyright 1999-2002 Megapublic Inc. Basel, Switzerland. All rights reserved.
//
//	Downloading and utilization of this library is strictly forbidden without prior
//  written agreement by Megapublic Incorporated.
//	All online activities are logged.
//
//  Author: Philippe Wiede (subscribed2@megapublic.com).  Last modified 2005-12-04.
////////////////////////////////// Globals ///////////////////////////////////////
	
	var agt 	= navigator.userAgent.toLowerCase();
	var bNS 	= ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible')==-1)));
	var bLinux 	= ((agt.indexOf('konqueror')!=-1));
	var bLinuxNS = ((agt.indexOf('linux')!=-1));
	var bFFox 	= ((agt.indexOf('firefox')!=-1));
	var bMIE 	= ((agt.indexOf('msie')!=-1));
	var bMac 	= ((agt.indexOf('mac')!=-1));
	var bMac9 	= ( ((agt.indexOf(' ppc;')!=-1)) || ((agt.indexOf('mac_powerpc')!=-1)) );
	var bSafari = ((agt.indexOf('safari')!=-1));
	var bGecko 	= ((agt.indexOf('gecko')!=-1));
	var bMacMIE5 = ( (agt.indexOf('msie 5.')!=-1) || (agt.indexOf(' msie 6.')!=-1) );
	var bOpera 	= ((agt.indexOf('opera')!=-1)); // true even when camouflaged
	var bW3C	= document.getElementById && !document.all;
	var bICab	= "";
	var bKonqr	= "";
	var bNS4	= "";
	if (!bMIE) { if (window.ScriptEngine && window.ScriptEngine.indexOf('InScript')!=-1) { bICab = 1; } }
	if (navigator.vendor && navigator.vendor == 'KDE') bKonqr = 1; // true even when camouflaged
	
	if ((bMIE) || (bOpera)) bNS = '';
	var bVersion = parseInt(navigator.appVersion);
	if ( bNS && (bGecko||bFFox||bSafari) ) bVersion = 6;
	if ( bNS && bVersion < 5 ) bNS4 = 1;
	if (bMIE) {
		if (agt.indexOf('msie 2.')>=0) { bVersion = 2; }
		else if (agt.indexOf('msie 3.')>=0) { bVersion = 3; }
		else { bVersion += 1; }
	}
	var DateObj = new Date();
	var bStartTime = DateObj;
	bStartTime = bStartTime.getTime();
	var bWin   = ( (agt.indexOf('win')!=-1) || (agt.indexOf('16bit')!=-1) );
	var bWin16 = ( (agt.indexOf('win16')!=-1) || (agt.indexOf('16bit')!=-1) || (agt.indexOf('windows 3.1')!=-1) || (agt.indexOf('windows 16-bit')!=-1) );
	var bWin32 = bWin && ( 
		!bWin16 || (agt.indexOf('2000')!=-1) || (agt.indexOf('xp')!=-1) || (agt.indexOf(' nt')!=-1) || 
		(agt.indexOf('98')!=-1) || (agt.indexOf(' ce')!=-1) || (agt.indexOf(' me')!=-1) || (agt.indexOf('95')!=-1) ||
		(agt.indexOf('win 9x')!=-1) || (agt.indexOf('win32')!=-1) || (agt.indexOf('32bit')!=-1)
	); 
	var bNav_size,bScr_size,bColord,bMIEpdf,bFlashVs = 0;
	var bFlashMime = eval( navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash'] && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin );
	var bFlashVoid = 1;
	var bFlashMaxVs = 9;
	function OmitError() { return true; }
	document.onerror = window.onerror = OmitError;
	
	// Fix stubborn Netscape 4 resize bug 
	function resizeFix(){  
	if (document.resizeFix.initWidth!=window.innerWidth ||document.resizeFix.initHeight!=window.innerHeight) {
		document.location=document.location; }
	}  
	function checkBrowser(){  
 		if (document.layers) {  
    		if (typeof document.resizeFix=="undefined") {  
     			document.resizeFix = new Object();  
    			document.resizeFix.initWidth  = window.innerWidth;  
     			document.resizeFix.initHeight = window.innerHeight;  
      		}  
			window.onresize=resizeFix; 
		}  
	}  
	if (bNS) checkBrowser();

//////////////////////// Preload swap images & status bar messages /////////////////
	var S = new Array (
                "/images/nav_agency_on",
                "/images/nav_consultants_on",
                "/images/nav_services_on",
                "/images/nav_experience_on",
                "/images/nav_advantages_on",
                "/images/nav_booking_on",
				"/images/nav_german_on",
                "/images/nav_agency",
                "/images/nav_consultants",
                "/images/nav_services",
                "/images/nav_experience",
                "/images/nav_advantages",
                "/images/nav_booking",
                "/images/nav_german"
	);
	if (document.images) { LoadImg(); }
	
	var T = new Array();                
	T[0] = "Information about megapublic inc.";
	T[1] = "Information about the senior brand consultant Philippe Wiede";
	T[2] = "Information about the branding capabilities";
	T[3] = "Information about the branding experience";
	T[4] = "Information about megapublic's strategic approach";
	T[5] = "Information about the booking procedure";
	T[6] = "Information about the German Web presence of megapublic";
	
	// Load Images
	function LoadImg() {
		I = new Array ();
		var suffix;
		for (i in S) {
			suffix = '.gif';
			I[i] = new Image();
			if (S[i].indexOf('-jpg-')>=0) { suffix = '.jpg'; }
			I[i].src = S[i] + suffix;
 		}
	}
	// Rollover & Status On
	function FXon(iname,idx,mesg) {
		window.status = T[idx];
		if (document.images) {
			iname.src = I[idx].src;
		}
	}
	// Rollover & Status Off
	function FXoff(iname,idx) {
		window.status='';
		if (document.images) {
			iname.src = I[idx].src;
  		} 
	}
	

//////////////////////////////// Content Protection /////////////////////////////

	var thisserver 		= "www.megapublic.co.uk";
	var thisserver2 	= "www.megapublic.co.euk";
	var redircturl 		= "/ext/";
	var txt_size_max	= 40; // max num bytes of text allowed to copy
	var ignore_match 	= 0;
	var omiturls 		= ["search-engine", "/communications/", "/admin/", "/cgi-bin/", "/network/", "/ext/"];
	for (i = 0; i < omiturls.length; i++) {
		if (parent.location.href.indexOf( omiturls[i] ) != -1) { ignore_match = 1; break; }
	}
	if (parent.location.href.indexOf(thisservername2) != -1) ignore_match = 1; // allow all for local user 
	var omittags 		= ["a", "img", "input", "textarea", "select", "option", "radio", "button", "form", "scrollbar"];
	//var tags_ok_rgx = /(?:a|img|input|textarea|select|option|radio|button|form|scrollbar)/i; // IE Mac 5 incompatible
	var incompat_b 		= (bNS || bSafari || bMac9 || bLinux || bLinuxNS || bFFox);
	var scmessage 		= "Function disabled. This page (C) 2005. Entire content protected and copyrighted by " + thisserver + ". Copyright notice: you must not copy, reproduce or redistribute any original content of this document. Any use of our intellectual property is strictly prohibited and will be prosecuted without further warning.";

	// Disable Frame Nesting
	if (top.location != self.location) {
		top.location = self.location;
	}
	// Redirect remote search engine cache lookups to the server
	var thisservername = 'http://' + thisserver + '/';
	var thisservername2 = 'http://' + thisserver2 + '/';
	//if ( (top.location.indexOf(thisservername)!=-1) ) { top.location = thisservername; }
	if (parent.location.href.indexOf(thisservername) != 0 && parent.location.href.indexOf(thisservername2) != 0) {
		top.location = thisservername;
	} else if (location.href.indexOf("q=cache") != -1 || location.href.indexOf("/cache") != -1) {
		top.location = thisservername;
	}

	// Disable context menu - all browsers except IE Mac, Opera, NS4
	function noContextMenu(evt) { 
		if ( ignore_match ) {
			return true;
		}
		if (window.Event) { 
			evt.cancelBubble = true; 
			evt.returnValue  = false; 
		} else { 
			event.cancelBubble = true; 
			event.returnValue  = false; 
		}
		var img_last_idx = document.images.length - 1;
		document.images[img_last_idx].src = "/stats/alert.gif?name=alert_contextmenu";
		return false; 
	}
	document.oncontextmenu = noContextMenu;

	// Disable text select for Safari
	function no_select_ie(e) {
		// Safari: triggers block on click in text 
		//ignore_match = 0; // TEMP!
		var evtobj = window.event ? event : e;
		var target = bMIE ? evtobj.srcElement : e.target;
		var targ_n = target.tagName.toLowerCase();
		var tag_match = 0;
		for (i = 0; i < omittags.length; i++) {
			if (omittags[i] == targ_n) tag_match = 1;
		}
		//alert("alert_Select: Blocked" +' # ' +tag_match+ ' # ' +ignore_match+ ' # ' +targ_n );
		if ( (tag_match || (!bMIE && targ_n == "table") || (bMIE && targ_n == "img")) || document.forms[0].elements[4] || ignore_match ) {
			// allow text selection on links, etc. or on pages with contact forms (besides the search field on each page)
			return true; // || targ_n.match(tags_ok_rgx)
		}
		var img = new Image(); 
		img.src = "/stats/alert.gif?name=alert_select_"+targ_n;
		if (document.all) { // IE
    		document.body.insertAdjacentHTML('beforeEnd','<IMG SRC="' + img.src + '">');
  		} else if (document.createElement) { // NS6
    		var imgEl = document.createElement('IMG');
    		imgEl.src = img.src;
    		document.body.appendChild(imgEl);
    	} else {
    		var img_last_idx = document.images.length - 1;
			document.images[img_last_idx].src = img.src;
		}
		document.location.replace( redircturl );
		evtobj.returnValue = false;
		return false;
	}
	if (bSafari) { document.onselectstart = document.ondragstart = no_select_ie; }
	
	// Disable text select for IE Win/Mac, NS, Gecko, Firefox, Safari, Opera
	function no_select_ns(e) { 
		//ignore_match = 0; // TEMP!
		if (!e) e = window.event; // NS4
		var txt_copied = "";
		if (window.getSelection) { // NS6, Safari
			txt_copied = window.getSelection().toString();
		} else if (document.getSelection) { // IE 5 Mac, NS6, Firefox, Opera, NS4, ICab
			txt_copied = document.getSelection().toString();
		} else if (document.selection) { // IE 5/6 Win
			txt_copied = document.selection.createRange().text;
		}
		var target = bMIE ? e.srcElement : e.target;
		var targ_n = target.tagName.toLowerCase();
		//var msCode = (!bMIE && e.which) ? e.which : e.button;
		//var mouseClick = msBut[msCode] ? msBut[msCode] : msBut['bMIE_'+msCode] ? msBut['bMIE_'+msCode] : msBut['bGecko_'+msCode] ? msBut['bGecko_'+msCode] : msBut['bNS_'+msCode] ? msBut['bNS_'+msCode] : msBut['bOpera_'+msCode] ? msBut['bOpera_'+msCode] : '';
		//if (bMac && bNS && mouseClick && mouseClick != 'left_click')
		if ( !txt_copied || ignore_match || document.forms[0].elements[4] ) { 
			return true; // targ_n.match(tags_ok_rgx)
		}
		var txt_part = txt_copied.substr(0,35);
		if (!txt_part) txt_part = txt_copied.substring(0,35);
		var reg1 = new RegExp(" ","g");
		txt_part = txt_part.replace(reg1,"_");
		//	alert( 'NS blocked: '+' # '+ targ_n +' # '+ txt_part );
		if (!bOpera && !bMIE) window.getSelection().removeAllRanges();
		if (!bMac && !bOpera && bMIE) { document.selection.empty(); }
		var txt_size = txt_copied.length;
		var img = new Image(); 
		img.src = "/stats/alert.gif?name=alert_copied_"+txt_size+"_"+txt_part;
		if (document.all) { // IE
    		document.body.insertAdjacentHTML('beforeEnd','<IMG SRC="' + img.src + '">');
  		} else if (document.createElement) { // NS6
    		var imgEl = document.createElement('IMG');
    		imgEl.src = img.src;
    		document.body.appendChild(imgEl);
    	} else {
    		var img_last_idx = document.images.length - 1;
			document.images[img_last_idx].src = img.src;
		}
		if ( txt_size_max && txt_size <= txt_size_max ) {
			return true; // ok - leave as is
		}
		if (bFFox) document.location.replace( redircturl );
		else if (document.images) { location.replace( redircturl ); } 
		else { location.href = redircturl; }
		return false; 
	}
	if (bNS4) document.captureEvents(Event.MOUSEUP); // NS4
	document.onmouseup = no_select_ns;
	
	// Disable key commands + right click - all browsers - TODO: Mozilla ignores command + a|s|i|u
	var badKeys = new Object();
	badKeys.alt = new Object();
	badKeys.alt['114'] = 'alt_f3'; // Opera: View Source - not working

	badKeys.shift = new Object();
	badKeys.shift['121'] = 'shift_f10'; // Display context menu for a link

	badKeys.ctrl = new Object();
	badKeys.ctrl['8'] = 'ctrl_space'; // Moz Display Context Menu
	badKeys.ctrl['65'] = 'ctrl_a';
	badKeys.ctrl['67'] = 'ctrl_c';
	badKeys.ctrl['69'] = 'ctrl_e'; // NS6: launch Composer, IE Mac: View Source
	badKeys.ctrl['73'] = 'ctrl_i'; // NS6: Page Info
	badKeys.ctrl['80'] = 'ctrl_p';
	badKeys.ctrl['83'] = 'ctrl_s';
	badKeys.ctrl['85'] = 'ctrl_u'; // NS6: View Source
	badKeys.ctrl['88'] = 'ctrl_x';
	badKeys.ctrl['168'] = 'ctrl_alt_u'; // Safari: View Source

	badKeys.ctrl['backspace'] = 'ctrl_backspace'; // Moz Display Context Menu
	badKeys.ctrl['a'] = 'ctrl_a';
	badKeys.ctrl['c'] = 'ctrl_c';
	badKeys.ctrl['e'] = 'ctrl_e'; // NS6: launch Composer, IE Mac: View Source
	badKeys.ctrl['i'] = 'ctrl_i'; // NS6: Page Info, Safari: Mail Contents of this Page
	badKeys.ctrl['p'] = 'ctrl_p';
	badKeys.ctrl['s'] = 'ctrl_s';
	badKeys.ctrl['u'] = 'ctrl_u'; // NS6: View Source
	badKeys.ctrl['x'] = 'ctrl_x';
//	badKeys.ctrl['113'] = 'ctrl_f2';
	badKeys.ctrl['114'] = 'ctrl_f3'; // Opera: View Source
//	badKeys.ctrl['115'] = 'ctrl_f4';
//	badKeys.ctrl['118'] = 'ctrl_f7';
//	badKeys.ctrl['119'] = 'ctrl_f8';
//	badKeys.ctrl['120'] = 'ctrl_f9';
//	badKeys.ctrl['123'] = 'ctrl_f12';
// Opera ctrl+shift+c = copy to note

	badKeys.single = new Object();
	// Windows Shift/Ctrl/Alt keys == 16/17/18
	badKeys.single['1']  = 'left_click'; // NS (e.which)
	badKeys.single['2']  = 'middle_click'; // NS (e.which); Opera == 3
	badKeys.single['3']  = 'right_click'; // NS (e.which); Opera == 2
	badKeys.single['17'] = 'ctrl';
	badKeys.single['18'] = 'alt';
	badKeys.single['91'] = 'cmd'; // Mac only
	badKeys.single['93'] = 'select_key';
	
	var msBut = new Object();
	// Windows Shift/Ctrl/Alt keys == 16/17/18
	msBut['1']  	   = 'left_click'; // All except NS6 e.button (e.which,e.button)
	msBut['bGecko_0']  = 'left_click'; // NS6 (e.button)
	msBut['bGecko_2']  = 'middle_click'; // NS (e.which)
	msBut['bGecko_3']  = 'right_click'; // NS (e.which)
	msBut['bNS_3'] 	   = 'right_click'; // NS4 (can do e.which only)
	msBut['bMIE_2']    = 'right_click'; // IE (can do e.button only)
	msBut['bMIE_4']    = 'middle_click'; // IE (can do e.button only)
	msBut['bOpera_3']  = 'middle_click'; // Opera (e.button)

	function alert_keycode(e) {
		// Bug in IE Win: alert without if (...) will forget the second key press value
		// IE Mac & Opera: only catch first key ctrl/alt/shift - Opera does not send an ALT keypress event
		//ignore_match = 0; // TEMP!
		var evtobj = window.event ? event : e;
		var ch 	 = evtobj.keyCode ? evtobj.keyCode : evtobj.charCode ? evtobj.charCode : evtobj.which;
		var ch_w = String.fromCharCode(ch).toLowerCase(); // NS/Firefox/Safari only
		//alert("alert_keycode: TEST" +' # '+ ch +' # ' + ch_w );
		if (!this.ctrlKey && bMac) this.ctrlKey = (ch == 91); // Mac command key
		if (bW3C && document.layers) {
			// NS4: e.modifiers: Values: 1: Alt, 2: Ctrl, 4: Shift, 8: Command
			this.altKey 	= ((evtobj.modifiers & Event.ALT_MASK) > 0);
			this.ctrlKey 	= ((evtobj.modifiers & Event.CONTROL_MASK) > 0);
			this.shiftKey 	= ((evtobj.modifiers & Event.SHIFT_MASK) > 0);
			if (!this.ctrlKey) this.ctrlKey = (evtobj.modifiers == 8);
			if (!this.ctrlKey) this.ctrlKey = ((e.metaKey) > 0); // NS6
		} else {
			// Internet Explorer, Mozilla
			this.altKey	 	= evtobj.altKey;
			this.ctrlKey 	= evtobj.ctrlKey;
			this.shiftKey 	= evtobj.shiftKey;
			if (!bMIE && !this.ctrlKey) this.ctrlKey = ((e.metaKey) > 0); // NS6 Mac command key
		}
		var cmd_type = this.ctrlKey ? 'ctrl' : this.altKey ? 'alt' : this.shiftKey ? 'shift' : 'single';
		var target = bMIE ? window.event.srcElement : e.target;
		var targ_n = target.tagName.toLowerCase();
		var tag_match = 0;
		for (i = 0; i < omittags.length; i++) {
			if (omittags[i] == targ_n) tag_match = 1; //alert( omittags[i] +'='+targ_n); 
		}
		if ( tag_match || ignore_match || document.forms[0].elements[4] ) {
			return true;
		}
		if (bMIE && (!ch_w || ch_w == '[')) ch_w = ch;
		var key_comb = badKeys[cmd_type][ch]; // check for match
		var r_button = evtobj.button == 2 ? 3 : ch == 3 ? 3 : 0; // right click event
		if (bMIE && !r_button && cmd_type == "shift" && key_comb == "undefined") { r_button = 3; key_comb == 'right_click'; }
		if (!key_comb && r_button) key_comb = badKeys["single"][r_button]; // check for match, eg. Mac alt only
		var true_match = '';
		if (!key_comb) key_comb = badKeys[cmd_type][ch_w]; // check for match NS only
		if ( (!bMIE && key_comb && (ch == 69||ch == 73)) || key_comb ) { 
			true_match = 1;
		}
		if (!key_comb) key_comb = badKeys["single"][ch]; // check for match, eg. Opera|Mac alt only
		if (!true_match && (bMac||bOpera) && key_comb) { // (key_comb||this.ctrlKey)
			true_match = 1;
		}
		//alert("alert_keycode: Blocked" +' # '+ true_match +' # '+ cmd_type +' # ' + key_comb +' # ' + targ_n +' # ' + r_button );
		//if (!true_match) alert("TEST: "+this.ctrlKey+' '+ch+' # '+ r_button+' # '+ cmd_type +' # ' + key_comb); evtobj.returnValue=false; return false;
		if ( true_match ) {
			//alert("alert_keycode: Blocked" +' # '+ cmd_type +' # ' + key_comb);
			var img_last_idx = document.images.length - 1;
			document.images[img_last_idx].src = "/stats/alert.gif?name=alert_keycode_"+key_comb;
			if (evtobj.preventDefault) { // NS, W3C
				evtobj.preventDefault();
				evtobj.stopPropagation();
			} else {
				evtobj.keyCode = 0;
				evtobj.returnValue = false;
			}
			evtobj.cancel = true;
			evtobj.cancelBubble = true;
			if (bFFox) { document.location.replace( redircturl ); } 
			else if (document.images) { location.replace( redircturl ); } 
			else { location.href = redircturl; }
			return false;
		} else {
			return true;
		}
	}
	if (bMIE||bOpera) { document.onkeydown = alert_keycode; } else { document.onkeypress = alert_keycode; }

//////////////////////////////// Plugin detection /////////////////////////////
	function PlugDetect() {
		if (bMIE) { 
			if (agt.indexOf('mac')>=0) {
				if (agt.indexOf('msie 5.')>=0) { bVersion = 5; bFlashVoid = 2; } else { bFlashVoid = 3; } 
			} else if (bWin16) { bFlashVoid = 4; }
		} else if (!bNS) { bFlashVoid = 5; }
  		if ( bMIE && bWin32 && !bWin16 ) {
			document.write('<S'+'CRIPT LANGUAGE="VBScript"\> \n');
			document.writeln('on error resume next');
			document.writeln('    If (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash.2"))) Then');
			document.writeln(' bFlashVs = 2');
			document.writeln('ElseIf (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash.3"))) Then');
			document.writeln(' bFlashVs = 3');
			document.writeln('ElseIf (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash.4"))) Then');
			document.writeln(' bFlashVs = 4');
			document.writeln('ElseIf (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash.5"))) Then');
			document.writeln(' bFlashVs = 5');
			document.writeln('ElseIf (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash.6"))) Then');
			document.writeln(' bFlashVs = 6');
			document.writeln('ElseIf (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash.7"))) Then');
			document.writeln(' bFlashVs = 7');
			document.writeln('ElseIf (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash.8"))) Then');
			document.writeln(' bFlashVs = 8');
			document.writeln('ElseIf (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash.9"))) Then');
			document.writeln(' bFlashVs = 9');
			document.writeln('End If');
			// document.writeln('bMIEpdf = (IsObject (CreateObject ("PDF.PdfCtrl.1")))'); // launches Acro in IE Win!
			document.write('</S'+'CRIPT\> \n');
		} else if ( (bVersion==5||bFlashVoid==5||!bMIE) && bFlashMime ) {
			if (navigator.plugins['Shockwave Flash 2.0']) { 
				bFlashVs = 2;
			} else if (bFlashMime) {
				var bFlashDr = navigator.plugins['Shockwave Flash'].description;
				bFlashVs     = parseInt( bFlashDr.charAt(bFlashDr.indexOf('.')-1) );
				if (!bFlashVs) bFlashVs = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin;
			}
		} else if (bFlashMime) {
			var bFlashDr = navigator.plugins['Shockwave Flash'].description;
			bFlashVs     = parseInt( bFlashDr.charAt(bFlashDr.indexOf('.')-1) );
			if (!bFlashVs) bFlashVs = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin;
		}
	}

///////////////////////////////// Date Function ////////////////////////////////////
	function GreetDate(disptype,lang,abbrev) {
	// disptype = t (time only), g (greeting only), '' (empty = both)
	// lang 	= d (german), e (english), f (french)
	// abbrev 	= s (time only in digits), '' (day & month spelled)
	var MonthsE  = new Array('Jan','Feb','March','April','May','June','July','Aug','Sep','Oct','Nov','Dec');
	var DaysE    = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
	var MonthsD  = new Array('Jan','Feb','M&auml;rz','Apr','Mai','Juni','Juli','Aug','Sep','Okt','Nov','Dez');
	var DaysD    = new Array('Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag');
	var MonthsF  = new Array('Jan','F&#233;v','Mars','Avr','Mai','Juin','Jui','Ao&#251;','Sep','Oct','Nov','D&#233;c');
	var DaysF    = new Array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi');
	var TimeObj = DateObj.getTime();
	DateObj.setTime(TimeObj);
	var TimeHr  = DateObj.getHours();
	var GreetE   = (TimeHr>17) ? 'Good Evening' : (TimeHr>11) ? 'Good Afternoon' : 'Good Morning';
	var GreetD   = (TimeHr>17) ? 'Guten Abend' : (TimeHr>11) ? 'Guten Tag' : 'Guten Morgen';
	var GreetF   = (TimeHr>17) ? 'Bonsoir' : (TimeHr>11) ? 'Bonjour' : 'Bon Matin';
	var Date 	= DateObj.getDate();
	var Year 	= DateObj.getYear();
	if (Year < 2000) Year = Year + 1900;
		if (!abbrev && lang == 'f') {
			var result = (disptype=='t'||!disptype) ? (DaysF[DateObj.getDay()] + ', ' + MonthsF[DateObj.getMonth()] + '&nbsp;' + Date + ',&nbsp;' + Year) : '';
			return(result + (disptype=='g' ? (' - '+GreetF) : '') );
		} else if (!abbrev && lang == 'd') {
			var result = (disptype=='t'||!disptype) ? (DaysD[DateObj.getDay()] + ', ' + MonthsD[DateObj.getMonth()] + '&nbsp;' + Date + ',&nbsp;' + Year) : '';
			return(result + (disptype=='g' ?  (' - '+GreetD) : '') );
		} else if (!abbrev) {
			var result = (disptype=='t'||!disptype) ? (DaysE[DateObj.getDay()] + ', ' + MonthsE[DateObj.getMonth()] + '&nbsp;' + Date + ',&nbsp;' + Year) : '';
			return(result + (disptype=='g' ?  (' - '+GreetE) : '') );
		} else {
			var Month  = DateObj.getMonth() +1;
			if (Date < 10) Date = '0' + Date;
			var result = (Date + '.' + '0' + Month + '.' + Year + '<BR>');
			var messg  = (lang == 'd' ? GreetD : lang == 'f' ? GreetF : GreetE);
			return( result + messg );
		}		
	}

/////////////////////////////// Clicktracer Module /////////////////////////////////	
	function Tracer(arg,arg2) {
	PlugDetect();
	var defaultUrl = '/stats/clicktracer.gif'; // /stats/clicktracer.gif
	var path = !arg ? '<img src="'+defaultUrl : '<img src="'+arg;
		if (bVersion>=3){if (self.innerWidth){bNav_size = self.innerWidth+'x'+self.innerHeight;}
 			else if (document.all){bNav_size = document.body.clientWidth+'x'+document.body.clientHeight;}
			if (self.screen){bScr_size = screen.width+'x'+screen.height;
			(!bNS)?(bColord=screen.colorDepth):(bColord=screen.pixelDepth);}
			var servername = document.domain;
			var ul= path+'?js=1&nav_size='+bNav_size+'&scr_size='+bScr_size+'&colors='+bColord; 
			var acro=qt='0';
			if (arg2) ul=ul+arg2;
			if (navigator.javaEnabled()){isjava='1';}else{isjava='0';}ul=ul+'&java='+isjava;
			if (!bMIE && !bOpera && navigator.plugins){if (navigator.plugins['PDFViewer']||navigator.mimeTypes['application/pdf'].enabledPlugin){acro='1';}if (navigator.plugins['QuickTime Plugin']||navigator.mimeTypes['video/quicktime'].enabledPlugin){qt='1';}ul=ul+'&flash='+bFlashVs+'&pdf='+acro+'&quicktime='+qt;
			}else{if (bMIE && bFlashVoid==1){acro=(bMIEpdf)?'1':'0';ul=ul+'&flash='+bFlashVs+'&pdf='+acro+'&quicktime=0';}else if (bMIE && bFlashVoid==2){ul=ul+'&flash='+bFlashVs+'&quicktime=1';}else{ul=ul+'&flash=Unknown';}
 		}
 	var bStopTime = new Date(); bStopTime = bStopTime.getTime(); ul=ul+'&refer='+escape(top.document.referrer)+'&vhost='+servername+'&loadtime='+((bStopTime - bStartTime) / 1000)+'" height="1" width="3" alt="" border="0">';document.write(ul);}
	}

 // -->