function radio (id)
{
	var ll = document.forms.survey['q'+id].length - 1
	if ( document.forms.survey['q'+id][ll].checked )
	{
		document.forms.survey['a'+id].disabled = false;
		document.forms.survey['a'+id].className = 'enabled';
	}
	else
	{
		document.forms.survey['a'+id].disabled = true;
		document.forms.survey['a'+id].value = "";
		document.forms.survey['a'+id].className = 'disabled';
	}
}

function redirect(url)
{
	document.location = url;
}

function addClass(obj, css)
{
	obj.className = css;
}

function removeClass(obj)
{
	obj.className = '';
}

function imgfx_opacity(obj, fx)
{
	obj.style.opacity = fx;
	obj.style.filter = 'alpha(opacity=' + fx*100 + ')';
}

function render(awho, awhere, awhat)
{
	var locationstring = 'mai' + 'lto:' + awho + '@' + awhere + '?subject=' + awhat;
	window.location = locationstring;
}

function render2(id, awho, awhere)
{
	var locationstring = awho + '@' + awhere;
	document.getElementById(id).innerHTML = locationstring;
}

function GoogleMaps()
{
	if (GBrowserIsCompatible())
	{
		var map = new GMap2(document.getElementById('google_maps'));
		map.setCenter(new GLatLng(48.938485, 18.144178), 11);
		
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var mapicon = new GIcon();
		mapicon.shadow = '/images/common/icons/saemapshade.png';
        mapicon.image = '/images/common/icons/saemap.png';
        mapicon.iconSize = new GSize(90, 48);
        mapicon.shadowSize = new GSize(90, 48);
        mapicon.iconAnchor = new GPoint(0, 48);
        mapicon.infoWindowAnchor = new GPoint(0, 0);
        mapicon.infoShadowAnchor = new GPoint(0, 0);
        
		var pointt = new GMarker(new GLatLng(48.938457, 18.143749), { icon:mapicon });
		GEvent.addListener(pointt, 'click', function() {
			LocalMaps('open');
		});
		map.addOverlay(pointt);
	}
}

function LocalMaps(action)
{
	if ( action == 'close' )
	{
		document.getElementById('local_maps').style.display = 'none';
	}
	else
	{
		document.getElementById('local_maps').style.display = 'block';
	}
}

function GoogleSearch() {

	var searchControl = new GSearchControl();
	searchControl.setResultSetSize(GSearch.LARGE_RESULTSET);
	
	var siteSearch = new GwebSearch();
	siteSearch.setUserDefinedLabel('saeautom.sk');
	siteSearch.setUserDefinedClassSuffix('siteSearch');
	siteSearch.setSiteRestriction('saeautom.sk');
	searchControl.addSearcher(siteSearch);
	
	var pdfSearch = new GwebSearch();
	pdfSearch.setUserDefinedLabel('PDF');
	pdfSearch.setUserDefinedClassSuffix('pdfSearch');
	pdfSearch.setQueryAddition('filetype:pdf');
	pdfSearch.setSiteRestriction('saeautom.sk');
	searchControl.addSearcher(pdfSearch);
	
	searchControl.addSearcher(new GwebSearch());
	
	var drawOptions = new GdrawOptions();
	drawOptions.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
	searchControl.draw(document.getElementById('google_search'), drawOptions);
 }
 