function ChangePos(NewValue)
{
	Pos = document.getElementById('Pos');		
	Pos.value = parseInt(NewValue);
}
function open_win(file,wid,hei)
{
	window.open(file,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=yes, width="+parseInt(wid)+", height="+parseInt(hei))
}
function open_win_title(file,title,wid,hei)
{
	win = window.open(file,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=yes, width="+parseInt(wid)+", height="+parseInt(hei));
	win.document.write("<title>" + title + "</title>");
	win.document.write('<img src="' + file + '"/>');
}

function open_full_win(file)
{
	window.open(file,"_blank","toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes")
}

function contact_window(url, qry)
{
	window.open(ru + url + '?' + qry,'Popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=550,height=350,left=100,top=100');
}

function ShowAccType(type)
{
	divN = document.getElementById('cap-nume');
	divD = document.getElementById('cap-denumire');	
	divN.style.display = 'none';
	divD.style.display = 'none';
	if(type == 'p') divN.style.display = 'block';
	if(type == 'c') divD.style.display = 'block';	
}
function ShowSearch()
{		
	divTip = document.getElementById('sTip');
	Tip = divTip.value;
	
	divSearchAp = document.getElementById('searchAp');
	divSearchT = document.getElementById('searchT');
	divSearchCSH = document.getElementById('searchCSH');
		
	
	divSearchAp.style.display = 'none';
	divSearchT.style.display = 'none';
	divSearchCSH.style.display = 'none';
			
					
	if(Tip == 'a') divSearchAp.style.display = 'block';
	if(Tip == 't') divSearchT.style.display = 'block';
	if(Tip == 'c') divSearchCSH.style.display = 'block';
	if(Tip == 's') divSearchCSH.style.display = 'block';
	if(Tip == 'r') divSearchCSH.style.display = 'block';

}
function ShowUser(divID)
{		
	divUser = document.getElementById(divID);
	
	if(divUser.style.display == 'none')	divUser.style.display = 'block';
	else divUser.style.display = 'none';
}
function SchimbaJudet()
{
	selectJudet = document.getElementById('SelJudet');
	Judet = selectJudet.value;
	document.location = 'http://www.imobiliare-ro.ro/' + Judet + '/30';
}
function CautaDupaID()
{
	ID = document.SearchForm2.SearchID.value;
	if(ID == '') alert('Introduceti ID-ul');
	else
	{
		document.location = 'http://www.constantaimobiliare.ro/cauta/7/cautaid-' + ID;
	}
}

function getConfirm(message, url) 
{
	if (confirm(message)) {
		document.location = url;
	}
}

function postConfirm(message) {
	if (confirm(message) == false) {
		return false;
	}
}

// Show contact form
function ShowForm(Tip)
{		
	if(Tip == 1 || Tip == 2 || Tip == 3)
	{
		divTip = document.getElementById('cTip');
		divTip.value = Tip;

		divTelefon  = document.getElementById('cTelefon');
		divPrieten  = document.getElementById('cPrieten');
		divIncorect = document.getElementById('cIncorect');
		divContact  = document.getElementById('cContact');
		div1H3      = document.getElementById('c1H3');
		div2H3      = document.getElementById('c2H3');
		div3H3      = document.getElementById('c3H3');		
		divRaspuns  = document.getElementById('cRaspuns');	
		
		divTelefon.style.display = 'none';
		divPrieten.style.display = 'none';
		divIncorect.style.display = 'none';
		divContact.style.display = 'none';
		div1H3.style.display = 'none';
		div2H3.style.display = 'none';
		div3H3.style.display = 'none';
		divRaspuns.style.display = 'none';
		
		if(Tip == '1') divTelefon.style.display = 'block';
		if(Tip == '1') divContact.style.display = 'block';		
		if(Tip == '1') div1H3.style.display = 'block';		
		if(Tip == '2') divPrieten.style.display = 'block';		
		if(Tip == '2') div2H3.style.display = 'block';		
		if(Tip == '3') divIncorect.style.display = 'block';				
		if(Tip == '3') div3H3.style.display = 'block';				
	}
}

function ShowNavMenu(divShow)
{
	HideNavMenu();

	document.getElementById('l' + divShow).style.color = '#ffcd1f';

	show = document.getElementById(divShow);
	show.style.display = 'block';
}

function HideNavMenu()
{
	document.getElementById('mav').style.display  = 'none';
	document.getElementById('mai').style.display  = 'none';
	document.getElementById('mpv').style.display  = 'none';
	document.getElementById('mpi').style.display  = 'none';
	document.getElementById('mpcc').style.display = 'none';
	document.getElementById('mpci').style.display = 'none';

	document.getElementById('lmav').style.color  = '#fff';
	document.getElementById('lmai').style.color  = '#fff';
	document.getElementById('lmpv').style.color  = '#fff';
	document.getElementById('lmpi').style.color  = '#fff';
	document.getElementById('lmpcc').style.color = '#fff';
	document.getElementById('lmpci').style.color = '#fff';
}
function ChangeColor(id)
{
	document.getElementById(id).style.color = '#ffe691';
}
