function showPic(picName)
{
	window.parent.document.all('mainImg').src=picName;
}
function submitsearch()
{
	//document.searchform.target="mframe";
	document.searchform.target=document.searchform.targetname.value;
	document.searchform.submit();
	
}
function popwin(winurl,w,h)
{
	window.open(winurl,'popupwin','toolbar=no,directories=no,resizable=yes,location=no,scrollbars=yes,height='+h+',width='+w);
}
function showmap(froma,fromz,toa,toz)
{
var mstr;mstr='http://www.mapquest.com/directions/main.adp?go=1&do=nw&ct=NA&1y=US&1p=&1ah=&2ah=&lr=2&x=72&y=14&';
mstr=mstr+'1a='+froma+'&1z='+fromz+'&2a='+toa+'&2z='+toz;

window.resizeTo(800,600);
window.location.href=mstr;
}

function selectDate(d,m,y)
{
	document.submitform.month.value=m;
	document.submitform.startmonth.value=m;
	document.submitform.startyear.value=y;
	document.submitform.day.value=d;
	document.submitform.year.value=y;
	document.submitform.submit();
}

function selectOwnerDate(d,m,y)
{
	
	// document.submitform.startmonth.value=m;
	// document.submitform.startyear.value=y;
	document.submitform.day.value=d;
	document.submitform.month.value=m;
	document.submitform.year.value=y;
	document.submitform.submit();
}

function bookDate(d,m,y,n)
{
	var f;
	if (n)
	{
		f='submitform'+n;
	}else{
		f='submitform';
	}
	var os=document.getElementById('sslcgiurl').value+'rtbooking.pl?month='+m+'&day='+d+'&year='+y+'&arrivalmonth='+document.getElementById('month').value+'&arrivalday='+document.getElementById('day').value+'&arrivalyear='+document.getElementById('year').value+'&propid='+document.getElementById('propid').value+'&sessionid='+document.getElementById('sessionid').value;
	window.open(os,'booking','width=640,height=600,scrollbars=yes');
}
function bookDate2(d,m,y,pid)
{
	var os=document.getElementById('sslcgiurl').value+'rtbooking.pl?month='+m+'&day='+d+'&year='+y+'&arrivalmonth='+document.getElementById('month').value+'&arrivalday='+document.getElementById('day').value+'&arrivalyear='+document.getElementById('year').value+'&propid='+pid+'&sessionid='+document.getElementById('sessionid').value;
	window.open(os,'booking','width=640,height=600,scrollbars=yes');
}
function bookOwnerDate(d,m,y)
{
	var f;
	f='submitform';
	var os=document.getElementById('sslcgiurl').value+'main.pl?action=newownerbooking&month='+m+'&day='+d+'&year='+y+'&arrivalmonth='+document.getElementById('arrivalmonth').value+'&arrivalday='+document.getElementById('arrivalday').value+'&arrivalyear='+document.getElementById('arrivalyear').value+'&sessionid='+document.getElementById('sessionid').value;
	window.location.replace(os);
}

function viewBooking(id)
{
	var sessionid;
	sessionid=document.all('sessionid').value;
	var os=document.all('sslcgiurl').value+'main.pl?action=viewownerbooking&sessionid='+sessionid+'&id='+id;
	window.location.replace(os);
}
function viewBlock(id)
{
	var sessionid;
	sessionid=document.all('sessionid').value;
	var os=document.all('sslcgiurl').value+'main.pl?action=viewownerblock&sessionid='+sessionid+'&id='+id;
	window.location.replace(os);
}
