From: <Saved by Windows Internet Explorer 8>
Subject: DesignDose3-2010
Date: Wed, 20 Jul 2011 11:43:52 -0500
MIME-Version: 1.0
Content-Type: multipart/related;
	type="text/html";
	boundary="----=_NextPart_000_000E_01CC46D2.4C8E6A60"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109

This is a multi-part message in MIME format.

------=_NextPart_000_000E_01CC46D2.4C8E6A60
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.susanfredman.com/know/DesignDose3-2010.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" =
"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML =
xmlns=3D"http://www.w3.org/1999/xhtml"><HEAD><TITLE>DesignDose3-2010</TIT=
LE>
<SCRIPT type=3Dtext/javascript=20
src=3D"http://www.susanfredman.com/A2EB891D63C8/avg_ls_dom.js"></SCRIPT>

<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.19088"></HEAD>
<BODY>
<OBJECT classid=3Dclsid:CA8A9780-280D-11CF-A24D-444553540000 width=3D524 =
height=3D741><PARAM NAME=3D"src" =
VALUE=3D"documents/DesignDose3-2010_001.pdf">
    <embed src=3D"documents/DesignDose3-2010_001.pdf" =
type=3D"application/pdf"=20
pluginspage=3D"http://www.adobe.com/products/acrobat/readstep2.html" =
width=3D"524"=20
height=3D"741"></embed></OBJECT></BODY></HTML>

------=_NextPart_000_000E_01CC46D2.4C8E6A60
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.susanfredman.com/A2EB891D63C8/avg_ls_dom.js

function AVG(param) {
=09
	//Checking if AVG was already created -the constructor should only run =
once per window:
	if (window.AVGRUN)
		return null;
	else
		window.AVGRUN=3D true;
=09
	var IE_browser_version =3D =
parseFloat(navigator.appVersion.split("MSIE")[1]);
=09
	//Create XMLHttpRequest object once, this significantly improves the =
performance=09
	try
	{
		if( IE_browser_version <=3D 6 )
			var httpRequest =3D new ActiveXObject("Microsoft.XMLHttp");
		else
			var  httpRequest =3D new XMLHttpRequest();
	}
	catch(err)
	{
		return ErrorHandler();
	}
=09
	/* ###############################
	Overriding Methods:
	 For each method define:
	 1. Private pointer to the original function
	 2. Privileged method to override the original function
	 The scan is done on the input variable
	################################### */


	/* -------------- Eval  ------------- */
	//Storing the original method in private variable
	var AVG_eval =3D eval;
=09
=09
	//Defining privileged method to override the original function
	var Chck_eval =3D function (inpStr) {

		if (isEmpty(inpStr))
			return AVG_eval(inpStr);=20

		if (checkData(inpStr, AVG_eval))
		{
			try
			{
				res =3D AVG_eval(inpStr);
				return res;
			}
			catch(err){}
		}
	}

	//Overriding the original function
	//window.eval =3D Chck_eval;
	/* =
-------------------------------------------------------------------------=
---------- */


	/* -------------- document.write & document.writeln  ------------- */

	//Storing the original method in private variable
	var AVG_docWrite =3D document.write;
	var docWrite_Stuck=3Dnew Stuck(5);
=09
	var AVG_docWriteln =3D document.writeln;
	var docWriteln_Stuck=3Dnew Stuck(5);
=09

	//Defining privileged method to override the original function
	var Chck_docWrite =3D function (inpStr) {					=09

		if (arguments.length >1)
		{
			for(var i=3D1; i<arguments.length;i++)
			{
				inpStr+=3Darguments[i];
			}
		}
	=09
		inpStr =3D String(inpStr);
		if (isEmpty(inpStr) || docWrite_Stuck.find(inpStr))
		{
			try
			{
				if (IE_browser_version <=3D 7)
				{
					return AVG_docWrite(inpStr);
				}
				else
				{
					return AVG_docWrite.call(document, inpStr);
				}
			}
			catch(err){}
		}
		docWrite_Stuck.add(inpStr);
	=09
		if (checkData(inpStr, AVG_docWrite))
		{
			try
			{
				if (IE_browser_version <=3D 7 )
				{
					return AVG_docWrite(inpStr);
				}
				else
				{
					return AVG_docWrite.call(document, inpStr);
				}
			}
			catch(err){}
		}
	}

	var Chck_docWriteln =3D function (inpStr) {
	=09
		if (arguments.length >1)
		{
			for(var i=3D1; i<arguments.length;i++)	=09
			{
				inpStr+=3Darguments[i];
			}
		}

		inpStr =3D String(inpStr);
		if (isEmpty(inpStr) || docWriteln_Stuck.find(inpStr) )
		{
			try
			{
				if (IE_browser_version <=3D 7)
				{
					return AVG_docWriteln(inpStr);
				}
				else
				{
					return AVG_docWriteln.call(document, inpStr);
				}
			}
			catch(err){}
		}
	=09
		docWriteln_Stuck.add(inpStr);
	=09
		if (checkData(inpStr, AVG_docWriteln))
		{
			try
			{
				if (IE_browser_version <=3D7 )
				{
					return AVG_docWriteln(inpStr);
				}
				else
				{
					return AVG_docWriteln.call(document, inpStr);
				}
			}
			catch(err){}
		}
	}

	//Overriding the original function
	//document.write =3D Chck_docWrite;
	//document.writeln =3D Chck_docWriteln;
	/* =
-------------------------------------------------------------------------=
---------- */

	/* -------------- setTimeOut  ------------- */
	//Storing the original method in private variable
	var AVG_STO =3D setTimeout;
=09
	//Store last calls value=20
=09
	var string_Stuck=3Dnew Stuck(5);
=09
	//Defining privileged method to override the original function
	var Chck_STO =3D function (expr, timeout) {
=09
		if (isEmpty(expr))
			return;
		//Bypass scan in case the expression is equal to the last one scanned
		if (string_Stuck.find(expr))
			return AVG_STO(expr, timeout);
	=09
		string_Stuck.add(expr);

		if (checkData(expr, AVG_STO))
	=09
		{
			try
			{
				return AVG_STO(expr, timeout);
			}
			catch(err){}
		}
	}

	//Overriding the original function
	//window.setTimeout =3D Chck_STO;
	/* =
-------------------------------------------------------------------------=
---------- */
=09
	/* -------------- Function constructor  ------------- */
		=09
	//Storing the original constructor in private variable
	var AVG_Function =3D Function;

	//Defining privileged method to override the original function
	var Chck_Function =3D function () {

		function inheritance() {}
		inheritance.prototype =3D Function.prototype;

		var Args =3D [].slice.call(arguments);
		var Body =3D Args.pop();
		if (isEmpty(Body))
		{				=09
			AVG_eval('AVG_newFunc =3D AVG_Function(' + Args.join(',') + ')');
		}
		else
		{
			if (checkData('function(' + Args.join(',') + ') {' + Body + '}', =
AVG_Function) )
				eval('AVG_newFunc =3D function(' + Args.join(',') + ') {' + Body + =
'}');
			else
				return false;
		=09
		}

		AVG_newFunc.prototype =3D new inheritance();
		AVG_newFunc.prototype.constructor =3D AVG_newFunc;

		return AVG_newFunc;
	}

	//Setting Chck_Function's prototype to Function's prototype=20
	Chck_Function.prototype =3D Function.prototype;
	Chck_Function.prototype.constructor =3D Chck_Function;
=09
	//Overriding the original function
	//Function =3D Chck_Function;
	/* =
-------------------------------------------------------------------------=
---------- */
=09
	/* -------------- setInterval  ------------- */
	//Storing the original method in private variable
	var AVG_SetInterval =3D setInterval;
	=09
	var SI_string_Stuck=3Dnew Stuck(5);
=09
	//Defining privileged method to override the original function
	var Chck_SetInterval =3D function (expr, timeout) {
		if (isEmpty(expr))
			return;
	=09
		if ( SI_string_Stuck.find( String(expr) ) )
			return AVG_SetInterval(expr, timeout);
			=09
		SI_string_Stuck.add(String(expr));
	=09
		if (checkData(expr, AVG_SetInterval))
		{
			try
			{
				return AVG_SetInterval(expr, timeout);
			}
			catch(err){}
		}
	}
=09
	//Overriding the original function
	//window.setInterval =3D Chck_SetInterval;
	/* =
-------------------------------------------------------------------------=
---------- */
=09
	/* -------------- execScript  ------------- */
	=09
	//Run only if execScript is supported
	if (typeof(window["execScript"]) !=3D "undefined")
	{
		//Storing the original method in private variable
		var AVG_execScript =3D execScript;
			=09
		//Defining privileged method to override the original function
		var Chck_execScript =3D function (expr, lang) {
			if (isEmpty(expr))
				return;					=09
			if (isEmpty(lang))
			{
			 lang=3D'javascript';
			}=09
			=09
			if (checkData(expr, AVG_execScript))
			{
				try
				{
					return AVG_execScript(expr, lang);
				}
				catch(err){}
			}
		}

		//Overriding the original function
		//window.execScript =3D Chck_execScript;
	}
	/* =
-------------------------------------------------------------------------=
---------- */
=09
	/* -------------- unescape  ------------- */
	//Storing the original method in private variable
	var AVG_Unescape =3D unescape;
=09
	var MIN_SCAN_LEN =3D 4;=20
=09
	var AGG_Unescape_Buff =3D "";
=09
	//Defining privileged method to override the original function
	var Chck_Unescape =3D function (inpStr) {
	=09
		if (arguments.length >1)
		{
			for(var i=3D1; i<arguments.length;i++)
			{
				inpStr+=3Darguments[i];
			}
		}
		inpStr =3D String(inpStr);
		if (isEmpty(inpStr))
			return AVG_Unescape(inpStr);
	=09
		AGG_Unescape_Buff +=3D String(inpStr);
	=09
		if (AGG_Unescape_Buff.length < MIN_SCAN_LEN*3 )
		{
		 	return AVG_Unescape(inpStr);
		}
	=09
	=09
		if (checkData(AGG_Unescape_Buff, AVG_Unescape))
		{
			AGG_Unescape_Buff =3D "";
			try
			{
				return AVG_Unescape(inpStr);
			}
			catch(err){}
		}
		AGG_Unescape_Buff =3D "";
	}
=09
		//Overriding the original function
		window.unescape =3D Chck_Unescape;
	/* =
-------------------------------------------------------------------------=
---------- */

	//Block malicous code
	function BlockPage()
	{
		//redirect to block page + provide reason code + referrer
		=
//document.location=3D"http://www.avg.com/blockpage?reason=3D&referrer=3D=
";
	}
=09
	var SEND_ORIG_BUFF =3D true;
=09
	function checkData(data, func)
	{
		//func: Currently not used, we can consider appending it to the buffer =
sent for scanning=20
		//data: The buffer of the method

		data =3D String(data);
		var params =3Dunescape_me(data);
	=09
		if ( SEND_ORIG_BUFF && params.length !=3D data.length )
		{
			params+=3D "\n"+data;
		}
	=09
		try
		{
		httpRequest.open("POST", "/CC0227228D62/CheckData", false);
		httpRequest.setRequestHeader("Content-Type", =
"application/x-www-form-urlencoded");
		httpRequest.send(params);
		}
		catch(err)
		{
			return ErrorHandler();
		}
	=09
		if (httpRequest.readyState =3D=3D 4)
			return respHandler(httpRequest);
		else
			return ErrorHandler();
	}

	function respHandler(httpRequest)
	{
		if (httpRequest.status =3D=3D 200)
		{
			var resp =3D httpRequest.responseText;
			if ((resp =3D=3D null)		||=20
				(resp =3D=3D undefined)	||
				(0 =3D=3D resp.length)	||=20
				("3" !=3D resp.substr(0,1)))
			{
				return true;
			}
			else
			{
				BlockPage();
				return false;
			}
		}
		else
		{
			return ErrorHandler();
		}
	}
=09
	function ErrorHandler()
	{
		//This function handles the logic of infrastructure errors.
		//For now, return true to avoid potential of false positives.
		return true;	=09
	}
=09
	function isEmpty(Buf)
	{
		if ((Buf =3D=3D 'undefined')	||
			(Buf =3D=3D=3D undefined)		||
			(Buf =3D=3D "null")			||
			(Buf =3D=3D=3D null)			||
			(Buf =3D=3D ""))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
=09

	function Stuck (a_size) {
	 this.size=3Da_size;
	 //define the stuck size
	 this.StuckArray=3Dnew Array(this.size);	=20
	 this.currentIndex =3D 0;
	=20
	 //add an item to the begining of the stuck. If stuck is full, pop out =
the oldest item

	 this.add =3D function(item){
	  if (this.StuckArray.length>this.size)
	  {
	   this.StuckArray.pop();
	  }
	  this.StuckArray.unshift(String(item));
	 };
	=20
	 //finds if item exists
	 this.find =3D function(item){
	  var s_item=3DString(item);
	  for (var i=3D0;i<this.size;i++)
	  {
	   if(s_item=3D=3Dthis.StuckArray[i])
	   {
	   return true;
	   }
	  }
	  return false;
	 };
	=20
	 //toString implemetation
	 this.toString=3Dfunction(){return this.StuckArray.toString()};
	=20

	}
=09
	var MAX_UNESCAPE_ITERATIONS =3D5;
=09
	function unescape_me(data){
	=09
		var mdata=3DString(data);
		var udata=3DString('');
		for (var i=3D0;i<MAX_UNESCAPE_ITERATIONS;i++){
	=09
			udata=3DAVG_Unescape(mdata);
			if (udata.length=3D=3Dmdata.length){ break; }
			mdata=3Dudata;
	=09
		}
		return udata;
		=09
	}
=09
}

AVG();

------=_NextPart_000_000E_01CC46D2.4C8E6A60--
