var L= new Layer('menu0');

function gLs(ln){
   return document.getElementById?document.getElementById(ln).style:document.all?document.all[ln].style:document.layers[ln]
}
function gL(ln){
   return document.getElementById?document.getElementById(ln):document.all?document.all[ln]:document.layers[ln]
}
function Layer(id) {
   this.id=id;
   this.n4 = (document.layers)? true:false
   this.i4 = (document.all)   ? true:false; 
   this.op = (window.opera)	  ? true:false;
   
   this.setCss = function(p_name,value) {
         var temp=p_name.indexOf("-");
		 if(temp>0){
		    s1=p_name.substring(0,temp);
		  	s2=p_name.substring(temp+1,p_name.length);
		  
		  	s21=s2.substring(0,1);
		  	s22=s2.substring(1,s2.length);
		  	s21=s21.toUpperCase();
		  
		  	s2=s21+s22;
		  
		  	p_name=s1+s2;
			}
		 var Ls=gLs(this.id);
		 eval("Ls."+p_name+"="+"'"+value+"'");		
   }
   this.writeIn=function (tekst) {
   		 var L = gL(this.id);
  		 if(this.n4) {
		     alert('Opera');
      	 	 L.document.open();
      		 L.document.write(tekst);
      		 L.document.close();    
  		 } else {
		     L.innerHTML = tekst;
		 }
   }
}

function _getSize(){
  this.i4 = (document.all) ? true:false;
  if(this.i4){
   this.width=document.body.clientWidth;
   this.height=document.body.clientHeight;
  }else{
   this.width=window.innerWidth-16;
   this.height=window.innerHeight
  }
}

W = {getSize:_getSize};

function center(width,height){
 		 W.getSize();
		 var left = Math.round((W.width-width)/2);
		 var top = Math.round((W.height-height)/2);
		 return Array(left,top);
		 }	