var a,b,c,cw,ch;
cw=document.documentElement.clientWidth;
ch=document.documentElement.clientHeight;

function ath()
{
a=document.getElementById("pagecontainer");
b=document.getElementById("pagebody");

	if(b.offsetHeight<ch-200)
	{
	a.style.height=ch-50+'px';
	}
	else
	{
	a.style.height=b.offsetHeight+200+'px';
	}
	
}
function inp(fil,cdiv,hdiv,hd)
{
ajaxpage(fil,cdiv);
document.getElementById(hdiv).innerHTML=hd;
setTimeout('ath();',300);
}

function cnt_valid()
{
	var fom, nam, ema, con, com;	
	fom=document.cnt_fm;
	nam = fom.cn_nam;
	ema = fom.cn_ema;
	con = fom.cn_con;
	com = fom.cn_com;
	
	if(nam.value=="Name" || nam.value=="")
	{
		nam.select();
		return false;
	}
	else if(ema.value=="Email" || ema.value=="")
	{
		ema.select();
		return false;
	}
	else if(con.value=="Contact" || con.value=="")
	{
		con.select();
		return false;
	}
	else if(com.value=="Comments" || com.value=="")
	{
		com.select();
		return false;
	}
	else
	{	
		document.getElementById("cnfm").action="cnt_fm.asp";
	}
}

function lyr(cdiv)
{
 	var d = document.getElementById(cdiv)
		d.style.position="absolute";
		d.style.left=cw/2-d.offsetWidth/2+'px';
		d.style.top=ch/2-d.offsetHeight/2+'px';
}

function bn(cdiv,db)
{	
	document.getElementById(cdiv).style.display=db;
}
window.onload=ath;
