function img_over(txt_id, img_id) {
	
	txt_id = eval(txt_id);
	img_id = eval(img_id);

	txt_id.style.color = '#FF6000';
	img_id.style.filter = 'alpha(Opacity=80)';		
	}
	
function img_out(txt_id, img_id) {
	
	txt_id = eval(txt_id);
	img_id = eval(img_id);

	txt_id.style.color = '#B50000';
	img_id.style.filter = 'alpha(Opacity=100)';
	}
	
	
var clickFlag = false;

function checkForm() {

	if(clickFlag == true) return false;
	
	var txt = '';
	
	if(document.order.country.value == 0)
		txt = txt + ' - Страна поездки\n';

	if(document.order.phone.value == '')
		txt = txt + ' - Контактный телефон\n';
		if(document.order.mail.value == '')
		txt = txt + ' - E-mail\n';

	if(txt != '') {
		
		txt = "Укажите, пожалуйста, следующую информацию:\n\n" + txt;
		window.alert(txt);	
		return false;
		}
		
	clickFlag = true;
	
	return true;	
	}
var ie4 = false; 
if(document.all) { ie4 = true; }

function getObject(id) { 

	if (ie4) { return document.all[id]; } 
	else { return document.getElementById(id); } 
	}


function oc_header(divId) {
	
	var d = getObject(divId);
	
	if(d.style.display == 'block') {
		
		d.style.display = 'none';
		return;
		}
		
	if(d.style.display == 'none') {
	
		d.style.display = 'block';
		return;
		}
	
	}
	
	
function oc_header_arrow(divId, linkId) {

	var d = getObject(divId);
	var l = getObject(linkId);
	
	if(d.style.display == 'block') {
		
		l.className = l.className.replace('_2','_1');
		d.style.display = 'none';
		return;
		}
		
	if(d.style.display == 'none') {
	
		l.className = l.className.replace('_1','_2');
		d.style.display = 'block';
		return;
		}
	
	}		
function open_w(id) {

	if (tek) document.getElementById(tek).style.display='none';
	block = document.getElementById(id);
 	block.style.opacity = 0; 
  	block.style.filter='alpha(opacity=0)'; 
	block.style.display='block';

	var from = 0; // Начальная координата X
	var to = 1; // Конечная координата X
	var duration = 400; // Длительность - 1 секунда
	var start = new Date().getTime(); // Время старта

	setTimeout(function fade() {
		var now = (new Date().getTime()) - start; // Текущее время
		var progress = now / duration; // Прогресс анимации
		var result = (to - from) * progress + from;

	 	block.style.opacity = result; 
    		block.style.filter='alpha(opacity='+result*100+')'; 
  
		if (progress < 1) { // Если анимация не закончилась, продолжаем
      			setTimeout(arguments.callee, 10);
		} else {
			block.style.filter='none';
		}

	}, 10);

	document.getElementById('dark').style.display='block';
	tek=id;
}

function close_w(id) {

	var from = 1; // Начальная координата X
	var to = 0; // Конечная координата X
	var duration = 200; // Длительность - 1 секунда
	var start = new Date().getTime(); // Время старта
 
	setTimeout(function fade() {
		var now = (new Date().getTime()) - start; // Текущее время
	    	var progress = now / duration; // Прогресс анимации
 
    		var result = (to - from) * progress + from;

    		block.style.opacity = result; 
    		block.style.filter='alpha(opacity='+result*100+')'; 
 
    		if (progress < 1) { // Если анимация не закончилась, продолжаем
        		setTimeout(arguments.callee, 10);
		} else {
			document.getElementById(id).style.display='none';
		}

	}, 10);
	document.getElementById('dark').style.display='none';
	tek='';
}	