// JavaScript Document
<!--
function showImg(src, w, h, id, headline, alttitle) {
	var photo;
    photo = window.open('', id, "width="+w+"px, height="+h+"px, scrollbars=no, status=no, location=no, menubar=no, resizable=no, toolbar=no").document;
    photo.write('<html><head><title>Трибуна \\\ '+headline+'</title></head><body style="margin:0px; "><img src="'+src+'" style="cursor:pointer;" onClick="window.close();"  alt="'+alttitle+'" title="'+alttitle+'"></body></html>');
    photo.close();
}

function doLoadMacros(id, target) 
{
    var req = new JsHttpRequest();
    req.onreadystatechange = function() {
        if (req.readyState == 4) {
            document.getElementById(target).innerHTML = req.responseText;
        }
    }
    req.open(null, '/template/loadmacros.php', true);
    req.send( { id:id } );
}

function changeSearchToGoogle() {
 	document.getElementById("fid").method = "get";
	document.getElementById("fid").action = "http://google.com.ua/search";
	document.getElementById("tid").name = "q";
 	document.getElementById("fidm").method = "get";
	document.getElementById("fidm").action = "http://google.com.ua/search";
	document.getElementById("tidm").name = "q";
}
function changeSearchToSite() {
 	document.getElementById("fid").method = "post";
	document.getElementById("fid").action = "http://{domain}{lang}search/result";
	document.getElementById("tid").name = "search";
 	document.getElementById("fidm").method = "post";
	document.getElementById("fidm").action = "http://{domain}{lang}search/result";
	document.getElementById("tidm").name = "search";
}
//-->
