var req;
var dropDown;
var hideGray = false;
var URIPage;
var categories = "categories.aspx";
var regions = "regions.aspx";
var subjects = "subjects.aspx";
var flipPosMainPage = "Handlers/flipPosMainPage.aspx";
var flipPosBoardPage = "Handlers/flipPosBoardPage.aspx";
var flipPageAddress;
var flipPageUri = "flipPage.aspx";
var selectSubjects = "Handlers/selectSubjects.aspx";
var mainContent = "Handlers/mainContent.aspx";
var boardContent = "Handlers/boardContent.aspx";
var articlesContent = "Handlers/articlesContent.aspx";
var categoriesWhere, categoriesBuffer;

/* Posluga */
var posBuffer, posContent;
/* ------- */

var w3cDOM = (typeof document.getElementById != "undefined" && typeof document.createElement != "undefined") ? true : false;

try {
document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

/* Events */
var pageLoaded = function() {};
function listenEvent (target, type, listener) {
if( target==window && type=='load' ) {
var tmp = pageLoaded;
pageLoaded = function() {tmp();listener();};
} else if (typeof target.addEventListener != "undefined") {
target.addEventListener (type, listener, false);
} else if (typeof target.attachEvent != "undefined") {
target.attachEvent ("on" + type, listener);
}
}
function unlistenEvent (target, type, listener) {
if (typeof target.removeEventListener != "undefined") {
target.removeEventListener (type, listener, false);
} else if (typeof target.detachEvent != "undefined") {
target.detachEvent ("on" + type, listener);
}
}

/* Call to server */
function callToServer(ctrl, url) {
dropDown = ctrl;
if (typeof XMLHttpRequest != "undefined") {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
}
req.open("GET", url, true);
req.onreadystatechange = clientCallback;
req.send(null);
}

function clientCallback() {
if (req.readyState == 4 && req.status == 200) {
fillClientDropDown();
}
}
 
function fillClientDropDown() {
var ar = req.responseXML.getElementsByTagName("ddItem");
dropDown.length = 0;
for (i=0; i < ar.length; ++i) {
newOption = new Option(ar[i].childNodes[0].nodeValue, ar[i].attributes[0].nodeValue);
if (true == hideGray) {
if ("0" == ar[i].attributes[1].nodeValue)
newOption.className = 'kw';
}
dropDown.options[dropDown.length] = newOption;
dropDown.focus();
}
}

function UpdateRegionsFromServer(ctrl1, ctrl2, mg)
{
hideGray = mg;
var Url = mainURL + regions + "?countryId=" + ctrl2.value;
callToServer(ctrl1, Url);
}

function UpdateSubjectsFromServer(ctrl1, ctrl2)
{
var Url = mainURL + subjects + "?lineId=" + ctrl2.value;
callToServer(ctrl1, Url);
}

/* Limit length of the input string */
function limitLength(obj, max)
{
if (obj.value.length > max)
obj.value = obj.value.substring(0, max);
}

function cutString(obj, max, message)
{
if (obj.value.length > max)
{
obj.value = obj.value.substring(0, max);
alert(message);
}
}

/* Favourites */
var itemsCount=0;
function checkBoxClick()
{
var list = getCookie( 'clipboard' );
if( list==null ) { list = '' }
else { list = list.replace( /^\*/, '' ); }
if( this.className=='clipboard' ) {
if( clipbordMaxSize && itemsCount >= clipbordMaxSize ) {
var removeElement = list.substr( 0, list.indexOf( '|' ) );
var removeSelectionCheckbox = document.getElementById( 'clipboard'+removeElement );
if( removeSelectionCheckbox ) {
removeSelectionCheckbox.className = 'clipboard';
removeSelectionCheckbox.src = this.src.replace(/star_on/g, 'star_off');
removeSelectionCheckbox.alt = addToFav;
removeSelectionCheckbox.title = addToFav;
}
list = list.replace( /^[0-9]+[^0-9]/, '' );
itemsCount--;
}
list += this.value + '|';
itemsCount++;
this.className = 'clipboardIn';
this.src = this.src.replace(/star_off/g, 'star_on');
this.alt = delFromFav;
this.title = delFromFav;
} else if( list.length>0 ) {
list = '|' + list;
var patern = new RegExp( '[^0-9]+'+this.value+'[^0-9]+', 'g' );
list = list.replace( patern, '|' );
list = list.replace( /^[^0-9]+/g, '' );

itemsCount--;
this.className = 'clipboard';
this.src = this.src.replace(/star_on/g, 'star_off');
this.alt = addToFav;
this.title = addToFav;
}
list = '*' + list; /* this adds additional * as sign that this cookie is from JS*/
setCookie( 'clipboard', list);
if( document.getElementById('favCount') ) {
document.getElementById('favCount').innerHTML = "("+itemsCount+")";
}
}

function clipboard() {
var container;
var clipboardList = getCookie( 'clipboard' );
if( clipboardList ) {
clipboardList = clipboardList.replace( /^\*/, '' );
itemsCount = 0;
for( var i=0; i<clipboardList.length; i++ ) {
if(clipboardList.charAt(i) == '|') itemsCount++;
}
clipboardList = '|' + clipboardList;
} else {
clipboardList = '';
}

if( document.getElementById('favCount') ) {
document.getElementById('favCount').innerHTML = "("+itemsCount+")";
}

if( !(container = document.getElementById('favList')) ) {
return false;
}

var images = container.getElementsByTagName( 'img' );
for( var i = 0; i<images.length; i++ ) {
if( images.item(i).className=='clipboard' ) {
var checkbox = images.item(i);

checkbox.value = checkbox.id.replace( /clipboard/, '' );
if( clipboardList.indexOf( '|' + checkbox.value + '|' )>-1 ) {
checkbox.className = 'clipboardIn';
checkbox.src = checkbox.src.replace(/star_off/g, 'star_on');
checkbox.alt = delFromFav;
checkbox.title = delFromFav;
} else {
checkbox.alt = addToFav;
checkbox.title = addToFav;
}
checkbox.onclick = checkBoxClick;
}
}
}

function initFav()
{
if (w3cDOM) {
clipboard();
}
}

listenEvent(window, 'load', initFav);

/* Gallery */
function SetImageSrc(imgSrc, imgHref, imgAlt)
{
var _img = document.getElementById('demoImg');
if( _img ) {
_img.src = imgSrc;
_img.style.cursor = 'hand';
_img.style.border = '4px solid white';
_img.alt = imgAlt;
}
var _a = document.getElementById('demoA');
if (_a)
_a.href = imgHref;
var _div = document.getElementById('demoDiv');
if (_div)
_div.style.border = 'solid 1px #CDDEEE';
var _span = document.getElementById('demoSpan');
if (_span)
_span.innerHTML = imgAlt;
}

var _viewPlanExpanded = false;
function ViewPlanExpandCollapse(obj, targetCtrlId, parentDivId, imgSrc)
{
_viewPlanExpanded = !_viewPlanExpanded;
var _img = document.getElementById(targetCtrlId);
var _div = document.getElementById(parentDivId);
var _divPlan = document.getElementById('trPlan');
if( _img ) {
if (_viewPlanExpanded){
_divPlan.style.display = 'block';
obj.innerHTML = hidePlanStr;
_div.style.border = 'solid 1px #C0C0C0';
_img.src = imgSrc;
_img.alt = showPlanStr;
}
else{
_divPlan.style.display = 'none';
obj.innerHTML = showPlanStr;
_div.style.border = 'none';
}
}

}

/* Mutiple category select */

document.getUniqueId = function () {
var prefix = "random";
var suffix;
do {
suffix = Math.round (Math.random () * 1000000000000000000);
} while (typeof document.getElementById (prefix + suffix) == "undefined" && document.getElementById (prefix + suffix) == null);
return prefix + suffix;
}

function shrinkAmpCharEntRefs (string) {
return string.replace (/&amp;/g, "&")
}

function classNameGetId (className) {
return className.replace (/^[^0-9]*/, "");
}

function replaceLastCid(cidStr, newCid)
{
var index = cidStr.lastIndexOf(';');
if (index != -1)
cidStr = cidStr.substring(0, index)
cidStr += ";" + newCid;
return cidStr;
}

function URISetParameter (URI, name, value) {
if (URI.indexOf (name + "=") != -1) {
var re = new RegExp ("(" + name + ")=[^&]*", "");
return URI.replace (re, "$1=" + value);
} else if (URI.indexOf ("?") != -1) {
return URI += ("&" + name + "=" + value);
} else {
return URI += ("?" + name + "=" + value);
}
}

function setCategoriesEventHandling () {
var as = categoriesWhere.getElementsByTagName ("a");
if (as.length == 0) {
cid = 0;
var cidVal = document.getElementById(cidValueField);
cidVal.value += ";0";
}

for (loop = 0; loop < as.length; loop ++) {

if (/^drop[0-9]*$/.test (as.item (loop).className)) {
as.item(loop).style.cursor = 'hand';
as.item (loop).onmouseover = function () {
window.status = this.title;
return true;
}
as.item (loop).onmouseout = function () {
window.status = "";
return true;
}
as.item (loop).onclick = function () {
cid = classNameGetId (this.className);
var cidVal = document.getElementById(cidValueField);
cidVal.value = replaceLastCid(cidVal.value, cid);
URICategories = URISetParameter (URICategories, "cid", cidVal.value);
URICategories = URISetParameter (URICategories, "lang", lang);

categoriesWhere.innerHTML = loading;
window.status = "";
categoriesBuffer.loadData(URICategories);
return false;
}
}
}

if (categoriesWhere.getElementsByTagName ("select").length > 0) {
var select = categoriesWhere.getElementsByTagName ("select").item (0);

select.onchange = function () {

cid = this.options[this.selectedIndex].value;

if (this.selectedIndex != 0) {
var cidVal = document.getElementById(cidValueField);

cidVal.value = replaceLastCid(cidVal.value, cid);
URICategories = URISetParameter (URICategories, "cid", cidVal.value);
URICategories = URISetParameter (URICategories, "lang", lang);
categoriesBuffer.loadData(URICategories);
} 
}
}
}

function rewrite (action) {
switch (action) {
case categories:
case selectSubjects:
categoriesWhere.innerHTML = flush (categoriesBuffer);
setCategoriesEventHandling();
break;
case mainContent:
case boardContent:
case articlesContent:
posContent.innerHTML = flush (posBuffer);
itemsCount = 0;
initFav();
var adv=document.getElementById("adv");
if (adv)
adv.style.display='block';
break;
case flipPosMainPage:
case flipPosBoardPage:
case flipPageUri:
case flipPageAddress:
pagePanel.innerHTML = flush(pageBuffer);
initFav();
break;
}
}

function contextAction(url) {
url = url.replace(/\?.*$/, '');
url = url.replace(mainURL, '');
return url;
}

function createBuffer (get) {

var buffer = new Object();
buffer.xml = false;
buffer.iframe = false;
if( get ) {
buffer.loadData = function(url) 
{
var url = URISetParameter(url, 'XMLHttpRequest', 'true');
buffer.xml.open('GET', url, true);


buffer.xml.onreadystatechange = function() {
if (buffer.xml.readyState==4) {
    
var action = contextAction(url);
var content = buffer.xml.responseText;
if( content.indexOf(action)>-1 ) {
rewrite(action);
} else {
content = content.replace(/\n/g, '');
content = content.replace(/.*<meta http-equiv="Refresh" content="/i, '');
content = content.replace(/".*/i, '');
var delay = Math.ceil(content);
if( delay!='NaN' && delay>0 ) { delay = delay*1000; }
else { delay = 5000; }
setTimeout(function(){buffer.loadData(url);}, delay);
}
}
}

if(document.cookie != '') {
buffer.xml.setRequestHeader('Cookie', document.cookie);
}
buffer.xml.send(null);
}

if (!buffer.xml && typeof XMLHttpRequest!='undefined') {
buffer.xml = new XMLHttpRequest();
}
}

if (!buffer.xml) {
var name = document.getUniqueId ();
try {
var iframe = document.createElement ("iframe");
iframe.style.width = 0;
iframe.style.height = 0;
iframe.style.border = 0;

document.getElementsByTagName ("body").item (0).appendChild (iframe);
buffer.iframe = iframe;
buffer.iframe.setAttribute ("name", name);
buffer.iframe.setAttribute ("id", name);

if (typeof buffer.iframe.location == "undefined") {
buffer.iframe = frames[frames.length - 1];
buffer.iframe.name = name;
buffer.iframe.id = name;
}
} catch (exception) {
/* intended to be IE5-only section - the browser that cannot append an iframe*/
var iframeHTML = '<iframe name="'+name+'" id="'+name+'" style="width:0;height:0;border:0"></iframe>';
document.getElementsByTagName ("body").item (0).insertAdjacentHTML ("beforeEnd", iframeHTML);
buffer.iframe = frames[name];
}

buffer.loadData = function(url) {
buffer.iframe.location = url;
}
}
return buffer;
}


function flush (buffer) {
var content = "";

if(buffer.xml) {
content = buffer.xml.responseText;
} else if (typeof buffer.iframe.contentDocument != "undefined") {
content = buffer.iframe.contentDocument.body.innerHTML;
content = content.replace( /\\"/g, "&quot;" )
buffer.iframe.contentDocument.body.innerHTML = "";
} else if (typeof buffer.iframe.contentWindow != "undefined") {
content = buffer.iframe.contentWindow.document.body.innerHTML;
buffer.iframe.contentWindow.document.body.innerHTML = "";
} else if (typeof buffer.iframe.document!="undefined") {
content = buffer.iframe.document.body.innerHTML;
buffer.iframe.document.body.innerHTML = "";
}
var patern = new RegExp( '<!-- .+ -->', 'g' );
content = content.replace( patern, '' );
return content;
}

function flipPage(panel_id, page){
pagePanel = document.getElementById(panel_id);
pageBuffer = createBuffer (true);
URIPage = URISetParameter (URIPage, "page", page);
pageBuffer.loadData(URIPage);
}

function initCategories()
{
categoriesWhere = document.getElementById ("chCat");
categoriesWhere.innerHTML = loading;
categoriesBuffer = createBuffer (true);
/*URICategories = URISetParameter( URICategories, 'cid', cid );for pos must be commented*/
URICategories = URISetParameter (URICategories, "lang", lang);
categoriesBuffer.loadData(URICategories);
}

function initPos()
{
posContent = document.getElementById ("posContent");
setTimeout(tree + '.GenerateHoverPopups()',1000);
}

function clearAll()
{
var cidVal = document.getElementById(cidValueField);
cidVal.value = "";
cid = 0;
URICategories = URISetParameter( URICategories, 'cid', cid );
initCategories();
}

function replaceContent(sbjUrl)
{
posBuffer = createBuffer (true);
URIPosContent = URISetParameter (URIPosContent, "sbj", sbjUrl);
URIPosContent = URISetParameter (URIPosContent, "rg", regUrl);
URIPosContent = URISetParameter (URIPosContent, "tp", tpUrl);
URIPosContent = URISetParameter (URIPosContent, "lang", lang);

URIPage = URISetParameter (URIPage, "sbj", sbjUrl);
URIPage = URISetParameter (URIPage, "rg", regUrl);
URIPage = URISetParameter (URIPage, "tp", tpUrl);
URIPage = URISetParameter (URIPage, "lang", lang);

posContent.innerHTML = loading;
window.status = "";

posBuffer.loadData(URIPosContent);
}

function trim(stringToTrim) {
return stringToTrim.replace(/^\s+|\s+$/g,"");
}

/* Posluga splitter */
var MIN_WIDTH = 100;
var MAX_WIDTH = 350;
var OFFSET_X=7;

var startX;

var pos_browser_agt=(navigator==null||navigator.userAgent==null)?'':navigator.userAgent.toLowerCase();
var pos_browser_app=(navigator==null||navigator.appVersion==null)?'':navigator.appVersion;
var pos_browser_major=parseInt(pos_browser_app);
var pos_browser_opera=pos_browser_agt.indexOf('opera')!=-1;
var pos_browser_ie=!pos_browser_opera&&(pos_browser_agt.indexOf('msie')!=-1);

function qzAfw(qzgx){return 100;};
function qzAfx(qzgx){return 100;};

var resizingOffset=0;
var resizingObj;
var resizeDragObject;


function qzff(qzbc){
if(qzbc){
if(cart_browser_ie){
qzbc.removeNode(true);
}else{
qzbc.parentNode.removeChild(qzbc);
};
};
};

function nodeSelect(node){
var adv=document.getElementById("adv");
if (adv)
adv.style.display='none';
replaceContent(node.GetProperty('Value'));
setTimeout(tree + '.GenerateHoverPopups()',1000);
}

function curX(qzim){return pos_browser_ie?event.clientX+(document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft):qzim.pageX;}

function startResize(qzim,qzgx,id){
ComponentArt_CancelEvent(qzim);
resizingObj=document.getElementById(id);

//resizingObj = domObj;
startX = curX(qzim);

resizeDragObject=document.createElement('table');
resizeDragObject.cellSpacing=0;
var tb=document.createElement('tbody');
resizeDragObject.appendChild(tb);
var tr=document.createElement('tr');
tb.appendChild(tr);
var td=document.createElement('td');
tr.appendChild(td);
var div=document.createElement('div');
div.className="ActiveSplitterBar";
div.style.width=qzgx.offsetWidth+'px';
div.style.height=qzgx.offsetHeight+'px';
div.style.overflow='hidden';
td.appendChild(div);
resizeDragObject.style.position='absolute';
resizeDragObject.style.cursor=qzgx.style.cursor;
resizeDragObject.style.top=qzAfw(qzgx)+'px';
resizeDragObject.style.left=qzAfx(qzgx)+'px';

document.body.insertBefore(resizeDragObject,document.body.firstChild);

document.onmousemove=resizeHandler;
document.onmouseup=resizeDone;
return false;
}

function resizeHandler(qzim){
ComponentArt_CancelEvent(qzim);
var off = getposOffset(treeHolder, "left")+OFFSET_X;
var qzp=curX(qzim)-off;
if(qzp<MIN_WIDTH){
qzp=MIN_WIDTH;
}else if(qzp>MAX_WIDTH){
qzp=MAX_WIDTH;
};
if (resizeDragObject){
resizeDragObject.style.left=qzp+off-OFFSET_X+'px';
}
}

function resizeDone(qzim,qzgx){
var qzp=curX(qzim)- getposOffset(treeHolder, "left")-OFFSET_X ;
if(qzp<MIN_WIDTH){
qzp=MIN_WIDTH;
}else if(qzp>MAX_WIDTH){
qzp=MAX_WIDTH;
};
resizingObj.style.width = qzp+ 'px';
qzff(resizeDragObject);
resizeDragObject=null;
document.onmousemove=null;
document.onmouseup=null;

return false;
}

/* encodeToURI
** encodes text to URI standard
*/
function utf8(wide) {
var c, s;
var enc = '';
var i = 0;
while( i<wide.length ) {
c= wide.charCodeAt(i++);
/* handle UTF-16 surrogates*/
if( c>=0xDC00 && c<0xE000 ) { continue;
}
if( c>=0xD800 && c<0xDC00 ) {
if( i>=wide.length ) { continue;
}
s = wide.charCodeAt(i++);
if( s<0xDC00 || c>=0xDE00 ) { continue;
}
c = ((c-0xD800)<<10)+(s-0xDC00)+0x10000;
}
/* output value*/
if( c<0x80 ) { enc += String.fromCharCode(c);
} else if( c<0x800 ) { enc += String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F));
} else if( c<0x10000 ) { enc += String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F));
} else { enc += String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F));
}
}
return enc;
}

var hexchars = "0123456789ABCDEF";

function toHex(n) {
return hexchars.charAt(n>>4)+hexchars.charAt(n & 0xF);
}

var okURIchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";

function encodeURIComponentNew(s) {
var s = utf8(s);
var c;
var enc = '';
for (var i= 0; i<s.length; i++) {
if (okURIchars.indexOf(s.charAt(i))==-1) {
enc += '%'+toHex(s.charCodeAt(i));
} else {
enc += s.charAt(i);
}
}
return enc;
}
function encodeToURI(text) {
if( text=='' ) { 
return text;
}
var encodedText = '';
if( typeof encodeURIComponent!='undefined' && encodeURIComponent!=null ) {
encodedText = encodeURIComponent(text);
} else if( typeof encodeURI!='undefined' && encodeURI!=null ) {
encodedText = encodeURI(text);
} else {
/* Need to mimic the JavaScript version
 Netscape 4 and IE 4 and IE 5.0*/
encodedText = encodeURIComponentNew(text);
}
return encodedText;
}
/* encodeToURI
** END
*/
/* Search */
function redirectTo(obj, searchCtrl, where, logic) {
obj.disabled=true;
var search = document.getElementById(searchCtrl);
if (null == search)
return;
var keywords = trim(search.value).toLowerCase();
keywords = keywords.replace( /[^a-z0-9_à-ÿ¸³º¿´]+/ig, ' ' );
keywords = keywords.replace( /\s[^\s]{1,2}\s/ig, ' ' );
keywords = keywords.replace( /(\s+)/ig, '_' );

if (keywords.length > 0){
var newUrl = mainURL + "search/" + encodeToURI(keywords) + ".aspx";
if (!where){
var app = document.getElementById("appsearch");
if (app != null && app.value != "")
newUrl = URISetParameter (newUrl, "app", app.value);
}else{
newUrl = URISetParameter (newUrl, "app", where);
}
if (!logic){
var logicAnd = document.getElementById("searchLogicAnd");
if (logicAnd != null && logicAnd.checked)
newUrl = URISetParameter (newUrl, "logic", "and");
}else{
newUrl = URISetParameter (newUrl, "logic", "and");
}
window.location.href = newUrl;
}
}
function keyDownDefaultBtn(event, btnCtrl){
if (event.keyCode == 13){
event.returnValue = false;
event.cancel = true;
var btn = document.getElementById(btnCtrl);
if (btn)
btn.click();
}
}

var extendedVisible = false;
function hideShowExt(){
extendedVisible = !extendedVisible;
if (extendedVisible){
document.getElementById('hideShowBtn').innerHTML = searchBrief;
document.getElementById('hideShowBtn').className = "searchHide";
document.getElementById('extended').style.display = 'block';
}
else{
document.getElementById('hideShowBtn').innerHTML = searchDetailed;
document.getElementById('hideShowBtn').className = "searchShow";
document.getElementById('extended').style.display = 'none';
}
}


imgout=new Image(13,13);
imgin=new Image(13,13);

imgout.src="/Themes/pos/images/rep/expand.jpg";
imgin.src="/Themes/pos/images/rep/collapse.jpg";


function filter(imagename,objectsrc, txtAlt){
if (document.images){
document.images[imagename].src=eval(objectsrc+".src");
document.images[imagename].alt=txtAlt;
}
}

//show OR hide funtion depends on if element is shown or hidden
function showhide(block_id, hint_id, img_id, txtExpand, txtCollapse, cookieKey) { 

if (document.getElementById) { // DOM3 = IE5, NS6
if (document.getElementById(block_id).style.display == "none"){
document.getElementById(block_id).style.display = 'block';
filter((img_id),'imgin',txtCollapse);
hint = document.getElementById(hint_id);
if (typeof(hint) != 'undefined')
hint.innerHTML = '(' + txtCollapse + ')';
setCookie( cookieKey, "");
} else {
filter((img_id),'imgout',txtExpand);
document.getElementById(block_id).style.display = 'none';
hint = document.getElementById(hint_id);
if (typeof(hint) != 'undefined')
hint.innerHTML = '(' + txtExpand+  ')';
setCookie( cookieKey, "collapsed");
}
} else { 
if (document.layers) {
if (document.block_id.display == "none"){
document.block_id.display = 'block';
filter((img_id),'imgin',txtCollapse);
setCookie( cookieKey, "");
} else {
filter((img_id),'imgout',txtExpand);
document.block_id.display = 'none';
setCookie( cookieKey, "collapsed");
}
} else {
if (document.all.block_id.style.visibility == "none"){
document.all.block_id.style.display = 'block';
setCookie( cookieKey, "");
} else {
filter((img_id),'imgout',txtExpand, txtCollapse);
document.all.block_id.style.display = 'none';
setCookie( cookieKey, "collapsed");
}
}
}
}
