// *****************************************

function gif_over(img) {
	document.getElementById(img).src=document.getElementById(img).src.replace('.gif','r.gif');
};
function gif_out(img) {
	document.getElementById(img).src=document.getElementById(img).src.replace('r.gif','.gif');
};

// *****************************************

function jpg_over(img) {
	document.getElementById(img).src=document.getElementById(img).src.replace('.jpg','r.jpg');
};
function jpg_out(img) {
	document.getElementById(img).src=document.getElementById(img).src.replace('r.jpg','.jpg');
};

// *****************************************

function div_over(dif,pic){
	document.getElementById(dif).style.backgroundColor="#DF0825";
	document.getElementById(pic).src=document.getElementById(pic).src.replace('.gif','r.gif');
};

function div_out(div,pic){
	document.getElementById(div).style.backgroundColor="#516671";
	document.getElementById(pic).src=document.getElementById(pic).src.replace('r.gif','.gif');
};

// *****************************************

function div_calendar_over(div){
	document.getElementById(div).style.backgroundColor="#DF0825";
};

function div_calendar_out(div){
	document.getElementById(div).style.backgroundColor="#516671";
};
// *****************************************

function show_div(pas,act) {
	document.getElementById(pas).style.display="none";
	document.getElementById(act).style.display="block";
};

function hide_div (pas,act) {
	document.getElementById(pas).style.display="block";
	document.getElementById(act).style.display="none";
};

// *****************************************


function moreOver(id) {
	document.getElementById(id).style.backgroundImage = "url('/img/oformlenia/moreAct.gif')";
};
function moreOut(id) {
	document.getElementById(id).style.backgroundImage = "url('/img/oformlenia/morePas.gif')";
};

// *****************************************

function opacity_max_3(img1,img2) {
	if(img1 != ""){
		jpg_out(img1);
	}
	if(img2 != ""){
		jpg_out(img2);
	}
}


function opacity_min_3(img1,img2) {
	if(img1 != ""){
		jpg_over(img1);
	}
	if(img2 != ""){
		jpg_over(img2);
	}
}

function show(id,a_id){
	var obj = document.getElementById(id);
	var obj_a = document.getElementById(a_id);
	obj.style.height = "auto";
	if((obj.style.display=="") || (obj.style.display == "none")){
		obj.style.display = "block";
		obj_a.className = "block_active";
	}else{
		obj.style.display = "none";
		obj_a.className = "block";
	}
	
}

function open3D(name,w,h){
	window.open('/auto/3D/'+name+'.html','','resizable=0,scrollbars=0,width='+w+',height='+h+',toolbar=0');
}

function submit_podpiski(){
	var url = "?subscribe_change=ok"
	for(i in document.c_podpiska){
		if(i.indexOf('subscribe_') == 0){
			if(document.c_podpiska[i].checked){
				url+="&";
				url+=i+"="+document.c_podpiska[i].value;
			}
		}
	}
	//load_files(top_url+'company/press/podpiski/'+url,'podpiski');
    //alert('asdf');
    $('#podpiski').html('<img src="/img/loading.gif" border=0>');
	$('#podpiski').load(top_url+'company/press/podpiski/'+url);
}