function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*** BEGIN eCustomerOpinions code v2.5 ******/
/* Copyright (c) 2004 eCustomerOpinions.com  */
/* Please refer to our Terms & Conditions    */
/* for conditions of use                     */
/* Do NOT modify this code unless directed   */
/* to do so by a member of eCustomerOpinions */
/* staff                                     */
/*********************************************/

var ecos_surveyid = 668192092;
var ecos_testmode = 0;
var ecos_host = 'ecustomeropinions.com';

var ecos_packed = 0;
var ecos_hitmode = 0;
var ecos_2stage = 0;
var ecos_hitme = 0;
var ecos_popunder = 0;

var ecos_data = '';
var ecos_data2 = '';
var ecos_data3 = '';

var isNav, isIE;

if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
	if (navigator.appName == 'Netscape') {
		isNav = true;
	} else {
		isIE = true;
	};
};


function buildurl(destpage) {
	var ecos_url = ecos_host + '/popup/' + destpage + '.php?sid=' + ecos_surveyid;

	if (document.location.protocol == 'https:')
		ecos_url = 'https://' + ecos_url;
	else
		ecos_url = 'http://' + ecos_url;

	if (ecos_testmode > 0)
		ecos_url = ecos_url + '&testmode=1';

	ecos_url = ecos_url + '&r=' + Math.round(Math.random() * 100000);

	var myvar2 = '';
	myvar = window.location.href;

	var icount = 0;
	for (i=0; i<myvar.length; i++) {
		if (myvar.charAt(i) == '/')
			icount++;
		if (icount >= 3)
			myvar2 += myvar.charAt(i);
	};

	if (ecos_data.length > 0)	ecos_url += '&data=' + ecos_data;
	if (ecos_data2.length > 0)	ecos_url += '&data2=' + ecos_data;
	if (ecos_data3.length > 0)	ecos_url += '&data3=' + ecos_data;

	if ((screen.width > 0) && (screen.height > 0))
		ecos_url += '&xres=' + screen.width + '&yres=' + screen.height;

	if (screen.colordepth > 0)
		ecos_url += '&depth=' + screen.colordepth;

	ecos_url += '&url=' + escape(myvar2.substring(0,100));
	ecos_url += '&referrer=' + escape(document.referrer.substring(0,100));

	return ecos_url;
};


ecos_img = new Image;
ecos_img.src = buildurl('img');


function ecos_popup() {
	if (ecos_hitme > 0) {
		var sw;
		if (ecos_2stage > 0) {
			sw = window.open(buildurl('survey'), 'surveywin', 'location=0,toolbar=no,width=350,height=100,directories=no,status=no,scrollbars=yes,resizable=yes');
		} else {
			sw = window.open(buildurl('survey'), 'surveywin', 'location=0,toolbar=no,width=550,height=400,directories=no,status=no,scrollbars=yes,resizable=yes');
		};
		if (ecos_popunder > 0)
			if (sw)
				sw.blur();
	};
};


function ecos_run() {

	if (!(ecos_img.width > 0))
		return false;

	ecos_packed = ecos_img.width
	ecos_hitme = (ecos_packed >> 1) & 1;
	ecos_2stage = (ecos_packed >> 2) & 1;
	ecos_hitmode = (ecos_packed >> 3) & 3;
	ecos_popunder = (ecos_packed >> 5) & 1;

	if (ecos_hitme > 0) {
		if (ecos_hitmode == 0) {
			ecos_popup();
		} else if (ecos_hitmode == 1) {
			if (isNav || isIE)
				window.onunload = ecos_popup;
		};
	};

	return true;
};


if (isNav || isIE) {
	ecos_img.onload = ecos_run;
} else {
	window.onload = ecos_run;
};

/*** END eCustomerOpinions code *************/

