String.prototype.trim = function () {var reExtraSpace = /^\s+(.*?)\s+$/;return this.replace(reExtraSpace, "$1");};function menuCreator(menuShowerID,subMenuID,direction) {var menuShower=$m(menuShowerID);var subMenu=$m(subMenuID);
menuCreator2(menuShower,subMenu,direction);}function menuCreator2(menuShower,subMenu,direction) {menuShower.style.position='relative';subMenu.style.visibility='hidden';subMenu.style.position='absolute';subMenu.style.display='';
subMenu.style.zIndex='1000';subMenu.style.top='0px';subMenu.style.left='0px';if(direction=='right'){subMenu.style.left=menuShower.style.width;}else if(direction=='down'){subMenu.style.top=menuShower.style.height;}else if(direction=='left'){
subMenu.style.left='-'+subMenu.style.width;}else if(direction=='up'){subMenu.style.top='-'+subMenu.style.height;}if(subMenu.parentNode){ subMenu.parentNode.removeChild(subMenu);}menuShower.appendChild(subMenu);menuShower.onmouseover=function (){ subMenu.style.visibility='visible';};
menuShower.onmouseout=function (){ subMenu.style.visibility='hidden';};}function menuCreator3(menuShower,subMenu,direction) {menuShower.style.position='relative';subMenu.style.position='absolute';subMenu.style.left='0px';if(direction=='right'){
subMenu.style.left=menuShower.style.width;}else if(direction=='down'){subMenu.style.top=menuShower.style.height;}else if(direction=='left'){subMenu.style.left='-'+subMenu.style.width;}else if(direction=='up'){subMenu.style.top='-'+subMenu.style.height;
}if(subMenu.parentNode){ subMenu.parentNode.removeChild(subMenu);}menuShower.appendChild(subMenu);menuShower.onmouseover=function (){ subMenu.style.visibility='visible'; this.style.textDecoration='underline';};menuShower.onmouseout=function (){ subMenu.style.visibility='hidden';this.style.textDecoration='none';};
}function CreateListWordList(IDobj,result,classAll,classOver,fponclick){var obj=$m(IDobj);obj.innerHTML='';arrSource=result.wordList;if(!arrSource){return;}var t=$c('div');obj.appendChild(t);t.innerHTML='<div title="قبلي"  style="width:100%; text-align:center;"><div class="wordlistupbutton"style="width: 12px; height: 7px"></div></div> ';t.onclick=function(){this.nextSibling.onclick();};
t.className='wordlistupall';if(classOver)t.onmouseover=function(){this.className=classOver;};t.onmouseout=function(){this.className='wordlistupall';};for(i=0;i<arrSource.length;i++){var ts=arrSource[i]; ts=' '+ts+' '; arrSource[i]=ts.trim();var t=$c('div');
obj.appendChild(t);if(arrSource[i].toLowerCase()==result.wordAround.toLowerCase() ){t.className='wordlistactiveword';}else if(classAll)t.className=classAll;if(classOver)t.onmouseover=function(){if(this.className!='wordlistactiveword') this.className=classOver;};if(classAll)t.onmouseout=function(){if(this.className!='wordlistactiveword')this.className=classAll;};
if(fponclick){t.onclick=fponclick;}t.lang=result.lang;t.innerHTML=arrSource[i];}var t=$c('div');obj.appendChild(t);t.innerHTML='<div   title="بعدي" style="width:100%; text-align:center;"><div class="wordlistdownbutton"style="width: 12px; height: 7px"></div></div> ';t.onclick=function(){this.previousSibling.onclick();};
t.className='wordlistdownall';if(classOver)t.onmouseover=function(){this.className=classOver;};t.onmouseout=function(){this.className='wordlistdownall';};}
