

function o(a){return document.getElementById(a);}


function encode(arg){
if(encodeURIComponent)
return encodeURIComponent(arg);
return escape(arg)

}

function ajax(met,url,func,params)
  {
  //alert("METHOD="+met+"\nURL="+url+"\nCALLBACK="+func+"\nPARAMS="+params);
  var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
	
        func(xmlHttp.responseText);
        }
      }
	if(met=="get"||met=="GET"){
	
	xmlHttp.open(met,url,true);
	xmlHttp.send(null);
    
	}
    	if(met=="post"||met=="POST"){
	//alert("METHOD="+met+"\nURL="+url+"\nCALLBACK="+func+"\nPARAMS="+params);
	xmlHttp.open(met,url,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(params);
	}
	return xmlHttp;
  }

function getStyle(el,styleProp)
{
	
	var stylIE = styleProp.replace(/-(.){1,1}/g ,function(s){return s.charAt(1).toUpperCase()})

	var x = el;
	if (x.currentStyle)
		var y = x.currentStyle[stylIE];
	else if (window.getComputedStyle)
		var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
	return y;
}



var animki=[];
function Anim(i) {
this.index=i;
this.speed = null;
this.begin = null;
this.cur=null;
this.end = null;
this.prop=null;
this.obj=null;
this.timer=null;
this.onDone=null;
this.onActive=null;
this.ofWhat="px"
this.animate = function () {
	if(Math.round(this.cur)!=this.end){
		this.cur+=(this.end-this.cur)/this.speed;
		this.cur=this.cur
		
		if(this.obj)
		this.obj[this.prop] =this.cur + this.ofWhat
		
		if(this.onActive)
			this.onActive(this.cur)
			
		this.timer=setTimeout('animki["'+this.index+'"].animate()',1);
	}else{
		if(this.obj)
		this.obj[this.prop] =this.end + this.ofWhat
		
		if(this.onDone)
		this.onDone();
	}

}
this.actual=function (){
var r=parseInt(this.obj[this.prop]);
return isNaN(r)?this.begin:r;
}
return this;
}




var mywin;
function win_open(arg,w,h){
try{
		if(!w)
		w=600
		if(!h)
		h=400
		
		mywin=window.open(arg,"_blank","toolbar=no, location=no, directories=no, status=1, menubar=no, scrollbars=1, resizable=yes, copyhistory=no, width="+w+", height="+h)
}catch(err){}
return false;
}


function op(link){
var ul = link.parentNode.getElementsByTagName('ul')[0]
if(!ul)
return false;
if(ul.style.display=='none'){
	link.className='sel'
	ul.style.display='block'
}else if(ul.style.display=='block'){
	link.className=''
	ul.style.display='none'
}else{
	link.className='sel'
	ul.style.display='block'
}
link.blur();
return false;
}


function instalMenu(){
var list= o('menu').getElementsByTagName('ul')[0].getElementsByTagName('a')

}

onload=function(){

//instalMenu();
}