function set_valign(){
	var obj_valign = document.getElementById("content_valign");	
	var obj_cont_alias = document.getElementById("content_alias");
	var obj_content = document.getElementById("content_text");
	var obj_resize_alias =document.getElementById("resize_elem");
	var nResElHeight = 0;
	var nContentHeight = 0;
	var nContTextHeight = 0;
	var nWindowHeight = getWindowHeight(window.self);
	var elem = 118; //высота элемента
	if(navigator.appName == "Microsoft Internet Explorer"){
		obj_resize_alias.style.display = "none";
		obj_cont_alias.style.display = "none";
		obj_content.style.display = "none";
			nResElHeight = obj_resize_alias.clientHeight;
			nContentHeight = obj_cont_alias.clientHeight;			
			nContTextHeight = obj_content.clientHeight;
		obj_cont_alias.style.display = "";			
		obj_resize_alias.style.display = "";
		obj_content.style.display = "";
                n1= (nResElHeight - elem);
		n2= (nContentHeight -8- nContTextHeight);
		if(n1 >0 || n2 > 0){
			//alert('n1:'+n1+'\n n2:'+n2 );
			obj_valign.style.height = (n2+n1);						
		}
	}
	
};


function initKLayers(){
  isDOM=document.getElementById?true:false
  isOpera=isOpera5=window.opera && isDOM
  isOpera6=isOpera && window.print
  isOpera7=isOpera && document.readyState
  isMSIE=isIE=document.all && document.all.item && !isOpera
  isStrict=document.compatMode=='CSS1Compat'
  isNN=isNC=navigator.appName=="Netscape"
  isNN4=isNC4=isNN && !isDOM
  isMozilla=isNN6=isNN && isDOM

  if(!isDOM && !isNC && !isMSIE && !isOpera){
    KLayers=false
    return false
  }

  pageLeft=0
  pageTop=0

  KL_imgCount=0
  KL_imgArray=new Array()

  KL_imageRef="document.images[\""
  KL_imagePostfix="\"]"
  KL_styleSwitch=".style"
  KL_layerPostfix="\"]"

  if(isNN4){
    KL_layerRef="document.layers[\""
    KL_styleSwitch=""
  }

  if(isMSIE){
    KL_layerRef="document.all[\""
  }

  if(isDOM){
    KL_layerRef="document.getElementById(\""
    KL_layerPostfix="\")"
  }

  KLayers=true
  return true
}

initKLayers()

// document and window functions:

function KL_getBody(w){
  if(!w) w=window
  if(isStrict){
    return w.document.documentElement
  }else{
    return w.document.body
  }
}


function getWindowWidth(w){
  if(!w) w=window
  if(isMSIE) return KL_getBody(w).clientWidth
  if(isNN || isOpera) return w.innerWidth
}

function getWindowHeight(w){
  if(!w) w=window
  if(isMSIE) return KL_getBody(w).clientHeight
  if(isNN || isOpera) return w.innerHeight
}

function getDocumentWidth(w){
  if(!w) w=window
  if(isMSIE || isOpera7) return KL_getBody(w).scrollWidth
  if(isNN) return w.document.width
  if(isOpera) return w.document.body.style.pixelWidth
}

function getDocumentHeight(w){
  if(!w) w=window
  if(isMSIE || isOpera7) return KL_getBody(w).scrollHeight
  if(isNN) return w.document.height
  if(isOpera) return w.document.body.style.pixelHeight
}


