// JavaScript Document
function srch_go(t) {
	var forma  = document.getElementById(t);
	forma.submit();
}
function wind_print(id,w,h){
	var x=(screen.width/2)-(w/2);var y=(screen.height/2)-(h/2);
window.open(id, 'orto' ,config='left='+x+', top='+y+', height='+h+', width='+w+', scrollbars=yes, resizable=no,location=no').focus(); 
}
function doLoad_vote(t,prf) {
	for (i=0; i<t; i++) {
		if (document.f_vote.ans[i].checked==true) {			
				value=i+1;
		} 
	}
    var req = new JsHttpRequest();
    req.onreadystatechange = function() {
        if (req.readyState == 4) {
			//document.getElementById('d_vt4').innerHTML = req.responseJS.vote;
			document.getElementById('d_vt4').innerHTML = req.responseText;
        }
    }
    req.open(null, 'includes/block7_ajax.php', true);
    req.send( { ans: value,prf: prf } );
}
function doLoad_panorama(rec_start,rec_start_nav,prf) {
    var req = new JsHttpRequest();
    req.onreadystatechange = function() {
        if (req.readyState == 4) {
			document.getElementById('dv_left').innerHTML = req.responseJS.left;
			document.getElementById('dv_right').innerHTML = req.responseJS.right;
			document.getElementById('div_0').innerHTML = req.responseText;
        }
    }
	//document.getElementById('div_1').innerHTML = '<img src="images/loading.gif" width="16" height="16">';
	//document.getElementById('div_2').innerHTML = '<img src="images/loading.gif" width="16" height="16">';
	//document.getElementById('div_3').innerHTML = '<img src="images/loading.gif" width="16" height="16">';
	//document.getElementById('div_4').innerHTML = '<img src="images/loading.gif" width="16" height="16">';
    req.open(null, 'includes/block1_ajax.php', true);
    req.send( { rec_start: rec_start, rec_start_nav: rec_start_nav,prf: prf } );
}
function audio(id,w,h){
	var x=(screen.width/2)-(w/2);var y=(screen.height/2)-(h/2);
	window.open(id, 'email' ,config='left='+x+', top='+y+', height='+h+', width='+w+', scrollbars=no, resizable=no,location=no').focus(); 
}


var cl = 0;
function clear_value_ser() {
	if (cl == 0) {
		document.f_ser.q.value = "";
		cl = 1;
	}
}

var cl_1 = 0;
var cl_2 = 0;
var cl_3 = 0;
function clear_value(t,t1) {
	if (cl_1 == 0 && t1==1) {	 document.getElementById(t).value = ""; cl_1 = 1; }
	if (cl_2 == 0 && t1==2) {	 document.getElementById(t).value = ""; cl_2 = 1; }
	if (cl_3 == 0 && t1==3) {	 document.getElementById(t).value = ""; cl_3 = 1; }
}

