
function menu_show_title(div){
	
	if(div){
		document.getElementById(div).style.visibility = '';
		//$(div).style.display = 'block';
	}
}

function menu_hidde_title(div){

	if(div){
		document.getElementById(div).style.visibility = 'hidden';
		//$(div).style.display = 'none';
	}
}


function click(e) {
	if (navigator.appName == 'Netscape' && e.which == 3) {
		alert("Благодарим Ви за проявеният интерес!!!")
		return false;
	}else {
		if (navigator.appName == 'Microsoft Internet Explorer'&& event.button==2)
		alert("Благодарим Ви за проявеният интерес!!!");
		return false;
	}
	return true;
}

document.onmousedown=click

function changeCaptcha(element){
	
	field = document.getElementById(element);
	field.src = '/lib/captcha/CaptchaSecurityImages.php?width=100&height=30&characters=4&rand='+ (Math.random());
}

function display_hidden_content(element, state){
	
	if (typeof state == 'undefined'){
		
		state = '';
	}
	
	field = document.getElementById(element);
	
	if (state){
		
		field.style.display = state;
	}else{
		
		if(field.style.display == 'none'){
			
			field.style.display = 'block';
		}else{
			
			field.style.display = 'none';
		}
	}
}

function popWin1(page, wi, he, wi2, he2) {
	
	w = screen.width;
	h = screen.height;
	sx = w/2-wi2;
	sy = h/2-he2;
	win = window.open(page,'pic_win','status=no,resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,menubar=no,width='+wi+',height='+he+',top='+sy+',left='+sx+',screenX='+sx+',screenY='+sy+'');
	win.resizeTo(wi+7, he+50);
	win.moveTo(sx, sy);
	win.focus();
}

function popPreview(page) {
	
	wi = wi2 = 800;
	he = he2 = 600;
	w = screen.width;
	h = screen.height;
	sx = w/2-wi2;
	sy = h/2-he2;
	win = window.open(page,'pic_win','status=no,resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,menubar=no,width='+wi+',height='+he+',top='+sy+',left='+sx+',screenX='+sx+',screenY='+sy+'');
	win.resizeTo(wi+7, he+50);
	win.moveTo(sx, sy);
	win.focus();
}
