
  function wwOnError () {
    return true;
  }
  onerror = wwOnError;
var wwLastErrorReason   = "";
var wwMaxEvalCodeLen    = 2048;
var wwMaxTimeoutCodeLen = 2048;
var sPotentiallyHostileIdentifications   = new Array (
"execScript", ".execCommand",
"setInterval", "showModalDialog", "showModelessDialog", "showHelp",
".CreateTextFile", ".DeleteFile", ".GetSpecialFolder", ".Run",
".RegRead", ".RegWrite",
".Recipients", ".Attachments", ".AddressEntries"
);
var sPotentiallyHostileIdentificationsLC = new Array (	"mhtml:file://" );
function IsHostileMarkupCode (str)
{
var i;
var p;
for (i = 0; i < sPotentiallyHostileIdentifications.length; ++i) {
p = str.indexOf (sPotentiallyHostileIdentifications[i]);
if (p != -1) {
var isValid = true;
if ((p > 0) && (str[p] != ".")) {
var ch = str.charCodeAt (p - 1);
if (((ch >= 65) && (ch <= 90)) || ((ch >= 97) && (ch <= 122))) {
isValid = false;
} else {
var pE = p + sPotentiallyHostileIdentifications[i].length;
if (pE < str.length) {
ch = str.charCodeAt (pE);
if (((ch >= 65) && (ch <= 90)) || ((ch >= 97) && (ch <= 122))) {
isValid = false;
}
}
}
}
if (isValid) {
wwLastErrorReason = sPotentiallyHostileIdentifications[i];
return true;
}
}
}
var strLC = str.toLowerCase();
for (i = 0; i < sPotentiallyHostileIdentificationsLC.length; ++i) {
if (strLC.indexOf (sPotentiallyHostileIdentificationsLC[i]) != -1) {
wwLastErrorReason = sPotentiallyHostileIdentificationsLC[i];
return true;
}
}
i = 0;
do {
i = strLC.indexOf (".location", i);
if (i != -1) {
var p;
i += 10;
p = strLC.indexOf ("javascript:", i);
if (p == -1) {
p = strLC.indexOf ("<script", i);
}
if (p == -1) {
p = strLC.indexOf ("file://", i);
}
if (p == -1) {
p = strLC.indexOf ("res://", i);
}
if (p == -1) {
p = strLC.indexOf ("c:/", i);
}
if (p == -1) {
p = strLC.indexOf ("c:\\", i);
}
if (p != -1) {
if ((p - i) <= 15) {
wwLastErrorReason = "location";
return true;
}
}
}
} while (i != -1);
if (str.length > 256) {
var chThis;
var chPrev  = str.charCodeAt (0);
var stepCnt = 16;
var repCnt  = 0;
for (i = stepCnt; i < str.length; i += stepCnt) {
chThis = str.charCodeAt (i);
if (chThis == chPrev) {
++repCnt;
if (stepCnt > 1) {
stepCnt = 1;
}
if (repCnt > 150) {
wwLastErrorReason = "potBufOverflow";
return true;
}
} else if (repCnt > 0) {
repCnt  = 0;
stepCnt = 16;
}
chPrev = chThis;
}
var baseOffs   = 16;
var patBegin   = baseOffs;
var patEnd     = 0;
var patBeginCh = str.charCodeAt (patBegin);
for (i = baseOffs + 1; i < str.length; i++) {
chThis = str.charCodeAt (i);
if (chThis == patBeginCh) {
patEnd = i;
break;
} else if ((i - baseOffs) > 40) {
break;
}
}
if (patEnd > patBegin) {
var patLen = (patEnd - patBegin);
if (patLen > 1) {
var patStr = str.substr (patBegin, patLen);
var patOccurences = 0;
for (var b = baseOffs; b < str.length; b += patLen) {
var patOccurs = true;
for (var i = 0; i < patLen; i++) {
if (str.charCodeAt (b + i) != patStr.charCodeAt (i)) {
patOccurs = false;
break;
}
}
if (patOccurs) {
++patOccurences;
if (patOccurences > 80) {
wwLastErrorReason = "potBufOverflow";
return true;
}
}
}
}
}
}
return false;
}
function BlockScript (categories, callerId)
{
if ( false ) {
var proto = "http";
if (top.location.protocol.toLowerCase().indexOf ("https") == 0) {
proto = "https";
}
if ((wwLastErrorReason.indexOf ("&") != -1) ||
(wwLastErrorReason.indexOf ("=") != -1) ||
(wwLastErrorReason.indexOf (">") != -1)) {
wwLastErrorReason = "tampered";
}
if (wwLastErrorReason.length > 64) {
wwLastErrorReason = wwLastErrorReason.substr (0, 64);
} else if (wwLastErrorReason.length == 0) {
wwLastErrorReason = "n/a";
}
if (encodeURIComponent) {
wwLastErrorReason = encodeURIComponent (wwLastErrorReason);
} else {
wwLastErrorReason = escape (wwLastErrorReason);
}
top.location.href = proto + "://-web.washer-/proactive?block&pfc=A0cQS9T9p4mOIJJjJSspWRcwbwNSaGAr&ruc=iUk4we6WjeB4pU4wPrJsTTVsxTFIkX8VjH0HJ0Bw6Wa/nKY5Qi7R2ToTQO%2BkfcZQICUGVTf%2BvSU=&cats=" + (categories) + "&cid=" + (callerId) + "&ler=" + (wwLastErrorReason);
if (document.all) {
var s, f;
for (s = 0; s < top.document.scripts.length; s++) {
if (top.document.scripts(s).text.indexOf ("wwOnError") == -1) {
top.document.scripts(s).text = "";
}
}
for (f = 0; f < top.frames.length; f++) {
for (s = 0; s < top.frames(f).document.scripts.length; s++) {
if (top.frames(f).document.scripts(s).text.indexOf ("wwOnError") == -1) {
top.frames(f).document.scripts(s).text = "";
}
}
}
}
}

wwLastErrorReason = "";
if (document.all == null) {
throw "Script execution blocked by Webwasher Proactive Scanning";
}
}
var wwWriteCache = "";
function IsHostileMarkupCodeInCache (object, markup)
{
if (markup.length > 2048) {
wwWriteCache = "";
} else if (wwWriteCache.length > 2048) {
wwWriteCache = wwWriteCache.substr (wwWriteCache.length - 2048, 2048);
}
wwWriteCache += markup;
return IsHostileMarkupCode (wwWriteCache);
}
function InjectHooks (str)
{
if (typeof str == "string") {
str = str.replace (/document\.writeln/g,	"wwDocumentWriteln");
str = str.replace (/document\.write/g,		"wwDocumentWrite");
str = str.replace (/execScript/g,			"wwExecScript");
str = str.replace (/execCommand/g,			"wwExecCommand");
str = str.replace (/setTimeout/g,			"wwSetTimeout");
str = str.replace (/setInterval/g,			"wwSetInterval");
str = str.replace (/eval/g,					"wwEval");
str = str.replace (/ActiveXObject/g,		"wwActiveXObject");
}
return str;
}
var wwInIFRAMESection = false;
function RemoveIFRAMEs (markup)
{
if ( false ) {
var markupLC = markup.toLowerCase();
var i, j;
if (!wwInIFRAMESection) {
i = markupLC.indexOf ("<iframe");
if (i != -1) {
var removeThisIFRAME = true;
if ( true ) {
var n, m;
var singleQuotedURL = false;
n = markupLC.indexOf ("src=\"", i + 7);
if (n == -1) {
n = markupLC.indexOf ("src='", i + 7);
if (n != -1) {
singleQuotedURL = true;
}
}
if (n != -1) {
m = markupLC.indexOf (">", i + 7);
if ((m != -1) && (n < m)) {
if (singleQuotedURL) {
m = markupLC.indexOf ("'", n + 5);
} else {
m = markupLC.indexOf ("\"", n + 5);
}
if (m != -1) {
var iframeUrl = markup.substring (n + 5, m);
if (iframeUrl.length >= 5) {
if ( iframeUrl.match (/^http.?\:\/\/\w+\.\w+\.\w+\/.*/) ||
iframeUrl.match (/^\/.+/) ||
iframeUrl.match (/\D\w+\.\D?htm.?$/i) ) {
removeThisIFRAME = false;
}
}
}
} else if (m == -1) {
var iframeUrl = markup.substring (n + 5, markup.length);
if (iframeUrl.length >= 5) {
if ( iframeUrl.match (/^http.?\:\/\/\w+\.\w+\.\w+\/.*/) ) {
removeThisIFRAME = false;
}
}
}
}
}
if (removeThisIFRAME) {
j = markupLC.indexOf ("</iframe", i + 8);
if (j != -1) {
markup = markup.substring (0, i) + markup.substring (j + 9, markup.length);
} else {
markup = markup.substring (0, i);
wwInIFRAMESection = true;
}
}
}
} else {
i = markupLC.indexOf ("</iframe");
if (i != -1) {
markup = markup.substring (i + 9, markup.length);
wwInIFRAMESection = false;
} else {
markup = "";
}
}
}
return markup;
}
function wwWrite (object, markup)
{
if (typeof markup != "string") {
markup = String (markup);
}
if (IsHostileMarkupCode (markup) || IsHostileMarkupCodeInCache (object, markup)) {
BlockScript (512 /*Vulnerable*/, 1000);
return;
}
object.write (InjectHooks (RemoveIFRAMEs (markup)));
}
function wwWriteln (object, markup)
{
if (typeof markup != "string") {
markup = String (markup);
}
if (IsHostileMarkupCode (markup) || IsHostileMarkupCodeInCache (object, markup)) {
BlockScript (512 /*Vulnerable*/, 1001);
return;
}
object.writeln (InjectHooks (RemoveIFRAMEs (markup)));
}
function wwDocumentWrite (markup)
{
if (typeof markup != "string") {
markup = String (markup);
}
if (IsHostileMarkupCode (markup) || IsHostileMarkupCodeInCache (document, markup)) {
BlockScript (512 /*Vulnerable*/, 1002);
return;
}
document.write (InjectHooks (RemoveIFRAMEs (markup)));
}
function wwDocumentWriteln (markup)
{
if (typeof markup != "string") {
markup = String (markup);
}
if (IsHostileMarkupCode (markup) || IsHostileMarkupCodeInCache (document, markup)) {
BlockScript (512 /*Vulnerable*/, 1003);
return;
}
document.writeln (InjectHooks (RemoveIFRAMEs (markup)));
}
function GetCategoryIfWellknownHostileActiveX (progID)
{
var str = progID.toLowerCase();
if (str == "scripting.filesystemobject") {
return 3;    /*FileRead | FileWrite*/
} else if (str == "scripting.encoder") {
return 512;  /*Vulnerable*/
} else if (str.indexOf ("wscript.shell") == 0) {
return 15;   /*FileRead | FileWrite | RegistryRead | RegistryWrite*/
} else if (str.indexOf ("wscript.network") == 0) {
return 16;   /*Network*/
} else if (str.indexOf ("outlook.application") == 0) {
return 528;  /*Vulnerable | Network*/
} else if (str.indexOf ("adodb.") == 0) {
return 512;  /*Vulnerable*/
}
return 0;
}
var sAllowedActiveXCtls = new Array (  );
function wwActiveXObject (progID)
{
var cat = GetCategoryIfWellknownHostileActiveX (progID);
if (cat != 0) {
wwLastErrorReason = progID;
BlockScript (cat, 2000);
return null;
}
if ( true ) {
return new ActiveXObject (progID);
}
var i;
for (i = 0; i < sAllowedActiveXCtls.length; ++i) {
if (progID.match (sAllowedActiveXCtls[i])) {
return new ActiveXObject (progID);
}
}
return null;
}
function wwGetEntropy (str)
{
var s = new Array (0x100);
var e = 0;
var n = str.length;
var p;
var ch;
var i;
for (i = 0; i < s.length; i++) {
s[i] = 0;
}
for (i = 0; i < n; i++) {
ch = str.charCodeAt (i);
if (ch < 0x100) {
s[ch] += 1;
}
}
for (i = 0; i < s.length; i++) {
if (s[i] == 0) {
p = 0;
} else if (s[i] == n) {
p = 1;
} else {
p = (s[i] / n);
}
if (p > 0) {
e = e + (p * Math.log (p));
}
}
return (e * -1);
}
function wwFilterCode (scriptCode)
{
if (typeof scriptCode == "string") {
if (scriptCode.length > wwMaxEvalCodeLen) {
var e = wwGetEntropy (scriptCode);
if ((e >= 3) && (e <= 3.75)) {
} else {
wwLastErrorReason = "length " + (scriptCode.length);
BlockScript (512 /*Vulnerable*/, 3000);
return "";
}
}
if (IsHostileMarkupCode (scriptCode)) {
BlockScript (512 /*Vulnerable*/, 3001);
return "";
}
}
return InjectHooks (scriptCode);
}
function wwExecCommand (object, cmd, /*OPTIONAL*/ withUI, /*OPTIONAL*/ value)
{
if ((cmd.length > wwMaxEvalCodeLen) || (value.length > wwMaxEvalCodeLen)) {
wwLastErrorReason = "length " + (cmd.length) + " or " + (value.length);
BlockScript (512 /*Vulnerable*/, 3020);
return;
}
if (IsHostileMarkupCode (cmd) || IsHostileMarkupCode (value)) {
BlockScript (512 /*Vulnerable*/, 3021);
return false;
}
return object.execCommand (InjectHooks (cmd), withUI, InjectHooks (value));
}
function wwSetTimeout (code, msec, /*OPTIONAL*/ language)
{
if (typeof code == "string") {
if (code.length > wwMaxTimeoutCodeLen) {
wwLastErrorReason = "length " + (code.length);
BlockScript (512 /*Vulnerable*/, 3030);
return;
}
if (IsHostileMarkupCode (code)) {
BlockScript (512 /*Vulnerable*/, 3031);
return;
}
}
return setTimeout (InjectHooks (code), msec, language);
}
function ww2SetTimeout (object, code, msec, /*OPTIONAL*/ language)
{
if (typeof code == "string") {
if (code.length > wwMaxTimeoutCodeLen) {
wwLastErrorReason = "length " + (code.length);
BlockScript (512 /*Vulnerable*/, 3032);
return;
}
if (IsHostileMarkupCode (code)) {
BlockScript (512 /*Vulnerable*/, 3033);
return;
}
}
return object.setTimeout (InjectHooks (code), msec, language);
}
function wwSetInterval (code, msec, /*OPTIONAL*/ language)
{
if (typeof code == "string") {
if (code.length > wwMaxTimeoutCodeLen) {
wwLastErrorReason = "length " + (code.length);
BlockScript (512 /*Vulnerable*/, 3040);
return 0;
}
if (IsHostileMarkupCode (code)) {
BlockScript (512 /*Vulnerable*/, 3041);
return 0;
}
}
return setInterval (InjectHooks (code), msec, language);
}
function ww2SetInterval (object, code, msec, /*OPTIONAL*/ language)
{
if (typeof code == "string") {
if (code.length > wwMaxTimeoutCodeLen) {
wwLastErrorReason = "length " + (code.length);
BlockScript (512 /*Vulnerable*/, 3042);
return 0;
}
if (IsHostileMarkupCode (code)) {
BlockScript (512 /*Vulnerable*/, 3043);
return 0;
}
}
return object.setInterval (InjectHooks (code), msec, language);
}

// Create the offsetable marker
//
// GLatLng - mkrPoint the actual position to be marked
// GMarkerOptions - mkrOpts the options for the marker
// opt_color - color string for the offset line e.g. "#FF0000" or "" to use the map's default text color
// opt_width - width for the offset line in pixels
// opt_opacity - opacity for the offset line, 0.0 (transparent) to 1.0 (opaque)
// opt_dx - x pixel offset for symbol, the same at all zooms
// opt_yx - y pixel offset for symbol, the same at all zooms
//
// Bill Chadwick 2006
//
// Events dragstart, drag, dragend and dblclick used internally
//
function OffsetableMarker(mkrPoint, mkrOpts, opt_color, opt_width, opt_opacity, opt_dx, opt_dy) {

	this.poi = mkrPoint;//original point of interest

    //offset line style
	this.color = opt_color || "";
	this.width = opt_width || 1;
	this.opacity = opt_opacity || 1.0;

    //symbol offset distance in pixels
	this.dx = opt_dx || 0;
	this.dy = opt_dy || 0;
	
	//polyline object used to draw the offset line
	this.line = null;
	
	//ensure marker is draggable
	if(!mkrOpts) 
		mkrOpts = {};
	mkrOpts.draggable = false;//true;
	mkrOpts.bouncy = false;
	mkrOpts.dragCrossMove = true;//? does not work in 6.5
	mkrOpts.bounceGravity = 10000.0;
	

    GMarker.call(this,mkrPoint,mkrOpts);//call super class constructor 

}
OffsetableMarker.prototype = new GMarker(new GLatLng(0,0));//subclass from GMarker

OffsetableMarker.prototype.initialize = function(map) {
    GMarker.prototype.initialize.call(this,map); //super class

	this.map = map;//save
	this.map.setZoom(17);
	
    //Initial offset    
    if((this.dx != 0) || (this.dy !=0)){
        var pt = map.fromLatLngToDivPixel(this.poi);
	    pt.x += this.dx;
	    pt.y += this.dy;
	    this.setPoint(map.fromDivPixelToLatLng(pt));
	}

	//set up event handling
	var mkr = this;
	GEvent.addListener(this,"dragstart", this.onDragStart);
	GEvent.addListener(this,"drag", this.onDrag);
	GEvent.addListener(this,"dragend", this.onDrag);
	GEvent.addListener(this,"dblclick", this.onDblclick);	
	GEvent.addListener(this.map,"zoomend", function(oldL,newL){	
	    //move marker after zoom
		var pt = mkr.map.fromLatLngToDivPixel(mkr.poi);
		pt.x += mkr.dx;
		pt.y += mkr.dy;
		mkr.setPoint(mkr.map.fromDivPixelToLatLng(pt));
		mkr.redraw.call(mkr);//and redraw the line
	});

	/*
	GEvent.addListener(this, "click", function() {
  		this.openInfoWindowHtml("Club de Wing Tsun Kung Fu<br>4 rue Falque<br>13006 Marseille<br>Tel: 06.15.08.33.63");
  	});*/
  		
}

OffsetableMarker.prototype.onDragStart = function() {
    if(!this.map.getInfoWindow().isHidden())
        this.map.closeInfoWindow();
}

OffsetableMarker.prototype.onDrag = function(){
	var pt2 = this.map.fromLatLngToDivPixel(this.getPoint());
	var pt1 = this.map.fromLatLngToDivPixel(this.poi);
	this.dx = pt2.x-pt1.x;
	this.dy = pt2.y-pt1.y;	
	this.redraw();
}

OffsetableMarker.prototype.onDblclick = function(){

	if(!this.map.getInfoWindow().isHidden())
		this.map.closeInfoWindow();

	this.setPoint(this.poi);//reset symbol to original location
    this.remLine();
	this.dx = 0;
	this.dy = 0;
	var mkr = this;
	ww2SetTimeout(window, function(){mkr.onDragStart.call(mkr);},100);//clear any info window poped up by double click

	return false;
}

OffsetableMarker.prototype.remove = function() {
    this.remLine();
    GMarker.prototype.remove.call(this);//super class
}

OffsetableMarker.prototype.hide = function() {
    this.remLine();
    GMarker.prototype.hide.call(this);//super class
}

OffsetableMarker.prototype.remLine = function() {
	if(this.line != null){//the offset line
	    this.map.removeOverlay(this.line);
		this.line = null;
		}
}

OffsetableMarker.prototype.copy = function() {
	return new OffsetableMarker(this.poi,this.opts,this.color,this.width,this.opacity,this.dx,this.dy);
}  	

OffsetableMarker.prototype.redraw = function(force) {

    this.remLine();
    		
	if((this.dx != 0) || (this.dy != 0)){
		var pts = new Array();//draw new line
		pts[0] = this.poi;
		var pt = this.map.fromLatLngToDivPixel(this.poi);
		pt.x += this.dx;
		pt.y += this.dy;
		pts[1] = this.map.fromDivPixelToLatLng(pt);
		//default color
		var lc = this.color;
		if (lc.length < 7){
			lc = this.map.getCurrentMapType().getTextColor();
			}
		this.line = new GPolyline(pts,lc,this.width,this.opacity);
		this.map.addOverlay(this.line);
	}
	
	GMarker.prototype.redraw.call(this,force);//super class

}








