
function sendToFriend() 
{ 
	var strPath = '../userdata/sendtofriend.asp?DBID=' + lDatabaseID + '&LNGID=' + lLanguageID;
	var sendToFriendWin = window.open(strPath,'PopUp','width=520,height=500,scrollbars,resizable');
	sendToFriendWin.focus();
}

var ddName = 'Answer';
var ddClickToOpen = 'Click to open the';
var ddClickToClose = 'Click to close the';
if(document.getElementById)
{
	document.write('<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen">');
}
///////////////Open/Close DD for FAQ////////////////

function closeOpenDescription(e)
{	
	if (ddName != 'stopIt')
	{
		var sourceEl = document.getElementById && !document.all ? e.target : event.srcElement;
		var targetEl;
		if(sourceEl.tagName != 'DT') sourceEl = sourceEl.parentNode;
		//alert(sourceEl.tagName);
		if(sourceEl.tagName == 'DT')
		{
			targetEl = sourceEl.nextSibling.tagName == 'DD' ? sourceEl.nextSibling : sourceEl.nextSibling.nextSibling;
			targetEl.style.display = targetEl.style.display == 'block' ? 'none' : 'block';
			sourceEl.title = sourceEl.title == ddClickToOpen + ' ' + ddName ? ddClickToClose + ' ' + ddName : ddClickToOpen + ' ' + ddName;
		}	
		//alert(targetEl.tagName);
	}
}

function makeDTOver(e)
{	
		var sourceEl = document.getElementById && !document.all ? e.target : event.srcElement;
		var targetEl;
		if(sourceEl.tagName != 'DT') sourceEl = sourceEl.parentNode;
		if(sourceEl.tagName == 'DT')
		{			
			sourceEl.style.textDecoration = sourceEl.style.textDecoration == 'underline' ? 'none' : 'underline';
		}	
}

if(document.getElementById)
{	
	document.onclick = closeOpenDescription;
	document.onmouseover = makeDTOver;
	document.onmouseout = makeDTOver;
}

function openAll()
{ 
	var curElement;
	for(i=0; i<document.getElementsByTagName('DD').length; i++)
	{
		curElement = document.getElementsByTagName('DD').item(i);
		curElement.style.display = 'block';
		curElement.previousSibling.title = ddClickToClose + ' ' + ddName;
	}
}

function closeAll()
{
	var curElement;
	for(i=0; i<document.getElementsByTagName('DD').length; i++)
	{
		curElement = document.getElementsByTagName('DD').item(i);
		curElement.style.display = 'none';
		curElement.previousSibling.title = ddClickToOpen + ' ' + ddName;
	}

}



/////////// standard trim function - clean spaces, tabs and new line symbols at the beginning and the end of the string ////////
function trim(str)
{
	var lead = 0, trail = str.length - 1;
	while(str.charCodeAt(lead)  < 33) lead++;
	while(str.charCodeAt(trail)  < 33) trail--;
	return lead > trail ? '' : str.substring(lead, trail + 1);
}

function notValidCharsInValue(fldValue, fldNotValidChars)
{
	var notGoodChars = fldNotValidChars;
	var i = 0;
	for (i =0; i < fldValue.length; i++)
	{
		if (notGoodChars.indexOf(fldValue.charAt(i)) != -1)	return true; 
	}
	return false;
}

function ValidCharsInValue(fldValue, fldValidChars)
{
	var goodChars = fldValidChars;
	var i = 0;	

	for (i =0; i < fldValue.length; i++)
	{
		if (goodChars.indexOf(fldValue.charAt(i)) == -1) return false; 
	}
	return true;
}

////////// Check the Search forms //////////////
function checkSearch(frmObj)
{
	for (i=0; i<frmObj.length; i++)
	{
		if (frmObj[i].type.indexOf('text') == 0)
		{
			frmObj[i].value = trim(frmObj[i].value);
			if (frmObj[i].value.length == 0)
			{
				alert('Please type the keyword to search');
				frmObj[i].focus();
				return false;
				break;
			}
		}
	}
	return true;
}

////////// Check all other forms //////////////
function isValidEmail(strEmail)
{
	if (notValidCharsInValue(strEmail, "!#$%^&*()+=<>?/,\|~`\"[]") || strEmail.indexOf('@') <= 0 || strEmail.indexOf('.') <= 0) 
	{
		alert('Please type a valid e-mail address!');
		return false;
	}
	return true;
}

function isValidPhone(strPhone) 
{
	if (!ValidCharsInValue(strPhone, "0123456789()-+ ") || strPhone.length < 6)
	{
		alert('Please type a valid phone number!');
		return false;
	}
	return true;
}

function isNumber(strNumber) 
{
	if (!ValidCharsInValue(strNumber, "0123456789 "))
	{
		alert('Please type a valid number!');
		return false;
	} 
	return true;
}

function isHumanName(strName) 
{
	if (notValidCharsInValue(strName, "0123456789!@#$%^&*()_+=<>?/.,\|~`\"[]"))
	{
		alert('Please type a valid human name!');
		return false;
	} 
	return true;
}

function isValidCVFileName(fileName) 
{
	var strExt = fileName.substring(fileName.length - 4, fileName.length);
	strExt = strExt.toLowerCase();	
	if (strExt != ".txt" && strExt != ".rtf" && strExt != ".doc" && strExt != ".pdf")
	{
		alert('Please send a file in one of the following formats: \n \".txt\", \".rtf\", \".doc\", \".pdf\"!');
		return false;
	}
	return true;
}


function isValidPassword(curField)
{
	var strValue=curField.value;
	if ( notValidCharsInValue(strValue, "!#@$%^&*()_+=<>?/,\|~`\"[]") || strValue.length < 6 ) return false;
	return true;
}

function isValidUserName(curField)
{
	var strValue=curField.value;
	if ( notValidCharsInValue(strValue, "!#@$%^&*()_+=<>?/,\|~`\"[]") || strValue.length < 6 ) return false;
	return true;
}

function isValidNickName(curField)
{
	var strValue=curField.value;
	if ( notValidCharsInValue(strValue, "!#@$%^&*()_+=<>?/,\|~`\"[]") || strValue.length < 6 ) return false;
	return true;
}


function containValidChars(curField)
{
	var curName = curField.name;
	var curFldType = String(curField.getAttribute('fldType')).toUpperCase();
	
	if (curFldType=='EMAIL')
	{ 
		return isValidEmail(curField.value); 
	}
	else if (curFldType=='PHONE' || curFldType=='FAX' || curFldType=='MOBILEPHONE' || curFldType=='CELLPHONE') 
	{ 
		return isValidPhone(curField.value); 
	}
	else if (curFldType=='NUMERIC' || curFldType=='ZIP')
	{ 
		return isNumber(curField.value); 
	}
	else if (curFldType=='FIRSTNAME' || curFldType=='FULLNAME' || curFldType=='LASTNAME' || curFldType=='MIDDLENAME') 
	{ 
		return isHumanName(curField.value); 
	}
	else if (curFldType=='CVFILE')
	{ 
		return isValidCVFileName(curField.value);
	}
	return true;
}

function showAlert(curField)
{
	if ( curField.verefication_alert!=undefined)
	{
		strAlert = curField.getAttribute('verefication_alert').toString();
		alert(strAlert);
	}
	else
	{
		strAlert = 'Please provide all required information';
		alert(strAlert);
	}
}

/////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////  checkForm   ////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
// Checks all mandatory inputs in a form...

function checkForm(frmObj)
{
	var found;
	var i, ii;
	var curField, curName, curType;
	var isFilled, isRequired;	
	var passCounter = 0;
	var passField1;
	var curFldType;
	with(frmObj)
	{
		for (i = 0; i < elements.length; i++)
		{
			curField = elements[i];
			if (curField.disabled || curField.tagName == 'FIELDSET' || curField.tagName == 'OBJECT') continue;
			curField.value = trim(curField.value);
			curName = curField.name;
			curType = curField.type;
			isFilled =  trim(curField.value) != '' ? true : false;
			isRequired = String(curField.getAttribute('IsMandatory')).toUpperCase() == 'TRUE' ? true : false;
			curFldType = String(curField.getAttribute('fldType')).toUpperCase();

			if(curType == 'text' && isFilled && !containValidChars(curField))
			{
					openRelevantTab(curField, frmObj);
					curField.focus();
					curField.select();
					return false;
			}
			else if (elements[curName].length && isRequired &&  (curType == 'radio' || curType == 'checkbox'))
			{
				found = 0;
				for (ii = 0; ii < elements[curName].length; ii++)
				{
					if (elements[curName][ii].checked)
					{
						found = 1;
						break;
					}
				}
				if (found == 0)
				{
					showAlert(curField);
					openRelevantTab(curField, frmObj);
					elements[curName][0].focus();	
					//elements[curName][0].click();
					return false;
				}
			}
			else if (isRequired && curType == 'select-one')
			{
				if (curField.selectedIndex == 0)
				{
					showAlert(curField);
					openRelevantTab(curField, frmObj);
					curField.focus();
					return false;
				}
			}
			else if (isRequired && curType == 'select-multiple')
			{
				if (curField.selectedIndex == -1)
				{
					showAlert(curField);
					openRelevantTab(curField, frmObj);
					curField.focus();
					return false;
				}
			}
			else if (isRequired && (curType == 'text' || curType == 'textarea' || curType == 'password'))
			{
				if (!isFilled)
				{
					showAlert(curField);
					openRelevantTab(curField, frmObj);
					curField.focus();
					return false;
				}
				if ( curType == 'text' && curFldType=='USERNAME' && !isValidUserName(curField))
				{
					alert('Username length have to be more than 6 chars.');
					openRelevantTab(curField, frmObj);
					curField.focus();
					return false;
				}
				if ((curType == 'password' || curFldType=='PASSWORD') && !isValidPassword(curField))
				{
					alert('Password length have to be more than 6 chars.');
					openRelevantTab(curField, frmObj);
					curField.focus();
					return false;
				}
			}
			else if (isRequired && curType == 'hidden')
			{
				if (!isFilled)
				{
					showAlert(curField);
					openRelevantTab(curField, frmObj);
					eval(curField.getAttribute('errorEval'));
					return false;
				}
			}
			else if(curType == 'file' && isFilled && !containValidChars(curField))
			{
					openRelevantTab(curField, frmObj);
					curField.focus();
					curField.select();
					return false;
			}

			if ((curType == 'password' || curFldType=='PASSWORD') && curFldType!='ORIGINALPASSWORD' && passCounter == 0)
			{
				passCounter++;
				passField1 = curField;
			}
			else if ((curType == 'password' || curFldType=='PASSWORD') && curFldType!='ORIGINALPASSWORD' && passCounter == 1)
			{
				if (passField1.value != curField.value)
				{
					alert('The entered passwords do not match.\nPlease re enter them.');
					curField.value = "";
					openRelevantTab(curField, frmObj);
					passField1.focus();
					passField1.select();
					return false;
				}
			}
			
		}
	}
	return true;
}




////////////////////////////////////////////////////////////
// this function toggles tabs and related content divs on same page
////////////////////////////////////////////////////////////

function toggleTab(tabID, objA)
{
	//open related div by ID
	var arrAllDivs = document.getElementsByTagName('DIV');
	for (i=0; i<arrAllDivs.length; i++)
	{
		if (arrAllDivs[i].id.indexOf('tabDiv_') == 0) arrAllDivs[i].style.display = 'none';
	}
	document.getElementById('tabDiv_'+tabID).style.display = 'block';

	//set current tab selected ( <TD class="this"> )
	var objTabTd = objA.parentNode.parentNode.firstChild;
	do
	{
		objTabTd.className="";
		objTabTd = objTabTd.nextSibling; 
	}
	while (null != objTabTd)

	objA.parentNode.className = "this";
}

////////////////////////////////////////////////////////////
// if we need open a tab immediately onload
// place this JS+ASP code on the page:
// addEvent(window, 'load', function(){toggleTabOnLoad(<%=strCurrentTab%>)});
////////////////////////////////////////////////////////////
function toggleTabOnLoad(tabID)
{
	if(document.getElementById('tabA_' + tabID))
	{
		toggleTab(tabID, document.getElementById('tabA_' + tabID))
	}
}

//////////////////////////////////////////////////////////////////////
// if we work with tabs, we must first open the relevant tab
// the function begins work if we have any tab with 'tabDiv_' string in ID
// each div with 'tabDiv_X' string in ID must have related '<a id="tabA_X">' element
//////////////////////////////////////////////////////////////////////
function openRelevantTab(curObj, objForm)
{
	var arrDivs = objForm.getElementsByTagName('DIV');
	var bTabsFound = false;
	var lDivIdNum;
	for (i = 0; i < arrDivs.length; i++ )
	{
		if(arrDivs[i].id.indexOf('tabDiv_') == 0)
		{
			bTabsFound = true;
			break;
		}
	}
	if(bTabsFound)
	{
		while(curObj.tagName != 'FORM' && curObj.style.display != 'none') curObj = curObj.parentNode;
		if(curObj.style.display == 'none' && curObj.id.indexOf('tabDiv_') == 0)
		{
			lDivIdNum = curObj.id.substring(curObj.id.lastIndexOf('_')+1, curObj.id.length);
			toggleTab(lDivIdNum, document.getElementById('tabA_' + lDivIdNum));
		}
	}
}






































function l_a(a){throw a;}var l_b=true,l_c=null,l_d=false;Function.prototype.bind=function(a){if(typeof this!="function")l_a(new Error("Bind must be called as a method of a function object."));var b=this,c=Array.prototype.splice.call(arguments,1,arguments.length);return function(){for(var d=c.concat(),e=0;e<arguments.length;e++)d.push(arguments[e]);return b.apply(a,d)}};var l_e,l_f,l_aa;
(function(){function a(f){if(f.Vf==l_c)f.Vf=++e;return f.Vf}function b(f,g,h,i){f=a(f);h=a(h);i=!!i;return g=f+"_"+g+"_"+h+"_"+i}function c(f){var g=Array.prototype.splice.call(arguments,1,arguments.length);return d[f].listener.apply(l_c,g)}var d={},e=0;l_e=function(f,g,h,i){var j=b(f,g,h,i);if(j in d)return j;var k=c.bind(l_c,j);d[j]={listener:h,proxy:k,event:g,node:f,useCapture:i};if(f.addEventListener)f.addEventListener(g,k,i);else if(f.attachEvent)f.attachEvent("on"+g,k);else l_a(new Error("Node {"+f+
"} does not support event listeners."));return j};l_f=function(f,g,h,i){f=b(f,g,h,i);return l_aa(f)};l_aa=function(f){if(!(f in d))return l_d;var g=d[f],h=g.proxy,i=g.event,j=g.node;g=g.useCapture;if(j.removeEventListener)j.removeEventListener(i,h,g);else j.detachEvent&&j.detachEvent("on"+i,h);delete d[f];return l_b}})();var l_ba=l_d;function l_g(a){try{l_a(a)}catch(b){l_ca(b)}}function l_ca(a,b){b="Javascript exception: "+(b?b:"")+" "+a;if(l_h())b+=" "+a.name+": "+a.message+" ("+a.number+")";var c="";if(typeof a=="string")c=a+"\n";else for(var d in a)try{c+=d+": "+a[d]+"\n"}catch(e){}c+=l_da(l_ca.caller);l_ea(b+"\n"+c,1)}var l_fa=/function (\w+)/;function l_ga(a){if(a=l_fa.exec(String(a)))return a[1];return""}
function l_da(a){try{if(!l_h()&&!l_ha()&&l_i("mozilla"))return Error().stack;if(!a)return"";for(var b="- "+l_ga(a)+"(",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+=l_da(a.caller);return b}catch(e){return"[Cannot get stack trace]: "+e+"\n"}}var l_ia,l_j=l_c,l_ja=l_d;
function l_ka(){if((l_j==l_c||l_j.closed)&&!l_ja)try{l_ja=l_b;l_j=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");l_j.blur();l_j.document.open();l_ja=l_d;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>";l_la(a)}catch(b){}}
function l_ea(a,b){if(l_ba){try{var c=(new Date).getTime()-l_ia,d="["+c+"] "+l_ma(a).replace(/\n/g,"<br>")+"<br>";if(b==1){d="<font color=#ff0000><b>Error: "+d+"</b></font>";l_j.focus()}}catch(e){}l_la(d)}else typeof l_k!="undefined"&&l_k(l_ma(a))}function l_la(a){if(l_ba)try{l_ka();l_j.document.write(a);l_j.scrollTo(0,1E6)}catch(b){}};function l_i(a){if(a in l_na)return l_na[a];return l_na[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var l_na={};function l_h(){return l_i("msie")&&!window.opera}function l_ha(){return l_i("safari")||l_i("konqueror")}function l_oa(a){if(typeof Error!="undefined")l_a(new Error(a||"Assertion Failed"));else l_a(a)}function l_pa(a){a=a||"Assertion failed";typeof l_g!="undefined"&&l_g(a+"\n");l_oa(a)}function l_qa(a,b){if(!a){b=b||"Assertion failed";l_pa(b)}}
function l_l(a,b){if(a==l_c||a.className==l_c)return l_d;if(a.className==b)return l_b;a=a.className.split(" ");for(var c=0;c<a.length;c++)if(a[c]==b)return l_b;return l_d}function l_m(a,b){l_l(a,b)||(a.className+=" "+b)}function l_n(a,b){if(a.className!=l_c)if(a.className==b)a.className="";else{for(var c=a.className.split(" "),d=[],e=l_d,f=0;f<c.length;f++)if(c[f]!=b)c[f]&&d.push(c[f]);else e=l_b;if(e)a.className=d.join(" ")}}
function l_o(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)l_ra(a,b,c);return c}function l_ra(a,b,c){b.select(a)&&c.push(a);for(a=a.firstChild;a;a=a.nextSibling)l_ra(a,b,c)}function l_sa(a){var b=a.offsetLeft,c=a.offsetTop;if(a.offsetParent!=l_c){a=l_sa(a.offsetParent);b+=a.x;c+=a.y}return{x:b,y:c}}
var l_ta={qd:function(a){return a.document.body.scrollTop},rd:function(a){return a.document.documentElement.scrollTop},Ib:function(a){return a.pageYOffset}},l_ua={qd:function(a){return a.document.body.scrollLeft},rd:function(a){return a.document.documentElement.scrollLeft},Ib:function(a){return a.pageXOffset}},l_va={qd:function(a){return a.document.body.clientHeight},rd:function(a){return a.document.documentElement.clientHeight},Ib:function(a){return a.innerHeight}};
function l_p(a,b){try{if(l_ha())return b.Ib(a);else if(!window.opera&&"compatMode"in a.document&&a.document.compatMode=="CSS1Compat")return b.rd(a);else if(l_h())return b.qd(a)}catch(c){}return b.Ib(a)}var l_wa=/&/g,l_xa=/</g,l_ya=/>/g;function l_ma(a){if(!a)return"";return a.replace(l_wa,"&amp;").replace(l_xa,"&lt;").replace(l_ya,"&gt;").replace(l_za,"&quot;")}var l_za=/\"/g,l_Aa=/\+/g;
function l_Ba(a){var b={};b.clientX=a.clientX;b.clientY=a.clientY;b.pageX=a.pageX;b.pageY=a.pageY;b.type=a.type;b.srcElement=a.srcElement;b.target=a.target;b.cancelBubble=a.cancelBubble;b.explicitOriginalTarget=a.explicitOriginalTarget;b.button=a.button;b.shiftKey=a.shiftKey;b.ctrlKey=a.ctrlKey;return b}function l_Ca(a){return document.getElementById(a)}function l_Da(a){return document.all[a]}var l_Ea=document.getElementById?l_Ca:l_Da;
function l_k(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var c=l_Ea("log");if(c){a="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+a+"</span></p>";c.innerHTML=a+c.innerHTML}else window.status=a};function l_q(){}l_q.raise=function(a){if(typeof Error!="undefined")l_a(new Error(a||"Assertion Failed"));else l_a(a)};l_q.fail=function(a){a=a||"Assertion failed";typeof l_g!="undefined"&&l_g(a+"\n");l_q.raise(a)};l_q.isTrue=function(a,b){if(!a){if(b===undefined)b="Assertion failed";l_q.fail(b)}};l_q.equals=function(a,b,c){if(a!=b){if(c===undefined)c="AS_Assert.equals failed: <"+a+"> != <"+b+">";l_q.fail(c)}};
l_q.typeOf=function(a,b,c){if(typeof a!=b){if(a||a=="")try{if(b==l_q.TYPE_MAP[typeof a]||a instanceof b)return}catch(d){}if(c===undefined){if(typeof b=="function")if(c=b.toString().match(/^\s*function\s+([^\s\{]+)/))b=c[1];c="AS_Assert.typeOf failed: <"+a+"> not typeof "+b}l_q.fail(c)}};l_q.TYPE_MAP={string:String,number:Number,"boolean":Boolean};
l_q.numArgs=function(a,b){var c=l_q.numArgs.caller;if(c&&c.arguments.length!=a){if(b===undefined)b=c.name+" expected "+a+" arguments  but received "+c.arguments.length;l_q.fail(b)}};function l_r(a,b,c){this.x=a;this.y=b;this.coordinateFrame=c||l_c}l_r.prototype.toString=function(){return"[P "+this.x+","+this.y+"]"};l_r.prototype.clone=function(){return new l_r(this.x,this.y,this.coordinateFrame)};function l_s(a,b){this.dx=a;this.dy=b}l_s.prototype.toString=function(){return"[D "+this.dx+","+this.dy+"]"};function l_t(a,b,c,d,e){this.x=a;this.y=b;this.w=c;this.h=d;this.coordinateFrame=e||l_c}
l_t.prototype.contains=function(a){return this.x<=a.x&&a.x<this.x+this.w&&this.y<=a.y&&a.y<this.y+this.h};l_t.prototype.toString=function(){return"[R "+this.w+"x"+this.h+"+"+this.x+"+"+this.y+"]"};l_t.prototype.clone=function(){return new l_t(this.x,this.y,this.w,this.h,this.coordinateFrame)};function l_u(a){function b(g){for(var h=a.offsetParent;h&&h.offsetParent;h=h.offsetParent){if(h.scrollLeft)g.x-=h.scrollLeft;if(h.scrollTop)g.y-=h.scrollTop}}if(!a)return l_c;var c;c=a.ownerDocument&&a.ownerDocument.parentWindow?a.ownerDocument.parentWindow:window;if(a.ownerDocument&&a.ownerDocument.getBoxObjectFor){var d=a.ownerDocument.getBoxObjectFor(a);c=new l_t(d.x,d.y,d.width,d.height,c);b(c);return c}if(a.getBoundingClientRect){d=a.getBoundingClientRect();return new l_t(d.left+l_p(c,l_ua),
d.top+l_p(c,l_ta),d.right-d.left,d.bottom-d.top,c)}for(var e=d=0,f=a;f.offsetParent;f=f.offsetParent){d+=f.offsetLeft;e+=f.offsetTop}c=new l_t(d,e,a.offsetWidth,a.offsetHeight,c);b(c);return c}function l_Fa(a){if(!a)return l_c;a=l_u(a);return new l_r(a.x,a.y,a.coordinateFrame)}
function l_v(a){var b=0,c=0;if(a.pageX||a.pageY){b=a.pageX;c=a.pageY}else if(a.clientX||a.clientY){b=a.target?a.target:a.srcElement;c=b.ownerDocument&&b.ownerDocument.parentWindow?b.ownerDocument.parentWindow:window;b=a.clientX+l_p(c,l_ua);c=a.clientY+l_p(c,l_ta)}return new l_r(b,c,window)};var l_Ga=2*Math.PI/16,l_w=l_c,l_x=0,l_y=undefined,l_z=undefined,l_A=undefined,l_B=undefined,l_C=undefined,l_D=undefined,l_E=undefined,l_F=undefined,l_Ha=l_d,l_G=undefined,l_H=undefined;function _DD_Install(a){a||(a=document);l_H=a;l_e(l_H.body,"mousedown",l_Ia)}var l_Ja=[];function l_Ka(a){l_Ja.push(a)}function l_La(a,b){for(var c=l_Ja.length-1;c>=0;--c){var d=l_Ja[c](a,b);if(d)return d}}var l_I;
function l_Ia(a){l_I=l_Ba(a||window.event);l_e(l_H.body,"mousemove",l_Ma);l_e(l_H.body,"mouseup",l_Na);return l_d}
function l_Oa(a){for(var b=undefined,c=a.srcElement||a.target;c;c=c.parentNode)if(b=l_La(c,a)){l_z=l_v(a);if(b.sg(a,c)){if(!(l_w&&l_x>=0&&l_x<6&&1===1+l_x%1&&l_D&&0===(l_D&-4))){c="Bogus drag: el="+l_w+", type="+l_x+", axis mask="+l_D;l_J();l_oa(c)}a.cancelBubble=l_b;l_y=b;l_A=l_z;l_B={x:l_w.offsetLeft,y:l_w.offsetTop,w:l_w.offsetWidth,h:l_w.offsetHeight};if(l_x===4)l_C=[l_z];l_E=new l_s(0,0);l_F=new l_s(0,0);if(l_x===1||l_x===2||l_x===5){l_x!==2&&l_y.useUserDefinedAlpha&&!l_y.useUserDefinedAlpha()&&
l_Pa(l_w,l_b);l_G=l_w.style.zIndex;l_w.style.zIndex=2E3}l_h()?l_e(l_H.body,"mouseleave",l_K):l_e(l_H.body,"mouseout",l_K)}else l_J();return l_d}return l_b}function l_Na(a){if(l_I){l_I=l_c;l_f(l_H.body,"mousemove",l_Ma);l_f(l_H.body,"mouseup",l_Na);for(var b=undefined,c=a.srcElement||a.target;c;c=c.parentNode)if((b=l_La(c,a))&&b.handleClick){b.handleClick(c,a);return l_d}}else{a=a||l_H.parentWindow.event;l_y.jf(a,l_w,l_x)?l_J():l_L()}}
function l_Ma(a){if(l_I){var b=l_Oa(l_I);l_I=l_c;if(b){l_L();return l_b}}if(!l_w)return l_b;if(!l_y)return l_b;var c=a||l_H.parentWindow.event;c.cancelBubble=l_b;var d=l_v(c);b=new l_s(d.x-l_z.x+l_E.dx,d.y-l_z.y+l_E.dy);if(!(b.dx|b.dy))return l_d;a=new l_s(b.dx,b.dy);l_z=d;l_Ha=l_b;d=l_Fa(l_w);if(l_D&1)l_F.dx+=a.dx;if(l_D&2)l_F.dy+=a.dy;if(l_y.Qb(c,l_w,l_x,a,l_F)){c=l_Fa(l_w);l_F.dx-=c.x-d.x;l_F.dy-=c.y-d.y;switch(l_x){case 1:case 2:case 5:l_E.dx=b.dx-a.dx;l_E.dy=b.dy-a.dy;break}switch(l_x){case 1:if(!(l_D&
1))a.dx=0;if(!(l_D&2))a.dy=0;if((b=l_w.currentStyle?l_w.currentStyle:l_w.ownerDocument.defaultView.getComputedStyle(l_w,""))&&b.position=="relative"){l_w.style.left=l_F.dx+"px";l_w.style.top=l_F.dy+"px"}else{b=l_w.offsetLeft+a.dx;c=l_w.offsetTop+a.dy;if(a.dx)l_w.style.left=b+"px";if(a.dy)l_w.style.top=c+"px";if(a.dx&&b!==l_w.offsetLeft)l_w.style.left=b+b-l_w.offsetLeft+"px";if(a.dy&&c!==l_w.offsetTop)l_w.style.top=c+c-l_w.offsetTop+"px"}break;case 5:a=l_u(l_w);if(l_D&1){c=l_z.x+l_E.dx;b=Math.min(c,
l_A.x);c=Math.abs(c-l_A.x);if(b!==a.x){b=b;l_w.style.left=b+"px";if(b!==l_w.offsetLeft)l_w.style.left=b+b-l_w.offsetLeft+"px"}if(c!==a.w){l_w.style.width=c+"px";if(c!=l_w.offsetWidth){c=Math.max(0,c+c-l_w.offsetWidth);l_w.style.width=c+"px"}}}if(l_D&2){c=l_z.y+l_E.dy;b=Math.min(c,l_A.y);d=Math.abs(c-l_A.y);if(b!==a.y){c=b;l_w.style.top=c+"px";if(c!==l_w.offsetTop)l_w.style.top=c+c-l_w.offsetTop+"px"}if(d!==a.h){l_w.style.height=d+"px";if(d!=l_w.offsetHeight){d=Math.max(0,d+d-l_w.offsetHeight);l_w.style.height=
d+"px"}}}break;case 2:if(a.dx&&l_D&1){b=l_w.offsetWidth;c=b+a.dx;if(c<0){l_E.dx+=c;c=0}if(c<1){l_E.dx+=c-1;c=1}l_w.style.width=c+"px";if(c!=l_w.offsetWidth){c+=c-l_w.offsetWidth;if(c<1)c=1;l_w.style.width=c+"px"}}if(a.dy&&l_D&2){b=l_w.offsetHeight;d=b+a.dy;if(d<0){l_E.dy+=d;d=0}if(d<1){l_E.dy+=d-1;d=1}l_w.style.height=d+"px";if(d!=l_w.offsetHeight){d+=d-l_w.offsetHeight;if(d<1)d=1;l_w.style.height=d+"px"}}break;case 3:if(!(l_D&1))a.dx=0;if(!(l_D&2))a.dy=0;if(l_w.scrollBy)l_w.scrollBy(a.dx,a.dy);else{a.dx*=
-1;a.dy*=-1;b=l_w.scrollLeft;c=l_w.scrollLeft+l_w.scrollWidth-l_w.offsetWidth;d=l_w.scrollTop;var e=l_w.scrollTop+l_w.scrollHeight-l_w.offsetHeight;a.dx=Math.max(Math.min(a.dx,c),-b);a.dy=Math.max(Math.min(a.dy,e),-d);if(a.dx)l_w.scrollLeft+=a.dx;if(a.dy)l_w.scrollTop+=a.dy}break;case 4:if(a.dx|a.dy){if(l_C.length>=1){d=a;b=l_C[l_C.length-1];c=new l_s(d.dx+b.dx,d.dy+b.dy);e=l_d;if(c.dx*c.dx+c.dy*c.dy<=25)e=l_b;else{d=Math.atan2(d.dx,d.dy);e=Math.atan2(b.dx,b.dy);d=Math.abs((d-e+2*Math.PI)%(2*Math.PI));
e=d<l_Ga}if(e){b.dx=c.dx;b.dy=c.dy}else l_C.push(a)}else l_C.push(a);l_Qa(l_C)}break}}else l_L();return l_d}function l_K(a){a=a||window.event;(a=a.relatedTarget||a.toElement)||l_L()}
function l_J(){if(l_x!==0){if(l_w){l_x===4&&l_Qa([]);l_y.bf(l_w,l_x)}if(l_x===1||l_x===2||l_x===5){l_x!==2&&l_y.useUserDefinedAlpha&&!l_y.useUserDefinedAlpha()&&l_Pa(l_w,l_d);if(undefined!==l_G){l_w.style.zIndex=l_G;l_G=undefined}else delete l_w.style.zIndex}}l_w=l_c;l_x=0;l_B=l_z=undefined;l_D=0;l_E=undefined;l_Ha=l_d;if(l_y)l_h()?l_f(l_H.body,"mouseleave",l_K):l_f(l_H.body,"mouseout",l_K);l_y=undefined;l_f(l_H.body,"mousemove",l_Ma);l_f(l_H.body,"mouseup",l_Na)}
function l_L(){switch(l_x){case 1:var a=l_w.currentStyle?l_w.currentStyle:window.getComputedStyle(l_w,"");if(a&&a.position=="relative"){l_w.style.left="0px";l_w.style.top="0px"}else{l_w.style.left=l_B.x+"px";l_w.style.top=l_B.y+"px"}break;case 2:l_w.style.width=l_B.w+"px";l_w.style.height=l_B.h+"px";break;case 3:break;case 4:l_C=[];break;case 0:break;case 5:break;default:l_oa("failed to cancel drag with dd_dragType="+l_x)}l_J()}
function l_Pa(a,b){if(l_h())a.style.filter=b?"alpha(opacity=50)":"alpha(opacity=100)";else a.style.MozOpacity=b?0.5:1}var l_Ra=l_d,l_Sa=undefined;function l_Qa(a){l_Sa=a;if(!l_Ra){l_Ra=l_b;window.setTimeout(l_Ta,100)}}
function l_Ta(){var a=l_Sa;l_Sa=undefined;l_Ra=l_d;if(a){var b="";if(a.length)for(var c=a[0].x,d=a[0].y,e=0,f=0,g=1;g<a.length;g++){var h=a[g];if(h.dx|h.dy){if(g!=0)b+="<img class=gestimg src=images/joiner.png width=5 height=5 style=left:"+(c-2)+"px;top:"+(d-2)+"px>";var i=Math.atan2(h.dx,h.dy),j;i=Math.floor(i/(Math.PI/6));switch(i){case 0:case 6:case -6:j="vert.png";break;case 1:case -4:j="negslope.png";break;case 2:case -2:case 3:case -3:j="horz.png";break;case 4:case -1:j="posslope.png";break;
case 5:case -5:j="vert.png";break}i=Math.max(1,Math.abs(h.dx));var k=Math.max(1,Math.abs(h.dy));b+="<img class=gestimg src=images/"+j+" width="+i+" height="+k+" style=left:"+(c+Math.min(h.dx,0))+"px;top:"+(d+Math.min(h.dy,0))+"px>";c+=h.dx;d+=h.dy;e=Math.max(c,e);f=Math.max(d,f)}}a=l_Ea("gesture");a.style.display="none";a.innerHTML=b;a.style.display="inline"}}function l_Ua(){}l_Ua.prototype.Qb=function(){l_a(new Error("Unimplemented"))};var l_M=l_c,l_N=l_c,l_O=l_c,l_P="",l_Q=[],l_R=l_c,l_Va=function(){return l_b},l_Wa=function(){return l_d};function l_Xa(a){l_R=a;for(var b=0;b<a.length;b++)l_Ya(a[b])}function l_Za(a){l_Wa=a}function l__a(a){l_Va=a}function l_0a(a,b){a=l_1a(a);return l_2a(b,a)}
function l_3a(a,b){l_w=b;l_x=1;l_D=3;l_m(b,"el_active");a=b.parentNode;var c,d=l_S(a);c=d?a.offsetWidth:a.offsetHeight;l_Q=l_4a("div","dropregion");_ddc_dropregion_counter_=l_Q.length-1;for(var e=b.nextSibling;e&&!l_T(e);)e=e.nextSibling;l_O=e;for(e=b.previousSibling;e&&!l_T(e);)e=e.previousSibling;(l_N=e)&&l_m(e,"hidden_dropregion");l_M=l_O;e=l_5a(b);if(d){l_P=b.offsetWidth;e=e==l_c?0:"-"+b.offsetWidth}else{l_P=b.offsetHeight;e=e==l_c?0:"-"+b.offsetHeight}l_U(l_b,b);l_6a(b,e,d);if(d)a.style.width=
c+"px";else a.style.height=c+"px";return l_b}function l_5a(a){for(;a!=l_c;){a=a.nextSibling;if(a!=l_c&&a.nodeType==1)return a}return l_c}function l_7a(a,b){a=l_1a(a);if(a==l_M)return l_b;l_U(l_d);l_M=a;l_U(l_b,b);var c=0;if(a!=l_c){var d=l_S(a.parentNode);c=d?-1*b.offsetWidth:-1*b.offsetHeight}l_6a(b,c,d);return l_b}function l_8a(a){l_U(l_d);l_M=l_c;a.style.left="";a.style.top="";l_n(a,"el_active");l_9a(a,l_S(l_O.parentNode));l_N&&l_n(l_N,"hidden_dropregion");l_O=l_N=l_c;l_P="";return l_b}
function l_2a(a,b){if(a==l_c||b==l_c)return l_d;var c=b.parentNode;if(l_S(l_O.parentNode))l_O.parentNode.style.width="";else l_O.parentNode.style.height="";if(l_N==b)return l_d;if(l_O==b)return l_d;var d=l_S(a.parentNode);l_9a(a,d);c.insertBefore(a,b);if(l_N!=l_c){l_N.setAttribute("container",c.id);l_N.className="dropregion dr_inactive "+l_V(c);c.insertBefore(l_N,a)}return l_b}
function l_Ya(a){if(a!=l_c){for(var b=a.firstChild;b&&b.nextSibling;){l_T(b)&&l_T(b.nextSibling)&&a.removeChild(b.nextSibling);b=b.nextSibling}b=a.childNodes[0];for(var c=l_c;b!=l_c;){if(!l_T(b)&&!l_T(b.previousSibling)&&l_Va(b)){var d=l_$a(a);a.insertBefore(d,b)}if(l_Va(b))c=b;b=b.nextSibling}if(!l_T(a.lastChild)){d=l_$a(a);c&&c.nextSibling?a.insertBefore(d,c.nextSibling):a.appendChild(d)}}}
function l_U(a){if(l_M!=l_c){var b=l_V(l_M.parentNode),c=l_S(l_M.parentNode);if(a){if(l_M!=l_N)l_M.className="dropregion dr_active "+b;l_m(l_M.parentNode,"activated-section");if(c)l_M.style.width=l_P+"px";else l_M.style.height=l_P+"px"}else{l_M.className="dropregion dr_inactive "+b;l_n(l_M.parentNode,"activated-section");if(c)l_M.style.width="";else l_M.style.height=""}}}function l_T(a){return l_l(a,"dropregion")}var _ddc_dropregion_counter_=0;
function l_$a(a){var b=a.ownerDocument.createElement("div"),c=l_V(a);b.className="dropregion "+c+" dr_inactive";b.id="ddc_dropregion_"+_ddc_dropregion_counter_++;b.setAttribute("container",a.id);b.innerHTML="&nbsp;";l_Q.push(b);return b}function l_ab(a){a=l_v(a);for(var b=0;b<l_R.length;b++){var c=l_u(l_R[b]);if(c.x<=a.x&&c.x+c.w>=a.x&&c.y<=a.y&&c.y+c.h>=a.y&&!l_Wa(l_R[b]))return l_R[b]}return l_c}
function l_1a(a){var b=l_ab(a);if(b==l_c)return l_O;a=l_v(a);for(var c={elt:l_c,delta:-1},d=0;d<l_Q.length;d++){var e=l_Q[d];if(!(e.getAttribute("container")!=b.id||l_l(e,"hidden_dropregion"))){var f=l_V(b),g=0;if(f=="dropregion_v"){f=l_u(e);if(a.x<f.x||a.x>f.x+f.offsetWidth)continue;g=f.y-a.y}else{f=l_u(e);if(a.y<f.y||a.y>f.y+e.offsetHeight)continue;g=f.x-a.x}if(g<0)g*=-1;if(c.delta<0||g<c.delta)c={elt:e,delta:g}}}return c.elt}function l_V(a){return l_S(a)?"dropregion_h":"dropregion_v"}
function l_S(a){return"horizontal"==a.getAttribute("growth")}function l_6a(a,b,c){if(c){c=a.currentStyle?a.currentStyle:a.ownerDocument.defaultView.getComputedStyle(a,"");c=c.getPropertyValue?c.getPropertyValue("float"):c["float"];if(c=="right")a.style.marginLeft=b+"px";else a.style.marginRight=b+"px"}else a.style.marginBottom=b+"px"}function l_9a(a,b){if(b){a.style.marginLeft="";a.style.marginRight=""}else a.style.marginBottom=""}
function l_4a(a,b){a=l_H.getElementsByTagName(a);for(var c=[],d=0;d<a.length;d++){var e=a.item(d);if(l_l(e,b))c[c.length]=e}return c};var l_W;function l_bb(){var a=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var b=0;b<a.length;b++){var c=a[b];try{new ActiveXObject(c);l_W=c;break}catch(d){}}if(!l_W)l_a(Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed."))}}l_bb();function l_cb(a,b,c){a.open("GET",b,l_b);a.onreadystatechange=c;l_db(a,l_c)}
function l_eb(a,b,c,d){a.open("POST",b,l_b);a.onreadystatechange=d;a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.setRequestHeader("Content-Length",c.length);l_db(a,c)}function l_db(a,b){try{a.send(b)}catch(c){l_k("XMLHttpSend failed "+c.toString()+"<br>"+c.stack);l_a(c)}};var l_fb=0,l_gb=0;if("undefined"==typeof l_k)l_k=function(){};function l_hb(a){var b=-1;try{b=a.status}catch(c){}return b}function l_ib(a){var b=l_c;try{b=a.statusText}catch(c){}return b}
function l_jb(a,b,c,d){if(a.readyState==4)try{var e=l_b;if(d)try{e=l_d!==d(a)}catch(f){l_k("Message ("+b+") handling failed: "+f);l_a(f)}var g=l_hb(a);if(200===g){l_k("Message ("+b+") received after "+((new Date).getTime()-c)+" ms");try{var h=(new Date).getTime();e&&a.responseText.length&&eval(a.responseText);l_k("Message ("+b+") processing took "+((new Date).getTime()-h)+" ms")}catch(i){l_k("Message ("+b+") processing failed: "+i);alert(i+"\n"+i.stack+"\n\n"+a.responseText);l_a(i)}}else 204==g?l_k("Message ("+
b+") received after "+((new Date).getTime()-c)+" ms"):l_k("Message ("+b+") failed with response "+g+" "+l_ib(a)+" after "+((new Date).getTime()-c)+" ms.")}finally{--l_gb}}
function l_kb(a,b,c,d){var e="";if(b)for(var f="",g=0;g<b.length;){var h=b[g++],i=b[g++];e+=f+encodeURIComponent(h);f="&";if(l_c!==i&&undefined!==i)e+="="+encodeURIComponent(i.toString())}var j=++l_fb,k=l_W?new ActiveXObject(l_W):new XMLHttpRequest,m=(new Date).getTime();b=function(){l_jb(k,j,m,d)};f=a.indexOf("?")>=0?"&":"?";a=e.length?a+f+e:a;e=c!==undefined?"POST":"GET";f=a;for(g=f.length+1;(g=f.lastIndexOf("&",g-1))>=0;)f=f.substring(0,g)+"&amp;"+f.substring(g+1);l_k("Message ("+j+") sent: "+
e+" <tt>"+f+"</tt>.");++l_gb;c!==undefined?l_eb(k,a,c.toString(),b):l_cb(k,a,b)}
function l_lb(a,b,c){var d="";if(b)for(var e="",f=0;f<b.length;){var g=b[f++],h=b[f++];d+=e+encodeURIComponent(g);e="&";if(l_c!==h&&undefined!==h)d+="="+encodeURIComponent(h.toString())}var i=++l_fb,j=l_W?new ActiveXObject(l_W):new XMLHttpRequest,k=(new Date).getTime();b=function(){l_jb(j,i,k,c)};e=a;for(f=e.length+1;(f=e.lastIndexOf("&",f-1))>=0;)e=e.substring(0,f)+"&amp;"+e.substring(f+1);l_k("Message ("+i+") sent: POST <tt>"+e+"</tt>.");++l_gb;l_eb(j,a,d,b)};function l_mb(a){var b={};a=a.split("?");a=a[a.length-1].split("&");for(var c=0;c<a.length;c++){var d=a[c].split("=");if(d[0])b[d[0].toLowerCase()]=d.length>1?decodeURIComponent(d[1].replace(l_Aa," ")):""}return b};var l_nb=this;String.prototype.tg=function(a){return this.indexOf(a)==0};String.prototype.df=function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a,b)==b};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.subs=function(){for(var a=this,b=0;b<arguments.length;b++)a=a.replace(/\%s/,String(arguments[b]));return a};
if(!Function.prototype.apply)Function.prototype.apply=function(a,b){var c=[];a||(a=l_nb);b=b||[];for(var d=0;d<b.length;d++)c[d]="args["+d+"]";c="oScope.__applyTemp__.peek()("+c.join(",")+");";if(!a.__applyTemp__)a.__applyTemp__=[];a.__applyTemp__.push(this);c=eval(c);a.__applyTemp__.pop();return c};if(!Array.prototype.push)Array.prototype.push=function(){for(var a=0;a<arguments.length;a++)this[this.length]=arguments[a];return this.length};
if(!Array.prototype.pop)Array.prototype.pop=function(){if(this.length){var a=this[this.length-1];this.length--;return a}};Array.prototype.peek=function(){return this[this.length-1]};if(!Array.prototype.shift)Array.prototype.shift=function(){if(this.length!=0){for(var a=this[0],b=0;b<this.length-1;b++)this[b]=this[b+1];this.length--;return a}};
if(!Array.prototype.unshift)Array.prototype.unshift=function(){for(var a=arguments.length,b=this.length-1;b>=0;b--)this[b+a]=this[b];for(b=0;b<a;b++)this[b]=arguments[b];return this.length};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,b){for(var c=0;c<this.length;c++)a.call(b,this[c],c,this)};
function l_ob(a,b){var c=a.Lg||[];c=c.concat(Array.prototype.slice.call(arguments,2));if(typeof a.Qe!="undefined")b=a.Qe;if(typeof a.Pe!="undefined")a=a.Pe;var d=function(){var e=c.concat(Array.prototype.slice.call(arguments));return a.apply(b,e)};d.Lg=c;d.Qe=b;d.Pe=a;return d}Function.prototype.bind=function(a){return l_ob.apply(l_c,[this,a].concat(Array.prototype.slice.call(arguments,1)))};Function.prototype.partial=function(){return l_ob.apply(l_c,[this,l_c].concat(Array.prototype.slice.call(arguments)))};
Function.prototype.inherits=function(a){var b=function(){};this.r=b.prototype=a.prototype;this.prototype=new b};Function.prototype.mixin=function(a){for(var b in a)this.prototype[b]=a[b];if(typeof a.toString=="function"&&a.toString!=this.prototype.toString)this.prototype.toString=a.toString};var l_=l_||{};l_.global=this;l_.DEBUG=l_b;l_.LOCALE="en";l_.Kb=l_c;l_.provide=function(a){l_.gf(a)};l_.gf=function(a,b,c){a=a.split(".");c=c||l_.global;!(a[0]in c)&&c.execScript&&c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)if(!a.length&&l_.isDef(b))c[d]=b;else c=c[d]?c[d]:(c[d]={})};l_.getObjectByName=function(a,b){a=a.split(".");b=b||l_.global;for(var c;c=a.shift();)if(b[c])b=b[c];else return l_c;return b};l_.globalize=function(a,b){b=b||l_.global;for(var c in a)b[c]=a[c]};
l_.addDependency=function(){};l_.require=function(){};l_.useStrictRequires=l_d;l_.basePath="";l_.nullFunction=function(){};l_.identityFunction=function(){return arguments[0]};l_.abstractMethod=function(){l_a(Error("unimplemented abstract method"))};l_.addSingletonGetter=function(a){a.getInstance=function(){return a.eh||(a.eh=new a)}};
l_.typeOf=function(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array||!(a instanceof Object)&&Object.prototype.toString.call(a)=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(!(a instanceof Object)&&(Object.prototype.toString.call(a)=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call")))return"function"}else return"null";
else if(b=="function"&&typeof a.call=="undefined")return"object";return b};l_.nh=function(a,b){if(b in a)for(var c in a)if(c==b&&Object.prototype.hasOwnProperty.call(a,b))return l_b;return l_d};l_.Bh=function(a,b){return a instanceof Object?Object.prototype.propertyIsEnumerable.call(a,b):l_.nh(a,b)};l_.isDef=function(a){return a!==undefined};l_.isNull=function(a){return a===l_c};l_.isDefAndNotNull=function(a){return a!=l_c};l_.isArray=function(a){return l_.typeOf(a)=="array"};
l_.isArrayLike=function(a){var b=l_.typeOf(a);return b=="array"||b=="object"&&typeof a.length=="number"};l_.isDateLike=function(a){return l_.isObject(a)&&typeof a.getFullYear=="function"};l_.isString=function(a){return typeof a=="string"};l_.isBoolean=function(a){return typeof a=="boolean"};l_.isNumber=function(a){return typeof a=="number"};l_.isFunction=function(a){return l_.typeOf(a)=="function"};l_.isObject=function(a){a=l_.typeOf(a);return a=="object"||a=="array"||a=="function"};
l_.getHashCode=function(a){if(a.hasOwnProperty&&a.hasOwnProperty(l_.la))return a[l_.la];a[l_.la]||(a[l_.la]=++l_.bh);return a[l_.la]};l_.removeHashCode=function(a){"removeAttribute"in a&&a.removeAttribute(l_.la);try{delete a[l_.la]}catch(b){}};l_.la="closure_hashCode_"+Math.floor(Math.random()*2147483648).toString(36);l_.bh=0;l_.cloneObject=function(a){var b=l_.typeOf(a);if(b=="object"||b=="array"){if(a.clone)return a.clone.call(a);b=b=="array"?[]:{};for(var c in a)b[c]=l_.cloneObject(a[c]);return b}return a};
l_.bind=function(a,b){var c=b||l_.global;if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(c,e)}}else return function(){return a.apply(c,arguments)}};l_.partial=function(a){var b=Array.prototype.slice.call(arguments,1);return function(){var c=Array.prototype.slice.call(arguments);c.unshift.apply(c,b);return a.apply(this,c)}};
l_.mixin=function(a,b){for(var c in b)a[c]=b[c]};l_.now=Date.now||function(){return+new Date};
l_.globalEval=function(a){if(l_.global.execScript)l_.global.execScript(a,"JavaScript");else if(l_.global.eval){if(l_.Kb==l_c){l_.global.eval("var _et_ = 1;");if(typeof l_.global._et_!="undefined"){delete l_.global._et_;l_.Kb=l_b}else l_.Kb=l_d}if(l_.Kb)l_.global.eval(a);else{var b=l_.global.document,c=b.createElement("script");c.type="text/javascript";c.defer=l_d;c.appendChild(b.createTextNode(a));b.body.appendChild(c);b.body.removeChild(c)}}else l_a(Error("goog.globalEval not available"))};
l_.typedef=l_b;l_.getCssName=function(a,b){a=a+(b?"-"+b:"");return l_.ad&&a in l_.ad?l_.ad[a]:a};l_.setCssNameMapping=function(a){l_.ad=a};l_.getMsg=function(a,b){b=b||{};for(var c in b)a=a.replace(new RegExp("\\{\\$"+c+"\\}","gi"),b[c]);return a};l_.exportSymbol=function(a,b,c){l_.gf(a,b,c)};l_.exportProperty=function(a,b,c){a[b]=c};l_.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.r=b.prototype;a.prototype=new c;a.prototype.constructor=a};l_.base=function(){};
l_.MODIFY_FUNCTION_PROTOTYPES=l_b;
if(l_.MODIFY_FUNCTION_PROTOTYPES){Function.prototype.bind=function(a){if(arguments.length>1){var b=Array.prototype.slice.call(arguments,1);b.unshift(this,a);return l_.bind.apply(l_c,b)}else return l_.bind(this,a)};Function.prototype.partial=function(){var a=Array.prototype.slice.call(arguments);a.unshift(this,l_c);return l_.bind.apply(l_c,a)};Function.prototype.inherits=function(a){l_.inherits(this,a)};Function.prototype.mixin=function(a){l_.mixin(this.prototype,a)}};l_.asserts={};l_.asserts.assert=function(a,b){if(l_.DEBUG&&!a)l_a(Error("Assertion failed"+(b?": "+b:"")))};l_.asserts.fail=function(a){if(l_.DEBUG)l_a(Error("Failure"+(a?": "+a:"")))};l_.asserts.assertNumber=function(a,b){l_.asserts.assert(l_.isNumber(a),b)};l_.asserts.assertString=function(a,b){l_.asserts.assert(l_.isString(a),b)};l_.asserts.assertFunction=function(a,b){l_.asserts.assert(l_.isFunction(a),b)};l_.asserts.assertObject=function(a,b){l_.asserts.assert(l_.isObject(a),b)};
l_.asserts.assertInstanceof=function(a,b,c){l_.asserts.assert(a instanceof b,c)};l_.array={};l_.array.ArrayLike=l_.typedef;l_.array.peek=function(a){return a[a.length-1]};l_.array.m=Array.prototype;l_.array.indexOf=l_.array.m.indexOf?function(a,b,c){return l_.array.m.indexOf.call(a,b,c)}:function(a,b,c){c=c==l_c?0:c<0?Math.max(0,a.length+c):c;if(l_.isString(a)){if(!l_.isString(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};
l_.array.lastIndexOf=l_.array.m.lastIndexOf?function(a,b,c){c=c==l_c?a.length-1:c;return l_.array.m.lastIndexOf.call(a,b,c)}:function(a,b,c){c=c==l_c?a.length-1:c;if(c<0)c=Math.max(0,a.length+c);if(l_.isString(a)){if(!l_.isString(b)||b.length!=1)return-1;return a.lastIndexOf(b,c)}for(c=c;c>=0;c--)if(c in a&&a[c]===b)return c;return-1};
l_.array.forEach=l_.array.m.forEach?function(a,b,c){l_.array.m.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=l_.isString(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)};l_.array.forEachRight=function(a,b,c){var d=a.length,e=l_.isString(a)?a.split(""):a;for(d=d-1;d>=0;--d)d in e&&b.call(c,e[d],d,a)};
l_.array.filter=l_.array.m.filter?function(a,b,c){return l_.array.m.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=l_.isString(a)?a.split(""):a,h=0;h<d;h++)if(h in g){var i=g[h];if(b.call(c,i,h,a))e[f++]=i}return e};l_.array.map=l_.array.m.map?function(a,b,c){return l_.array.m.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=l_.isString(a)?a.split(""):a,h=0;h<d;h++)if(h in g)e[f++]=b.call(c,g[h],h,a);return e};
l_.array.reduce=function(a,b,c,d){if(a.reduce)return d?a.reduce(l_.bind(b,d),c):a.reduce(b,c);var e=c;l_.array.forEach(a,function(f,g){e=b.call(d,e,f,g,a)});return e};l_.array.reduceRight=function(a,b,c,d){if(a.reduceRight)return d?a.reduceRight(l_.bind(b,d),c):a.reduceRight(b,c);var e=c;l_.array.forEachRight(a,function(f,g){e=b.call(d,e,f,g,a)});return e};
l_.array.some=l_.array.m.some?function(a,b,c){return l_.array.m.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=l_.isString(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return l_b;return l_d};l_.array.every=l_.array.m.every?function(a,b,c){return l_.array.m.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=l_.isString(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return l_d;return l_b};
l_.array.find=function(a,b,c){b=l_.array.findIndex(a,b,c);return b<0?l_c:l_.isString(a)?a.charAt(b):a[b]};l_.array.findIndex=function(a,b,c){for(var d=a.length,e=l_.isString(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return f;return-1};l_.array.findRight=function(a,b,c){b=l_.array.findIndexRight(a,b,c);return b<0?l_c:l_.isString(a)?a.charAt(b):a[b]};
l_.array.findIndexRight=function(a,b,c){var d=a.length,e=l_.isString(a)?a.split(""):a;for(d=d-1;d>=0;d--)if(d in e&&b.call(c,e[d],d,a))return d;return-1};l_.array.contains=function(a,b){return l_.array.indexOf(a,b)>=0};l_.array.g=function(a){return a.length==0};l_.array.clear=function(a){if(!l_.isArray(a))for(var b=a.length-1;b>=0;b--)delete a[b];a.length=0};l_.array.insert=function(a,b){l_.array.contains(a,b)||a.push(b)};l_.array.insertAt=function(a,b,c){l_.array.splice(a,c,0,b)};
l_.array.insertArrayAt=function(a,b,c){l_.partial(l_.array.splice,a,c,0).apply(l_c,b)};l_.array.insertBefore=function(a,b,c){var d;arguments.length==2||(d=l_.array.indexOf(a,c))<0?a.push(b):l_.array.insertAt(a,b,d)};l_.array.remove=function(a,b){b=l_.array.indexOf(a,b);var c;if(c=b>=0)l_.array.removeAt(a,b);return c};l_.array.removeAt=function(a,b){return l_.array.m.splice.call(a,b,1).length==1};l_.array.removeIf=function(a,b,c){b=l_.array.findIndex(a,b,c);if(b>=0){l_.array.removeAt(a,b);return l_b}return l_d};
l_.array.clone=function(a){if(l_.isArray(a))return a.concat();else{for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}};l_.array.toArray=function(a){if(l_.isArray(a))return a.concat();return l_.array.clone(a)};l_.array.extend=function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];if(l_.isArrayLike(c)){c=l_.array.toArray(c);a.push.apply(a,c)}else a.push(c)}};l_.array.splice=function(a){return l_.array.m.splice.apply(a,l_.array.slice(arguments,1))};
l_.array.slice=function(a,b,c){return arguments.length<=2?l_.array.m.slice.call(a,b):l_.array.m.slice.call(a,b,c)};l_.array.removeDuplicates=function(a,b){b=b||a;for(var c={},d=0,e=0;e<a.length;){var f=a[e++],g=l_.isObject(f)?l_.getHashCode(f):f;if(!Object.prototype.hasOwnProperty.call(c,g)){c[g]=l_b;b[d++]=f}}b.length=d};
l_.array.binarySearch=function(a,b,c){var d=0,e=a.length-1;for(c=c||l_.array.defaultCompare;d<=e;){var f=d+e>>1,g=c(b,a[f]);if(g>0)d=f+1;else if(g<0)e=f-1;else return f}return-(d+1)};l_.array.sort=function(a,b){l_.array.m.sort.call(a,b||l_.array.defaultCompare)};l_.array.stableSort=function(a,b){function c(f,g){return e(f.value,g.value)||f.index-g.index}for(var d=0;d<a.length;d++)a[d]={index:d,value:a[d]};var e=b||l_.array.defaultCompare;l_.array.sort(a,c);for(d=0;d<a.length;d++)a[d]=a[d].value};
l_.array.sortObjectsByKey=function(a,b,c){var d=c||l_.array.defaultCompare;l_.array.sort(a,function(e,f){return d(e[b],f[b])})};l_.array.equals=function(a,b,c){if(!l_.isArrayLike(a)||!l_.isArrayLike(b)||a.length!=b.length)return l_d;var d=a.length;c=c||l_.array.defaultCompareEquality;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return l_d;return l_b};l_.array.compare=function(a,b,c){return l_.array.equals(a,b,c)};l_.array.defaultCompare=function(a,b){return a>b?1:a<b?-1:0};
l_.array.defaultCompareEquality=function(a,b){return a===b};l_.array.binaryInsert=function(a,b,c){c=l_.array.binarySearch(a,b,c);if(c<0){l_.array.insertAt(a,b,-(c+1));return l_b}return l_d};l_.array.binaryRemove=function(a,b,c){b=l_.array.binarySearch(a,b,c);return b>=0?l_.array.removeAt(a,b):l_d};l_.array.bucket=function(a,b){for(var c={},d=0;d<a.length;d++){var e=a[d],f=b(e,d,a);if(l_.isDef(f)){f=c[f]||(c[f]=[]);f.push(e)}}return c};
l_.array.repeat=function(a,b){for(var c=[],d=0;d<b;d++)c[d]=a;return c};l_.array.flatten=function(){for(var a=[],b=0;b<arguments.length;b++){var c=arguments[b];l_.isArray(c)?a.push.apply(a,l_.array.flatten.apply(l_c,c)):a.push(c)}return a};l_.array.rotate=function(a,b){if(a.length){b%=a.length;if(b>0)l_.array.m.unshift.apply(a,a.splice(-b,b));else b<0&&l_.array.m.push.apply(a,a.splice(0,-b))}return a};l_.dom={};l_.dom.classes={};l_.dom.classes.set=function(a,b){a.className=b};l_.dom.classes.get=function(a){return(a=a.className)&&typeof a.split=="function"?a.split(" "):[]};l_.dom.classes.add=function(a){var b=l_.dom.classes.get(a),c=l_.array.slice(arguments,1);c=l_.dom.classes.Me(b,c);a.className=b.join(" ");return c};l_.dom.classes.remove=function(a){var b=l_.dom.classes.get(a),c=l_.array.slice(arguments,1);c=l_.dom.classes.jg(b,c);a.className=b.join(" ");return c};
l_.dom.classes.Me=function(a,b){for(var c=0,d=0;d<b.length;d++)if(!l_.array.contains(a,b[d])){a.push(b[d]);c++}return c==b.length};l_.dom.classes.jg=function(a,b){for(var c=0,d=0;d<a.length;d++)if(l_.array.contains(b,a[d])){l_.array.splice(a,d--,1);c++}return c==b.length};l_.dom.classes.swap=function(a,b,c){for(var d=l_.dom.classes.get(a),e=l_d,f=0;f<d.length;f++)if(d[f]==b){l_.array.splice(d,f--,1);e=l_b}if(e){d.push(c);a.className=d.join(" ")}return e};
l_.dom.classes.addRemove=function(a,b,c){var d=l_.dom.classes.get(a);if(l_.isString(b))l_.array.remove(d,b);else l_.isArray(b)&&l_.dom.classes.jg(d,b);if(l_.isString(c)&&!l_.array.contains(d,c))d.push(c);else l_.isArray(c)&&l_.dom.classes.Me(d,c);a.className=d.join(" ")};l_.dom.classes.has=function(a,b){return l_.array.contains(l_.dom.classes.get(a),b)};l_.dom.classes.enable=function(a,b,c){c?l_.dom.classes.add(a,b):l_.dom.classes.remove(a,b)};
l_.dom.classes.toggle=function(a,b){var c=!l_.dom.classes.has(a,b);l_.dom.classes.enable(a,b,c);return c};l_.Disposable=function(){};l_.Disposable.prototype.Hb=l_d;l_.Disposable.prototype.Pf=function(){return this.Hb};l_.Disposable.prototype.dispose=function(){if(!this.Hb){this.Hb=l_b;this.a()}};l_.Disposable.prototype.a=function(){};l_.dispose=function(a){a&&typeof a.dispose=="function"&&a.dispose()};l_.events={};l_.events.Event=function(a,b){l_.Disposable.call(this);this.type=a;this.currentTarget=this.target=b};l_.inherits(l_.events.Event,l_.Disposable);l_.events.Event.prototype.a=function(){delete this.type;delete this.target;delete this.currentTarget};l_.events.Event.prototype.$=l_d;l_.events.Event.prototype.xa=l_b;l_.events.Event.prototype.stopPropagation=function(){this.$=l_b};l_.events.Event.prototype.preventDefault=function(){this.xa=l_d};l_.object={};l_.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};l_.object.filter=function(a,b,c){var d={};for(var e in a)if(b.call(c,a[e],e,a))d[e]=a[e];return d};l_.object.map=function(a,b,c){var d={};for(var e in a)d[e]=b.call(c,a[e],e,a);return d};l_.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return l_b;return l_d};l_.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return l_d;return l_b};
l_.object.c=function(a){var b=0;for(var c in a)b++;return b};l_.object.getAnyKey=function(a){for(var b in a)return b};l_.object.getAnyValue=function(a){for(var b in a)return a[b]};l_.object.contains=function(a,b){return l_.object.X(a,b)};l_.object.f=function(a){var b=[],c=0;for(var d in a)b[c++]=a[d];return b};l_.object.l=function(a){var b=[],c=0;for(var d in a)b[c++]=d;return b};l_.object.D=function(a,b){return b in a};l_.object.X=function(a,b){for(var c in a)if(a[c]==b)return l_b;return l_d};
l_.object.findKey=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};l_.object.findValue=function(a,b,c){return(b=l_.object.findKey(a,b,c))&&a[b]};l_.object.g=function(a){for(var b in a)return l_d;return l_b};l_.object.clear=function(a){for(var b=l_.object.l(a),c=b.length-1;c>=0;c--)l_.object.remove(a,b[c])};l_.object.remove=function(a,b){var c;if(c=b in a)delete a[b];return c};
l_.object.add=function(a,b,c){if(b in a)l_a(Error('The object already contains the key "'+b+'"'));l_.object.set(a,b,c)};l_.object.get=function(a,b,c){if(b in a)return a[b];return c};l_.object.set=function(a,b,c){a[b]=c};l_.object.setIfUndefined=function(a,b,c){return b in a?a[b]:(a[b]=c)};l_.object.clone=function(a){var b={};for(var c in a)b[c]=a[c];return b};l_.object.transpose=function(a){var b={};for(var c in a)b[a[c]]=c;return b};
l_.object.me=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];l_.object.extend=function(a){for(var b,c,d=1;d<arguments.length;d++){c=arguments[d];for(b in c)a[b]=c[b];for(var e=0;e<l_.object.me.length;e++){b=l_.object.me[e];if(Object.prototype.hasOwnProperty.call(c,b))a[b]=c[b]}}};
l_.object.create=function(){var a=arguments.length;if(a==1&&l_.isArray(arguments[0]))return l_.object.create.apply(l_c,arguments[0]);if(a%2)l_a(Error("Uneven number of arguments"));for(var b={},c=0;c<a;c+=2)b[arguments[c]]=arguments[c+1];return b};l_.object.createSet=function(){var a=arguments.length;if(a==1&&l_.isArray(arguments[0]))return l_.object.createSet.apply(l_c,arguments[0]);for(var b={},c=0;c<a;c++)b[arguments[c]]=l_b;return b};l_.structs={};l_.structs.SimplePool=function(a,b){l_.Disposable.call(this);this.va=b;this.q=[];this.Ve(a)};l_.inherits(l_.structs.SimplePool,l_.Disposable);l_.structs.SimplePool.prototype.Fb=l_c;l_.structs.SimplePool.prototype.dd=l_c;l_.structs.SimplePool.prototype.Ka=function(a){this.Fb=a};l_.structs.SimplePool.prototype.p=function(){if(this.q.length)return this.q.pop();return this.Y()};l_.structs.SimplePool.prototype.t=function(a){this.q.length<this.va?this.q.push(a):this.K(a)};
l_.structs.SimplePool.prototype.Ve=function(a){if(a>this.va)l_a(Error("[goog.structs.SimplePool] Initial cannot be greater than max"));for(var b=0;b<a;b++)this.q.push(this.Y())};l_.structs.SimplePool.prototype.Y=function(){return this.Fb?this.Fb():{}};l_.structs.SimplePool.prototype.K=function(a){if(this.dd)this.dd(a);else if(l_.isFunction(a.dispose))a.dispose();else for(var b in a)delete a[b]};
l_.structs.SimplePool.prototype.a=function(){l_.structs.SimplePool.r.a.call(this);for(var a=this.q;a.length;)this.K(a.pop());delete this.q};l_.debug={};l_.debug.errorHandlerWeakDep={protectEntryPoint:function(a){return a}};l_.string={};l_.string.Unicode={NBSP:"\u00a0"};l_.string.tg=function(a,b){return a.indexOf(b)==0};l_.string.df=function(a,b){var c=a.length-b.length;return c>=0&&a.lastIndexOf(b,c)==c};l_.string.caseInsensitiveStartsWith=function(a,b){return l_.string.caseInsensitiveCompare(b,a.substr(0,b.length))==0};l_.string.caseInsensitiveEndsWith=function(a,b){return l_.string.caseInsensitiveCompare(b,a.substr(a.length-b.length,b.length))==0};
l_.string.subs=function(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a};l_.string.collapseWhitespace=function(a){return a.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};l_.string.g=function(a){return/^[\s\xa0]*$/.test(a)};l_.string.isEmptySafe=function(a){return l_.string.g(l_.string.makeSafe(a))};l_.string.isBreakingWhitespace=function(a){return!/[^\t\n\r ]/.test(a)};l_.string.isAlpha=function(a){return!/[^a-zA-Z]/.test(a)};
l_.string.isNumeric=function(a){return!/[^0-9]/.test(a)};l_.string.isAlphaNumeric=function(a){return!/[^a-zA-Z0-9]/.test(a)};l_.string.isSpace=function(a){return a==" "};l_.string.isUnicodeChar=function(a){return a.length==1&&a>=" "&&a<="~"||a>="\u0080"&&a<="\ufffd"};l_.string.stripNewlines=function(a){return a.replace(/(\r\n|\r|\n)+/g," ")};l_.string.canonicalizeNewlines=function(a){return a.replace(/(\r\n|\r|\n)/g,"\n")};l_.string.normalizeWhitespace=function(a){return a.replace(/\xa0|\s/g," ")};
l_.string.normalizeSpaces=function(a){return a.replace(/\xa0|[ \t]+/g," ")};l_.string.trim=function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};l_.string.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,"")};l_.string.trimRight=function(a){return a.replace(/[\s\xa0]+$/,"")};l_.string.caseInsensitiveCompare=function(a,b){a=String(a).toLowerCase();b=String(b).toLowerCase();return a<b?-1:a==b?0:1};l_.string.eg=/(\.\d+)|(\d+)|(\D+)/g;
l_.string.numerateCompare=function(a,b){if(a==b)return 0;if(!a)return-1;if(!b)return 1;for(var c=a.toLowerCase().match(l_.string.eg),d=b.toLowerCase().match(l_.string.eg),e=Math.min(c.length,d.length),f=0;f<e;f++){var g=c[f],h=d[f];if(g!=h){a=parseInt(g,10);if(!isNaN(a)){b=parseInt(h,10);if(!isNaN(b)&&a-b)return a-b}return g<h?-1:1}}if(c.length!=d.length)return c.length-d.length;return a<b?-1:1};l_.string.ah=/^[a-zA-Z0-9\-_.!~*'()]*$/;
l_.string.urlEncode=function(a){a=String(a);if(!l_.string.ah.test(a))return encodeURIComponent(a);return a};l_.string.urlDecode=function(a){return decodeURIComponent(a.replace(/\+/g," "))};l_.string.newLineToBr=function(a,b){return a.replace(/(\r\n|\r|\n)/g,b?"<br />":"<br>")};
l_.string.htmlEscape=function(a,b){if(b)return a.replace(l_.string.Ne,"&amp;").replace(l_.string.Xf,"&lt;").replace(l_.string.Cf,"&gt;").replace(l_.string.hg,"&quot;");else{if(!l_.string.Kg.test(a))return a;if(a.indexOf("&")!=-1)a=a.replace(l_.string.Ne,"&amp;");if(a.indexOf("<")!=-1)a=a.replace(l_.string.Xf,"&lt;");if(a.indexOf(">")!=-1)a=a.replace(l_.string.Cf,"&gt;");if(a.indexOf('"')!=-1)a=a.replace(l_.string.hg,"&quot;");return a}};l_.string.Ne=/&/g;l_.string.Xf=/</g;l_.string.Cf=/>/g;
l_.string.hg=/\"/g;l_.string.Kg=/[&<>\"]/;l_.string.unescapeEntities=function(a){if(l_.string.contains(a,"&"))return"document"in l_.global&&!l_.string.contains(a,"<")?l_.string.qh(a):l_.string.rh(a);return a};l_.string.qh=function(a){var b=l_.global.document.createElement("a");b.innerHTML=a;b[l_.string.le]&&b[l_.string.le]();a=b.firstChild.nodeValue;b.innerHTML="";return a};
l_.string.rh=function(a){return a.replace(/&([^;]+);/g,function(b,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if(c.charAt(0)=="#"){c=Number("0"+c.substr(1));if(!isNaN(c))return String.fromCharCode(c)}return b}})};l_.string.le="normalize";l_.string.whitespaceEscape=function(a,b){return l_.string.newLineToBr(a.replace(/  /g," &#160;"),b)};
l_.string.stripQuotes=function(a,b){for(var c=b.length,d=0;d<c;d++){var e=c==1?b:b.charAt(d);if(a.charAt(0)==e&&a.charAt(a.length-1)==e)return a.substring(1,a.length-1)}return a};l_.string.truncate=function(a,b,c){if(c)a=l_.string.unescapeEntities(a);if(a.length>b)a=a.substring(0,b-3)+"...";if(c)a=l_.string.htmlEscape(a);return a};
l_.string.truncateMiddle=function(a,b,c){if(c)a=l_.string.unescapeEntities(a);if(a.length>b){var d=Math.floor(b/2),e=a.length-d;d+=b%2;a=a.substring(0,d)+"..."+a.substring(e)}if(c)a=l_.string.htmlEscape(a);return a};l_.string.vd={"\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\x0B",'"':'\\"',"'":"\\'","\\":"\\\\"};
l_.string.quote=function(a){a=String(a);if(a.quote)return a.quote();else{for(var b=['"'],c=0;c<a.length;c++)b[c+1]=l_.string.escapeChar(a.charAt(c));b.push('"');return b.join("")}};l_.string.escapeChar=function(a){if(a in l_.string.vd)return l_.string.vd[a];var b=a,c=a.charCodeAt(0);if(c>31&&c<127)b=a;else{if(c<256){b="\\x";if(c<16||c>256)b+="0"}else{b="\\u";if(c<4096)b+="0"}b+=c.toString(16).toUpperCase()}return l_.string.vd[a]=b};
l_.string.toMap=function(a){for(var b={},c=0;c<a.length;c++)b[a.charAt(c)]=l_b;return b};l_.string.contains=function(a,b){return a.indexOf(b)!=-1};l_.string.removeAt=function(a,b,c){var d=a;if(b>=0&&b<a.length&&c>0)d=a.substr(0,b)+a.substr(b+c,a.length-b-c);return d};l_.string.remove=function(a,b){b=new RegExp(l_.string.regExpEscape(b),"");return a.replace(b,"")};l_.string.wa=function(a,b){b=new RegExp(l_.string.regExpEscape(b),"g");return a.replace(b,"")};
l_.string.regExpEscape=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};l_.string.repeat=function(a,b){return(new Array(b+1)).join(a)};l_.string.padNumber=function(a,b,c){a=l_.isDef(c)?a.toFixed(c):String(a);c=a.indexOf(".");if(c==-1)c=a.length;return l_.string.repeat("0",Math.max(0,b-c))+a};l_.string.makeSafe=function(a){return a==l_c?"":String(a)};l_.string.buildString=function(){return Array.prototype.join.call(arguments,"")};
l_.string.getRandomString=function(){return Math.floor(Math.random()*2147483648).toString(36)+(Math.floor(Math.random()*2147483648)^(new Date).getTime()).toString(36)};
l_.string.compareVersions=function(a,b){var c=0;a=l_.string.trim(String(a)).split(".");b=l_.string.trim(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;c==0&&e<d;e++){var f=a[e]||"",g=b[e]||"",h=new RegExp("(\\d*)(\\D*)","g"),i=new RegExp("(\\d*)(\\D*)","g");do{var j=h.exec(f)||["","",""],k=i.exec(g)||["","",""];if(j[0].length==0&&k[0].length==0)break;c=j[1].length==0?0:parseInt(j[1],10);var m=k[1].length==0?0:parseInt(k[1],10);c=l_.string.$c(c,m)||l_.string.$c(j[2].length==0,k[2].length==
0)||l_.string.$c(j[2],k[2])}while(c==0)}return c};l_.string.$c=function(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};l_.string.Hg=4294967296;l_.string.hashCode=function(a){for(var b=0,c=0;c<a.length;++c){b=31*b+a.charCodeAt(c);b%=l_.string.Hg}return b};l_.string.th=l_.now();l_.string.createUniqueString=function(){return"goog_"+l_.string.th++};l_.string.toNumber=function(a){var b=Number(a);if(b==0&&l_.string.g(a))return NaN;return b};l_.userAgent={};l_.userAgent.ASSUME_IE=l_d;l_.userAgent.ASSUME_GECKO=l_d;l_.userAgent.ASSUME_WEBKIT=l_d;l_.userAgent.ASSUME_MOBILE_WEBKIT=l_d;l_.userAgent.ASSUME_OPERA=l_d;l_.userAgent.Aa=l_.userAgent.ASSUME_IE||l_.userAgent.ASSUME_GECKO||l_.userAgent.ASSUME_MOBILE_WEBKIT||l_.userAgent.ASSUME_WEBKIT||l_.userAgent.ASSUME_OPERA;l_.userAgent.getUserAgentString=function(){return l_.global.navigator?l_.global.navigator.userAgent:l_c};l_.userAgent.getNavigator=function(){return l_.global.navigator};
l_.userAgent.sd=function(){l_.userAgent.eb=l_d;l_.userAgent.Ye=l_d;l_.userAgent.Gb=l_d;l_.userAgent.Ze=l_d;l_.userAgent.Xe=l_d;var a;if(!l_.userAgent.Aa&&(a=l_.userAgent.getUserAgentString())){var b=l_.userAgent.getNavigator();l_.userAgent.eb=a.indexOf("Opera")==0;l_.userAgent.Ye=!l_.userAgent.eb&&a.indexOf("MSIE")!=-1;l_.userAgent.Gb=!l_.userAgent.eb&&a.indexOf("WebKit")!=-1;l_.userAgent.Ze=l_.userAgent.Gb&&a.indexOf("Mobile")!=-1;l_.userAgent.Xe=!l_.userAgent.eb&&!l_.userAgent.Gb&&b.product=="Gecko"}};
l_.userAgent.Aa||l_.userAgent.sd();l_.userAgent.OPERA=l_.userAgent.Aa?l_.userAgent.ASSUME_OPERA:l_.userAgent.eb;l_.userAgent.IE=l_.userAgent.Aa?l_.userAgent.ASSUME_IE:l_.userAgent.Ye;l_.userAgent.GECKO=l_.userAgent.Aa?l_.userAgent.ASSUME_GECKO:l_.userAgent.Xe;l_.userAgent.WEBKIT=l_.userAgent.Aa?l_.userAgent.ASSUME_WEBKIT||l_.userAgent.ASSUME_MOBILE_WEBKIT:l_.userAgent.Gb;l_.userAgent.MOBILE=l_.userAgent.ASSUME_MOBILE_WEBKIT||l_.userAgent.Ze;l_.userAgent.SAFARI=l_.userAgent.WEBKIT;
l_.userAgent.Yg=function(){var a=l_.userAgent.getNavigator();return a&&a.platform||""};l_.userAgent.PLATFORM=l_.userAgent.Yg();l_.userAgent.ASSUME_MAC=l_d;l_.userAgent.ASSUME_WINDOWS=l_d;l_.userAgent.ASSUME_LINUX=l_d;l_.userAgent.ASSUME_X11=l_d;l_.userAgent.Sa=l_.userAgent.ASSUME_MAC||l_.userAgent.ASSUME_WINDOWS||l_.userAgent.ASSUME_LINUX||l_.userAgent.ASSUME_X11;
l_.userAgent.dh=function(){l_.userAgent.Vg=l_.string.contains(l_.userAgent.PLATFORM,"Mac");l_.userAgent.Wg=l_.string.contains(l_.userAgent.PLATFORM,"Win");l_.userAgent.Ug=l_.string.contains(l_.userAgent.PLATFORM,"Linux");l_.userAgent.Xg=!!l_.userAgent.getNavigator()&&l_.string.contains(l_.userAgent.getNavigator().appVersion||"","X11")};l_.userAgent.Sa||l_.userAgent.dh();l_.userAgent.MAC=l_.userAgent.Sa?l_.userAgent.ASSUME_MAC:l_.userAgent.Vg;
l_.userAgent.WINDOWS=l_.userAgent.Sa?l_.userAgent.ASSUME_WINDOWS:l_.userAgent.Wg;l_.userAgent.LINUX=l_.userAgent.Sa?l_.userAgent.ASSUME_LINUX:l_.userAgent.Ug;l_.userAgent.X11=l_.userAgent.Sa?l_.userAgent.ASSUME_X11:l_.userAgent.Xg;
l_.userAgent.Zg=function(){var a="",b;if(l_.userAgent.OPERA&&l_.global.opera){a=l_.global.opera.version;a=typeof a=="function"?a():a}else{if(l_.userAgent.GECKO)b=/rv\:([^\);]+)(\)|;)/;else if(l_.userAgent.IE)b=/MSIE\s+([^\);]+)(\)|;)/;else if(l_.userAgent.WEBKIT)b=/WebKit\/(\S+)/;if(b)a=(a=b.exec(l_.userAgent.getUserAgentString()))?a[1]:""}return a};l_.userAgent.VERSION=l_.userAgent.Zg();l_.userAgent.compare=function(a,b){return l_.string.compareVersions(a,b)};l_.userAgent.Sf={};
l_.userAgent.isVersion=function(a){return l_.userAgent.Sf[a]||(l_.userAgent.Sf[a]=l_.string.compareVersions(l_.userAgent.VERSION,a)>=0)};l_.events.BrowserEvent=function(a,b){a&&this.init(a,b)};l_.inherits(l_.events.BrowserEvent,l_.events.Event);l_.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};l_.events.BrowserEvent.wh=[1,4,2];l_.events.BrowserEvent.prototype.target=l_c;l_.events.BrowserEvent.prototype.relatedTarget=l_c;l_.events.BrowserEvent.prototype.offsetX=0;l_.events.BrowserEvent.prototype.offsetY=0;l_.events.BrowserEvent.prototype.clientX=0;l_.events.BrowserEvent.prototype.clientY=0;
l_.events.BrowserEvent.prototype.screenX=0;l_.events.BrowserEvent.prototype.screenY=0;l_.events.BrowserEvent.prototype.button=0;l_.events.BrowserEvent.prototype.keyCode=0;l_.events.BrowserEvent.prototype.charCode=0;l_.events.BrowserEvent.prototype.ctrlKey=l_d;l_.events.BrowserEvent.prototype.altKey=l_d;l_.events.BrowserEvent.prototype.shiftKey=l_d;l_.events.BrowserEvent.prototype.metaKey=l_d;l_.events.BrowserEvent.prototype.sa=l_c;
l_.events.BrowserEvent.prototype.init=function(a,b){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(l_.userAgent.GECKO)try{b=b.nodeName&&b}catch(d){b=l_c}}else if(c=="mouseover")b=a.fromElement;else if(c=="mouseout")b=a.toElement;this.relatedTarget=b;this.offsetX=a.offsetX!==undefined?a.offsetX:a.layerX;this.offsetY=a.offsetY!==undefined?a.offsetY:a.layerY;this.clientX=a.clientX!==undefined?a.clientX:a.pageX;this.clientY=a.clientY!==undefined?
a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||(c=="keypress"?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.sa=a;delete this.xa;delete this.$};l_.events.BrowserEvent.prototype.stopPropagation=function(){this.$=l_b;if(this.sa.stopPropagation)this.sa.stopPropagation();else this.sa.cancelBubble=l_b};
l_.events.BrowserEvent.Ig=l_.userAgent.IE&&!l_.userAgent.isVersion("8");l_.events.BrowserEvent.prototype.preventDefault=function(){this.xa=l_d;var a=this.sa;if(a.preventDefault)a.preventDefault();else{a.returnValue=l_d;if(l_.events.BrowserEvent.Ig)try{if(a.ctrlKey||a.keyCode>=112&&a.keyCode<=123)a.keyCode=-1}catch(b){}}};l_.events.BrowserEvent.prototype.a=function(){l_.events.BrowserEvent.r.a.call(this);this.relatedTarget=this.currentTarget=this.target=this.sa=l_c};l_.events.EventWrapper=function(){};l_.events.EventWrapper.prototype.listen=function(){};l_.events.EventWrapper.prototype.unlisten=function(){};l_.userAgent.jscript={};l_.userAgent.jscript.ASSUME_NO_JSCRIPT=l_d;l_.userAgent.jscript.sd=function(){var a="ScriptEngine"in l_.global;l_.userAgent.jscript.Td=a&&l_.global.ScriptEngine()=="JScript";l_.userAgent.jscript.Cg=l_.userAgent.jscript.Td?l_.global.ScriptEngineMajorVersion()+"."+l_.global.ScriptEngineMinorVersion()+"."+l_.global.ScriptEngineBuildVersion():"0"};l_.userAgent.jscript.ASSUME_NO_JSCRIPT||l_.userAgent.jscript.sd();
l_.userAgent.jscript.HAS_JSCRIPT=l_.userAgent.jscript.ASSUME_NO_JSCRIPT?l_d:l_.userAgent.jscript.Td;l_.userAgent.jscript.VERSION=l_.userAgent.jscript.ASSUME_NO_JSCRIPT?"0":l_.userAgent.jscript.Cg;l_.userAgent.jscript.isVersion=function(a){return l_.string.compareVersions(l_.userAgent.jscript.VERSION,a)>=0};l_.events.Listener=function(){};l_.events.Listener.Qg=0;l_.events.Listener.prototype.key=0;l_.events.Listener.prototype.removed=l_d;l_.events.Listener.prototype.bb=l_d;
l_.events.Listener.prototype.init=function(a,b,c,d,e,f){if(l_.isFunction(a))this.Qf=l_b;else if(a&&a.handleEvent&&l_.isFunction(a.handleEvent))this.Qf=l_d;else l_a(Error("Invalid listener argument"));this.listener=a;this.proxy=b;this.src=c;this.type=d;this.capture=!!e;this.handler=f;this.bb=l_d;this.key=++l_.events.Listener.Qg;this.removed=l_d};
l_.events.Listener.prototype.handleEvent=function(a){if(this.Qf)return this.listener.call(this.handler||this.src,a);return this.listener.handleEvent.call(this.listener,a)};l_.events.pools={};
(function(){function a(){return{n:0,M:0}}function b(){return[]}function c(){var l=function(n){return g.call(l.src,l.key,n)};return l}function d(){return new l_.events.Listener}function e(){return new l_.events.BrowserEvent}var f=l_.userAgent.jscript.HAS_JSCRIPT&&!l_.userAgent.jscript.isVersion("5.7"),g;l_.events.pools.setProxyCallbackFunction=function(l){g=l};if(f){l_.events.pools.p=function(){return h.p()};l_.events.pools.t=function(l){h.t(l)};l_.events.pools.getArray=function(){return i.p()};l_.events.pools.releaseArray=
function(l){i.t(l)};l_.events.pools.getProxy=function(){return j.p()};l_.events.pools.releaseProxy=function(){j.t(c())};l_.events.pools.getListener=function(){return k.p()};l_.events.pools.releaseListener=function(l){k.t(l)};l_.events.pools.getEvent=function(){return m.p()};l_.events.pools.releaseEvent=function(l){m.t(l)};var h=new l_.structs.SimplePool(0,600);h.Ka(a);var i=new l_.structs.SimplePool(0,600);i.Ka(b);var j=new l_.structs.SimplePool(0,600);j.Ka(c);var k=new l_.structs.SimplePool(0,600);
k.Ka(d);var m=new l_.structs.SimplePool(0,600);m.Ka(e)}else{l_.events.pools.p=a;l_.events.pools.t=l_.nullFunction;l_.events.pools.getArray=b;l_.events.pools.releaseArray=l_.nullFunction;l_.events.pools.getProxy=c;l_.events.pools.releaseProxy=l_.nullFunction;l_.events.pools.getListener=d;l_.events.pools.releaseListener=l_.nullFunction;l_.events.pools.getEvent=e;l_.events.pools.releaseEvent=l_.nullFunction}})();l_.events.ha={};l_.events.s={};l_.events.T={};l_.events.lh="on";l_.events.Cd={};l_.events.xh="_";
l_.events.listen=function(a,b,c,d,e){if(b)if(l_.isArray(b)){for(var f=0;f<b.length;f++)l_.events.listen(a,b[f],c,d,e);return l_c}else{d=!!d;var g=l_.events.s;b in g||(g[b]=l_.events.pools.p());g=g[b];if(!(d in g)){g[d]=l_.events.pools.p();g.n++}g=g[d];var h=l_.getHashCode(a),i;g.M++;if(g[h]){i=g[h];for(f=0;f<i.length;f++){g=i[f];if(g.listener==c&&g.handler==e){if(g.removed)break;return i[f].key}}}else{i=g[h]=l_.events.pools.getArray();g.n++}f=l_.events.pools.getProxy();f.src=a;g=l_.events.pools.getListener();
g.init(c,f,a,b,d,e);c=g.key;f.key=c;i.push(g);l_.events.ha[c]=g;l_.events.T[h]||(l_.events.T[h]=l_.events.pools.getArray());l_.events.T[h].push(g);if(a.addEventListener){if(a==l_.global||!a.bd)a.addEventListener(b,f,d)}else a.attachEvent(l_.events.tf(b),f);return c}else l_a(Error("Invalid event type"))};l_.events.Ia=function(a,b,c,d,e){if(l_.isArray(b)){for(var f=0;f<b.length;f++)l_.events.Ia(a,b[f],c,d,e);return l_c}a=l_.events.listen(a,b,c,d,e);b=l_.events.ha[a];b.bb=l_b;return a};
l_.events.Uf=function(a,b,c,d,e){b.listen(a,c,d,e)};l_.events.unlisten=function(a,b,c,d,e){if(l_.isArray(b)){for(var f=0;f<b.length;f++)l_.events.unlisten(a,b[f],c,d,e);return l_c}d=!!d;a=l_.events.kd(a,b,d);if(!a)return l_d;for(f=0;f<a.length;f++)if(a[f].listener==c&&a[f].capture==d&&a[f].handler==e)return l_.events.unlistenByKey(a[f].key);return l_d};
l_.events.unlistenByKey=function(a){if(!l_.events.ha[a])return l_d;var b=l_.events.ha[a];if(b.removed)return l_d;var c=b.src,d=b.type,e=b.proxy,f=b.capture;if(c.removeEventListener){if(c==l_.global||!c.bd)c.removeEventListener(d,e,f)}else c.detachEvent&&c.detachEvent(l_.events.tf(d),e);c=l_.getHashCode(c);e=l_.events.s[d][f][c];if(l_.events.T[c]){var g=l_.events.T[c];l_.array.remove(g,b);g.length==0&&delete l_.events.T[c]}b.removed=l_b;e.cg=l_b;l_.events.Se(d,f,c,e);delete l_.events.ha[a];return l_b};
l_.events.wg=function(a,b,c,d,e){b.unlisten(a,c,d,e)};
l_.events.Se=function(a,b,c,d){if(!d.Vb)if(d.cg){for(var e=0,f=0;e<d.length;e++)if(d[e].removed){var g=d[e].proxy;g.src=l_c;l_.events.pools.releaseProxy(g);l_.events.pools.releaseListener(d[e])}else{if(e!=f)d[f]=d[e];f++}d.length=f;d.cg=l_d;if(f==0){l_.events.pools.releaseArray(d);delete l_.events.s[a][b][c];l_.events.s[a][b].n--;if(l_.events.s[a][b].n==0){l_.events.pools.t(l_.events.s[a][b]);delete l_.events.s[a][b];l_.events.s[a].n--}if(l_.events.s[a].n==0){l_.events.pools.t(l_.events.s[a]);delete l_.events.s[a]}}}};
l_.events.wa=function(a,b,c){var d=0,e=a==l_c,f=b==l_c,g=c==l_c;c=!!c;if(e)l_.object.forEach(l_.events.T,function(i){for(var j=i.length-1;j>=0;j--){var k=i[j];if((f||b==k.type)&&(g||c==k.capture)){l_.events.unlistenByKey(k.key);d++}}});else{a=l_.getHashCode(a);if(l_.events.T[a]){a=l_.events.T[a];for(e=a.length-1;e>=0;e--){var h=a[e];if((f||b==h.type)&&(g||c==h.capture)){l_.events.unlistenByKey(h.key);d++}}}}return d};l_.events.getListeners=function(a,b,c){return l_.events.kd(a,b,c)||[]};
l_.events.kd=function(a,b,c){var d=l_.events.s;if(b in d){d=d[b];if(c in d){d=d[c];a=l_.getHashCode(a);if(d[a])return d[a]}}return l_c};l_.events.getListener=function(a,b,c,d,e){d=!!d;if(a=l_.events.kd(a,b,d))for(b=0;b<a.length;b++)if(a[b].listener==c&&a[b].capture==d&&a[b].handler==e)return a[b];return l_c};
l_.events.hasListener=function(a,b,c){a=l_.getHashCode(a);var d=l_.events.T[a];if(d){var e=l_.isDef(b),f=l_.isDef(c);if(e&&f){d=l_.events.s[b];return!!d&&!!d[c]&&a in d[c]}else return e||f?l_.array.some(d,function(g){return e&&g.type==b||f&&g.capture==c}):l_b}return l_d};l_.events.expose=function(a){var b=[];for(var c in a)a[c]&&a[c].id?b.push(c+" = "+a[c]+" ("+a[c].id+")"):b.push(c+" = "+a[c]);return b.join("\n")};
l_.events.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",SELECTSTART:"selectstart",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:l_.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:l_.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",SELECT:"select",SUBMIT:"submit",CONTEXTMENU:"contextmenu",DRAGSTART:"dragstart",ERROR:"error",HASHCHANGE:"hashchange",
HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload"};l_.events.tf=function(a){if(a in l_.events.Cd)return l_.events.Cd[a];return l_.events.Cd[a]=l_.events.lh+a};l_.events.fireListeners=function(a,b,c,d){var e=l_.events.s;if(b in e){e=e[b];if(c in e)return l_.events.Fa(e[c],a,b,c,d)}return l_b};
l_.events.Fa=function(a,b,c,d,e){var f=1;b=l_.getHashCode(b);if(a[b]){a.M--;a=a[b];if(a.Vb)a.Vb++;else a.Vb=1;try{for(var g=a.length,h=0;h<g;h++){var i=a[h];if(i&&!i.removed)f&=l_.events.fireListener(i,e)!==l_d}}finally{a.Vb--;l_.events.Se(c,d,b,a)}}return Boolean(f)};l_.events.fireListener=function(a,b){b=a.handleEvent(b);a.bb&&l_.events.unlistenByKey(a.key);return b};l_.events.getTotalListenerCount=function(){return l_.object.c(l_.events.ha)};
l_.events.dispatchEvent=function(a,b){if(l_.isString(b))b=new l_.events.Event(b,a);else if(b instanceof l_.events.Event)b.target=b.target||a;else{var c=b;b=new l_.events.Event(b.type,a);l_.object.extend(b,c)}c=1;var d,e=b.type,f=l_.events.s;if(!(e in f))return l_b;f=f[e];e=l_b in f;var g;if(e){d=[];for(g=a;g;g=g.ld())d.push(g);g=f[l_b];g.M=g.n;for(var h=d.length-1;!b.$&&h>=0&&g.M;h--){b.currentTarget=d[h];c&=l_.events.Fa(g,d[h],b.type,l_b,b)&&b.xa!=l_d}}if(g=l_d in f){g=f[l_d];g.M=g.n;if(e)for(h=
0;!b.$&&h<d.length&&g.M;h++){b.currentTarget=d[h];c&=l_.events.Fa(g,d[h],b.type,l_d,b)&&b.xa!=l_d}else for(a=a;!b.$&&a&&g.M;a=a.ld()){b.currentTarget=a;c&=l_.events.Fa(g,a,b.type,l_d,b)&&b.xa!=l_d}}return Boolean(c)};l_.events.protectBrowserEventEntryPoint=function(a,b){l_.events.Pb=a.protectEntryPoint(l_.events.Pb,b);l_.events.pools.setProxyCallbackFunction(l_.events.Pb)};
l_.events.Pb=function(a,b){if(!l_.events.ha[a])return l_b;a=l_.events.ha[a];var c=a.type,d=l_.events.s;if(!(c in d))return l_b;d=d[c];var e,f;if(l_.userAgent.IE){e=b||l_.getObjectByName("window.event");b=l_b in d;var g=l_d in d;if(b){if(l_.events.fh(e))return l_b;l_.events.hh(e)}var h=l_.events.pools.getEvent();h.init(e,this);e=l_b;try{if(b){for(var i=l_.events.pools.getArray(),j=h.currentTarget;j;j=j.parentNode)i.push(j);f=d[l_b];f.M=f.n;for(var k=i.length-1;!h.$&&k>=0&&f.M;k--){h.currentTarget=
i[k];e&=l_.events.Fa(f,i[k],c,l_b,h)}if(g){f=d[l_d];f.M=f.n;for(k=0;!h.$&&k<i.length&&f.M;k++){h.currentTarget=i[k];e&=l_.events.Fa(f,i[k],c,l_d,h)}}}else e=l_.events.fireListener(a,h)}finally{if(i){i.length=0;l_.events.pools.releaseArray(i)}h.dispose();l_.events.pools.releaseEvent(h)}return e}f=new l_.events.BrowserEvent(b,this);try{e=l_.events.fireListener(a,f)}finally{f.dispose()}return e};l_.events.pools.setProxyCallbackFunction(l_.events.Pb);
l_.events.hh=function(a){var b=l_d;if(a.keyCode==0)try{a.keyCode=-1;return}catch(c){b=l_b}if(b||a.returnValue==undefined)a.returnValue=l_b};l_.events.fh=function(a){return a.keyCode<0||a.returnValue!=undefined};l_.events.sh=0;l_.events.getUniqueId=function(a){return a+"_"+l_.events.sh++};l_.events.EventHandler=function(a){this.ib=a};l_.inherits(l_.events.EventHandler,l_.Disposable);l_.events.EventHandler.KEY_POOL_INITIAL_COUNT=0;l_.events.EventHandler.KEY_POOL_MAX_COUNT=100;l_.events.EventHandler.Tf=new l_.structs.SimplePool(l_.events.EventHandler.KEY_POOL_INITIAL_COUNT,l_.events.EventHandler.KEY_POOL_MAX_COUNT);l_.events.EventHandler.b=l_c;l_.events.EventHandler.H=l_c;
l_.events.EventHandler.prototype.listen=function(a,b,c,d,e){if(l_.isArray(b))for(var f=0;f<b.length;f++)this.listen(a,b[f],c,d,e);else{a=l_.events.listen(a,b,c||this,d||l_d,e||this.ib||this);this.Jd(a)}return this};l_.events.EventHandler.prototype.Ia=function(a,b,c,d,e){if(l_.isArray(b))for(var f=0;f<b.length;f++)this.Ia(a,b[f],c,d,e);else{a=l_.events.Ia(a,b,c||this,d||l_d,e||this.ib||this);this.Jd(a)}return this};
l_.events.EventHandler.prototype.Uf=function(a,b,c,d,e){b.listen(a,c,d,e||this.ib,this);return this};l_.events.EventHandler.prototype.Jd=function(a){if(this.b)this.b[a]=l_b;else if(this.H){this.b=l_.events.EventHandler.Tf.p();this.b[this.H]=l_b;this.H=l_c;this.b[a]=l_b}else this.H=a};
l_.events.EventHandler.prototype.unlisten=function(a,b,c,d,e){if(this.H||this.b)if(l_.isArray(b))for(var f=0;f<b.length;f++)this.unlisten(a,b[f],c,d,e);else if(a=l_.events.getListener(a,b,c||this,d||l_d,e||this.ib||this)){a=a.key;l_.events.unlistenByKey(a);if(this.b)l_.object.remove(this.b,a);else if(this.H==a)this.H=l_c}return this};l_.events.EventHandler.prototype.wg=function(a,b,c,d,e){b.unlisten(a,c,d,e||this.ib,this);return this};
l_.events.EventHandler.prototype.wa=function(){if(this.b){for(var a in this.b){l_.events.unlistenByKey(a);delete this.b[a]}l_.events.EventHandler.Tf.t(this.b);this.b=l_c}else this.H&&l_.events.unlistenByKey(this.H)};l_.events.EventHandler.prototype.a=function(){l_.events.EventHandler.r.a.call(this);this.wa()};l_.events.EventHandler.prototype.handleEvent=function(){l_a(Error("EventHandler.handleEvent not implemented"))};l_.events.EventTarget=function(){l_.Disposable.call(this)};l_.inherits(l_.events.EventTarget,l_.Disposable);l_.events.EventTarget.prototype.bd=l_b;l_.events.EventTarget.prototype.Fd=l_c;l_.events.EventTarget.prototype.ld=function(){return this.Fd};l_.events.EventTarget.prototype.addEventListener=function(a,b,c,d){l_.events.listen(this,a,b,c,d)};l_.events.EventTarget.prototype.removeEventListener=function(a,b,c,d){l_.events.unlisten(this,a,b,c,d)};
l_.events.EventTarget.prototype.dispatchEvent=function(a){return l_.events.dispatchEvent(this,a)};l_.events.EventTarget.prototype.a=function(){l_.events.EventTarget.r.a.call(this);l_.events.wa(this);this.Fd=l_c};l_.iter={};l_.iter.Iterable=l_.typedef;l_.iter.StopIteration="StopIteration"in l_.global?l_.global.StopIteration:Error("StopIteration");l_.iter.Iterator=function(){};l_.iter.Iterator.prototype.next=function(){l_a(l_.iter.StopIteration)};l_.iter.Iterator.prototype.__iterator__=function(){return this};
l_.iter.toIterator=function(a){if(a instanceof l_.iter.Iterator)return a;if(typeof a.__iterator__=="function")return a.__iterator__(l_d);if(l_.isArrayLike(a)){var b=0,c=new l_.iter.Iterator;c.next=function(){for(;1;){if(b>=a.length)l_a(l_.iter.StopIteration);if(b in a)return a[b++];else b++}};return c}l_a(Error("Not implemented"))};
l_.iter.forEach=function(a,b,c){if(l_.isArrayLike(a))try{l_.array.forEach(a,b,c)}catch(d){if(d!==l_.iter.StopIteration)l_a(d)}else{a=l_.iter.toIterator(a);try{for(;1;)b.call(c,a.next(),undefined,a)}catch(e){if(e!==l_.iter.StopIteration)l_a(e)}}};l_.iter.filter=function(a,b,c){a=l_.iter.toIterator(a);var d=new l_.iter.Iterator;d.next=function(){for(;1;){var e=a.next();if(b.call(c,e,undefined,a))return e}};return d};
l_.iter.range=function(a,b,c){var d=0,e=a,f=c||1;if(arguments.length>1){d=a;e=b}if(f==0)l_a(Error("Range step argument must not be zero"));var g=new l_.iter.Iterator;g.next=function(){if(f>0&&d>=e||f<0&&d<=e)l_a(l_.iter.StopIteration);var h=d;d+=f;return h};return g};l_.iter.join=function(a,b){return l_.iter.toArray(a).join(b)};l_.iter.map=function(a,b,c){a=l_.iter.toIterator(a);var d=new l_.iter.Iterator;d.next=function(){for(;1;){var e=a.next();return b.call(c,e,undefined,a)}};return d};
l_.iter.reduce=function(a,b,c,d){var e=c;l_.iter.forEach(a,function(f){e=b.call(d,e,f)});return e};l_.iter.some=function(a,b,c){a=l_.iter.toIterator(a);try{for(;1;)if(b.call(c,a.next(),undefined,a))return l_b}catch(d){if(d!==l_.iter.StopIteration)l_a(d)}return l_d};l_.iter.every=function(a,b,c){a=l_.iter.toIterator(a);try{for(;1;)if(!b.call(c,a.next(),undefined,a))return l_d}catch(d){if(d!==l_.iter.StopIteration)l_a(d)}return l_b};
l_.iter.chain=function(){var a=arguments,b=a.length,c=0,d=new l_.iter.Iterator;d.next=function(){try{if(c>=b)l_a(l_.iter.StopIteration);var e=l_.iter.toIterator(a[c]);return e.next()}catch(f){if(f!==l_.iter.StopIteration||c>=b)l_a(f);else{c++;return this.next()}}};return d};l_.iter.dropWhile=function(a,b,c){a=l_.iter.toIterator(a);var d=new l_.iter.Iterator,e=l_b;d.next=function(){for(;1;){var f=a.next();if(!(e&&b.call(c,f,undefined,a))){e=l_d;return f}}};return d};
l_.iter.takeWhile=function(a,b,c){a=l_.iter.toIterator(a);var d=new l_.iter.Iterator,e=l_b;d.next=function(){for(;1;)if(e){var f=a.next();if(b.call(c,f,undefined,a))return f;else e=l_d}else l_a(l_.iter.StopIteration)};return d};l_.iter.toArray=function(a){if(l_.isArrayLike(a))return l_.array.toArray(a);a=l_.iter.toIterator(a);var b=[];l_.iter.forEach(a,function(c){b.push(c)});return b};
l_.iter.equals=function(a,b){a=l_.iter.toIterator(a);b=l_.iter.toIterator(b);var c,d;try{for(;1;){c=d=l_d;var e=a.next();c=l_b;var f=b.next();d=l_b;if(e!=f)return l_d}}catch(g){if(g!==l_.iter.StopIteration)l_a(g);else{if(c&&!d)return l_d;if(!d)try{b.next();return l_d}catch(h){if(h!==l_.iter.StopIteration)l_a(h);return l_b}}}return l_d};l_.iter.nextOrValue=function(a,b){try{return l_.iter.toIterator(a).next()}catch(c){if(c!=l_.iter.StopIteration)l_a(c);return b}};l_.structs.c=function(a){if(typeof a.c=="function")return a.c();if(l_.isArrayLike(a)||l_.isString(a))return a.length;return l_.object.c(a)};l_.structs.f=function(a){if(typeof a.f=="function")return a.f();if(l_.isString(a))return a.split("");if(l_.isArrayLike(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return l_.object.f(a)};
l_.structs.l=function(a){if(typeof a.l=="function")return a.l();if(typeof a.f!="function"){if(l_.isArrayLike(a)||l_.isString(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return l_.object.l(a)}};l_.structs.contains=function(a,b){if(typeof a.contains=="function")return a.contains(b);if(typeof a.X=="function")return a.X(b);if(l_.isArrayLike(a)||l_.isString(a))return l_.array.contains(a,b);return l_.object.X(a,b)};
l_.structs.g=function(a){if(typeof a.g=="function")return a.g();if(l_.isArrayLike(a)||l_.isString(a))return l_.array.g(a);return l_.object.g(a)};l_.structs.clear=function(a){if(typeof a.clear=="function")a.clear();else l_.isArrayLike(a)?l_.array.clear(a):l_.object.clear(a)};
l_.structs.forEach=function(a,b,c){if(typeof a.forEach=="function")a.forEach(b,c);else if(l_.isArrayLike(a)||l_.isString(a))l_.array.forEach(a,b,c);else for(var d=l_.structs.l(a),e=l_.structs.f(a),f=e.length,g=0;g<f;g++)b.call(c,e[g],d&&d[g],a)};
l_.structs.filter=function(a,b,c){if(typeof a.filter=="function")return a.filter(b,c);if(l_.isArrayLike(a)||l_.isString(a))return l_.array.filter(a,b,c);var d,e=l_.structs.l(a),f=l_.structs.f(a),g=f.length;if(e){d={};for(var h=0;h<g;h++)if(b.call(c,f[h],e[h],a))d[e[h]]=f[h]}else{d=[];for(h=0;h<g;h++)b.call(c,f[h],undefined,a)&&d.push(f[h])}return d};
l_.structs.map=function(a,b,c){if(typeof a.map=="function")return a.map(b,c);if(l_.isArrayLike(a)||l_.isString(a))return l_.array.map(a,b,c);var d,e=l_.structs.l(a),f=l_.structs.f(a),g=f.length;if(e){d={};for(var h=0;h<g;h++)d[e[h]]=b.call(c,f[h],e[h],a)}else{d=[];for(h=0;h<g;h++)d[h]=b.call(c,f[h],undefined,a)}return d};
l_.structs.some=function(a,b,c){if(typeof a.some=="function")return a.some(b,c);if(l_.isArrayLike(a)||l_.isString(a))return l_.array.some(a,b,c);for(var d=l_.structs.l(a),e=l_.structs.f(a),f=e.length,g=0;g<f;g++)if(b.call(c,e[g],d&&d[g],a))return l_b;return l_d};
l_.structs.every=function(a,b,c){if(typeof a.every=="function")return a.every(b,c);if(l_.isArrayLike(a)||l_.isString(a))return l_.array.every(a,b,c);for(var d=l_.structs.l(a),e=l_.structs.f(a),f=e.length,g=0;g<f;g++)if(!b.call(c,e[g],d&&d[g],a))return l_d;return l_b};l_.structs.Map=function(a){this.j={};this.b=[];var b=arguments.length;if(b>1){if(b%2)l_a(Error("Uneven number of arguments"));for(var c=0;c<b;c+=2)this.set(arguments[c],arguments[c+1])}else a&&this.Za(a)};l_.structs.Map.prototype.n=0;l_.structs.Map.prototype.La=0;l_.structs.Map.prototype.c=function(){return this.n};l_.structs.Map.prototype.f=function(){this.Ea();for(var a=[],b=0;b<this.b.length;b++){var c=this.b[b];a.push(this.j[c])}return a};l_.structs.Map.prototype.l=function(){this.Ea();return this.b.concat()};
l_.structs.Map.prototype.D=function(a){return l_.structs.Map.ta(this.j,a)};l_.structs.Map.prototype.X=function(a){for(var b=0;b<this.b.length;b++){var c=this.b[b];if(l_.structs.Map.ta(this.j,c)&&this.j[c]==a)return l_b}return l_d};l_.structs.Map.prototype.equals=function(a,b){if(this===a)return l_b;if(this.n!=a.c())return l_d;b=b||l_.structs.Map.defaultEquals;this.Ea();for(var c,d=0;c=this.b[d];d++)if(!b(this.get(c),a.get(c)))return l_d;return l_b};
l_.structs.Map.defaultEquals=function(a,b){return a===b};l_.structs.Map.prototype.g=function(){return this.n==0};l_.structs.Map.prototype.clear=function(){this.j={};this.La=this.n=this.b.length=0};l_.structs.Map.prototype.remove=function(a){if(l_.structs.Map.ta(this.j,a)){delete this.j[a];this.n--;this.La++;this.b.length>2*this.n&&this.Ea();return l_b}return l_d};
l_.structs.Map.prototype.Ea=function(){if(this.n!=this.b.length){for(var a=0,b=0;a<this.b.length;){var c=this.b[a];if(l_.structs.Map.ta(this.j,c))this.b[b++]=c;a++}this.b.length=b}if(this.n!=this.b.length){var d={};for(b=a=0;a<this.b.length;){c=this.b[a];if(!l_.structs.Map.ta(d,c)){this.b[b++]=c;d[c]=1}a++}this.b.length=b}};l_.structs.Map.prototype.get=function(a,b){if(l_.structs.Map.ta(this.j,a))return this.j[a];return b};
l_.structs.Map.prototype.set=function(a,b){if(!l_.structs.Map.ta(this.j,a)){this.n++;this.b.push(a);this.La++}this.j[a]=b};l_.structs.Map.prototype.Za=function(a){var b;if(a instanceof l_.structs.Map){b=a.l();a=a.f()}else{b=l_.object.l(a);a=l_.object.f(a)}for(var c=0;c<b.length;c++)this.set(b[c],a[c])};l_.structs.Map.prototype.clone=function(){return new l_.structs.Map(this)};
l_.structs.Map.prototype.transpose=function(){for(var a=new l_.structs.Map,b=0;b<this.b.length;b++){var c=this.b[b],d=this.j[c];a.set(d,c)}return a};l_.structs.Map.prototype.__iterator__=function(a){this.Ea();var b=0,c=this.b,d=this.j,e=this.La,f=this,g=new l_.iter.Iterator;g.next=function(){for(;1;){if(e!=f.La)l_a(Error("The map has changed since the iterator was created"));if(b>=c.length)l_a(l_.iter.StopIteration);var h=c[b++];return a?h:d[h]}};return g};
l_.structs.Map.ta=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};l_.structs.Map.c=function(a){return l_.structs.c(a)};l_.structs.Map.f=function(a){return l_.structs.f(a)};l_.structs.Map.l=function(a){if(typeof a.l=="function")return a.l();var b=[];if(l_.isArrayLike(a))for(var c=0;c<a.length;c++)b.push(c);else return l_.object.l(a);return b};l_.structs.Map.D=function(a,b){if(typeof a.D=="function")return a.D(b);if(l_.isArrayLike(a))return Number(b)<a.length;return l_.object.D(a,b)};
l_.structs.Map.X=function(a,b){return l_.structs.contains(a,b)};l_.structs.Map.g=function(a){return l_.structs.g(a)};l_.structs.Map.clear=function(a){l_.structs.clear(a)};l_.structs.Map.remove=function(a,b){if(typeof a.remove=="function")return a.remove(b);if(l_.isArrayLike(a))return l_.array.removeAt(a,Number(b));return l_.object.remove(a,b)};
l_.structs.Map.add=function(a,b,c){if(typeof a.add=="function")a.add(b,c);else if(l_.structs.Map.D(a,b))l_a(Error('The collection already contains the key "'+b+'"'));else l_.structs.Map.set(a,b,c)};l_.structs.Map.get=function(a,b,c){if(typeof a.get=="function")return a.get(b,c);if(l_.structs.Map.D(a,b))return a[b];return c};l_.structs.Map.set=function(a,b,c){if(typeof a.set=="function")a.set(b,c);else a[b]=c};l_.net={};l_.net.EventType={COMPLETE:"complete",SUCCESS:"success",ERROR:"error",ABORT:"abort",READY:"ready",READY_STATE_CHANGE:"readystatechange",TIMEOUT:"timeout",INCREMENTAL_DATA:"incrementaldata"};l_.structs.Set=function(a){this.j=new l_.structs.Map;a&&this.Za(a)};l_.structs.Set.jd=function(a){var b=typeof a;return b=="object"&&a||b=="function"?"o"+l_.getHashCode(a):b.substr(0,1)+a};l_.structs.Set.prototype.c=function(){return this.j.c()};l_.structs.Set.prototype.add=function(a){this.j.set(l_.structs.Set.jd(a),a)};l_.structs.Set.prototype.Za=function(a){a=l_.structs.f(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};
l_.structs.Set.prototype.wa=function(a){a=l_.structs.f(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};l_.structs.Set.prototype.remove=function(a){return this.j.remove(l_.structs.Set.jd(a))};l_.structs.Set.prototype.clear=function(){this.j.clear()};l_.structs.Set.prototype.g=function(){return this.j.g()};l_.structs.Set.prototype.contains=function(a){return this.j.D(l_.structs.Set.jd(a))};l_.structs.Set.prototype.f=function(){return this.j.f()};l_.structs.Set.prototype.clone=function(){return new l_.structs.Set(this)};
l_.structs.Set.prototype.equals=function(a){return this.c()==l_.structs.c(a)&&this.Rf(a)};l_.structs.Set.prototype.Rf=function(a){var b=l_.structs.c(a);if(this.c()>b)return l_d;if(!(a instanceof l_.structs.Set)&&b>5)a=new l_.structs.Set(a);return l_.structs.every(this,function(c){return l_.structs.contains(a,c)})};l_.structs.Set.prototype.__iterator__=function(){return this.j.__iterator__(l_d)};l_.debug.catchErrors=function(a,b,c){var d=a||l_.debug.LogManager.getRoot();a=c||l_.global;var e=a.onerror;a.onerror=function(f,g,h){e&&e(f,g,h);g=String(g).split(/[\/\\]/).pop();l_.isFunction(d)?d({message:f,fileName:g,line:h}):d.severe("Error: "+f+" ("+g+" @ Line: "+h+")");return Boolean(b)}};l_.debug.expose=function(a,b){if(typeof a=="undefined")return"undefined";if(a==l_c)return"NULL";var c=[];for(var d in a)if(!(!b&&l_.isFunction(a[d]))){var e=d+" = ";try{e+=a[d]}catch(f){e+="*** "+f+" ***"}c.push(e)}return c.join("\n")};
l_.debug.deepExpose=function(a,b){var c=new l_.structs.Set,d=[],e=function(f,g){var h=g+"  ",i=function(m){return m.replace(/\n/g,"\n"+g)};try{if(l_.isDef(f))if(l_.isNull(f))d.push("NULL");else if(l_.isString(f))d.push('"'+i(f)+'"');else if(l_.isFunction(f))d.push(i(String(f)));else if(l_.isObject(f))if(c.contains(f))d.push("*** reference loop detected ***");else{c.add(f);d.push("{");for(var j in f)if(!(!b&&l_.isFunction(f[j]))){d.push("\n");d.push(h);d.push(j+" = ");e(f[j],h)}d.push("\n"+g+"}")}else d.push(f);
else d.push("undefined")}catch(k){d.push("*** "+k+" ***")}};e(a,"");return d.join("")};l_.debug.exposeArray=function(a){for(var b=[],c=0;c<a.length;c++)l_.isArray(a[c])?b.push(l_.debug.exposeArray(a[c])):b.push(a[c]);return"[ "+b.join(", ")+" ]"};
l_.debug.exposeException=function(a,b){try{var c=l_.debug.normalizeErrorObject(a),d="Message: "+l_.string.htmlEscape(c.message)+'\nUrl: <a href="view-source:'+c.fileName+'" target="_new">'+c.fileName+"</a>\nLine: "+c.lineNumber+"\n\nBrowser stack:\n"+l_.string.htmlEscape(c.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+l_.string.htmlEscape(l_.debug.getStacktrace(b)+"-> ");return d}catch(e){return"Exception trying to expose exception! You win, we lose. "+e}};
l_.debug.normalizeErrorObject=function(a){var b=l_.getObjectByName("window.location.href");return typeof a=="string"?{message:a,name:"Unknown error",lineNumber:"Not available",fileName:b,stack:"Not available"}:!a.lineNumber||!a.fileName||!a.stack?{message:a.message,name:a.name,lineNumber:a.lineNumber||a.line||"Not available",fileName:a.fileName||a.filename||a.sourceURL||b,stack:a.stack||"Not available"}:a};
l_.debug.enhanceError=function(a,b){var c=typeof a=="string"?Error(a):a;if(!c.stack)c.stack=l_.debug.getStacktrace(arguments.callee.caller);if(b){for(var d=0;c["message"+d];)++d;c["message"+d]=String(b)}return c};
l_.debug.getStacktraceSimple=function(a){for(var b=[],c=arguments.callee.caller,d=0;c&&(!a||d<a);){b.push(l_.debug.getFunctionName(c));b.push("()\n");try{c=c.caller}catch(e){b.push("[exception trying to get caller]\n");break}d++;if(d>=l_.debug.MAX_STACK_DEPTH){b.push("[...long stack...]");break}}a&&d>=a?b.push("[...reached max depth limit...]"):b.push("[end]");return b.join("")};l_.debug.MAX_STACK_DEPTH=50;l_.debug.getStacktrace=function(a){return l_.debug.zf(a||arguments.callee.caller,[])};
l_.debug.zf=function(a,b){var c=[];if(l_.array.contains(b,a))c.push("[...circular reference...]");else if(a&&b.length<l_.debug.MAX_STACK_DEPTH){c.push(l_.debug.getFunctionName(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){e>0&&c.push(", ");var f;f=d[e];switch(typeof f){case "object":f=f?"object":"null";break;case "string":f=f;break;case "number":f=String(f);break;case "boolean":f=f?"true":"false";break;case "function":f=(f=l_.debug.getFunctionName(f))?f:"[fn]";break;case "undefined":default:f=
typeof f;break}if(f.length>40)f=f.substr(0,40)+"...";c.push(f)}b.push(a);c.push(")\n");try{c.push(l_.debug.zf(a.caller,b))}catch(g){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")};l_.debug.getFunctionName=function(a){a=String(a);if(!l_.debug.Mb[a]){var b=/function ([^\(]+)/.exec(a);if(b){b=b[1];l_.debug.Mb[a]=b}else l_.debug.Mb[a]="[Anonymous]"}return l_.debug.Mb[a]};
l_.debug.makeWhitespaceVisible=function(a){return a.replace(/ /g,"[_]").replace(/\f/g,"[f]").replace(/\n/g,"[n]\n").replace(/\r/g,"[r]").replace(/\t/g,"[t]")};l_.debug.Mb={};l_.debug.LogRecord=function(a,b,c,d,e){this.Ch=typeof e=="number"?e:l_.debug.LogRecord.kh++;this.Dh=d||l_.now();this.ga=a;this.zh=b;this.yh=c};l_.debug.LogRecord.prototype.ff=l_c;l_.debug.LogRecord.prototype.ef=l_c;l_.debug.LogRecord.kh=0;l_.debug.LogRecord.prototype.pg=function(a){this.ff=a};l_.debug.LogRecord.prototype.qg=function(a){this.ef=a};l_.debug.LogRecord.prototype.Nb=function(){return this.ga};l_.debug.LogRecord.prototype.Zb=function(a){this.ga=a};l_.debug.Logger=function(a){this.jh=a;this.Wb=l_c;this.Ng={};this.Jf=[]};l_.debug.Logger.prototype.ga=l_c;l_.debug.Logger.Level=function(a,b){this.name=a;this.value=b};l_.debug.Logger.Level.prototype.toString=function(){return this.name};l_.debug.Logger.Level.OFF=new l_.debug.Logger.Level("OFF",Infinity);l_.debug.Logger.Level.SHOUT=new l_.debug.Logger.Level("SHOUT",1200);l_.debug.Logger.Level.SEVERE=new l_.debug.Logger.Level("SEVERE",1E3);
l_.debug.Logger.Level.WARNING=new l_.debug.Logger.Level("WARNING",900);l_.debug.Logger.Level.INFO=new l_.debug.Logger.Level("INFO",800);l_.debug.Logger.Level.CONFIG=new l_.debug.Logger.Level("CONFIG",700);l_.debug.Logger.Level.FINE=new l_.debug.Logger.Level("FINE",500);l_.debug.Logger.Level.FINER=new l_.debug.Logger.Level("FINER",400);l_.debug.Logger.Level.FINEST=new l_.debug.Logger.Level("FINEST",300);l_.debug.Logger.Level.ALL=new l_.debug.Logger.Level("ALL",0);
l_.debug.Logger.Level.PREDEFINED_LEVELS=[l_.debug.Logger.Level.OFF,l_.debug.Logger.Level.SHOUT,l_.debug.Logger.Level.SEVERE,l_.debug.Logger.Level.WARNING,l_.debug.Logger.Level.INFO,l_.debug.Logger.Level.CONFIG,l_.debug.Logger.Level.FINE,l_.debug.Logger.Level.FINER,l_.debug.Logger.Level.FINEST,l_.debug.Logger.Level.ALL];l_.debug.Logger.Level.ia=l_c;
l_.debug.Logger.Level.We=function(){l_.debug.Logger.Level.ia={};for(var a=0,b;b=l_.debug.Logger.Level.PREDEFINED_LEVELS[a];a++){l_.debug.Logger.Level.ia[b.value]=b;l_.debug.Logger.Level.ia[b.name]=b}};l_.debug.Logger.Level.getPredefinedLevel=function(a){l_.debug.Logger.Level.ia||l_.debug.Logger.Level.We();return l_.debug.Logger.Level.ia[a]||l_c};
l_.debug.Logger.Level.getPredefinedLevelByValue=function(a){l_.debug.Logger.Level.ia||l_.debug.Logger.Level.We();if(a in l_.debug.Logger.Level.ia)return l_.debug.Logger.Level.ia[a];for(var b=0;b<l_.debug.Logger.Level.PREDEFINED_LEVELS.length;++b){var c=l_.debug.Logger.Level.PREDEFINED_LEVELS[b];if(c.value<=a)return c}return l_c};l_.debug.Logger.getLogger=function(a){return l_.debug.LogManager.getLogger(a)};l_.debug.Logger.prototype.uf=function(){return this.Wb};
l_.debug.Logger.prototype.Zb=function(a){this.ga=a};l_.debug.Logger.prototype.Nb=function(){return this.ga};l_.debug.Logger.prototype.Ub=function(a){if(this.ga)return a.value>=this.ga.value;if(this.Wb)return this.Wb.Ub(a);return l_d};l_.debug.Logger.prototype.log=function(a,b,c){this.Ub(a)&&this.Wf(this.rf(a,b,c))};l_.debug.Logger.prototype.rf=function(a,b,c){var d=new l_.debug.LogRecord(a,String(b),this.jh);if(c){d.pg(c);d.qg(l_.debug.exposeException(c,arguments.callee.caller))}return d};
l_.debug.Logger.prototype.severe=function(a,b){this.log(l_.debug.Logger.Level.SEVERE,a,b)};l_.debug.Logger.prototype.warning=function(a,b){this.log(l_.debug.Logger.Level.WARNING,a,b)};l_.debug.Logger.prototype.fine=function(a,b){this.log(l_.debug.Logger.Level.FINE,a,b)};l_.debug.Logger.prototype.finest=function(a,b){this.log(l_.debug.Logger.Level.FINEST,a,b)};l_.debug.Logger.prototype.Wf=function(a){if(this.Ub(a.Nb()))for(var b=this;b;){b.Re(a);b=b.uf()}};
l_.debug.Logger.prototype.Re=function(a){for(var b=0;b<this.Jf.length;b++)this.Jf[b](a)};l_.debug.Logger.prototype.rg=function(a){this.Wb=a};l_.debug.Logger.prototype.Ke=function(a,b){this.Ng[a]=b};l_.debug.LogManager={};l_.debug.LogManager.lb={};l_.debug.LogManager.nb=l_c;l_.debug.LogManager.initialize=function(){if(!l_.debug.LogManager.nb){l_.debug.LogManager.nb=new l_.debug.Logger("");l_.debug.LogManager.lb[""]=l_.debug.LogManager.nb;l_.debug.LogManager.nb.Zb(l_.debug.Logger.Level.CONFIG)}};
l_.debug.LogManager.getLoggers=function(){return l_.debug.LogManager.lb};l_.debug.LogManager.getRoot=function(){l_.debug.LogManager.initialize();return l_.debug.LogManager.nb};l_.debug.LogManager.getLogger=function(a){l_.debug.LogManager.initialize();return a in l_.debug.LogManager.lb?l_.debug.LogManager.lb[a]:l_.debug.LogManager.Rg(a)};
l_.debug.LogManager.Rg=function(a){var b=new l_.debug.Logger(a),c=a.split("."),d=c[c.length-1];c.length-=1;c=c.join(".");c=l_.debug.LogManager.getLogger(c);c.Ke(d,b);b.rg(c);return l_.debug.LogManager.lb[a]=b};l_.json={};l_.json.gh=function(a){if(/^\s*$/.test(a))return l_d;var b=/\\["\\\/bfnrtu]/g,c=/"[^"\\\n\r\u2028\u2029\x00-\x08\x10-\x1f\x80-\x9f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,d=/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,e=/^[\],:{}\s\u2028\u2029]*$/;return e.test(a.replace(b,"@").replace(c,"]").replace(d,""))};l_.json.parse=function(a){a=String(a);if(l_.json.gh(a))try{return eval("("+a+")")}catch(b){}l_a(Error("Invalid JSON string: "+a))};
l_.json.unsafeParse=function(a){return eval("("+a+")")};l_.json.serialize=function(a){return(new l_.json.Serializer).serialize(a)};l_.json.Serializer=function(){};l_.json.Serializer.prototype.serialize=function(a){var b=[];this.Yb(a,b);return b.join("")};
l_.json.Serializer.prototype.Yb=function(a,b){switch(typeof a){case "string":this.Pd(a,b);break;case "number":this.lg(a,b);break;case "boolean":b.push(a);break;case "undefined":b.push("null");break;case "object":if(a==l_c){b.push("null");break}if(l_.isArray(a)){this.kg(a,b);break}this.mg(a,b);break;case "function":break;default:l_a(Error("Unknown type: "+typeof a))}};l_.json.Serializer.Zc={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"};
l_.json.Serializer.Mg=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;l_.json.Serializer.prototype.Pd=function(a,b){b.push('"',a.replace(l_.json.Serializer.Mg,function(c){if(c in l_.json.Serializer.Zc)return l_.json.Serializer.Zc[c];var d=c.charCodeAt(0),e="\\u";if(d<16)e+="000";else if(d<256)e+="00";else if(d<4096)e+="0";return l_.json.Serializer.Zc[c]=e+d.toString(16)}),'"')};l_.json.Serializer.prototype.lg=function(a,b){b.push(isFinite(a)&&!isNaN(a)?a:"null")};
l_.json.Serializer.prototype.kg=function(a,b){var c=a.length;b.push("[");for(var d="",e=0;e<c;e++){b.push(d);this.Yb(a[e],b);d=","}b.push("]")};l_.json.Serializer.prototype.mg=function(a,b){b.push("{");var c="";for(var d in a)if(a.hasOwnProperty(d)){var e=a[d];if(typeof e!="function"){b.push(c);this.Pd(d,b);b.push(":");this.Yb(e,b);c=","}}b.push("}")};l_.Timer=function(a,b){l_.events.EventTarget.call(this);this.kb=a||1;this.pb=b||l_.Timer.defaultTimerObject;this.Wc=l_.bind(this.ug,this);this.yd=l_.now()};l_.inherits(l_.Timer,l_.events.EventTarget);l_.Timer.Jg=2147483647;l_.Timer.prototype.enabled=l_d;l_.Timer.defaultTimerObject=l_.global.window;l_.Timer.intervalScale=0.8;l_.Timer.prototype.U=l_c;l_.Timer.prototype.setInterval=function(a){this.kb=a;if(this.U&&this.enabled){this.stop();this.start()}else this.U&&this.stop()};
l_.Timer.prototype.ug=function(){if(this.enabled){var a=l_.now()-this.yd;if(a>0&&a<this.kb*l_.Timer.intervalScale)this.U=this.pb.setTimeout(this.Wc,this.kb-a);else{this.$e();if(this.enabled){this.U=this.pb.setTimeout(this.Wc,this.kb);this.yd=l_.now()}}}};l_.Timer.prototype.$e=function(){this.dispatchEvent(l_.Timer.TICK)};l_.Timer.prototype.start=function(){this.enabled=l_b;if(!this.U){this.U=this.pb.setTimeout(this.Wc,this.kb);this.yd=l_.now()}};
l_.Timer.prototype.stop=function(){this.enabled=l_d;if(this.U){this.pb.clearTimeout(this.U);this.U=l_c}};l_.Timer.prototype.a=function(){l_.Timer.r.a.call(this);this.stop();delete this.pb};l_.Timer.TICK="tick";l_.Timer.bb=function(a,b,c){if(l_.isFunction(a)){if(c)a=l_.bind(a,c)}else if(a&&typeof a.handleEvent=="function")a=l_.bind(a.handleEvent,a);else l_a(Error("Invalid listener argument"));return b>l_.Timer.Jg?-1:l_.Timer.defaultTimerObject.setTimeout(a,b||0)};l_.Timer.clear=function(a){l_.Timer.defaultTimerObject.clearTimeout(a)};l_.net.ErrorCode={NO_ERROR:0,ACCESS_DENIED:1,FILE_NOT_FOUND:2,FF_SILENT_ERROR:3,CUSTOM_ERROR:4,EXCEPTION:5,HTTP_ERROR:6,ABORT:7,TIMEOUT:8,OFFLINE:9};
l_.net.ErrorCode.getDebugMessage=function(a){switch(a){case l_.net.ErrorCode.NO_ERROR:return"No Error";case l_.net.ErrorCode.ACCESS_DENIED:return"Access denied to content document";case l_.net.ErrorCode.FILE_NOT_FOUND:return"File not found";case l_.net.ErrorCode.FF_SILENT_ERROR:return"Firefox silently errored";case l_.net.ErrorCode.CUSTOM_ERROR:return"Application custom error";case l_.net.ErrorCode.EXCEPTION:return"An exception occurred";case l_.net.ErrorCode.HTTP_ERROR:return"Http response at 400 or 500 level";
case l_.net.ErrorCode.ABORT:return"Request was aborted";case l_.net.ErrorCode.TIMEOUT:return"Request timed out";case l_.net.ErrorCode.OFFLINE:return"The resource is not available offline";default:return"Unrecognized error code"}};l_.net.J=function(){if(l_.userAgent.GECKO){this.qa={};this.dc={};this.$b=[]}};l_.net.J.L=function(a){return l_.isString(a)?a:l_.isObject(a)?l_.getHashCode(a):""};l_.net.J.prototype.o=l_.debug.Logger.getLogger("goog.net.xhrMonitor");l_.net.J.prototype.fb=l_.userAgent.GECKO;l_.net.J.prototype.Id=function(a){if(this.fb){var b=l_.net.J.L(a);this.o.finest("Pushing context: "+a+" ("+b+")");this.$b.push(b)}};
l_.net.J.prototype.Hd=function(){if(this.fb){var a=this.$b.pop();this.o.finest("Popping context: "+a);this.xg(a)}};l_.net.J.prototype.Zf=function(a){if(this.fb){a=l_.getHashCode(a);this.o.fine("Opening XHR : "+a);for(var b=0;b<this.$b.length;b++){var c=this.$b[b];this.ab(this.qa,c,a);this.ab(this.dc,a,c)}}};l_.net.J.prototype.Yf=function(a){if(this.fb){a=l_.getHashCode(a);this.o.fine("Closing XHR : "+a);delete this.dc[a];for(var b in this.qa){l_.array.remove(this.qa[b],a);this.qa[b].length==0&&delete this.qa[b]}}};
l_.net.J.prototype.xg=function(a){var b=this.dc[a],c=this.qa[a];if(b&&c){this.o.finest("Updating dependent contexts");l_.array.forEach(b,function(d){l_.array.forEach(c,function(e){this.ab(this.qa,d,e);this.ab(this.dc,e,d)},this)},this)}};l_.net.J.prototype.ab=function(a,b,c){a[b]||(a[b]=[]);l_.array.contains(a[b],c)||a[b].push(c)};l_.net.xhrMonitor=new l_.net.J;l_.net.XmlHttp=function(){return l_.net.XmlHttp.hf()};l_.net.XmlHttp.getOptions=function(){return l_.net.XmlHttp.Xc||(l_.net.XmlHttp.Xc=l_.net.XmlHttp.fg())};l_.net.XmlHttp.hf=l_c;l_.net.XmlHttp.fg=l_c;l_.net.XmlHttp.Xc=l_c;l_.net.XmlHttp.setFactory=function(a,b){l_.net.XmlHttp.hf=a;l_.net.XmlHttp.fg=b;l_.net.XmlHttp.Xc=l_c};l_.net.XmlHttp.Sg=function(){var a=l_.net.XmlHttp.wf();return a?new ActiveXObject(a):new XMLHttpRequest};
l_.net.XmlHttp.Tg=function(){var a=l_.net.XmlHttp.wf(),b={};if(a){b[l_.net.XmlHttp.OptionType.USE_NULL_FUNCTION]=l_b;b[l_.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]=l_b}return b};l_.net.XmlHttp.setFactory(l_.net.XmlHttp.Sg,l_.net.XmlHttp.Tg);l_.net.XmlHttp.OptionType={USE_NULL_FUNCTION:0,LOCAL_REQUEST_ERROR:1};l_.net.XmlHttp.ReadyState={UNINITIALIZED:0,LOADING:1,LOADED:2,INTERACTIVE:3,COMPLETE:4};l_.net.XmlHttp.pd=l_c;
l_.net.XmlHttp.wf=function(){if(!l_.net.XmlHttp.pd&&typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var a=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],b=0;b<a.length;b++){var c=a[b];try{new ActiveXObject(c);return l_.net.XmlHttp.pd=c}catch(d){}}l_a(Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed"))}return l_.net.XmlHttp.pd};l_.net.XhrIo=function(){l_.events.EventTarget.call(this);this.headers=new l_.structs.Map};l_.inherits(l_.net.XhrIo,l_.events.EventTarget);l_.net.XhrIo.prototype.o=l_.debug.Logger.getLogger("goog.net.XhrIo");l_.net.XhrIo.CONTENT_TYPE_HEADER="Content-Type";l_.net.XhrIo.FORM_CONTENT_TYPE="application/x-www-form-urlencoded;charset=utf-8";l_.net.XhrIo.Od=[];
l_.net.XhrIo.send=function(a,b,c,d,e,f){var g=new l_.net.XhrIo;l_.net.XhrIo.Od.push(g);b&&l_.events.listen(g,l_.net.EventType.COMPLETE,b);l_.events.listen(g,l_.net.EventType.READY,l_.partial(l_.net.XhrIo.Og,g));f&&g.ob(f);g.send(a,c,d,e)};l_.net.XhrIo.cleanup=function(){for(var a=l_.net.XhrIo.Od;a.length;)a.pop().dispose()};l_.net.XhrIo.protectEntryPoints=function(a,b){l_.net.XhrIo.prototype.Ja=a.protectEntryPoint(l_.net.XhrIo.prototype.Ja,b)};
l_.net.XhrIo.Og=function(a){a.dispose();l_.array.remove(l_.net.XhrIo.Od,a)};l_.net.XhrIo.prototype.P=l_d;l_.net.XhrIo.prototype.e=l_c;l_.net.XhrIo.prototype.qb=l_c;l_.net.XhrIo.prototype.xd="";l_.net.XhrIo.prototype.wd="";l_.net.XhrIo.prototype.ua=l_.net.ErrorCode.NO_ERROR;l_.net.XhrIo.prototype.Ha="";l_.net.XhrIo.prototype.Jb=l_d;l_.net.XhrIo.prototype.jb=l_d;l_.net.XhrIo.prototype.Tb=l_d;l_.net.XhrIo.prototype.fa=l_d;l_.net.XhrIo.prototype.ba=0;l_.net.XhrIo.prototype.ja=l_c;
l_.net.XhrIo.prototype.ob=function(a){this.ba=Math.max(0,a)};
l_.net.XhrIo.prototype.send=function(a,b,c,d){if(this.P)l_a(Error("[goog.net.XhrIo] Object is active with another request"));b=b||"GET";this.xd=a;this.Ha="";this.ua=l_.net.ErrorCode.NO_ERROR;this.wd=b;this.Jb=l_d;this.P=l_b;this.e=new l_.net.XmlHttp;this.qb=l_.net.XmlHttp.getOptions();l_.net.xhrMonitor.Zf(this.e);this.e.onreadystatechange=l_.bind(this.Bd,this);try{this.o.fine(this.Q("Opening Xhr"));this.Tb=l_b;this.e.open(b,a,l_b);this.Tb=l_d}catch(e){this.o.fine(this.Q("Error opening Xhr: "+e.message));
this.ed(l_.net.ErrorCode.EXCEPTION,e);return}a=c||"";var f=this.headers.clone();d&&l_.structs.forEach(d,function(h,i){f.set(i,h)});b=="POST"&&!f.D(l_.net.XhrIo.CONTENT_TYPE_HEADER)&&f.set(l_.net.XhrIo.CONTENT_TYPE_HEADER,l_.net.XhrIo.FORM_CONTENT_TYPE);l_.structs.forEach(f,function(h,i){this.e.setRequestHeader(i,h)},this);try{if(this.ja){l_.Timer.defaultTimerObject.clearTimeout(this.ja);this.ja=l_c}if(this.ba>0){this.o.fine(this.Q("Will abort after "+this.ba+"ms if incomplete"));this.ja=l_.Timer.defaultTimerObject.setTimeout(l_.bind(this.vg,
this),this.ba)}this.o.fine(this.Q("Sending request"));this.jb=l_b;this.e.send(a);this.jb=l_d}catch(g){this.o.fine(this.Q("Send error: "+g.message));this.ed(l_.net.ErrorCode.EXCEPTION,g)}};l_.net.XhrIo.prototype.dispatchEvent=function(a){if(this.e){l_.net.xhrMonitor.Id(this.e);try{return l_.net.XhrIo.r.dispatchEvent.call(this,a)}finally{l_.net.xhrMonitor.Hd()}}else return l_.net.XhrIo.r.dispatchEvent.call(this,a)};
l_.net.XhrIo.prototype.vg=function(){if(typeof l_!="undefined")if(this.e){this.Ha="Timed out after "+this.ba+"ms, aborting";this.ua=l_.net.ErrorCode.TIMEOUT;this.o.fine(this.Q(this.Ha));this.dispatchEvent(l_.net.EventType.TIMEOUT);this.abort(l_.net.ErrorCode.TIMEOUT)}};l_.net.XhrIo.prototype.ed=function(a,b){this.P=l_d;if(this.e){this.fa=l_b;this.e.abort();this.fa=l_d}this.Ha=b;this.ua=a;this.cd();this.db()};
l_.net.XhrIo.prototype.cd=function(){if(!this.Jb){this.Jb=l_b;this.dispatchEvent(l_.net.EventType.COMPLETE);this.dispatchEvent(l_.net.EventType.ERROR)}};l_.net.XhrIo.prototype.abort=function(a){if(this.e){this.o.fine(this.Q("Aborting"));this.P=l_d;this.fa=l_b;this.e.abort();this.fa=l_d;this.ua=a||l_.net.ErrorCode.ABORT;this.dispatchEvent(l_.net.EventType.COMPLETE);this.dispatchEvent(l_.net.EventType.ABORT);this.db()}};
l_.net.XhrIo.prototype.a=function(){if(this.e){if(this.P){this.P=l_d;this.fa=l_b;this.e.abort();this.fa=l_d}this.db(l_b)}l_.net.XhrIo.r.a.call(this)};l_.net.XhrIo.prototype.Bd=function(){!this.Tb&&!this.jb&&!this.fa?this.Ja():this.Ad()};l_.net.XhrIo.prototype.Ja=function(){this.Ad()};
l_.net.XhrIo.prototype.Ad=function(){if(this.P)if(typeof l_!="undefined")if(this.qb[l_.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]&&this.Ga()==l_.net.XmlHttp.ReadyState.COMPLETE&&this.gb()==2)this.o.fine(this.Q("Local request error detected and ignored"));else if(this.jb&&this.Ga()==l_.net.XmlHttp.ReadyState.COMPLETE)l_.Timer.defaultTimerObject.setTimeout(l_.bind(this.Bd,this),0);else{this.dispatchEvent(l_.net.EventType.READY_STATE_CHANGE);if(this.td()){this.o.fine(this.Q("Request complete"));this.P=
l_d;if(this.ud()){this.dispatchEvent(l_.net.EventType.COMPLETE);this.dispatchEvent(l_.net.EventType.SUCCESS)}else{this.ua=l_.net.ErrorCode.HTTP_ERROR;this.Ha=this.Af()+" ["+this.gb()+"]";this.cd()}this.db()}}};
l_.net.XhrIo.prototype.db=function(a){if(this.e){var b=this.e,c=this.qb[l_.net.XmlHttp.OptionType.USE_NULL_FUNCTION]?l_.nullFunction:l_c;this.qb=this.e=l_c;if(this.ja){l_.Timer.defaultTimerObject.clearTimeout(this.ja);this.ja=l_c}if(!a){l_.net.xhrMonitor.Id(b);this.dispatchEvent(l_.net.EventType.READY);l_.net.xhrMonitor.Hd()}l_.net.xhrMonitor.Yf(b);try{b.onreadystatechange=c}catch(d){this.o.severe("Problem encountered resetting onreadystatechange: "+d.message)}}};l_.net.XhrIo.prototype.Of=function(){return this.P};
l_.net.XhrIo.prototype.td=function(){return this.Ga()==l_.net.XmlHttp.ReadyState.COMPLETE};l_.net.XhrIo.prototype.ud=function(){switch(this.gb()){case 0:case 200:case 204:case 304:return l_b;default:return l_d}};l_.net.XhrIo.prototype.Ga=function(){return this.e?this.e.readyState:l_.net.XmlHttp.ReadyState.UNINITIALIZED};l_.net.XhrIo.prototype.gb=function(){try{return this.Ga()>l_.net.XmlHttp.ReadyState.LOADED?this.e.status:-1}catch(a){this.o.warning("Can not get status: "+a.message);return-1}};
l_.net.XhrIo.prototype.Af=function(){try{return this.Ga()>l_.net.XmlHttp.ReadyState.LOADED?this.e.statusText:""}catch(a){this.o.fine("Can not get status: "+a.message);return""}};l_.net.XhrIo.prototype.xf=function(){return this.e?this.e.responseText:""};l_.net.XhrIo.prototype.getResponseHeader=function(a){return this.e&&this.td()?this.e.getResponseHeader(a):undefined};l_.net.XhrIo.prototype.pf=function(){return this.ua};
l_.net.XhrIo.prototype.Q=function(a){return a+" ["+this.wd+" "+this.xd+" "+this.gb()+"]"};l_.structs.Queue=function(){this.Z=[]};l_.structs.Queue.prototype.G=0;l_.structs.Queue.prototype.aa=0;l_.structs.Queue.prototype.enqueue=function(a){this.Z[this.aa++]=a};l_.structs.Queue.prototype.dequeue=function(){if(this.G!=this.aa){var a=this.Z[this.G];delete this.Z[this.G];this.G++;return a}};l_.structs.Queue.prototype.peek=function(){if(this.G!=this.aa)return this.Z[this.G]};l_.structs.Queue.prototype.c=function(){return this.aa-this.G};
l_.structs.Queue.prototype.g=function(){return this.aa-this.G==0};l_.structs.Queue.prototype.clear=function(){this.aa=this.G=this.Z.length=0};l_.structs.Queue.prototype.contains=function(a){return l_.array.contains(this.Z,a)};l_.structs.Queue.prototype.remove=function(a){a=l_.array.indexOf(this.Z,a);if(a<0)return l_d;if(a==this.G)this.dequeue();else{l_.array.removeAt(this.Z,a);this.aa--}return l_b};l_.structs.Queue.prototype.f=function(){return this.Z.slice(this.G,this.aa)};l_.structs.Pool=function(a,b){l_.Disposable.call(this);this.$f=a||0;this.va=b||10;if(this.$f>this.va)l_a(Error(l_.structs.Pool.Fg));this.q=new l_.structs.Queue;this.R=new l_.structs.Set;this.Da()};l_.inherits(l_.structs.Pool,l_.Disposable);l_.structs.Pool.Fg="[goog.structs.Pool] Min can not be greater than max";l_.structs.Pool.Dg="[goog.structs.Pool] Objects not released";l_.structs.Pool.prototype.p=function(){var a=this.ig();a&&this.R.add(a);return a};
l_.structs.Pool.prototype.t=function(a){if(this.R.remove(a)){this.$a(a);return l_b}return l_d};l_.structs.Pool.prototype.ig=function(){for(var a;this.gd()>0;){a=this.q.dequeue();if(this.mb(a))break;else this.Da()}if(!a&&this.c()<this.va)a=this.Y();return a};l_.structs.Pool.prototype.$a=function(a){this.R.remove(a);this.mb(a)&&this.c()<this.va?this.q.enqueue(a):this.K(a)};
l_.structs.Pool.prototype.Da=function(){for(var a=this.q;this.c()<this.$f;)a.enqueue(this.Y());for(;this.c()>this.va&&this.gd()>0;)this.K(a.dequeue())};l_.structs.Pool.prototype.Y=function(){return{}};l_.structs.Pool.prototype.K=function(a){if(typeof a.dispose=="function")a.dispose();else for(var b in a)a[b]=l_c};l_.structs.Pool.prototype.mb=function(a){if(typeof a.canBeReused=="function")return a.canBeReused();return l_b};
l_.structs.Pool.prototype.contains=function(a){return this.q.contains(a)||this.R.contains(a)};l_.structs.Pool.prototype.c=function(){return this.q.c()+this.R.c()};l_.structs.Pool.prototype.of=function(){return this.R.c()};l_.structs.Pool.prototype.gd=function(){return this.q.c()};l_.structs.Pool.prototype.g=function(){return this.q.g()&&this.R.g()};
l_.structs.Pool.prototype.a=function(){l_.structs.Pool.r.a.call(this);if(this.of()>0)l_a(Error(l_.structs.Pool.Dg));l_.iter.forEach(this.R,this.K,this);this.R.clear();delete this.R;for(var a=this.q;!a.g();)this.K(a.dequeue());delete this.q};l_.structs.Node=function(a,b){this.H=a;this.yg=b};l_.structs.Node.prototype.L=function(){return this.H};l_.structs.Node.prototype.hb=function(){return this.yg};l_.structs.Node.prototype.clone=function(){return new l_.structs.Node(this.H,this.yg)};l_.structs.Heap=function(a){this.B=[];a&&this.Nf(a)};l_.structs.Heap.prototype.insert=function(a,b){a=new l_.structs.Node(a,b);b=this.B;b.push(a);this.bg(b.length-1)};l_.structs.Heap.prototype.Nf=function(a){var b,c;if(a instanceof l_.structs.Heap){b=a.l();c=a.f();if(a.c()<=0){a=this.B;for(var d=0;d<b.length;d++)a.push(new l_.structs.Node(b[d],c[d]));return}}else{b=l_.object.l(a);c=l_.object.f(a)}for(d=0;d<b.length;d++)this.insert(b[d],c[d])};
l_.structs.Heap.prototype.remove=function(){var a=this.B,b=a.length,c=a[0];if(!(b<=0)){if(b==1)l_.array.clear(a);else{a[0]=a.pop();this.ag(0)}return c.hb()}};l_.structs.Heap.prototype.peek=function(){var a=this.B;if(a.length!=0)return a[0].hb()};l_.structs.Heap.prototype.ag=function(a){for(var b=this.B,c=b.length,d=b[a];a<Math.floor(c/2);){var e=this.qf(a),f=this.yf(a);e=f<c&&b[f].L()<b[e].L()?f:e;if(b[e].L()>d.L())break;b[a]=b[e];a=e}b[a]=d};
l_.structs.Heap.prototype.bg=function(a){for(var b=this.B,c=b[a];a>0;){var d=this.vf(a);if(b[d].L()>c.L()){b[a]=b[d];a=d}else break}b[a]=c};l_.structs.Heap.prototype.qf=function(a){return a*2+1};l_.structs.Heap.prototype.yf=function(a){return a*2+2};l_.structs.Heap.prototype.vf=function(a){return Math.floor((a-1)/2)};l_.structs.Heap.prototype.f=function(){for(var a=this.B,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].hb());return b};
l_.structs.Heap.prototype.l=function(){for(var a=this.B,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].L());return b};l_.structs.Heap.prototype.X=function(a){return l_.array.some(this.B,function(b){return b.hb()==a})};l_.structs.Heap.prototype.D=function(a){return l_.array.some(this.B,function(b){return b.L()==a})};l_.structs.Heap.prototype.clone=function(){return new l_.structs.Heap(this)};l_.structs.Heap.prototype.c=function(){return this.B.length};l_.structs.Heap.prototype.g=function(){return l_.array.g(this.B)};
l_.structs.Heap.prototype.clear=function(){l_.array.clear(this.B)};l_.structs.PriorityQueue=function(){l_.structs.Heap.call(this)};l_.inherits(l_.structs.PriorityQueue,l_.structs.Heap);l_.structs.PriorityQueue.prototype.enqueue=function(a,b){this.insert(a,b)};l_.structs.PriorityQueue.prototype.dequeue=function(){return this.remove()};l_.structs.PriorityPool=function(a,b){this.Xb=new l_.structs.PriorityQueue;l_.structs.Pool.call(this,a,b)};l_.inherits(l_.structs.PriorityPool,l_.structs.Pool);l_.structs.PriorityPool.Bg=100;l_.structs.PriorityPool.prototype.p=function(a,b){if(!a)return l_.structs.PriorityPool.r.p.call(this);b=b||l_.structs.PriorityPool.Bg;this.Xb.enqueue(b,a);this.Rb()};l_.structs.PriorityPool.prototype.Rb=function(){for(var a=this.Xb;a.c()>0;){var b=this.p();if(b){var c=a.dequeue();c.apply(this,[b])}else return}};
l_.structs.PriorityPool.prototype.$a=function(a){l_.structs.PriorityPool.r.$a.call(this,a);this.Rb()};l_.structs.PriorityPool.prototype.Da=function(){l_.structs.PriorityPool.r.Da.call(this);this.Rb()};l_.structs.PriorityPool.prototype.a=function(){l_.structs.PriorityPool.r.a.call(this);this.Xb.clear();this.Xb=l_c};l_.net.XhrIoPool=function(a,b,c){l_.structs.PriorityPool.call(this,b,c);this.nd=a};l_.inherits(l_.net.XhrIoPool,l_.structs.PriorityPool);l_.net.XhrIoPool.prototype.Y=function(){var a=new l_.net.XhrIo,b=this.nd;b&&l_.structs.forEach(b,function(c,d){a.headers.set(d,c)});return a};l_.net.XhrIoPool.prototype.K=function(a){a.dispose()};l_.net.XhrIoPool.prototype.mb=function(a){return!a.Pf()&&!a.Of()};l_.net.XhrManager=function(a,b,c,d,e){this.zd=l_.isDef(a)?a:1;this.ba=l_.isDef(e)?Math.max(0,e):0;this.Na=new l_.net.XhrIoPool(b,c,d);this.N=new l_.structs.Map;this.Lb=new l_.events.EventHandler(this)};l_.inherits(l_.net.XhrManager,l_.events.EventTarget);l_.net.XhrManager.Eg="[goog.net.XhrManager] ID in use";l_.net.XhrManager.Ie=[l_.net.EventType.READY,l_.net.EventType.COMPLETE,l_.net.EventType.SUCCESS,l_.net.EventType.ERROR,l_.net.EventType.ABORT,l_.net.EventType.TIMEOUT];
l_.net.XhrManager.EventType={RETRY:"retry"};l_.net.XhrManager.prototype.ob=function(a){this.ba=Math.max(0,a)};l_.net.XhrManager.prototype.send=function(a,b,c,d,e,f,g,h){var i=this.N;if(i.get(a))l_a(Error(l_.net.XhrManager.Eg));b=new l_.net.XhrManager.Request(b,l_.bind(this.Hf,this,a),c,d,e,g,l_.isDef(h)?h:this.zd);this.N.set(a,b);a=l_.bind(this.Ef,this,a);this.Na.p(a,f)};
l_.net.XhrManager.prototype.abort=function(a,b){var c=this.N.get(a);if(c){var d=c.xhrIo;c.ng(l_b);if(b){this.Kd(d,c.Ob());l_.events.Ia(d,l_.net.EventType.READY,function(){this.Na.t(d)},l_d,this);this.N.remove(a)}d&&d.abort()}};l_.net.XhrManager.prototype.Ef=function(a,b){var c=this.N.get(a);if(c&&!c.xhrIo){this.Le(b,c.Ob());b.ob(this.ba);c.xhrIo=c.xhrLite=b;this.dispatchEvent(new l_.net.XhrManager.Event(l_.net.EventType.READY,this,a,b));this.Ld(a,b);c.kf()&&b.abort()}else this.Na.t(b)};
l_.net.XhrManager.prototype.Hf=function(a,b){var c=b.target;switch(b.type){case l_.net.EventType.READY:this.Ld(a,c);break;case l_.net.EventType.COMPLETE:return this.Ff(a,c,b);case l_.net.EventType.SUCCESS:this.If(a,c);break;case l_.net.EventType.TIMEOUT:case l_.net.EventType.ERROR:this.Gf(a,c);break;case l_.net.EventType.ABORT:this.Df(a,c);break}return l_c};
l_.net.XhrManager.prototype.Ld=function(a,b){var c=this.N.get(a);if(c&&!c.lf()&&!c.Sb()){c.Lf();b.send(c.Bf(),c.sf(),c.mf(),c.nf())}else{if(c){this.Kd(b,c.Ob());this.N.remove(a)}this.Na.t(b)}};l_.net.XhrManager.prototype.Ff=function(a,b,c){var d=this.N.get(a);if(b.pf()==l_.net.ErrorCode.ABORT||b.ud()||d.Sb()){this.dispatchEvent(new l_.net.XhrManager.Event(l_.net.EventType.COMPLETE,this,a,b));if(d){d.og(l_b);if(d.fd())return d.fd().call(b,c)}}return l_c};
l_.net.XhrManager.prototype.Df=function(a,b){this.dispatchEvent(new l_.net.XhrManager.Event(l_.net.EventType.ABORT,this,a,b))};l_.net.XhrManager.prototype.If=function(a,b){this.dispatchEvent(new l_.net.XhrManager.Event(l_.net.EventType.SUCCESS,this,a,b))};l_.net.XhrManager.prototype.Gf=function(a,b){var c=this.N.get(a);c.Sb()&&this.dispatchEvent(new l_.net.XhrManager.Event(l_.net.EventType.ERROR,this,a,b))};
l_.net.XhrManager.prototype.Kd=function(a,b,c){c=c||l_.net.XhrManager.Ie;this.Lb.unlisten(a,c,b)};l_.net.XhrManager.prototype.Le=function(a,b,c){c=c||l_.net.XhrManager.Ie;this.Lb.listen(a,c,b)};l_.net.XhrManager.prototype.a=function(){l_.net.XhrManager.r.a.call(this);this.Na.dispose();this.Na=l_c;this.Lb.dispose();this.Lb=l_c;var a=this.N;l_.structs.forEach(a,function(b){b.dispose()});a.clear();this.N=l_c};
l_.net.XhrManager.Event=function(a,b,c,d){l_.events.Event.call(this,a,b);this.id=c;this.xhrLite=this.xhrIo=d};l_.inherits(l_.net.XhrManager.Event,l_.events.Event);l_.net.XhrManager.Event.prototype.a=function(){l_.net.XhrManager.Event.r.a.call(this);delete this.id;this.xhrLite=this.xhrIo=l_c};l_.net.XhrManager.Request=function(a,b,c,d,e,f,g){this.uh=a;this.ih=c||"GET";this.Pg=d;this.nd=e||l_c;this.zd=l_.isDef(g)?g:1;this.Oe=0;this.Je=this.Ue=l_d;this.Ag=b;this.Te=f;this.xhrIo=l_c};
l_.inherits(l_.net.XhrManager.Request,l_.Disposable);l_.net.XhrManager.Request.prototype.Bf=function(){return this.uh};l_.net.XhrManager.Request.prototype.sf=function(){return this.ih};l_.net.XhrManager.Request.prototype.mf=function(){return this.Pg};l_.net.XhrManager.Request.prototype.nf=function(){return this.nd};l_.net.XhrManager.Request.prototype.Lf=function(){this.Oe++};l_.net.XhrManager.Request.prototype.Sb=function(){return this.Oe>this.zd};
l_.net.XhrManager.Request.prototype.og=function(a){this.Ue=a};l_.net.XhrManager.Request.prototype.lf=function(){return this.Ue};l_.net.XhrManager.Request.prototype.ng=function(a){this.Je=a};l_.net.XhrManager.Request.prototype.kf=function(){return this.Je};l_.net.XhrManager.Request.prototype.Ob=function(){return this.Ag};l_.net.XhrManager.Request.prototype.fd=function(){return this.Te};l_.net.XhrManager.Request.prototype.a=function(){l_.net.XhrManager.Request.r.a.call(this);delete this.Ag;delete this.Te};function l_X(a,b,c,d,e,f){this.instanceId=a;this.sectionId=b;this.markups=c;this.rootElement=d||l_c;this.data=e||l_c;if(f){this.af=f;if(!l_X.IsValidDisplayMode(f))l_a("bad display mode: "+f)}else this.af=l_X.DISPLAY_MODE_NONE;this.isNew=l_d}l_X.IsValidDisplayMode=function(a){return a==l_X.DISPLAY_MODE_SNIPPET||a==l_X.DISPLAY_MODE_FULL||a==l_X.DISPLAY_MODE_LAYOUT||a==l_X.DISPLAY_MODE_NONE};l_X.DISPLAY_MODE_FULL="displayModeFull";l_X.DISPLAY_MODE_SNIPPET="displayModeSnippet";
l_X.DISPLAY_MODE_LAYOUT="displayModeLayout";l_X.DISPLAY_MODE_NONE="displayModeNone";l_X.prototype.hd=function(){return this.instanceId};function l_Y(a){this.$g=l_b;this.Rd=new l_Z(this);this.z=a;this.bc=l_c}l_Y.DATA_NAMESPACE_PREFIX="data";l_Y.ACTION_NAMESPACE_PREFIX="b";l_Y.INTERPRET_ATTR_NAMESPACE_PREFIX="expr";l_Y.prototype.Ud=function(){var a=this.z.rootElement;a.innerHTML="";this.Pa()==l_X.DISPLAY_MODE_LAYOUT?a.appendChild(this.tc("layout")):a.appendChild(this.tc("main"));return a};
l_Y.prototype.ze=function(a){this.bc=a};l_Y.prototype.Ca=function(){return this.z.data};l_Y.prototype.we=function(a){return this.z.data=a};l_Y.prototype.ee=function(){return this.z.isNew};l_Y.prototype.xe=function(a){return this.z.isNew=a};l_Y.prototype.tc=function(a,b){(b=b)||(b=this.Ca());b||(b={});var c=new l__;c.za("widget",this.Wd());c.Sd(b);a=this.uc(a,c,l__.DEFAULT_DICTIONARY_KEY);return this.rc(a,document)};
l_Y.prototype.Wd=function(){var a={};a.type=this.bc.wb();a.instanceId=this.z.instanceId;a.sectionId=this.z.sectionId;a.actionUrl=l_0.Yc;var b=l_0.cf+"&widgetType="+this.bc.wb()+"&widgetId="+this.z.instanceId+"&action="+l_0.EDIT_WIDGET_ACTION;a.quickEditUrl=b;return a};
l_Y.prototype.uc=function(a,b,c){var d=this.Zd(a);l_.asserts.assert(d!=l_c,"Markup chunk not found for "+a);a=d.varName?d.varName:"";var e=b.Ca(c);l_.asserts.assert(e!=l_c,"No data found for call: "+c);b.za(a,e);c=this.Ta(d.rootNode,b);b.zb(a);return c};
l_Y.prototype.Ta=function(a,b){l_.asserts.assert(a!=l_c,"Null node");var c=a;if(a.attributes){for(var d=[],e=[],f=0;f<a.attributes.length;f++){var g=a.attributes.item(f),h=this.qe(g,b);if(g!=h){e[e.length]=g.nodeName;d[d.length]=h}}for(f=0;f<e.length;f++)a.attributes.removeNamedItem(e[f]);for(f=0;f<d.length;f++)a.attributes.setNamedItem(d[f])}if(a.nodeType==1){d=a;if(d.prefix==l_Y.ACTION_NAMESPACE_PREFIX)c=this.ce(d,b);else if(d.prefix==l_Y.DATA_NAMESPACE_PREFIX)c=this.be(d,b)}if(a.hasChildNodes()){for(d=
a.ownerDocument.createDocumentFragment();a.hasChildNodes();){e=a.firstChild;f=this.Ta(e,b);d.appendChild(f);e!=f&&a.removeChild(e)}c.appendChild(d)}return c};l_Y.prototype.qe=function(a,b){if(a.prefix==l_Y.INTERPRET_ATTR_NAMESPACE_PREFIX){var c=a.ownerDocument.createAttribute(a.localName||a.baseName);a=this.Rd.ic(a.nodeValue,b);c.nodeValue=a;return c}return a};l_Y.prototype.ce=function(a,b){var c=a.localName||a.baseName;a=this.Jc(c,a,b);return this.He(a)};
l_Y.prototype.He=function(a){var b=a;if(!a)return document.createDocumentFragment();a.nodeType||(b=document.createTextNode(a));if(b.nodeType==3){a=document.createDocumentFragment();a.appendChild(b);b=a}return b};l_Y.prototype.rb=function(a,b){a=this.Xa(a);return b.Ca(a[1])};
l_Y.prototype.be=function(a,b){l_.asserts.assert(a!=l_c,"Null element");l_.asserts.assert(b!=l_c,"Null data");if(a.prefix!=l_Y.DATA_NAMESPACE_PREFIX)return a;b=this.rb(a.tagName,b);b=""+(b==l_c?"":b);var c=document.createElement("DIV");c.innerHTML=b;b=this.Ra(c);return this.rc(b,a.ownerDocument,l_b)};l_Y.prototype.Xa=function(a){a=a.split(":",2);a.length==1&&a.unshift("");a[0]=a[0].toLowerCase();return a};
l_Y.prototype.Jc=function(a,b,c){var d="_WidgetBinding_"+a;if(this.Rd[d])return this.Rd[d](b,c);l_.asserts.fail("could not find binding "+a);return l_c};
l_Y.prototype.oe=function(a){if(a==l_c)return l_c;var b;if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLDOM");b.async="false";if(!b.loadXML(a))l_a(new Error(b.parseError))}else if(window.DOMParser){b=new DOMParser;b=b.parseFromString(a,"text/xml");if(b.documentElement.nodeName=="parsererror")l_a(new Error(b.documentElement.textContent))}else l_.asserts.fail("Unable to find XML parser");return b.documentElement};
l_Y.prototype.Ra=function(a){for(var b=a.ownerDocument.createDocumentFragment();a.hasChildNodes();)b.appendChild(a.firstChild);return b};
l_Y.prototype.rc=function(a,b,c){l_.asserts.assert(a!=l_c);if(b.importNode)if(a.nodeType==11){c=b.createDocumentFragment();for(a=a.firstChild;a!=l_c;a=a.nextSibling)c.appendChild(b.importNode(a,l_b));return c}else return b.importNode(a,l_b);if(!c){c=b.createElement("DIV");a=a.innerHTML||a.xml;c.innerHTML=a;return this.Ra(c)}var d=function(e){var f;if(e.nodeType==1){if(e.nodeName=="SCRIPT")return document.createTextNode("");f=b.createElement(e.nodeName);e.style&&f.setAttribute("style",e.style.cssText);
e.currentStyle.height&&f.setAttribute("height",e.currentStyle.height);e.currentStyle.width&&f.setAttribute("width",e.currentStyle.width);for(var g=0;g<e.attributes.length;g++){var h=e.attributes[g];h.value&&h.value!="null"&&h.value!="false"&&h.value!="0"&&f.setAttribute(h.name,h.value)}}else if(e.nodeType==3)f=b.createTextNode(e.nodeValue);else if(e.nodeType==11)f=b.createDocumentFragment();else l_.asserts.fail("unexpected node type "+e.nodeType);if(e.hasChildNodes())for(g=0;g<e.childNodes.length;g++)f.appendChild(d(e.childNodes[g]));
return f};return d(a)};l_Y.prototype.Ab=function(a,b,c,d){l_0.Ab(a,b||{},this.z.instanceId,this.bc.wb(),c,d)};l_Y.prototype.Pa=function(){return this.z.af};l_Y.prototype.Zd=function(a){if(!a)return l_c;var b=l_0.Qd[a];b||(b=this.z.markups[a]);if(!b)return l_c;if(!b.parsedTemplate||!b.parsedTemplate.ownerDocument)this.ne(b);b.parsedTemplate||l_.asserts.fail("Parsing failed for "+a);b.rootNode=b.parsedTemplate.cloneNode(l_b);return b};
l_Y.prototype.ne=function(a){if(!a)return l_c;var b="<?xml version='1.0'?><markuproot xmlns:"+l_Y.DATA_NAMESPACE_PREFIX+"='urn:ns1'  xmlns:"+l_Y.ACTION_NAMESPACE_PREFIX+"='urn:ns2' xmlns:"+l_Y.INTERPRET_ATTR_NAMESPACE_PREFIX+"='urn:ns3'  xmlns='http://www.w3.org/1999/xhtml'>"+a.template+"</markuproot>\n";b=this.oe(b);a.parsedTemplate=this.Ra(b);return a};
l_Y.ConfigureWidget=function(a,b){b||(b="config");var c=document.forms[b].widgetId.value,d=document.forms[b].widgetType.value;a=l_1.ProcessForm(document.forms[b],a);a.success&&l_0.SaveWidget(a.values,c,d)};l_Y.getXmlHttpRequestStatus=function(a){var b=-1;try{b=a.status}catch(c){}return b};function l_0(){}
l_0.Init=function(a,b,c){l_0.Ma={};l_0.cf=a;l_0.Yc=b;l_0.Ah=c;l_0.md={};if(!l_0.Qd)l_0.Qd={};l_0.cc=new l_.net.XhrManager;l_0.dg=0;l_0.Gd=0;l_.events.listen(l_0.cc,l_.net.EventType.READY,function(){l_0.Gd++});l_.events.listen(l_0.cc,l_.net.EventType.COMPLETE,function(){l_0.Gd--})};l_0.TrapClicks=function(a){a=l_0.CreateTransparentClickTrappingDiv(a.document);document.body.appendChild(a)};l_0.SetupPreview=function(){l_0.TrapClicks(window)};l_0.NEW_WIDGET_WINDOW_NAME="chooseWidget";
l_0.CHOOSE_WIDGET_ACTION="chooseWidget";l_0.EDIT_WIDGET_ACTION="editWidget";l_0.GetCallbackUrl=function(){return l_0.Yc};l_0.SetPageActionUrl=function(a,b){l_0.Dd=a;l_0.mh=b};l_0.GetPageActionUrl=function(){return l_0.Dd};l_0.SetWidgetRefreshUrl=function(a){l_0.vh=a};l_0.GetWidgetRefreshUrl=function(){return l_0.vh};l_0.SetDataContext=function(a){l_0.md=a};l_0.SetSystemMarkup=function(a){l_0.Qd=a};
l_0.RegisterWidget=function(a,b){var c=new l_Y(b);a=window[a];a=new a(c);c.ze(a);l_0.Ma[b.instanceId]=a;l_0.DisplayWidget(a);return a};l_0.RegisterNewWidget=function(a,b){a=l_0.RegisterWidget(a,b);b=a.u();b.xe(l_b);return a};l_0.DisplayWidget=function(a,b){var c=a.u();if(c.Pa()!=l_X.DISPLAY_MODE_NONE){b&&c.Ud();c.Pa()==l_X.DISPLAY_MODE_FULL&&a.pe();a.u().$g=l_d}};l_0.GetWidget=function(a){if(l_0.Ma)return l_0.Ma[a];return l_c};
l_0.PopupPaneFromParams=function(a,b,c,d,e){var f="";if(d)f="&widgetId="+d;a=l_0.cf+"&action="+a+"&sectionId="+b+"&widgetType="+c+f;if(window.name==e){window.location.replace(a);window.focus();return window}e=window.open(a,e,"width=570,height=600,left=75,top=20,resizable=yes,scrollbars=yes");e.focus();return e};
l_0.PopupConfig=function(a){var b=a.getAttribute("id"),c=l_0.GetWidget(b);if(c){var d=c.u().configWin;if(d!=l_c&&!d.closed){d.focus();return l_d}}d="config"+b;a=l_0.PopupPaneFromParams(l_0.EDIT_WIDGET_ACTION,a.parentNode.getAttribute("id"),a.getAttribute("widgetType"),b,d);if(c)c.u().configWin=a;return l_d};l_0.PopupToolbox=function(a){l_0.PopupPaneFromParams(l_0.CHOOSE_WIDGET_ACTION,a.parentNode.getAttribute("id"),a.getAttribute("widgetType"),a.getAttribute("id"),l_0.NEW_WIDGET_WINDOW_NAME);return l_d};
l_0.DeleteWidgetFromPage=function(a,b,c){l_0.v(c,c.LayoutsMessages.DELETING,l_0.STATUS_MESSAGE_PENDING_CLASS);l_0.RunPageAction("delete",{},a,b)};l_Y.prototype.re=function(a,b){l_0.v(b,b.LayoutsMessages.SAVING,l_0.STATUS_MESSAGE_PENDING_CLASS);this.Ab("configure",a)};l_0.SaveNewWidget=function(a,b,c){var d=document.getElementById("sectionId").value;a.sectionid=d;l_0.v(c,c.LayoutsMessages.SAVING,l_0.STATUS_MESSAGE_PENDING_CLASS);l_0.RunPageAction("addnew",a,"",b)};
l_0.SaveWidget=function(a,b,c){l_.asserts.assert(c!=l_c,"no type");var d=l_0.GetWidget(b);l_.asserts.assert(d!=l_c,"no widget for "+b);d.u().ee()?l_0.SaveNewWidget(a,c,window):d.od.re(a,window)};l_0.Ab=function(a,b,c,d,e,f){l_0.RunAction(l_0.Yc,a,b,c,d,e,f)};l_0.RunPageAction=function(a,b,c,d,e){if(l_0.Dd){b.pageToken=l_0.mh;l_0.RunAction(l_0.Dd,a,b,c,d,e)}};
l_0.RunAction=function(a,b,c,d,e,f,g){b=["action="+encodeURIComponent(b),"widgetId="+encodeURIComponent(d),"widgetType="+encodeURIComponent(e),"responseType=js"];for(var h in c)if(typeof c[h]=="object"){d=c[h];for(e=0;e<d.length;++e)b.push(encodeURIComponent(h)+"="+encodeURIComponent(d[e]))}else b.push(encodeURIComponent(h)+"="+encodeURIComponent(c[h]));var i=f||l_2();c=function(){var j=this.e;(j=i(j))&&window.eval(this.xf())};if(g=="GET"){a+=a.indexOf("?")>=0?"&":"?";l_0.cc.send(""+l_0.dg++,a+b.join("&"),
"GET",undefined,l_c,l_c,c)}else l_0.cc.send(""+l_0.dg++,a,"POST",b.join("&"),l_c,l_c,c)};l_0.SetConfigWin=function(a,b){if(a)if(a=l_0.GetWidget(a))a.u().configWin=b};l_0.CloseIfNoPendingMessages=function(a,b){l_0.Gd==0?window.setTimeout(function(){a.close()},b):window.setTimeout(function(){l_0.CloseIfNoPendingMessages(a,b)},200)};l_0.KillPopupDelay=function(a,b){if(a){l_0.CloseIfNoPendingMessages(a,100);l_0.UpdateEditorStatus(a,b)}};
l_0.UpdateEditorStatus=function(a,b){if(a){var c=a.document.getElementById("status-message-inner");if(c)c=c.innerHTML;c&&a&&a.opener.parent&&a.opener.parent.editor&&a.opener.parent.editor._SetSaveMessage(c,b)}};l_0.xb=function(a,b,c){var d=l_0.Ma[a];if(c.errors!=l_c){(a=d?d.u().configWin:l_c)||(a=window);l_0.v(a,c.errors,l_0.STATUS_MESSAGE_BAD_CLASS);d&&d.ma?d.ma(b,c,a):l_0.ma(c,a)}else{l_.asserts.assert(d!=l_c,"no widget for "+a);d.xb(b,c)}};
l_0.ma=function(a,b){a=a["error-details"];for(var c in a)l_1.SetError(c,a[c],b.document)};l_Y.prototype.ae=function(a){l_0.v(this.configWin,a["status-message"],l_0.STATUS_MESSAGE_GOOD_CLASS);l_0.FinishPopupWork(this.z.instanceId,"_OnWidgetConfigured",function(b){window.opener._WidgetManager._OnWidgetConfigured(b,a)})};l_0.OnWidgetConfigured=function(a,b){window.parent&&window.parent.editor&&b?l_0.OnWidgetConfiguredWithData(a,b):window.location.replace(window.location.href)};
l_0.OnWidgetConfiguredWithData=function(a,b){a=l_0.GetWidget(a);a.u().we(b.data);l_0.DisplayWidget(a,l_b);a.u().configWin=l_c};
l_0.HandlePageActionResult=function(a,b,c){var d=c["status-message"];if(c.errors!=l_c){l_0.v(window,c.errors,l_0.STATUS_MESSAGE_BAD_CLASS);l_0.ma(c,window)}else if(b=="addnew"){var e;if(l_0.IsOpenerReachable(window)){if(window.opener&&window.opener.parent)e=window.opener.parent;e&&e.editor&&e.editor._HandleAddNewWidget(c)}l_0.v(window,d,l_0.STATUS_MESSAGE_GOOD_CLASS);if(window.opener==l_c)window.location="/rearrange?blogID="+c.blogID;else e&&e._WidgetManager?e._WidgetManager._KillPopupDelay(window):
l_0.CloseIfNoPendingMessages(window,100)}else{c=l_0.Ma[a];l_.asserts.assert(c!=l_c);if(b=="delete"){l_0.v(c.u().configWin,d,l_0.STATUS_MESSAGE_GOOD_CLASS);l_0.FinishPopupWork(a,"_OnWidgetDeleted")}}};l_0.OnWidgetDeleted=function(a){var b=l_0.GetWidget(a);if(b){if(b.u().Pa()==l_X.DISPLAY_MODE_LAYOUT)top.editor._HandleDeleteWidget(b.u().z.rootElement);else{b=b.u().z.rootElement;b.parentNode.removeChild(b)}delete l_0.Ma[a]}};
l_0.FinishPopupWork=function(a,b,c){if(l_0.IsOpenerReachable(window)){var d=window.opener;c||(c=d._WidgetManager[b]);c(a);d._WidgetManager?d._WidgetManager._KillPopupDelay(window,a):l_0.CloseIfNoPendingMessages(window,100)}else{a=l_0.GetWidgetRefreshUrl()+"?widgetId="+a;a+="&func="+encodeURIComponent(b);window.location.replace(a)}};l_0.IsOpenerReachable=function(a){var b=l_d;try{if(a.opener){var c="X"+a.opener.document.domain;if(c&&c!="X")b=l_b}}catch(d){}return b};l_0.STATUS_MESSAGE_GOOD_CLASS="status-msg status-msg-yellow-on-white";
l_0.STATUS_MESSAGE_PENDING_CLASS=l_0.STATUS_MESSAGE_GOOD_CLASS;l_0.STATUS_MESSAGE_BAD_CLASS=l_0.STATUS_MESSAGE_GOOD_CLASS;l_0.v=function(a,b,c){a||(a=self);var d=a.document.getElementById("status-message-inner");if(d)d.innerHTML=b;if(a=a.document.getElementById("status-message"))a.className=c};l_0.MaybePrependHttp=function(a){if(a&&a.length>0&&a.substring(0,4)!="http")a="http://"+a;return a};
l_0.GetFirstElementInElementWithClass=function(a,b){if(l_.dom.classes.has(a,b))return a;if(a)for(var c=a.childNodes.length,d=0;d<c;d++){var e=l_0.GetFirstElementInElementWithClass(a.childNodes.item(d),b);if(e)return e}return l_c};
l_0.CreateTransparentClickTrappingDiv=function(a){var b=a.createElement("div");a=a.body.scrollHeight;b.style.position="absolute";b.style.top="0px";b.style.left="0px";b.style.width="100%";b.style.height=a+"px";b.style.zIndex="10";b.style.cursor="default";b.onclick=l_0.vc;b.onmousedown=l_0.vc;b.onmouseup=l_0.vc;b.style.background="white";b.style.filter="alpha(opacity=1)";b.style.opacity=".01";b.innerHTML="&nbsp;";return b};
l_0.vc=function(a){a=a;if(!a)a=window.event;if(a){a.cancelBubble=l_b;a.stopPropagation&&a.stopPropagation()}return l_d};function l_Z(a){this.V=a;this._WidgetBinding_include=this.Eb;this._WidgetBinding_call=this.Ee;this._WidgetBinding_loop=this.Ge;this._WidgetBinding_if=this.Fe}l_Z.prototype.Eb=function(a,b){var c=a.getAttribute("name");a=a.getAttribute("data");return this.V.uc(c,b,a)};l_Z.prototype.Ee=l_Z.prototype.Eb;
l_Z.prototype.Ge=function(a,b){var c=a.getAttribute("values");c=this.V.Xa(c);c=this.V.rb(c[1],b);var d=a.getAttribute("var");d||l_.asserts.fail("Invalid var= attribute on b:loop");var e=a.getAttribute("index"),f=this.V.Ra(a);a=a.ownerDocument.createDocumentFragment();if(!c)return a;for(var g=0;g<c.length;g++){var h=c[g],i=f.cloneNode(l_b);b.za(d,h);e&&b.za(e,g);h=this.V.Ta(i,b);e&&b.zb(e);b.zb(d);a.appendChild(h)}return a};
l_Z.prototype.Fe=function(a,b){for(var c=this.ic(a.getAttribute("cond"),b),d=a.ownerDocument.createDocumentFragment(),e=l_d;a.firstChild!=l_c;){var f=a.firstChild;if("else"==this.V.Xa(f.nodeName)[1].toLowerCase())e=l_b;else if(c&&!e||!c&&e){var g=this.V.Ta(f,b);d.appendChild(g)}f.parentNode==a&&a.removeChild(f)}return d};l_Z.prototype.ic=function(a,b){l_.asserts.assert(a!=l_c,"null expression");a=this.Be(a,b);try{var c=eval(a);return c}catch(d){}return""};
l_Z.prototype.Be=function(a,b){for(var c=new RegExp("\\b(?:"+l_Y.DATA_NAMESPACE_PREFIX+"|"+l_Y.ACTION_NAMESPACE_PREFIX+"):[^ ]*\\b","gi"),d="",e=0,f=c.exec(a);f;){var g=f[0];if(!this.de(a,c.lastIndex)){var h,i=this.V.Xa(g);if(i[0]==l_Y.ACTION_NAMESPACE_PREFIX)h=this.V.Jc(i[1],l_c,b);else if(i[0]==l_Y.DATA_NAMESPACE_PREFIX){(h=this.V.rb(g,b))||(h="");h+=""}else l_.asserts.fail("Unrecognized prefix '"+i[0]+"'");h=h.replace(/"/g,"&quot;");h='"'+h+'"';d+=a.substring(e,f.index);d+=h;e=c.lastIndex}f=c.exec(a)}d+=
a.substring(e,a.length);return d};l_Z.prototype.de=function(a,b){l_.asserts.assert(b<=a.length,"Invalid index: i="+b+", l="+a.length);for(var c=0,d=0;d<b;d++)if(a.charAt(d)=='"'&&(d==0||a.charAt(d-1)!="\\"))c++;return c%2!=0};function l_1(){}l_1.ERROR_MSG_ACTIVE_CLASS="errorbox-bad errormsg";l_1.ERROR_MSG_INACTIVE_CLASS="errorbox-good";
l_1.ProcessForm=function(a,b){var c={success:l_b,values:{},errors:{}};for(var d in b){var e=l_1.GetFieldValue(a[d]),f=b[d];l_1.ClearError(d);if(f)if(f=f(e)){l_1.SetError(d,f);c.success=l_d;c.errors[d]=f}c.values[d]=e}return c};l_1.GetFieldValue=function(a){if(a)if(a.type=="checkbox"){if(a.checked)return a.value}else{if(a.type==l_c){for(var b=[],c=0;c<a.length;c++)if(a[c].checked)b[b.length]=a[c].value;switch(b.length){case 0:return;case 1:return b[0];default:return b}}return a.value}};
l_1.Yd=function(a,b){b||(b=document);a="errormessage_"+a;return b.getElementById(a)};l_1.ClearError=function(a){if(a=l_1.Yd(a)){a.innerHTML="";a.className=l_1.ERROR_MSG_INACTIVE_CLASS}};l_1.SetError=function(a,b,c){if(a=l_1.Yd(a,c)){a.innerHTML=b;a.className=l_1.ERROR_MSG_ACTIVE_CLASS}};l_1.GetRequiredStringFilter=function(){return function(a){a=a.replace(/^\s+/,"").replace(/\s+$/,"");if(a.length==0)return LayoutsMessages.FIELD_CANNOT_BE_BLANK}};
l_1.GetNumberFilter=function(a,b){return function(c){c=parseInt(c,10);if(isNaN(c))return LayoutsMessages.MUST_SPECIFY_A_NUMBER;if(c<a)return LayoutsMessages.NUMBER_TOO_SMALL+" "+a;if(c>b)return LayoutsMessages.NUMBER_TOO_LARGE+" "+b}};function l__(){this.F=[];for(var a=0;a<l_0.md.length;++a){var b=l_0.md[a];this.F[this.F.length]=b}}l__.DEFAULT_DICTIONARY_KEY="";l__.MAX_DICTIONARY_DEPTH=50;l__.SEPARATOR_CHAR=".";
l__.prototype.za=function(a,b){this.F.length>=l__.MAX_DICTIONARY_DEPTH&&l_.asserts.fail("Cannot add another dictionary: "+a);a.indexOf(l__.SEPARATOR_CHAR)>-1&&l_.asserts.fail("Cannot add dictionary name containing '.': "+a);a={name:a,data:b};this.F[this.F.length]=a};l__.prototype.zb=function(a){var b=this.F[this.F.length-1];b.name!=a&&l_.asserts.fail("Dictionary "+a+" is not the last one, and can't be deleted: "+b.name);this.F.splice(this.F.length-1,1)};
l__.prototype.sb=function(a){if(a==l_c)a=l__.DEFAULT_DICTIONARY_KEY;for(var b=this.F.length-1;b>=0;--b)if(this.F[b].name==a)return this.F[b].data;return l_c};l__.prototype.lc=function(){return this.sb(l__.DEFAULT_DICTIONARY_KEY)};l__.prototype.Sd=function(a){this.za(l__.DEFAULT_DICTIONARY_KEY,a)};
l__.prototype.Ca=function(a){var b=this.sb(a);if(b!==l_c)return b;var c=a.split(l__.SEPARATOR_CHAR);if(c.length==1){b=this.lc();return b[a]}b=this.sb(c[0]);a=0;if(b)a=1;else b=this.lc();for(a=a;a<c.length;a++){if(b==l_c)return l_c;b=b[c[a]]}return b};function l_3(a,b){this.ph=a;this.od=b}l_3.prototype.wb=function(){return this.ph};l_3.prototype.u=function(){return this.od};l_3.prototype.xb=function(a,b){a=="configure"&&this.od.ae(b)};l_3.prototype.ma=function(a,b,c){l_0.ma(b,c)};
l_3.prototype.pe=function(){};l_.exportSymbol("_WidgetManager",l_0);l_.exportProperty(l_0,"_Init",l_0.Init);l_.exportProperty(l_0,"_SetPageActionUrl",l_0.SetPageActionUrl);l_.exportProperty(l_0,"_GetPageActionUrl",l_0.GetPageActionUrl);l_.exportProperty(l_0,"_SetWidgetRefreshUrl",l_0.SetWidgetRefreshUrl);l_.exportProperty(l_0,"_GetWidgetRefreshUrl",l_0.GetWidgetRefreshUrl);l_.exportProperty(l_0,"_GetCallbackUrl",l_0.GetCallbackUrl);l_.exportProperty(l_0,"_DeleteWidgetFromPage",l_0.DeleteWidgetFromPage);
l_.exportProperty(l_0,"_DisplayWidget",l_0.DisplayWidget);l_.exportProperty(l_0,"_GetWidget",l_0.GetWidget);l_.exportProperty(l_0,"_HandleControllerResult",l_0.xb);l_.exportProperty(l_0,"_HandlePageActionResult",l_0.HandlePageActionResult);l_.exportProperty(l_0,"_IsOpenerReachable",l_0.IsOpenerReachable);l_.exportProperty(l_0,"_SetConfigWin",l_0.SetConfigWin);l_.exportProperty(l_0,"_SetDataContext",l_0.SetDataContext);l_.exportProperty(l_0,"_SetupPreview",l_0.SetupPreview);
l_.exportProperty(l_0,"_SetSystemMarkup",l_0.SetSystemMarkup);l_.exportProperty(l_0,"_RegisterWidget",l_0.RegisterWidget);l_.exportProperty(l_0,"_RegisterNewWidget",l_0.RegisterNewWidget);l_.exportProperty(l_0,"_PopupPaneFromParams",l_0.PopupPaneFromParams);l_.exportProperty(l_0,"_PopupConfig",l_0.PopupConfig);l_.exportProperty(l_0,"_PopupToolbox",l_0.PopupToolbox);l_.exportProperty(l_0,"_KillPopupDelay",l_0.KillPopupDelay);l_.exportProperty(l_0,"_OnWidgetConfigured",l_0.OnWidgetConfigured);
l_.exportProperty(l_0,"_OnWidgetDeleted",l_0.OnWidgetDeleted);l_.exportSymbol("_WidgetInfo",l_X);l_.exportProperty(l_X.prototype,"_getInstanceId",l_X.prototype.hd);function l_4(a){this.Kf=l_d;this.ac=a;this.ra=window.document}l_4.DISABLED_BUTTON_CLASS="disabled-button";l_4.HIDDEN_MESSAGE_CLASS="status-msg-hidden";l_4.prototype.C=function(a){(this.Kf=a)?l_.dom.classes.remove(this.ra.getElementById("save-button-wrapper"),l_4.DISABLED_BUTTON_CLASS):l_.dom.classes.add(this.ra.getElementById("save-button-wrapper"),l_4.DISABLED_BUTTON_CLASS)};l_4.prototype.na=function(){return this.Kf};
l_4.prototype.ka=function(){this.ra.getElementById(this.ac+"-inner").innerHTML="&nbsp;";l_.dom.classes.add(this.ra.getElementById(this.ac),l_4.HIDDEN_MESSAGE_CLASS)};l_4.prototype.v=function(a){this.ra.getElementById(this.ac+"-inner").innerHTML=a;l_.dom.classes.remove(this.ra.getElementById(this.ac),l_4.HIDDEN_MESSAGE_CLASS)};l_4.prototype.Pc=function(a){this.ra=a};function l_2(a){return function(b){var c=l_Y.getXmlHttpRequestStatus(b);if(c>=500){if(b.responseText.length)document.body.innerHTML=b.responseText;else window.alert(LayoutsMessages.SERVER_ERROR);return l_d}return a?a(b):l_b}};function l_5(a,b){this.ea=b;this.sectionSizeCache={};this.d=new l_4("save-message");this.previewBaseToken=this.previewBaseUrl="";this.savedWidgetOrder=l_c;this.securityToken=a}l_5.prototype.ca={};l_5.prototype.ca.select=function(a){return a&&l_l(a,"widget")};l_5.prototype.S={};l_5.prototype.S.select=function(a){return a&&l_l(a,"section")};
l_5.prototype.pa=function(a,b,c){this.previewBaseUrl=a;this.previewBaseToken=b;a=window.frames.editorframe.document;_DD_Install(a);a=l_o(a.documentElement,this.S);l_Xa(a);this.W(a);var d=this;l_Za(function(e){return d.oa(e)});this.A("editorframe");this.d.C(l_d);this.savedWidgetOrder=this.vb();c&&this.ve(a);c=l_mb(window.location.href);this.Qa(c.highlight)};
l_5.prototype.ve=function(a){a=this.ke(a);var b=this.ea+"&action=measure",c=["securityToken",encodeURIComponent(this.securityToken)];c=c.concat(a);l_lb(b,c,l_2())};l_5.prototype.ke=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];b.push("section."+d.id);b.push(d.offsetWidth)}return b};l_5.prototype.hc=function(){var a="",b=this.vb();for(var c in b){var d=b[c];a+="&section."+c+"=";a+=d.join(",")}return a};
l_5.prototype.vb=function(){for(var a={},b=l_4a("div","section"),c=0;c<b.length;c++){for(var d=b[c],e=d.childNodes,f=[],g=0;g<e.length;g++){var h=e.item(g);l_l(h,"widget")&&f.push(h.id)}a[d.id]=f}return a};l_5.prototype._SaveDone=function(a,b){this.d.C(!a);this.d.v(b);if(a)this.savedWidgetOrder=this.vb()};l_5.prototype.na=function(){return this.d.na()};l_5.prototype.yb=function(){this.d.ka();this.d.C(l_b);var a=this;window.setTimeout(function(){a.A("editorframe")},0)};l_5.GLOW_COLOR="ffffaa";
l_5.prototype.Rc=function(a,b){this.d.v(a);b&&this.Qa(b)};l_5.prototype.Qa=function(a){if(a){if(a=window.frames.editorframe.document.getElementById(a))a=l_0.GetFirstElementInElementWithClass(a,"widget-content");a&&l_6.Qa(a,l_5.GLOW_COLOR,2400,80)}};l_5.prototype.wc=function(){var a=this.ea+"&action=layout"+this.hc();a=a+"&securityToken="+encodeURIComponent(this.securityToken);this.d.v(LayoutsMessages.SAVING);l_kb(a,undefined,undefined,l_2())};
l_5.prototype.Sc=function(){var a=this.previewBaseUrl+"&action=preview"+this.hc();a=a+"&securityToken="+encodeURIComponent(this.previewBaseToken);a=window.open(a,"layout_preview","width=800,height=600,left=20,top=20,resizable=yes,scrollbars=yes");a.focus()};
l_5.prototype.Gc=function(){this.d.ka();this.d.C(l_d);var a=window.frames.editorframe.document,b=a.documentElement,c=a.createElement("div");c.style.display="none";b.appendChild(c);for(var d in this.savedWidgetOrder){for(var e=a.getElementById(d);e.childNodes.length>0;)c.appendChild(e.childNodes[0]);for(var f=this.savedWidgetOrder[d],g=0;g<f.length;g++){var h=f[g];h=a.getElementById(h);e.appendChild(h)}}c.parentNode.removeChild(c);a=l_o(b,this.S);l_Xa(a);this.W(a);this.A("editorframe")};
l_5.prototype.Oa=function(a){if(a.firstChild&&l_l(a.firstChild,"add_widget"))return a.firstChild;return l_c};l_5.prototype.W=function(a){for(var b=window.frames.editorframe,c=0;c<a.length;c++){var d=a[c],e=this.Oa(d);if(!this.oa(d,l_b)&&this.Wa(d)){if(e==l_c){e=d.ownerDocument.createElement("div");e.className="add_widget";e.innerHTML="<a href=''>"+LayoutsMessages.ADD_PAGE_ELEMENT+"</a>";e.firstChild.onclick=l_ob(b._WidgetManager._PopupToolbox,l_c,e);d.insertBefore(e,d.firstChild)}}else e!=l_c&&d.removeChild(e)}};
l_5.prototype.oc=function(a){var b=a.parentNode;b.removeChild(a);l_Ya(b);this.W(new Array(b));for(var c in this.savedWidgetOrder){b=this.savedWidgetOrder[c];for(var d=0;d<b.length;d++)if(b[d]==a.id){b.splice(d,1);break}}this.A("editorframe")};l_5.prototype.oa=function(a,b){if(b||this.sectionSizeCache[a.id]==l_c){b=l_o(a,this.ca);var c=a.getAttribute("maxwidgets");this.sectionSizeCache[a.id]=c&&c>=0&&c<=b.length}return this.sectionSizeCache[a.id]};
l_5.prototype.Wa=function(a){a=a.getAttribute("showaddelement");if("false"==a)return l_d;return l_b};l_5.prototype.Va=function(a){var b=document.getElementById(a);a=window.frames[a].document;if(a=a.documentElement){a=a.scrollHeight;b.style.height=a+"px"}};l_5.prototype.A=function(a){this.Va(a);var b=document.getElementById(a);a=window.frames[a].document;if(a=a.documentElement){a=a.scrollWidth;if(a>b.scrollWidth)b.style.width=a+"px"}};
l_5.prototype.nc=function(a){for(var b=a.sectionId,c=window.frames.editorframe,d=c.document.getElementById(b),e=d.firstChild;e!=l_c&&e.className!="add_widget";)e=e.nextSibling;var f=d.ownerDocument.createElement("div");e=e&&e.nextSibling?d.insertBefore(f,e.nextSibling):d.appendChild(f);e.className="widget "+a.widgetview+" draggable-widget";e.setAttribute("widgetType",a.widgetview);f=a.instanceId;var g=new c._WidgetInfo(a.instanceId,a.sectionId,a.markups,e,a.entryInfo.data,l_X.DISPLAY_MODE_LAYOUT);
e.setAttribute("id",g._getInstanceId());a="_"+a.widgetview+"View";a=c._WidgetManager._RegisterWidget(a,g,c[a]);c._WidgetManager._DisplayWidget(a,l_b);b=this.savedWidgetOrder[b];b.unshift(f);l_Ya(d);d=new Array(e.parentNode);this.W(d);this.A("editorframe")};var _LayoutEditor=l_5;_LayoutEditor.prototype=l_5.prototype;_LayoutEditor.prototype._HasUnsavedChanges=_LayoutEditor.prototype.na;_LayoutEditor.prototype._SetupEditorFrame=_LayoutEditor.prototype.pa;_LayoutEditor.prototype._LayoutModeSubmit=_LayoutEditor.prototype.wc;
_LayoutEditor.prototype._RevertPageState=_LayoutEditor.prototype.Gc;_LayoutEditor.prototype._ShowPreview=_LayoutEditor.prototype.Sc;_LayoutEditor.prototype._HandleAddNewWidget=_LayoutEditor.prototype.nc;_LayoutEditor.prototype._HandleDeleteWidget=_LayoutEditor.prototype.oc;_LayoutEditor.prototype._SetSaveMessage=_LayoutEditor.prototype.Rc;function l_7(a){this.ea=a;this.sectionSizeCache={}}l_7.prototype.ca={};l_7.prototype.ca.select=function(a){return a&&l_l(a,"widget")};l_7.prototype.S={};l_7.prototype.S.select=function(a){return a&&l_l(a,"section")};l_7.prototype.pa=function(){_DD_Install(document);var a=l_o(document.documentElement,this.S);l_Xa(a);this.W(a);var b=this;l_Za(function(c){return b.oa(c)})};
l_7.prototype.$d=function(){for(var a=[],b=l_4a("div","section"),c=0;c<b.length;c++){var d=b[c],e=[];e[1]=d.id;e[2]=[];a.push(e);d=d.childNodes;for(var f=0;f<d.length;f++){var g=d.item(f);if(l_l(g,"widget")){var h=[];h[1]=g.id;e[2].push(h)}}}b=[];b[1]=a;return b};l_7.prototype.yb=function(){gadgets.rpc.call("..","setSectionContents",l_c,gadgets.json.stringify(this.$d()))};l_7.prototype.Oa=function(a){if(a.firstChild&&l_l(a.firstChild,"add_widget"))return a.firstChild;return l_c};
l_7.prototype.Wa=function(a){a=a.getAttribute("showaddelement");if("false"==a)return l_d;return l_b};l_7.prototype.W=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=this.Oa(c);if(!this.oa(c,l_b)&&this.Wa(c)){if(d==l_c){d=c.ownerDocument.createElement("div");d.className="add_widget";d.innerHTML="Drag Widgets Here";c.insertBefore(d,c.firstChild)}}else d!=l_c&&c.removeChild(d)}};
l_7.prototype.oa=function(a,b){if(b||this.sectionSizeCache[a.id]==l_c){b=l_o(a,this.ca);var c=a.getAttribute("maxwidgets");this.sectionSizeCache[a.id]=c&&c>=0&&c<=b.length}return this.sectionSizeCache[a.id]};l_7.prototype.Va=function(){};var _IframeLayoutEditor=l_7;_IframeLayoutEditor.prototype=l_7.prototype;_IframeLayoutEditor.prototype._SetupEditorFrame=_IframeLayoutEditor.prototype.pa;_IframeLayoutEditor.prototype._HandleAddNewWidget=function(){};
_IframeLayoutEditor.prototype._HandleDeleteWidget=function(){};_IframeLayoutEditor.prototype._SetSaveMessage=function(){};function l_8(a,b){this.ea=a;this.Md=this.i=l_c;this.d=new l_4("save-message");this.oh=b;this.ya=this.Nd=this.I=this.Ed=l_c;this.k=window.document}l_8.VAR_TYPE_COLOR="COLOR";l_8.VAR_TYPE_FONT="FONT";l_8.COLOR_INPUT_FIELD="color-input";l_8.PREVIEW_MASKING_DIV_ID="preview-masking-div";l_8.CREATE_TEAROFF_LINK_ID="create-tearoff-link";l_8.DESTROY_TEAROFF_LINK_ID="destroy-tearoff-link";l_8.POPUP_LINK_ID="show-popup-link";l_8.HIDDEN_CONTROL_CLASS="hidden-controls";l_8.CONTROL_TABLE_ID="style-options";
l_8.SAVE_CONTROLS_ID="buttons";l_8.cb={};l_8.cb.select=function(a){return a&&l_l(a,"palette-chip")};l_8.zg={};l_8.zg.select=function(a){return a&&l_l(a,"var-selected")};l_8.prototype.Cb=function(a){this.i=a;this.Md={};for(var b in a)this.Md[b]=a[b].value};
l_8.prototype.sc=function(a){this.ec(window.document);this.A("preview");this.d.C(l_d);var b=document.getElementById("palette-page");b=l_o(b,l_8.cb);for(var c=[],d=0;d<b.length;d++)c.push(this.jc(b[d]));this.Ed=c;this.O();if(a)(a=document.getElementById(a))&&this.da(a)};
l_8.prototype.da=function(a,b){var c=l_c;if(this.I){this.I.className="var-unselected";c=this.kc()}this.I=a;this.I.className="var-selected";this.Nd=this.tb(a.id);var d=this.kc();if(c!=d||b){this.k.getElementById("font-options").style.display="none";this.k.getElementById("color-options").style.display="none";if(d==l_8.VAR_TYPE_COLOR)this.k.getElementById("color-options").style.display="block";else if(d==l_8.VAR_TYPE_FONT)this.k.getElementById("font-options").style.display="block"}if(d==l_8.VAR_TYPE_COLOR)this.Ce(a);
else if(d==l_8.VAR_TYPE_FONT)this.De(a);else l_a(new TypeError("unknown type "+d))};l_8.prototype.Ce=function(a){this.k.getElementById(l_8.COLOR_INPUT_FIELD).value=this.i[a.id].value;l_1.ClearError(l_8.COLOR_INPUT_FIELD);this.k.getElementById("color-instructions").innerHTML=LayoutsMessages.CHOOSE_A_COLOR+" "+this.i[a.id].description};
l_8.prototype.De=function(a){this.k.getElementById("font-instructions").innerHTML=LayoutsMessages.CHOOSE_A_FONT+" "+this.i[a.id].description;a=this.Ba();this.k.getElementById("font-italic").checked=a[0]=="italic";this.k.getElementById("font-bold").checked=a[1]=="bold";this.Xd(a[3]).checked=l_b};
l_8.prototype.Xd=function(a){if(a==l_c)return l_c;a=a.toLowerCase();for(var b=this.k.forms.styleform["font-face"],c=0;c<b.length;c++)if(a==b[c].value.toLowerCase())return b[c];a=a.replace(/\'/,"");a=a.replace(/,/g," ");a=a.replace(/\'/g,"");a=a.split(" ")[0].toLowerCase();for(c=0;c<b.length;c++)if(b[c].value.toLowerCase().indexOf(a)>=0)return b[c];return b[0]};l_8.prototype.kc=function(){if(this.I){var a=this.i[this.I.id];if(a)return a.type}return l_c};
l_8.prototype.xc=function(a){a=a||window.event;a=a.keyCode||a.which;if(a=="13"){a=this.k.getElementById(l_8.COLOR_INPUT_FIELD).value;if(this.fe(a)){if(a.charAt(0)!="#")a="#"+a;this.Lc(a);l_1.ClearError(l_8.COLOR_INPUT_FIELD)}else l_1.SetError(l_8.COLOR_INPUT_FIELD,LayoutsMessages.INVALID_COLOR)}};l_8.prototype.fe=function(a){if(!a)return l_d;return a.match(/^#?[0-9a-fA-F]{3,6}$/)!=l_c};
l_8.prototype.pc=function(a){for(var b=l_o(this.k.getElementById("palette-match"),l_8.cb),c=0;c<b.length;c++){var d;if(c<=a.length)d=a[c];d||(d="#ffffff");this.zc(b[c],d)}};l_8.prototype.te=function(a){a=this.jc(a);this.Lc(a)};
l_8.prototype.Lc=function(a){this.Qc(a);var b=this.ub();this.i[b].value=a;this.O();var c=0;for(var d in this.i){if(d==b)break;c++}b=this.k.getElementById("palette-page");this.Ac(b,c,a);a=this.Ed.join(",");a=["colors",a,"action","Suggest"];this.d.ka();this.d.C(l_b);this.ea&&l_lb(this.ea,a,l_2())};l_8.prototype.Ic=function(){this.d.ka();this.d.C(l_d);for(var a in this.i)this.i[a].value=this.Md[a];this.Ya();this.da(this.I);this.O()};
l_8.prototype.Hc=function(){this.d.ka();this.d.C(l_b);for(var a in this.i)this.i[a].value=this.i[a].defaultValue;this.Ya();this.da(this.I);this.O()};l_8.prototype.mc=function(){var a="";for(var b in this.i)a+=b+"="+this.i[b].value+"&";return a};l_8.prototype.Kc=function(){var a=this.mc();a=["action","Save","vars",a];this.d.v(LayoutsMessages.SAVING_CHANGES);l_lb(this.ea,a,l_2())};l_8.prototype.qc=function(a,b){this.d.C(!a);this.d.v(b);a&&this.Cb(this.i)};
l_8.prototype.ec=function(a){var b=l_o(a.documentElement,l_8.cb);for(var c in b){var d=b[c];d.onmouseover=this.he(b[c]);d.onmouseout=this.ge(b[c]);d.onclick=this.ie(b[c])}if(b=a.getElementById(l_8.CREATE_TEAROFF_LINK_ID))b.onclick=this.Ae.bind(this);if(b=a.getElementById(l_8.DESTROY_TEAROFF_LINK_ID))b.onclick=this.gc.bind(this);if(a=document.getElementById(l_8.POPUP_LINK_ID))a.onclick=this.Vd.bind(this)};l_8.prototype.he=function(a){return function(){l_m(a,"highlighted-palette-chip")}};
l_8.prototype.ge=function(a){return function(){l_n(a,"highlighted-palette-chip")}};l_8.prototype.ie=function(a){var b=this;return function(){b.te(a)}};l_8.prototype.Vc=function(a){l_l(a,"var-selected")||l_m(a,"var-hover");l_n(a,"var-unselected")};l_8.prototype.Uc=function(a){l_l(a,"var-selected")||l_m(a,"var-unselected");l_n(a,"var-hover")};l_8.prototype.ub=function(){if(this.I)return this.I.id;return l_c};
l_8.prototype.Qc=function(a,b){var c=this.Nd;if(b)c=this.tb(b);if(c){c.style.backgroundColor=a;b=this.k.getElementById(l_8.COLOR_INPUT_FIELD);b.value=a;l_1.ClearError(l_8.COLOR_INPUT_FIELD)}};l_8.prototype.Ac=function(a,b,c){a=l_o(a,l_8.cb);if(b>=a.length)return l_d;this.zc(a[b],c);this.Ed[b]=c;return l_b};l_8.prototype.zc=function(a,b){l_qa(b!=l_c);l_qa(a!=l_c);a.id="chip-color-"+b;for(var c in a.childNodes){var d=a.childNodes[c];if(d.nodeType==1){d.style.backgroundColor=b;break}}};
l_8.prototype.tb=function(a){return this.k.getElementById("var-sample-"+a)};l_8.prototype.Ya=function(){var a=0,b=this.k.getElementById("palette-page");for(var c in this.i){var d=this.i[c];if(d.type==l_8.VAR_TYPE_COLOR){this.Ac(b,a++,d.value);this.Qc(d.value,c)}else if(d.type==l_8.VAR_TYPE_FONT)this.tb(c).style.font=d.value}};
l_8.prototype.O=function(){var a=this.oh;for(var b in this.i){var c=this.i[b].value,d=RegExp("\\$\\{"+b.replace(/\./,"\\.")+"\\}","gi");a=a.replace(d,c);if(b.indexOf(".")==-1){d=RegExp("\\$"+b+"\\b","gi");a=a.replace(d,c)}}if(b=window.frames.preview.document){this.ye(b,"page-skin-1",a);if(a=b.getElementById(l_8.PREVIEW_MASKING_DIV_ID))a.style.height=b.body.scrollHeight+"px";else{a=l_0.CreateTransparentClickTrappingDiv(b);a.id=l_8.PREVIEW_MASKING_DIV_ID;b.body.appendChild(a)}}};
l_8.prototype.ye=function(a,b,c){for(var d=0;d<a.styleSheets.length;d++){var e=a.styleSheets[d];if(e.id==b)if(e.cssText){e.cssText=c;return}}if(e=a.getElementById(b))e.innerHTML=c};l_8.prototype.jc=function(a){if(!a)return l_c;a=a.id;a=a.match(/chip-color-(.*)/);if(!a)return l_c;return a[1]};l_8.prototype.Bc=function(){var a=l_c,b=l_c;for(var c in this.i){var d=this.i[c];if(d.type==l_8.VAR_TYPE_COLOR){if(a)this.i[a].value=d.value;else b=d.value;a=c}}this.i[a].value=b;this.d.C(l_b);this.Ya();this.O()};
l_8.prototype.Mc=function(){var a=this.k.getElementById("font-bold").checked,b=this.Ba();b[1]=a?"bold":"normal";this.Ua(b);this.O()};l_8.prototype.Oc=function(){var a=this.k.getElementById("font-italic").checked,b=this.Ba();b[0]=a?"italic":"normal";this.Ua(b);this.O()};l_8.prototype.Ba=function(){var a=this.i[this.ub()].value;a=a.split(" ");a[3]=a.slice(3).join(" ");return a.slice(0,4)};l_8.prototype.Ua=function(a){a=a.join(" ");this.i[this.ub()].value=a;this.Nd.style.font=a;this.d.C(l_b)};
l_8.prototype.Nc=function(){for(var a=this.k.forms.styleform["font-face"],b="",c=0;c<a.length;c++)if(a[c].checked){b=a[c].value;break}a=this.Ba();a[3]=b;this.Ua(a);this.O()};l_8.prototype.Cc=function(){this.Ec(1.1)};l_8.prototype.Dc=function(){this.Ec(0.9)};l_8.prototype.Ec=function(a){var b=this.Ba();b[2]=Math.round(parseFloat(b[2])*a)+"%";this.Ua(b);this.O()};l_8.prototype.A=function(a){a=document.getElementById(a);var b=l_p(window,l_va)-l_sa(a).y-10;a.style.height=b+"px"};
l_8.prototype._HasUnsavedChanges=function(){return this.d.na()};l_8.prototype.Ae=function(){var a=this.ea+"&action=Tearoff&vars="+encodeURIComponent(this.mc());this.ya=window.open(a,"tearoff","height=160,width=800,location=no,toolbar=no,scrollbars=yes")};l_8.prototype.Vd=function(){this.ya&&this.ya.focus();return l_d};
l_8._InitTearoff=function(){var a=window.opener;if(a&&a.styleEditor){var b=a.styleEditor;window.styleEditor=a.styleEditor;a.styleEditor.k=window.document;a.styleEditor.d.Pc(window.document);window.LayoutsMessages=a.LayoutsMessages;window.styleEditor.Tc(window);window.styleEditor.ec(window.document);var c=window.document.getElementById(b.I.id);window.styleEditor.da(c,l_b);window.onbeforeunload=b.gc.bind(b);c=a.document.getElementById(l_8.CONTROL_TABLE_ID);l_m(c,l_8.HIDDEN_CONTROL_CLASS);c=a.document.getElementById(l_8.SAVE_CONTROLS_ID);
l_m(c,l_8.HIDDEN_CONTROL_CLASS);b.A("preview")}};l_8.prototype.gc=function(){if(this.ya){var a=window.document.getElementById(l_8.CONTROL_TABLE_ID);l_n(a,l_8.HIDDEN_CONTROL_CLASS);a=window.document.getElementById(l_8.SAVE_CONTROLS_ID);l_n(a,l_8.HIDDEN_CONTROL_CLASS);this.A("preview");this.k=window.document;this.d.Pc(this.k);a=window.document.getElementById(this.I.id);this.Tc(window);this.Ya();this.da(a,l_b);this.ya.closed||this.ya.close();this.ya=l_c}};
l_8.prototype.Tc=function(a){a=l_o(a.document,l_8.zg);for(var b=0;b<a.length;b++)a[b].className="var-unselected"};var _StyleEditor=l_8;_StyleEditor.prototype=l_8.prototype;_StyleEditor.prototype._SetInitialVars=_StyleEditor.prototype.Cb;_StyleEditor.prototype._InitPage=_StyleEditor.prototype.sc;_StyleEditor.prototype._SelectVariable=_StyleEditor.prototype.da;_StyleEditor.prototype._MaybeUpdateFromInput=_StyleEditor.prototype.xc;_StyleEditor.prototype._HandleMatchingColorUpdate=_StyleEditor.prototype.pc;
_StyleEditor.prototype._Save=_StyleEditor.prototype.Kc;_StyleEditor.prototype._HandleSaveResult=_StyleEditor.prototype.qc;_StyleEditor.prototype._VarMouseover=_StyleEditor.prototype.Vc;_StyleEditor.prototype._VarMouseout=_StyleEditor.prototype.Uc;_StyleEditor.prototype._SelectFontBold=_StyleEditor.prototype.Mc;_StyleEditor.prototype._SelectFontItalic=_StyleEditor.prototype.Oc;_StyleEditor.prototype._SelectFontFace=_StyleEditor.prototype.Nc;_StyleEditor.prototype._ResizeFontBigger=_StyleEditor.prototype.Cc;
_StyleEditor.prototype._ResizeFontSmaller=_StyleEditor.prototype.Dc;_StyleEditor.prototype._Reshuffle=_StyleEditor.prototype.Bc;_StyleEditor.prototype._ResizeFrame=_StyleEditor.prototype.A;_StyleEditor.prototype._RevertToSaved=_StyleEditor.prototype.Ic;_StyleEditor.prototype._RevertToDefault=_StyleEditor.prototype.Hc;var _templateIdToThumb,_templateIdToGroup;function l_9(a,b){this.gg=l_b;this.baseUrl=a;this.Mf=b;this.d=new l_4("save-message");this.je(b);this.gg=l_d}l_9.prototype.Fc=function(){var a=document.getElementById("templatescroll"),b=l_sa(a);b=l_p(window,l_va)-b.y-10;a.style.height=b+"px";if(b=_templateIdToGroup[this.Mf]){for(b=document.getElementById(b);b&&!l_l(b,"gridElement");)b=b.parentNode;b&&this.se(a,b)}};
l_9.prototype.se=function(a,b){b=b.offsetTop;var c=a.scrollTop,d=c+a.offsetHeight;if(b<c||b>d)a.scrollTop=b-5};l_9.prototype.Db=function(a,b){this.fc();a.className="selected";if(!b)b=a.activeTemplateId;if(!b){b=a.getElementsByTagName("IMG")[0];b=b.id.substring(0,b.id.length-6)}a=document.getElementById("inner-"+b);this.Bb(a,b)};l_9.prototype.je=function(a){var b=_templateIdToGroup[a];b||(b=a);(b=document.getElementById(b))?this.Db(b,a):this.fc()};
l_9.prototype.fc=function(){var a=document.getElementsByTagName("form")[0];a=a.getElementsByTagName("li");for(var b=0;b<a.length;b++)l_n(a[b],"selected")};l_9.prototype.yc=function(a){(a=window.open(a.href,"layout_template_preview","width=770,height=500,top=80,left=20,toolbar=no,scrollbars=yes,menubar=no,location=no,status=yes"))&&a.focus&&a.focus()};
l_9.prototype.Bb=function(a,b){var c=_templateIdToThumb[b],d=_templateIdToGroup[b],e=document.getElementById(d+"-thumb");e.src=c;c=document.getElementById(d+"-preview");c.href=this.baseUrl+"&template="+b;this.ue(a);a=document.getElementById(d);a.activeTemplateId=b;this.gg||b==this.Mf&&this.d.ka()};
l_9.prototype.ue=function(a){var b=a.parentNode;b=b.getElementsByTagName("DIV");for(var c=0;c<b.length;c++){var d=b[c];d!=a&&!l_l(d,"creator")&&l_m(d,"unselected")}l_n(a,"unselected");a.getElementsByTagName("INPUT")[0].checked=l_b};var _TemplateSelector=l_9;_TemplateSelector.prototype=l_9.prototype;_TemplateSelector.prototype._ToggleSelectedTemplate=_TemplateSelector.prototype.Db;_TemplateSelector.prototype._PreviewTmpl=_TemplateSelector.prototype.yc;_TemplateSelector.prototype._SelectVariant=_TemplateSelector.prototype.Bb;
_TemplateSelector.prototype._ResizeWindow=_TemplateSelector.prototype.Fc;var _TEF_originalTemplate=l_c,_TEF_baseLocation=l_c,_TEF_shouldCheckForChanges=l_b;function _TEF_onBeforeUnload(){if(_TEF_shouldCheckForChanges&&_TEF_originalTemplate!=document.forms.templateEdit.templateText.value)return LayoutsMessages.TEF_UNLOAD_MESSAGE}function _TEF_onLoad(){if(_TEF_originalTemplate==l_c)_TEF_originalTemplate=document.forms.templateEdit.templateText.value}function l_pb(a){if(_TEF_originalTemplate!=document.forms.templateEdit.templateText.value)return confirm(a);return l_b}
function _TEF_hideErrorMessages(){var a=document.getElementById("error-container");a&&l_m(a,"hidden")}function _TEF_setErrors(a){var b=document.getElementById("error-container");if(b){b.innerHTML=a;l_n(b,"hidden")}}function _TEF_clearEdits(){if(l_pb(LayoutsMessages.TEF_DISCARD_CHANGES)){document.forms.templateEdit.templateText.value=_TEF_originalTemplate;_TEF_hideErrorMessages()}}
function _TEF_toggleWidgetTemplates(){var a=document.getElementById("expandWidgets");if(l_pb(LayoutsMessages.TEF_DISCARD_CHANGES_LONG)){_TEF_shouldCheckForChanges=l_d;var b=_TEF_baseLocation;if(a.checked)b+="&tpl=true";document.location=b}else a.checked=!a.checked}
function _TEF_submitEditForm(){document.forms.templateEdit.target="_parent";document.forms.templateEdit.action.value="save";_TEF_shouldCheckForChanges=l_d;if(window.event){window.event.cancelBubble=l_b;window.event.returnValue=l_d}document.forms.templateEdit.submit()}function _TEF_submitConfirmForm(){_TEF_shouldCheckForChanges=l_d;if(window.event){window.event.cancelBubble=l_b;window.event.returnValue=l_d}document.forms.saveConfirm.submit()}
function _TEF_preview(){_TEF_hideErrorMessages();document.forms.templateEdit.target="preview";document.forms.templateEdit.action.value="preview";document.forms.templateEdit.submit()}function _TEF_warnRevertWidgets(){confirm(LayoutsMessages.TEF_WARN_REVERT_WIDGET_TEMPLATES)&&document.forms.revertWidgetTemplates.submit()};function l_$(){}l_$.prototype.sg=function(a,b){a=l_3a(a,b);b=b.parentNode;b.style.zIndex=5;return a};l_$.prototype.Qb=function(a,b,c,d){l_7a(a,b,c,d);window.editor.Va("editorframe");return l_b};l_$.prototype.bf=function(a,b){b=l_8a(a,b);a=a.parentNode;a.style.zIndex="";return b};l_Ka(function(a){return l_l(a,"widget")&&!l_l(a,"locked-widget")?new l_$:undefined});l__a(function(a){return l_l(a,"widget")});
l_$.prototype.jf=function(a,b,c){var d=b.parentNode;d.style.zIndex=0;if(a=l_0a(a,b,c)){b=b.parentNode;if(d!=b){a=[];a.push(d,b);window.editor.W(a)}window.editor.yb()}};function l_6(){}l_6.Qa=function(a,b,c,d){if(c<0)l_a(new Error("Duration cannot be negative"));if(d<=0)l_a(new Error("Number of steps must be positive"));var e=l_6.HexColor(l_6.GetBackgroundColor(a));b=l_6.Gg(b,e,d);l_6.GlowStep(b,0,a,c/d,1)};
l_6.Gg=function(a,b,c){var d=[],e=parseInt(a.substring(0,2),16),f=parseInt(a.substring(2,4),16);a=parseInt(a.substring(4,6),16);for(var g=(parseInt(b.substring(0,2),16)-e)/c,h=(parseInt(b.substring(2,4),16)-f)/c,i=(parseInt(b.substring(4,6),16)-a)/c,j=0;j<c;j++){e+=g;f+=h;a+=i;d[j]="#"+l_6.RGBtoHex(e,f,a)}d[c-1]="#"+b;return d};l_6.GlowStep=function(a,b,c,d,e){if(!(b<0||b>=a.length)){c.style.backgroundColor=a[b];window.setTimeout(function(){l_6.GlowStep(a,b+e,c,d,e)},d)}};
l_6.RGBtoHex=function(a,b,c){return l_6.DigitToHex(a)+l_6.DigitToHex(b)+l_6.DigitToHex(c)};l_6.DigitToHex=function(a){if(a==l_c)return"00";a=parseInt(a,10);if(a==0||isNaN(a))return"00";a=Math.max(0,a);a=Math.min(a,255);a=Math.round(a);return"0123456789ABCDEF".charAt((a-a%16)/16)+"0123456789ABCDEF".charAt(a%16)};
l_6.GetBackgroundColor=function(a){if(!a.currentStyle&&!a.ownerDocument)return"transparent";var b=a.currentStyle?a.currentStyle:a.ownerDocument.defaultView.getComputedStyle(a,"");b=b.backgroundColor;if(l_ha()&&l_6.HexColor(b)=="000000"&&a.nodeName.toLowerCase!="body")b="transparent";if(b!="transparent")return b;if(a.parentNode)return l_6.GetBackgroundColor(a.parentNode);return"transparent"};
l_6.HexColor=function(a){var b=a.match(/#?([A-Fa-f0-9]+)/);if(b)if(b[1].length==6)return b[1].toUpperCase();else if(b[1].length==3){a=b[1];return(""+a.charAt(0)+a.charAt(0)+a.charAt(1)+a.charAt(1)+a.charAt(2)+a.charAt(2)).toUpperCase()}if(b=a.match(/(\d+),\s*(\d+),\s*(\d+)/))return l_6.RGBtoHex(b[1],b[2],b[3]);if(l_6.W3C_COLOR_NAMES[a.toLowerCase()])return l_6.W3C_COLOR_NAMES[a.toLowerCase()];return"FFFFFF"};
l_6.W3C_COLOR_NAMES={aqua:"00FFFF",black:"000000",blue:"0000FF",fuchsia:"FF00FF",gray:"808080",green:"008000",lime:"00FF00",maroon:"800000",navy:"000080",olive:"808000",orange:"FFA500",pink:"FFC0CB",purple:"800080",red:"FF0000",silver:"C0C0C0",teal:"008080",white:"FFFFFF",whitesmoke:"F5F5F5",yellow:"FFFF00"};
