


function f(){}f.raise=function(a){if(typeof Error!="undefined"){throw new Error(a||"Assertion Failed");}else{throw a;}};f.fail=function(a){if(a===undefined)a="Assertion failed";if(!(C===undefined))C(a+"\n");f.raise(a)};f.isTrue=function(a,b){if(!a){if(b===undefined)b="Assertion failed";f.fail(b)}};f.equals=function(a,b,c){if(a!=b){if(c===undefined){c="AS_Assert.equals failed: <"+a+"> != <"+b+">"}f.fail(c)}};f.typeOf=function(a,b,c){if(typeof a==b)return;if(a||a==""){try{if(b==f.TYPE_MAP[typeof a]||
a instanceof b){return}}catch(d){}}if(c===undefined){if(typeof b=="function"){var e=b.toString().match(/^\s*function\s+([^\s\{]+)/);if(e)b=e[1]}c="AS_Assert.typeOf failed: <"+a+"> not typeof "+b}f.fail(c)};f.TYPE_MAP={string:String,number:Number,"boolean":Boolean};f.numArgs=function(a,b){var c=f.numArgs.caller;if(c&&c.arguments.length!=a){if(b===undefined){b=c.name+" expected "+a+" arguments  but received "+c.arguments.length}f.fail(b)}};var B=false;function C(a){try{throw a;}catch(b){D(b)}}function D(a,b){var c="Javascript exception: "+(b?b:"")+" "+a;if(y()){c+=" "+a.name+": "+a.message+" ("+a.number+")"}var d="";if(typeof a=="string"){d=a+"\n"}else{for(var e in a){try{d+=e+": "+a[e]+"\n"}catch(m){}}}d+=z(D.caller);H(c+"\n"+d,1)}var S=/function (\w+)/;function F(a){var b=S.exec(String(a));if(b){return b[1]}return""}function z(a){try{if(!y()&&!(s("safari")||s("konqueror"))&&s("mozilla")){return Error().stack}if(!a)return"";var b=
"- "+F(a)+"(";for(var c=0;c<a.arguments.length;c++){if(c>0)b+=", ";var d=String(a.arguments[c]);if(d.length>40){d=d.substr(0,40)+"..."}b+=d}b+=")\n";b+=z(a.caller);return b}catch(e){return"[Cannot get stack trace]: "+e+"\n"}}var I;var i=null,w=false;function G(){if((i==null||i.closed)&&!w){try{w=true;i=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");i.blur();i.document.open();w=false;var a="<font color=#ff0000><b>To turn off this debugging window,hit 'D' inside the main caribou window, then close this window.</b></font><br>";
A(a)}catch(b){}}}




function H(a,b)
{
	if(!B)
	{
		if (typeof r != "undefined")
		{
			r(E(a))}
		return}try{var c=(new Date).getTime()-I,d="["+c+"] "+E(a).replace(/\n/g,"<br>")+"<br>";if(b==1){d="<font color=#ff0000><b>Error: "+d+"</b></font>";i.focus()}A(d)}catch(e){}}function A(a){if(!B){return}try{G();i.document.write(a);i.scrollTo(0,1000000)}catch(b){}};function s(a){if(a in v){return v[a]}return v[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var v={};function y(){return s("msie")&&!window.opera};var O=/&/g,U=/</g,T=/>/g;function E(a){if(!a)return"";return a.replace(O,"&amp;").replace(U,"&lt;").replace(T,"&gt;").replace(V,"&quot;")}var V=/\"/g;function Q(a){return document.getElementById(a)}function R(a){return document.all[a]}var P=document.getElementById?Q:R;function r(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+
"::"+a);return}}catch(b){}var c=P("log");if(c){var d="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+a+"</span></p>";c.innerHTML=d+c.innerHTML}else{window.status=a}};var _XH_ACTIVE_X_IDENTS=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","MICROSOFT.XMLHTTP.1.0","MICROSOFT.XMLHTTP.1","MICROSOFT.XMLHTTP"],_xh_ieProgId=undefined;function _XH_XmlHttpInit(){if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var a=0;a<_XH_ACTIVE_X_IDENTS.length;a++){var b=_XH_ACTIVE_X_IDENTS[a];try{new ActiveXObject(b);_xh_ieProgId=b;break}catch(c){}}if(undefined===_xh_ieProgId){throw"Could not create ActiveXObject. ActiveX might be disabled, or msxml might not be installed";
}}}_XH_XmlHttpInit();

function L()
{
	if (_xh_ieProgId !== undefined)
	{
		return new ActiveXObject(_xh_ieProgId)
	}
	else
	{
		return new XMLHttpRequest
	}
}


function M(a,b,c)
{
	a.onreadystatechange = c;
	a.open("GET",b,true);
	N(a,null)
}
function N(a,b)
{
	try
	{
		a.send(b)
	}catch(c)
	{
		r("XMLHttpSend failed " + c.toString() + "<br>" + c.stack);
		throw c;
	}
}

;if("undefined"==typeof r){r=function(){}};function findFormElement(a){var b=document.getElementById(a);if(b!=null){return b}var c=document.getElementsByTagName("form");for(var d=0;d<c.length;d++){var e=c[d];if(e[a]!==null){return e[a]}}return null}function wh(a,b){if(document.getElementById){document.getElementById("login").style.height=b+"px";document.getElementById("login").style.width=a+"px"}}String.prototype.trim=function(){return this.replace(/^\s*|\s*$/g,"")};String.prototype.a=function(){return this.replace(/^\s*|\s(?=\s)|\s*$/g,"")};
function setButtonEnableDependency(a,b,c){var d=findFormElement(b),e=findFormElement(a);if(!d||!e){return}if(e._fields==null){e._fields=[]}e._fields[e._fields.length]=d;e.enableIfClear=function(){var t=true;for(var l=0;l<this._fields.length;l++){var p=this._fields[l];if(!p.isOk()){t=false;break}}this.disabled=!t};var m=function(){return String(this.value).trim().length>0},x=function(){return this.checked},k=function(){return String(this.value).trim().length>0},n=function(){if(!c){return true}else{return this.value!=
c}};if(d.tagName=="INPUT"){if(d.type=="text"){d.isOk=m}else if(d.type=="checkbox"){d.isOk=x}}else if(d.tagName=="TEXTAREA"){d.isOk=k}else if(d.tagName=="SELECT"){d.isOk=n}d._button=e;var g=function(){this._button.enableIfClear()};d.onchange=g;d.onkeyup=g;d.onblur=g;d.onclick=g;d.onfocus=g;d.onmouseover=g;d.onmouseout=g;e.enableIfClear()}function getPos(a){var b={},c=a;b.left=c.offsetLeft;b.top=c.offsetTop;while(c.offsetParent!=null){var d=c.offsetParent;b.left+=d.offsetLeft;b.top+=d.offsetTop;c=d}return b}

function RaterControl(a,b,c,d,keyword,limStart,page)
{
	var e = "./layout/relaunch/rater/";
	var m = document.getElementById(a);
	if (!m)
		return;

	var x = document.createElement("div");
	var k = document.createElement("div");
	var n = document.createElement("div");

	x.className="raterPrompt";
	k.className="raterThanks";
	var g=this;
	k.style.display="none";
	k.className="raterText1";
	k.innerHTML=b["ThankYou"];
	m.appendChild(k);
	n.style.display="block";
	n.innerHTML="<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td></td></tr></table>";

	var t = n.getElementsByTagName("td")[0];
	var l = document.createElement("span");
	l.innerHTML = b["RateThisTool"] + ":&nbsp;";
	t.className="raterText2";
	function p(j)
	{
		var o=document.createElement("img");
		o.src=j;
		o.align="top";
		o.setAttribute("width","14");
		o.setAttribute("height","14");
		return o
	}
	var q=[];
	q[0] = p(e+"sad.gif");
	q[1] = p(e+"meh.gif");
	q[2] = p(e+"happy.gif");
	for(var u = 0; u < q.length ; u++)
	{
		var h=q[u];
		h.submitValue = u+1;
		h.rater = this;
		h.onclick = function()
		{
			this.rater.submitResponse(this.submitValue)
		};
		h.descText = b["value_"+h.submitValue];
		h.onmouseover = function()
		{
			this.className="faceOver";
			var j=getPos(this);
			Bubble.show(this.descText,j.left,
	j.top)
		};
		h.onmouseout = function()
		{
			this.className="";
			Bubble.hide()
		};
			h.style.cursor="pointer";
			l.appendChild(h)
		}
		t.appendChild(l);
		m.appendChild(n);
		this.hide = function(j)
		{
			n.style.display = "none";
			Bubble.hide();
			if (j)
			{
				k.style.display = "block";
				window.setTimeout(g.hide,1500)
			}
			else
			{
				m.style.display = "none"
			}
		};
		this.submitResponse = function(j)
		{
			var o = d+"?mode=rateres&keyword="+keyword+"&lim_start="+limStart+"&page="+page+"&question="+c+"&response="+j+"&c="+(new Date).getTime();
			try
			{
				var J = L();
				M(J,o,null)
			}
			catch (W)
			{
				var K = new Image;
				K.src=o
			}
			g.hide(true)
		}
	}
	
	var Bubble = 
	{
		imagePath:"./layout/relaunch/rater/",init:function()
											{
												if (Bubble.bubbleDiv == null)
												{
													var a = document.createElement("div");
													a.style.position = "absolute";
													a.style.top = 0;
													a.style.left = 0;
													var b = '<table cellpadding="0" cellspacing="0" border="0"><tr><td class="rate" colspan="5"><div style="font-family:Arial;background:#fff;padding:6px;border-width:1px 1px 0px 1px;border-style:solid;border-color:#000;" id="bubble_msg"></div></td></tr><tr><td class="rate" ><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="raterBubbleBL" style="width:2px" valign="top"><img src="'+Bubble.imagePath+'1.gif"></td><td class="raterBubbleBottom" valign="top" ><img src="'+Bubble.imagePath+'1.gif"></td><td class="rate" style="width:10px" valign="top"><img src="'+Bubble.imagePath+'bubble_tail.gif" height="11" width="10"></td><td class="raterBubbleBottom2" valign="top"><img src="'+Bubble.imagePath+'1.gif"></td><td class="rateBubbleBR" valign="top"><img src="'+Bubble.imagePath+'1.gif" height="2" width="2"></td></tr></table></td></tr></table>';
													a.innerHTML=b;
													a.style.display="none";
													a.style.visibility="hidden";
													document.body.appendChild(a);
													Bubble.msgBox = document.getElementById("bubble_msg");
													Bubble.bubbleDiv = a
												}
												Bubble.msgBox.innerHML="&nbsp;"
											},
										show:function(a,b,c)
											{
												Bubble.init();
												var d = 12;
												var e = 16;
												Bubble.bubbleDiv.style.display = "block";
												Bubble.msgBox.innerHTML = a;
												Bubble.bubbleDiv.style.left = b - Bubble.msgBox.offsetWidth + e;
												Bubble.bubbleDiv.style.top = c - Bubble.msgBox.offsetHeight - d;
												Bubble.bubbleDiv.style.visibility = "visible"
											},
										hide:function()
											{
												Bubble.bubbleDiv.style.visible = "hidden";
												Bubble.bubbleDiv.style.display = "none";
												Bubble.bubbleDiv.style.top = "0px";
												Bubble.bubbleDiv.style.left = "0px"
											}
	};

