function loadll()
{
	document.getElementById("hm").style.visibility="visible";
}
function changedivs(id,type)
{
	if(type=="full")
	{
		document.getElementById("shorttext"+id).style.display="none";
		document.getElementById("fulltextlink"+id).style.display="none";		
		document.getElementById("fulltext"+id).style.display="block";
		document.getElementById("shorttextlink"+id).style.display="block";			
	}
	
	if(type=="short")
	{
		document.getElementById("shorttext"+id).style.display="block";
		document.getElementById("fulltextlink"+id).style.display="block";		
		document.getElementById("fulltext"+id).style.display="none";
		document.getElementById("shorttextlink"+id).style.display="none";			
	}	
}
oldcid=1;
function changediv(cid)
{
	if(oldcid)
	{
		document.getElementById("plancat"+oldcid).style.display="none";
		document.getElementById("planlink"+oldcid).className="";
	}
	
	document.getElementById("plancat"+cid).style.display="";
	document.getElementById("planlink"+cid).className="active";	
	oldcid=cid;
}
function getWindowHeight() 
{ 
	 var windowHeight = 0; 
	 if (typeof(window.innerHeight) == 'number') { 
		windowHeight = window.innerHeight; 
	 } 
	 else { 
		if (document.documentElement && document.documentElement.clientHeight) { 
		   windowHeight = document.documentElement.clientHeight; 
		} 
		else { 
		   if (document.body && document.body.clientHeight) { 
			  windowHeight = document.body.clientHeight; 
		   } 
		} 
	 } 
	 return windowHeight; 
  } 
  
 function footer()
 {
	 wh=getWindowHeight();
	 bh=document.getElementById("body").offsetHeight;
	 fh=document.getElementById("bs").offsetHeight;
	 h=wh-bh-fh;
	 if(wh>(bh+fh))
	 {
		 document.getElementById("bs").style.position="absolute";
		 document.getElementById("bs").style.bottom="0";
		 document.getElementById("bs").style.left="0";
		 document.getElementById("bs").style.width="100%";		 
	 }
	 else document.getElementById("bs").style.position="relative";
 }
 
function checklenght(from,inform,length)
{
	val=document.getElementById(from).value;
	count=val.length;
	key=from.which;
	keychar = String.fromCharCode(key)
	if(count>=length)
	{
		tval="";
		for(i=0;i<length;i++)
		{
			tval=tval+val[i];
		}
		document.getElementById(from).value=tval;
	}
	itog=length-count;
	if(itog<0) itog=0;
	document.getElementById(inform).innerHTML=itog;	
}
