///////disable javascript

       var loop1;
       var anim;
       var rate = 80;
       var x = 0;
       var y = 0;
       var sy = 0;

       function scrolltop(){
          return browser("Moz") ? window.pageYOffset : document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ;
       }

       function restrictButton(e) {
          if(!e) var e = event;
          var btn = e.button;
          if(btn >= 2 && document.getElementById("olayer").style.display != "block"){
             document.getElementById("olayer").style.display = "block";
             loop1 = 0;
             anim = 1;
             opacity(document.getElementById("olayer"),0);
             setTimeout("slideshow();",200 );
             return false;
          } else if(document.getElementById("olayer").style.display == "block"){
             return false;
          } else{
	 	     return true;
		  }
       }

       function opacity(obj,opac){
          obj.style.MozOpacity = parseFloat(opac/100);
          obj.style.opacity = parseFloat(opac/100);
          obj.style.filter = "alpha(opacity=" + opac + ")";
       }

       document.getElementById("olayer").onclick = hidemessage;
       document.getElementById("popupmenu").onclick = hidemessage;

       function hidemessage(){
             //document.getElementById("popupmenu").style.display = "none";
			 $('#popupmenu').fadeOut('slow');
             //document.getElementById("olayer").style.display = "none";       
			 $('#olayer').fadeOut('slow');
             $('embed, object, select').css('visibility', 'visible');
       }
       
       function windowheight(){
           return browser("Moz") ? window.innerHeight  : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ;
       }

       //alert(browser("Explorer"));

       function bodyheight(){
           return $(document).height();
       }

       function setproperties(){
          try {
             x = parseInt((document.body.offsetWidth - document.getElementById("popupmenu").offsetWidth) / 2);
             y = parseInt((windowheight() - document.getElementById("popupmenu").offsetHeight) / 2);
             sy = scrolltop();
             document.getElementById("popupmenu").style.left = x + "px";
             document.getElementById("popupmenu").style.top = y  + sy + "px";
             document.getElementById("olayer").style.width = $(document).width(); + "px";
             document.getElementById("olayer").style.height = bodyheight() + "px";
          } catch(err) {}
       }

       function slideshow(){
              var tmp = document.getElementById("olayer");
              loop1 += 25;
              $('embed, object, select').css('visibility', 'hidden');
              if(loop1 >= rate){
                anim = 0;
                //document.getElementById("popupmenu").style.display = "block";
				$('#popupmenu').fadeIn('slow');
                setproperties();
              } else {
                opacity(tmp,loop1);
              }
              if (anim != 0 ) setTimeout("slideshow();",100);
       }



       /*function keyp(e) {
          if(!e) var e = event;
          var btn = e.which ? e.which: e.keyCode;
          hidemessage();
          return false;
       }*/

       document.oncontextmenu=restrictButton;
       document.onmouseup=restrictButton;
       document.onmousedown=restrictButton;
       //document.onkeyup = keyp;
       window.onresize = function(){ 
          setproperties();
       };
       
       function browser(keystr){
           return navigator.appName.indexOf(keystr) > -1
       }

       window.onscroll = function(){
          sy = scrolltop();
          document.getElementById("popupmenu").style.top =  y + sy + "px";
       };

