window.onresize = foot_down

function nav_url(url)
{
	window.location.href=url;
}

function onkeyup_(e)
{
	var keynum;

	if(window.event) // IE
	  {
	  keynum = e.keyCode;
	  }
	else if(e.which) // Netscape/Firefox/Opera
	  {
	  keynum = e.which;
	  }
	if (keynum==13) submit_();
}

function foot_down()
{
	ft = document.getElementById('footer');
	eb = document.getElementById('entire_body');
	inf = document.getElementById('info');
	ft.height = 1;
	blength = document.body.clientHeight - eb.clientHeight;
	//alert(blength);	
	if (blength>0) ft.height = blength;
}

function _onclk1(year_,mon_)
{
	if (mon_>=2) mon_=mon_-1; else {
		mon_=12;
		year_=year_-1;
	}
	doLoad('../pcalendar.php?mon_='+mon_+'&year_='+year_);
}

function _onclk2(year_,mon_)
{
	if (mon_<=11) mon_=mon_+1; else {
		mon_=1;
		year_=year_+1;
	}
	doLoad('../pcalendar.php?mon_='+mon_+'&year_='+year_);
}

function _onmover1(sender)
{
	sender.style.backgroundColor='#aaaaaa';
	sender.style.border="1px solid black";
}

function _onmout1(sender)
{
	sender.style.backgroundColor='transparent';
	sender.style.border='none';
}

function _onclk_cont()
{
	window.location.href="/contacts.php";
}

function _onclk(sender,year,month,day)
{
	window.location.href="/order.php?year="+year+"&month="+month+"&day="+day;
}

function _onmover(sender)
{
	sender.style.backgroundColor='#cccccc';
	sender.style.backgroundImage='url(/images/calborder.gif)';
}

function _onmout(sender)
{
	sender.style.backgroundColor='transparent';
	sender.style.backgroundImage='none';
}

function h_in(num)
{
	s='hdr'+num;
	hdr = document.getElementById(s);
	//alert(hdr.style.backgroundColor);
	hdr.style.backgroundColor = 'transparent';
	//alert(hdr.style.backgroundColor);
}

function h_out(num)
{
	s='hdr'+num;
	hdr = document.getElementById(s);
	//alert(hdr.style.backgroundColor);
	hdr.style.backgroundColor = 'transparent';
	//alert(hdr.style.backgroundColor);
}

function nh_in(num)
{
	s='ihdr'+num;
	hdr = document.getElementById(s);
	val='';
	if (num==0) {val='/images/main_1.png';};
	if (num==1) {val='/images/gallery_1.png';};
	if (num==2) {val='/images/service_1.png';};	
	if (num==3) {val='/images/cont_1.png';};
	if (num==4) {val='/images/inf_1.png';};	
	if (num==5) {val='/images/order_1.png';};	
	hdr.src = val;
}

function nh_out(num)
{
	s='ihdr'+num;
	hdr = document.getElementById(s);
	val='';
	if (num==0) {val='/images/main_0.png';};
	if (num==1) {val='/images/gallery_0.png';};
	if (num==2) {val='/images/service_0.png';};	
	if (num==3) {val='/images/cont_0.png';};
	if (num==4) {val='/images/inf_0.png';};	
	if (num==5) {val='/images/order_0.png';};	
	hdr.src = val;
}

function chg_wnd_size(wdth, hght)
{
	window.resizeTo(wdth, hght);
}

function sbmt(op_id)
{
	act_type = document.getElementById("ACTION_TYPE");
	mainform = document.getElementById("MFORM");
	
	act_type.value = op_id;
	mainform.submit();
}

function out()
{
	act_type = document.getElementById("ACTION_TYPE");
	alert(act_type.text);
}
