         function MM_openBrWindow(theURL,winName,features) 
         {
         	var a=Math.random();
           window.open(theURL,winName,features);
         }

         function GetById(id)
         {

           if(document.getElementById)
           {
             return document.getElementById(id);
           }
           if(document.All)
           {
             return document.All[id];
           }
           return document.Layers[id];
         }




         function SetCookie(name, value, expire, path) {
           document.cookie = name + "=" + escape(value) + ((!expire) ? "" : ("; expires=" + expire.toGMTString())) + "; path=/";
         }

         function GetCookie(name) {
           var value=null, search=name+"=";
           if (document.cookie.length > 0) {
             var offset = document.cookie.indexOf(search);
             if (offset != -1) {
               offset += search.length;
               var end = document.cookie.indexOf(";", offset);
               if (end == -1) end = document.cookie.length;
               value = unescape(document.cookie.substring(offset, end));
             }
           }
           return value;
         }
              
        function getElementPosition(el){ 
          var left=0;
          var top=0;
          var o=el;
          
          do{
            left+=o.offsetLeft;
            top+=o.offsetTop;
          }while(o=o.offsetParent);
         
          return [left, top];
        }


        function getBody(){
          
          if(window.document.body){
            return window.document.body;
          }else{
            return w.document.documentElement;
          }
        }

        function getWindowWidth(){
          var bd=getBody();
          if(bd.clientWidth) return bd.clientWidth;
          	else
          	 return w.innerWidth;
        }


        function getWindowHeight(){
          var bd=getBody();

          if(bd.clientHeight) return bd.clientHeight;
          	else
        	  	return window.innerHeight;
        }
        
        function getElementWidth(el){
          
          if(el.offsetWidth) return el.offsetWidth
          if(el.css) return this.css.pixelWidth
        	return 200;
        }

        function getElementHeight(el){
         
          if(el.offsetHeight) return el.offsetHeight;
          if(el.css) return el.css.pixelHeight;
          return 300;
        }
              
