
// common JS functions


function focus(obj)
{
    obj.focus();
}


function showCalendar(id)
{
    obj = document.getElementById(id);
    obj.focus();
}


function openGallery(lang,pic)
{
    window.open('/gallery/'+lang+'/gallery.php?pic='+pic+'&lang='+lang,'gallery','width=600,height=469,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
}
function openMap(lang) // FM Edit
{
	var p_width = 585;
	var p_height = 450;
		
	var p_left   = (screen.width  - p_width)/2;
	var p_top    = (screen.height - p_height)/2;
		
	window.open("/harta_"+lang+".html","Harta","menubar=no,width="+p_width+",height="+p_height+",toolbar=no, status=no, top="+p_top+", left="+p_left+", location=no,scrollbars=no,resizable=no");
}
function openSubscribe() // FM Edit 
{
	var p_width = 300;
	var p_height = 250;
		
	var p_left   = (screen.width  - p_width)/2;
	var p_top    = (screen.height - p_height)/2;
		
	window.open('','Subscribe','menubar=no,width='+p_width+',height='+p_height+',toolbar=no, status=no, top='+p_top+', left='+p_left+', location=no,scrollbars=no,resizable=no');
	
}

// online reservation panel functions
function onlineSelectRooms()
{
    document.getElementById('online_restype_3_time').style.display = 'none';
    document.getElementById('online_restype_1_date').style.display = 'block';
    document.getElementById('online_restype_1_type').style.display = 'block';
}
function onlineSelectRestaurant()
{
    document.getElementById('online_restype_3_time').style.display = 'none';
    document.getElementById('online_restype_1_date').style.display = 'none';
    document.getElementById('online_restype_1_type').style.display = 'none';
}
function onlineSelectConference()
{
    document.getElementById('online_restype_3_time').style.display = 'block';
    document.getElementById('online_restype_1_date').style.display = 'none';
    document.getElementById('online_restype_1_type').style.display = 'none';
}
function onlineSelectType(obj)
{
    switch (obj.value) {
        case '1':
            onlineSelectRooms();
            break;
        case '2':
            onlineSelectRestaurant();
            break;
        case '3':
            onlineSelectConference();
            break;
    }
}


