// JavaScript Document
function opn_wind(id){
	w=560;
	h=450;
	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 form_submit(forr) {
	var forma = document.getElementById(forr);
    forma.submit(); 
}
function doLoad_vote_left(t,id_h,lang,prf) {
	if(t!=0) {
		var ob=eval('document.f_vote_'+id_h+'.ans');
		//alert(ob[2].checked);
		for (i=0; i<t; i++) {
			//alert(i);
			if (ob[i].checked==true) {			
				value=i+1;
			} 
		}
		//alert(value);
		var req = new JsHttpRequest();
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				//document.getElementById('d_vt4').innerHTML = req.responseJS.vote;				
				document.getElementById('d_vt4_'+id_h).innerHTML = req.responseText;
			}
		}
		document.getElementById('d_vt4_'+id_h).innerHTML='';
		req.open(null, 'includes/vote_left_ajax.php', true);	
		req.send( { ans: value, id: id_h, lang: lang, prf: prf } );
	}
}
function doLoad_wth_rate(t,t1) {	
    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/weather_left_ajax.php', true);	
    req.send( { ans: t, prf: t1 } );
}
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; }
}
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 make_active(id,im) {
	document.getElementById(id).src=im;
}
