var dragstarted=false;var currentX=0;var currentY=0;var writing=false;var zindexcount=1;var activeMenu;clipboard=new Object;clipboard.from=false;clipboard.to=false;clipboard.items=new Array;var clipboardAction='copy';var upload2share=false;clipboard.fromuid=false;preloaded=new Array;var dragListBuilded=false;function getById(id){
obj=document.getElementById(id);if(!obj){
//alert('Object '+id+' cannot be found.');return false;
}else{
return obj;
}
}
function fireFoxURL(){
if(is.NS){
return document.location.href+'/';
}else{
return '';
}
}
function BrowserCheck(){
var ua=navigator.userAgent.toLowerCase();this.Opera=ua.indexOf("opera")!=-1;this.IE=(!this.Opera && (ua.indexOf("msie")!=-1));this.NS=(!this.Opera && (ua.indexOf("mozilla")!=-1) && (ua.indexOf("compatible")==-1));if(this.Opera){
this.what='Opera';
} else if(this.IE){
this.what='IE';
} else if(this.NS){
this.what='NS';
} 
}
is=new BrowserCheck();function preloadImg(src){
index=preloaded.length;preloaded[index]=new Image();preloaded[index].src=src;
}
function imageReloadSrc(){
this.src=this.src;
}
if(is.NS){
document.captureEvents(Event.MOUSEMOVE);
}
function cancelBubble(e){
if(is.IE){
eveniment=window.event;e.returnValue=false;event.cancelBubble=true;
}else{
e.stopPropagation();
}
}
function getScrollLeft(){
if(window.pageXOffset!=null){
scroll_left=window.pageXOffset;
}
if(document.body.scrollHeight!=null){
scroll_left=document.body.scrollLeft;
}
return scroll_left;
}
function getScrollTop(){
if(window.pageYOffset!=null){
scroll_top=window.pageYOffset;
}
if(document.body.scrollWidth!=null){
scroll_top=document.body.scrollTop;
}
return scroll_top;
}
function getX(event){
return event.clientX+getScrollLeft();
}
function getY(event){
return event.clientY+getScrollTop();
}
function getBodyH(){
return ((is.NS)?document.body.clientHeight:document.body.offsetHeight);
}
function getBodyW(){
return ((is.NS)?document.body.clientWidth:document.body.offsetWidth);
}
function newHiddenIframe(id){
el=document.createElement('IFRAME');el.name=id;el.id=id;el.src='';AfianHandler.iframesContainer.appendChild(el);return el;
}
function formatFileSize(filesize){
if(filesize >= 1024 && filesize < 1048576){
filesize=filesize/1024;dotpos=filesize.toString().indexOf(".");if(dotpos==-1){
dotpos=filesize.toString().length;
}
filesize=filesize.toString().substring(0,dotpos+2);filesize += " KB";
} else if(filesize >= 1048576){
filesize=(filesize/1024)/1024;dotpos=filesize.toString().indexOf(".");if(dotpos==-1){
dotpos=filesize.toString().length;
}
filesize=filesize.toString().substring(0,dotpos+2);filesize += " MB";
} else if(filesize > 0){
filesize=filesize;filesize += " Bytes";
}else{
filesize="0 Bytes";
}
return filesize;
}
Array.prototype.has4ValidElms=function(){
count=0;for (var i=0 ;i < this.length;i++){
if(this[i]!=undefined){
count++;
}
}
if(count > 3){
return true;
}else{
return false;
}
};function gluePath(pieces){
path='';for (var i=0 ;i < pieces.length;i++){
pieces[i]=addSingleSlashess(pieces[i]);if(path.substring(path.length-1, path.length)=='/'){
if(pieces[i].substring(0, 1)=='/'){
path += pieces[i].substring(1, pieces[i].length);
}else{
path += pieces[i];
}
}else{
if(pieces[i].substring(0, 1)!='/'){
if(pieces[i].length > 0){
path += '/'+pieces[i];
}else{
path += pieces[i];
}
}else{
path += pieces[i];
}
}
}
return path;
}
function addSingleSlashess(str){
return str.replace("\\","").replace("\'","\\\'");
}
function insertHTMLBeforeEnd (el, sHTML){
if(el.insertAdjacentHTML!=null){
el.insertAdjacentHTML("BeforeEnd", sHTML)
return;
}
var r=el.ownerDocument.createRange();r.selectNodeContents(el);r.collapse(false);df=r.createContextualFragment(sHTML);el.appendChild(df);
}
function isLegalFilename(filename){
bad=new Array;bad[0]="\\";bad[1]="/";bad[2]=":";bad[3]="*";bad[4]="?";bad[5]="<";bad[6]=">";bad[7]="|";bad[7]="\"";for (var i=0;i < bad.length ;i++){
if(filename.indexOf(bad[i])!=-1){
return false;
}
}
return true;
}
function debugLog(str){
debugWindow.document.write(str);debugWindow.document.write('<br>');
}
function popup(url, name, height, width, scrollbars){
var popwin;var opts="toolbar=no,status=yes,location=no,menubar=no,resizable=yes";opts += ",height=" + height + ",width=" + width + ",top="+(((screen.height/2)-height/2)-20)+",left=" + ((screen.width/2)-width/2) + ",scrollbars=" + scrollbars;popwin=window.open("", ''+name+'', opts);if(popwin){
popwin.location.replace(url);popwin.focus();
}
return popwin;
}
selectableTags=["input", "textarea", "select"];function disableselect(e){
if(is.IE){
target=event.srcElement;
}else{
target=e.target;
}
if(target.getAttribute('selectable')){
return true;
}else{
if(inArray(selectableTags, target.tagName.toLowerCase())){
return true;
}else{
return false;
}
}
}
function inArray(arr, needle){
for (var i=0 ;i < arr.length;i++){
if(arr[i]==needle){
return true;
}
}
return false;
}
if(window.name=='AfianMainWindow'){
if(typeof document.onselectstart!="undefined"){
document.onselectstart=disableselect;
}else{
document.onmousedown=disableselect;document.onmouseup=function(){return true;};
}
}
/* COOKIES */
function setCookie(key, value){
document.cookie=key + "=" + escape(value);
}
function getCookie(key){
if(document.cookie){
var start=document.cookie.indexOf(' ' + key + '=');if(start==-1){
return null;
}
var end=document.cookie.indexOf(";", start);if(end==-1){
end=document.cookie.length;
}
end -= start;var cookie=document.cookie.substr(start,end);return unescape(cookie.substr(cookie.indexOf('=') + 1, cookie.length - cookie.indexOf('=') + 1));
}else{
return null;
}
}
/* END COOKIES */


document.onload=function(){
var imgdir='images/interface/';preloadImg(imgdir+'popmenu/sp-bottom-bg.gif');preloadImg(imgdir+'popmenu/sp-bottom-left.gif');preloadImg(imgdir+'popmenu/sp-bottom-right.gif');preloadImg(imgdir+'popmenu/sp-left.gif');preloadImg(imgdir+'popmenu/sp-right.gif');preloadImg(imgdir+'popmenu/sp-titlebar2-top-bg.gif');preloadImg(imgdir+'popmenu/sp-titlebar2-top-left.gif');preloadImg(imgdir+'popmenu/sp-titlebar2-top-right.gif');preloadImg(imgdir+'popmenu/sp-titlebar-top-bg.gif');preloadImg(imgdir+'popmenu/sp-titlebar-top-left.gif');preloadImg(imgdir+'popmenu/sp-titlebar-top-right.gif');preloadImg(imgdir+'hourglass.gif');preloadImg(imgdir+'dropdown-dot.gif');preloadImg(imgdir+'iconbg.gif');
};function clipSelected(){
clipboard.items.length=0;clipboard.fromtabid=AfianHandler.activeTab.id;clipboard.fromtabbasepath=AfianHandler.activeTab.basepath;if(AfianHandler.activeTab.uid){
clipboard.fromuid=AfianHandler.activeTab.uid;
}
for (var i=0 ;i < AfianHandler.activeTab.items.length;i++){
if(AfianHandler.activeTab.items[i]!=undefined){
if(AfianHandler.activeTab.items[i].selected){
clipboard.items[clipboard.items.length]=AfianHandler.activeTab.items[i].input_value;
}
}
}
if(AfianHandler.activeTab.section!='browseshare'){
getById('MyFilesPasteButton').style.visibility='visible';
}else{
getById('BSharePasteButton').style.visibility='visible';
}
AfianHandler.activeTab.unselectAll();
}
function resetClipboard(){
clipboard.from=false;clipboard.to=false;clipboard.items=new Array;clipboard.length=0;clipboardAction='copy';clipboard.fromuid=false;
}
function fillHiddenFormItemList(){
document.hiddenForm.itemlist.value='';for (var i=0 ;i < AfianHandler.activeTab.items.length;i++){
if(AfianHandler.activeTab.items[i]!=undefined){
if(AfianHandler.activeTab.items[i].selected){
document.hiddenForm.itemlist.value += '|'+encodeURIComponent(AfianHandler.activeTab.items[i].input_value);
}
}
}
}
function showMenu(menuId){
if(activeMenu){
hideMenu(activeMenu);
}
meniu=getById(menuId);scroll_left=getScrollLeft();scroll_top=getScrollTop();if(meniu){
var leftPos=parseInt(currentX+20);var topPos=parseInt(currentY+15);if(leftPos+meniu.offsetWidth > getBodyW()+scroll_left-25){
leftPos=leftPos+((getBodyW()+scroll_left)-(leftPos+meniu.offsetWidth+25));
}
if(topPos+meniu.offsetHeight > getBodyH()+scroll_top-10){
topPos=topPos+((getBodyH()+scroll_top)-(topPos+meniu.offsetHeight)-10);
}
meniu.style.visibility='visible';meniu.style.left=leftPos;meniu.style.top=topPos;zindexcount=zindexcount++;meniu.style.zIndex=zindexcount;hideStupidMSIEElements(meniu);if(menuId!='popmenu-alert' && menuId!='popmenu-prompt' && menuId.indexOf('context')==-1){
activeMenu=menuId;
}
}
}
function hideMenu(menuId){
getById(menuId).style.visibility='hidden';showStupidMSIEElements();
}
function centeredMenu(menuId){
if(activeMenu){
hideMenu(activeMenu);
}
scroll_left=getScrollLeft();scroll_top=getScrollTop();meniu=getById(menuId);leftPos=(getBodyW()/2)-(meniu.offsetWidth/2);topPos=(getBodyH()/2)-(meniu.offsetHeight/2);if(meniu.offsetHeight > getBodyH()){
topPos=20;
}
meniu.style.left=leftPos;meniu.style.top=topPos+scroll_top;meniu.style.visibility='visible';zindexcount=zindexcount++;meniu.style.zIndex=zindexcount;hideStupidMSIEElements(meniu);if(menuId!='popmenu-alert' && menuId!='popmenu-prompt'){
activeMenu=menuId;
}
}
function getBreadCrumbs(startHTML, path, endHTML){
str='';splited=path.split('/');pt='';if(splited.length==1){
return path;
}else{
for (var i=0 ;i < splited.length;i++){
pt=gluePath([pt, splited[i]]);str += startHTML+splited[i]+endHTML;str=str.replace(/PATH/g, pt);if(splited[i+1]!=undefined){
if(splited[i+1].substring(0, 1)!='/'){
str += '/';
}
}
}
return str;
}
}
function btnOnMUp(){this.className='button';}
function btnOnMDown(){this.className='pushedbutton';}
function btnOnMOut(){this.className='button';}
function buttonize(){
buttons=document.getElementsByTagName('TABLE');for (var i=0 ;i < buttons.length;i++){
if(buttons[i].className=='button'){
histd=buttons[i];histd.onmouseup=btnOnMUp;histd.onmousedown=btnOnMDown;histd.onmouseout=btnOnMOut;
}
}
}
function styleDisableButton(id){
if(!AfianUserPermissions['ui_has_tree']){
return true;
}
btn=getById(id);if(is.IE){
btn.disabled=true;
}else{
btn.style.color='gray';
}
}
function styleEnableButton(id){
if(!AfianUserPermissions['ui_has_tree']){
return true;
}
btn=getById(id);if(is.IE){
btn.disabled=false;
}else{
btn.style.color='black';
}
}
function toggleView(how){
if(AfianHandler.activeTab.section=='browseshare'){
postfix='-bshare';
}else{
postfix='';
}
iBtn=getById('iconBtn'+postfix);lBtn=getById('listBtn'+postfix);tBtn=getById('thumbBtn'+postfix);if(how=='icons'){
iBtn.className='viewModeSelected';lBtn.className='viewMode';tBtn.className='viewMode';
} else if(how=='list'){
iBtn.className='viewMode';lBtn.className='viewModeSelected';tBtn.className='viewMode';
}else{
iBtn.className='viewMode';lBtn.className='viewMode';tBtn.className='viewModeSelected';
}
}
function changeView(how){
tb=AfianHandler.activeTab;tb.viewMode=how;tb.destroyItems();tb.buildItems();tb.showItems();setCookie('AfianViewMode', how);
}
afian_submenus=new Array;function Afian_SubMenu(menuid, left, top){
this.obj=getById(menuid);afian_submenus[menuid]=this;this.obj.onmouseover= new Function('Afian_SubMenu.Pause(\''+menuid+'\')');this.obj.onmouseout= new Function('Afian_SubMenu.Out(\''+menuid+'\')');this.obj.onclick= new Function('Afian_SubMenu.Out(\''+menuid+'\')');this.obj.onfocus=new Function('blur()');
}
Afian_SubMenu.Over=function(menuid, left, top){
if(!afian_submenus[menuid].draw){
clearTimeout(afian_submenus[menuid].stopTimer);afian_submenus[menuid].startTimer=setTimeout('Afian_SubMenu.Draw(\''+menuid+'\', \''+left+'\', \''+top+'\')', '0');
}else{
Afian_SubMenu.Pause(menuid);
}
if(Afian_SubMenu.activeMenuId!=menuid && Afian_SubMenu.activeMenuId!=undefined){
Afian_SubMenu.Hide(Afian_SubMenu.activeMenuId);
}
}
Afian_SubMenu.Draw=function(menuid, left, top){
afian_submenus[menuid].draw=true;menu=afian_submenus[menuid].obj;menu.style.left=left;menu.style.top=top;menu.style.display='block';zindexcount++;getById('afian_hmenu').style.zIndex=zindexcount;Afian_SubMenu.activeMenuId=menuid;
}
Afian_SubMenu.Out=function(menuid){
clearTimeout(afian_submenus[menuid].startTimer);afian_submenus[menuid].stopTimer=setTimeout('Afian_SubMenu.Hide(\''+menuid+'\')', 100);
}
Afian_SubMenu.Hide=function(menuid){
menu=afian_submenus[menuid].obj;menu.style.display='none';afian_submenus[menuid].draw=false;
}
Afian_SubMenu.Pause=function(menuid){
clearTimeout(afian_submenus[menuid].stopTimer);
}
function fileNameExists(name){
for (var i=0;i < AfianHandler.activeTab.items.length;i++){
if(AfianHandler.activeTab.items[i]!=undefined){
if(AfianHandler.activeTab.items[i].icon_title==name){
return true;
}
}
}
return false;
}
function makeDragable(objid){
Drag.init(getById(objid),null);
}
function titleDrag(objid){
Drag.init(getById('popmenu-titlebar-'+objid), getById('popmenu-'+objid));
}
function makePopMenu(id){
tp=getById('popmenu-top-'+id);mid=getById('popmenu-middle-'+id);bot=getById('popmenu-bottom-'+id);content=popMenuTemplate.replace('POPM_TOP', tp.innerHTML);content=content.replace('POPM_MIDDLE', mid.innerHTML);content=content.replace('POPM_BOTTOM', bot.innerHTML);content=content.replace('POPM_ID', 'popmenu-titlebar-'+id);getById('popmenu-'+id).innerHTML=content;tp.innerHTML='';mid.innerHTML='';bot.innerHTML='';
}
function AfianAlert(str){
getById('popmenu-alert-message').innerHTML=str;centeredMenu('popmenu-alert');
}
function AfianPrompt(str, buttons){
getById('popmenu-prompt-message').innerHTML=str;str='';for (var i=0 ;i < buttons.length;i++){
str += '<td><table cellspacing="0" cellpadding="0" class="button" onclick="javascript:'+buttons[i]['onclick']+'"><tr><td align="center">'+buttons[i]['title']+'</td></tr></table></td>';
}
getById('popmenu-prompt-buttons').innerHTML='<table border="0" cellpadding="1" cellspacing="0"><tr>'+str+'</tr></table>';buttonize();centeredMenu('popmenu-prompt');
}
function addUploadFields(){
if(is.Opera){
AfianAlert('Opera browser does not support this feature.');
}else{
tr=document.createElement('TR');td=document.createElement('TD');td.innerHTML='<input type="file" name="uploadfiles[]" class="inputfile" onFocus="javascript:writing=true;" onBlur="javascript:writing=false;" name="upload_extra_fileds[]">';tr.appendChild(td);getById('afian_upload_fields').appendChild(tr);
}
}
function msg(type, simplealert){
if(simplealert){
fnc=alert;
}else{
fnc=AfianAlert;
}
if(type=='noperm'){
fnc('You are not allowed to perform this operation');
} else if(type=='nospace'){
fnc('Not enough space');
} else if(type=='notraffic'){
fnc('Traffic quota exceeded');
}else{
fnc('Option unavailable');
}
}
function setQuotaIndicators (wich, curr, quota){
prefix=(wich=='space')?'space':'traffic';proc=Math.round((curr*100)/quota);getById(prefix+'_curr').style.width=proc+'%';getById(prefix+'_curr_num').innerHTML=formatFileSize(curr);getById(prefix+'_quota_num').innerHTML=formatFileSize(quota);getById(prefix+'_txt').style.color= (curr >= quota)?'red':'dimgray';
}
function AdminLoadCalendar(uid){
cali=getById('califrame');cali.setAttribute('src', 'javascript:document.write(\'<body style="border:1px solid silver;padding:5px;font-size:11px;font-family: verdana, tahoma, arial, sans-serif;color:#363636;" bgcolor="#E4E4E4">Loading, please wait...</body>\')');window.setTimeout('loadCalendarUID('+uid+')', 500);
}
function loadCalendarUID(uid){
cali.setAttribute('src', '?file=calendar'+((uid)?'&uid='+uid:'')+'');
}
var hideinterval;function AfianBubbleMessage(str, delay){
if(str.length==0){
hidePopupMessage();
}
if(!delay){
delay=2100;
}
if(hideinterval){
window.clearInterval(hideinterval);
}
container=getById('bubbleMessage');container.innerHTML=str;container.style.visibility='visible';hideinterval=window.setInterval('hidePopupMessage()',delay);
}
function hidePopupMessage(){
getById('bubbleMessage').style.visibility='hidden';if(hideinterval){
window.clearInterval(hideinterval);
}
}
function debugMode(how){
ic=document.getElementById('iframesContainer');if(how==false){
ic.style.display='none';
}else{
ic.style.display='block';
}
}
/**************************************************
 * dom-drag.js
 * 09.25.2001
 * www.youngpup.net
 **************************************************/
var Drag={
obj : null,
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
{
o.onmousedown= Drag.start;o.hmode= bSwapHorzRef ? false : true ;o.vmode= bSwapVertRef ? false : true ;o.root=oRoot && oRoot!=null ? oRoot : o ;if(o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left="0px";if(o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top="0px";if(!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right="0px";if(!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom="0px";o.minX= typeof minX!='undefined' ? minX : null;o.minY= typeof minY!='undefined' ? minY : null;o.maxX= typeof maxX!='undefined' ? maxX : null;o.maxY= typeof maxY!='undefined' ? maxY : null;o.xMapper=fXMapper ? fXMapper : null;o.yMapper=fYMapper ? fYMapper : null;o.root.onDragStart= new Function();o.root.onDragEnd= new Function();o.root.onDrag= new Function();o.root.onmouseover=function(){
zindexcount=zindexcount+100;this.style.zIndex=zindexcount;
}
},
start : function(e)
{
if(is.IE){
eveniment=window.event;
}else{
eveniment=e;
}
if(is.IE){
elementul=eveniment.srcElement;
}else{
elementul=eveniment.target;
}
if(elementul.tagName=='A' || elementul.tagName=='INPUT'){
document.onmousemove= null;document.onmouseup= null;return false;
}
var o=Drag.obj=this;e=Drag.fixE(e);var y=parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);var x=parseInt(o.hmode ? o.root.style.left : o.root.style.right );o.root.onDragStart(x, y);o.lastMouseX= e.clientX;o.lastMouseY= e.clientY;if(o.hmode){
if(o.minX!=null)o.minMouseX= e.clientX - x + o.minX;if(o.maxX!=null)o.maxMouseX= o.minMouseX + o.maxX - o.minX;
}else{
if(o.minX!=null) o.maxMouseX=-o.minX + e.clientX + x;if(o.maxX!=null) o.minMouseX=-o.maxX + e.clientX + x;
}
if(o.vmode){
if(o.minY!=null)o.minMouseY= e.clientY - y + o.minY;if(o.maxY!=null)o.maxMouseY= o.minMouseY + o.maxY - o.minY;
}else{
if(o.minY!=null) o.maxMouseY=-o.minY + e.clientY + y;if(o.maxY!=null) o.minMouseY=-o.maxY + e.clientY + y;
}
document.onmousemove= Drag.drag;document.onmouseup= Drag.end;return false;
},
drag : function(e){
e=Drag.fixE(e);var o=Drag.obj;hideStupidMSIEElements(Drag.obj.root);var ey= e.clientY;var ex= e.clientX;var y=parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);var x=parseInt(o.hmode ? o.root.style.left : o.root.style.right );var nx, ny;if(o.minX!=null) ex=o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);if(o.maxX!=null) ex=o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);if(o.minY!=null) ey=o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);if(o.maxY!=null) ey=o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);nx=x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));ny=y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));if(o.xMapper)nx=o.xMapper(y)
else if(o.yMapper)ny=o.yMapper(x)
Drag.obj.root.style[o.hmode ? "left" : "right"]=nx + "px";Drag.obj.root.style[o.vmode ? "top" : "bottom"]=ny + "px";Drag.obj.lastMouseX= ex;Drag.obj.lastMouseY= ey;Drag.obj.root.onDrag(nx, ny, Drag.obj);if(elementul.tagName!="IMG"){ /*MSIE image dragging workaround*/
return false;
}
},
end : function()
{
document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), 
parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]), Drag.obj);Drag.obj=null;
},
fixE : function(e)
{
if(typeof e=='undefined') e=window.event;if(typeof e.layerX=='undefined') e.layerX=e.offsetX;if(typeof e.layerY=='undefined') e.layerY=e.offsetY;return e;
}
};var allDropDownMenus=false;function preloadStupidMSIEElementsPosition(){
allDropDownMenus=document.getElementsByTagName('select');preloadedPositions=new Array;for (var i=0;i < allDropDownMenus.length;i++){
index=preloadedPositions.length;p=getAbsolutePos(allDropDownMenus[i]);preloadedPositions[index]=new Array;preloadedPositions[index]['object']=allDropDownMenus[i];preloadedPositions[index]['x']=p.x;preloadedPositions[index]['y']=p.y;preloadedPositions[index]['h']=allDropDownMenus[i].offsetHeight;preloadedPositions[index]['w']=allDropDownMenus[i].offsetWidth;preloadedPositions[index]['nohide']=allDropDownMenus[i].getAttribute('nohide');
}
}
function prelIsOver(dragElX, dragElY, dragElH, dragElW, i){
targetEl=preloadedPositions[i];if((dragElX > targetEl['x']+targetEl['w']) || (dragElX+dragElW < targetEl['x']) || (dragElY > targetEl['y']+targetEl['h']) || (dragElY+dragElH < targetEl['y'])){
return false;
}else{
if(targetEl['nohide']=="1"){
return false;
}else{
return true;
}
}
}
function getAbsolutePos(el){
var r={ x: el.offsetLeft, y: el.offsetTop };if(el.offsetParent){
var tmp=getAbsolutePos(el.offsetParent);r.x += tmp.x;r.y += tmp.y;
}
return r;
}
/*
function isOver(dragEl,targetEl){
p=getAbsolutePos(dragEl);r=getAbsolutePos(targetEl);dragElX=p.x;dragElY=p.y;targetElX=r.x;targetElY=r.y;if((dragElX > targetElX+targetEl.offsetWidth) || (dragElX+dragEl.offsetWidth < targetElX) || (dragElY > targetElY+targetEl.offsetHeight) || (dragElY+dragEl.offsetHeight < targetElY)){
return false;
}else{
if(targetEl.getAttribute('nohide')=="1"){
return false;
}else{
return true;
}
}
}
*/
function hideStupidMSIEElements(dragEl){
dragElX=dragEl.offsetLeft;dragElY=dragEl.offsetTop;dragElH=dragEl.offsetHeight;dragElW=dragEl.offsetWidth;for (var i=0;i<allDropDownMenus.length;i++){
if(prelIsOver(dragElX,dragElY,dragElH,dragElW,i)) allDropDownMenus[i].style.visibility='hidden';else
allDropDownMenus[i].style.visibility='inherit';
}}
function showStupidMSIEElements(){
for (var i=0;i < allDropDownMenus.length;i ++){
allDropDownMenus[i].style.visibility='inherit';
}
}
