 //function SymError() {  window.defaultStatus="with error";  return true;  } window.onerror = SymError;
 if (document.layers) { ie = true; document.all = document.layers; } else { ie = false; }
 if( self != top ) { top.location.href=this.location; } else {}

 function bookmark() { window.external.AddFavorite( this.location, document.title ); }
 function IsInputField() { switch( event.srcElement.tagName ) { 
    case "INPUT": if(event.srcElement.type == "text") { return true; } break; 
    case "SELECT": return true; break; case "A": return true; break; case "TEXTAREA": return true; break; 
    default: return false; break; } return false; }
 function NoMenu() {    if(event.ctrlKey) { return true; } if( IsInputField() == false) { SmthngCansel(); } return true; }
 function SmthngCansel() { if(window.event) { window.event.cancelBubble = true; window.event.returnValue = false; } else { } return false;  }

 window.onload = MyOnLoad; 

 function MyOnLoad() { 
             void(0); 
             if(document.getElementById('imaclock')) { MyClock();  } else { }
             OpeClo( MySelectForOpen() ); 
             MySetSelectedRed();
             return true;
                     }

function MySetSelectedRed() {
                ix =  MyGetLocation(); 
                id = ('idmenu_'+ix);
                if( da = document.getElementById( id ) ) {
                   if(da.className=="mainmenu2") {
                        if( da2 = da.parentNode ) {
                          if( da2.tagName == "DIV" ) {
                            if( da3 = da2.parentNode ) {
                               if( da3.tagName == "TD" ) {
                                    for(i=0;i<da3.childNodes.length;i++) {
                                      if(da2 == da3.childNodes[i]) {
                                          ix = i-2;
                                          if(da3.childNodes[ix].tagName && da3.childNodes[ix].tagName!="A" && ix>1) {
                                            da3.childNodes[(ix)].className+='1';
                                          } else {
                                            void(0);
                                          }
                                      } else {}
                                    }
                               } else { }
                            } else { }                             
                          } else { }
                        } else { }
                   } else {
                   }
                   da.className+='1';
                } else {
                   id = ('idmenu_'+ix+'_1');
                   if( da = document.getElementById( id ) ) {
                      da.className+='1';                      
                   } else {
                      da = false;
                   }
                }
                return da;
                }

function MyGetLocation() {
                  srchdvar = "id";
                  da = window.top.location.href; 
                  da = da.toLowerCase();
                  srchdvar = srchdvar.toLowerCase();
                  da = da.substring( (da.lastIndexOf( (srchdvar+'=') )+(srchdvar.length+1)));
                  if( da.indexOf('&') >0 )  {
                    da = da.substring(0, (da.indexOf('&')));
                  } else { } 
                return da;
                }

function MySelectForOpen() { 
                  da = false; 
                  la = MyGetLocation();
                  la1 = "idmenu_"+la; 
                  if( da = document.getElementById(la1) ) {
                     da = document.getElementById(la1);
                  } else {
                    la1 = "idmenu_"+la+"_1"; 
                    if( da = document.getElementById(la1) ) {
                       da = document.getElementById(la1);
                    } else {
                       da=false;                    
                    }                    
                  }

                  if(da) {
                     if(da.parentNode && da.parentNode.tagName && da.parentNode.tagName == "DIV" && da.parentNode.id) {
                         da = da.parentNode.id;
                     } else { 

                       if(da.parentNode && da.parentNode.tagName && da.parentNode.tagName == "TD") {
                           da2 = da.parentNode;
                                    for(i=0;i<da2.childNodes.length;i++) {
                                      if(da == da2.childNodes[i]) {
                                         if( (i+2)< da2.childNodes.length ) {
                                             ix = i+2;
                                         } else {
                                             if( (i+1)< da2.childNodes.length ) {
                                                 ix = i+1;
                                             } else {
                                                 ix = i;
                                             }
                                         }
                                         if( da2.childNodes[ix].tagName && da2.childNodes[ix].tagName=="DIV" ) {
                                          da3 = da2.childNodes[ix].id;  break;
                                         } else {
                                          da3 = false; 
                                         }
                                      } else { da3 = false; } 
                                    } 
                                    da = da3; 
                       } else { }
                     }
                  } else { }
                  return da;
                }

 function MyClock() {
   var date = new Date(); 
   var hr = date.getHours();
   var mi = date.getMinutes();
   if(mi<10) { mi = "0"+mi; } else {}
   document.getElementById('imaclock').innerHTML = hr+":"+mi; 
   setTimeout( "MyClock()", 6000); 
   return true; 
 }


 function addBookmark(url,title) {
 if (!url) url = location.href;
 if (!title) title = document.title;

 if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel(title, url, "");
 else if (typeof window.external == "object") window.external.AddFavorite(url, title);
 else if (window.opera && document.createElement)
 {
   var a = document.createElement('A');
   if (!a) return false;
   a.setAttribute('rel','sidebar');
   a.setAttribute('href',url);
   a.setAttribute('title',title);
   a.click();
 }
 else return false;
 
 return true;
 }


 function OpeClo(obj) {
   if(obj) {
    if(obj=document.getElementById(obj)) {
        if(obj.style.display=='none') {
            obj.style.display = ""; 
        } else {
            obj.style.display = "none"; 
        }
    } else { return SmthngCansel(); }
   } else { return SmthngCansel(); }
 }
 