
	
	function ipucuyardim(frm)
	{
		var veri=frm.search.value; 
		if(veri.length >= 3)
		{
			document.getElementById('ipucudiv').innerHTML="<span id=loading></span>"; 
			xajax_ipucu(xajax.getFormValues('searchform')); 
			return false;
		}
	}
	
	function filtre(filtform, kodblogu, id)
	{
		for (var i = 0; i < filtform.elements.length; i++)
		{
			if(filtform.elements[i].type=='radio' && filtform.elements[i].id.indexOf('['+kodblogu+']')>=1)
			{
				if(filtform.elements[i].id.indexOf('['+kodblogu+']['+id+']')>=1)
				{
					filtform.elements[i].checked=true;
				}else{
					filtform.elements[i].checked=false;
				}
			}
		}
	}
	function filtrebosalt(filtform, kodblogu, haric)
	{
		for (var i = 0; i < filtform.elements.length; i++)
		{
			if(filtform.elements[i].type=="radio")
			{
				var secm	=filtform.elements[i].id;
				if(secm.match(kodblogu)==''+kodblogu+'')
				{
					filtform.elements[i].checked=false;
					
						var secmharic	=filtform.elements[i].id;
						if(secmharic.match(haric)==''+haric+'')
						{
							filtform.elements[i].checked=true;
						}
				}
			}
		}
	}
	function ackapa(divadi)
	{
		if(document.getElementById(divadi).style.display=='none')
		{
			document.getElementById(divadi).style.display='block';
		}
		else
		{
			document.getElementById(''+divadi+'').style.display='none';
		}
	}
	function popup(URL, baslik, width, height)
	{
		day = new Date();
		id 	= day.getTime();
		eval(id = window.open(URL, id, 'toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0, resizable=no, width='+width+', height='+height+', left=240px, top=212px'));
	}

	
	function cagriMerkezi()
	{
		if(document.getElementById('cmdiv').style.display=='block')
		{
			document.getElementById('cmdiv').style.display='none';
		}
		else
		{
			document.getElementById('cmdiv').style.display='block';
		}
	}
		function hsfkont()
		{
			
			if((document.location.hostname)=='localhost')
			{
				var hostum	='http://'+document.location.hostname+'/host/detaymobilya/';
			}
			else
			{
				var hostum	='http://'+document.location.hostname+'/';
			}
			
			var form	=document.hsform;
			
				if(form.adsoyad.value=='' & form.tel.value=='' & form.email.value=='')
				{
					form.adsoyad.focus();
					document.getElementById('adsoyaddiv').innerHTML='<img src='+hostum+'images/error.png width=15>';
					return false;
				}else{
					document.getElementById('adsoyaddiv').innerHTML='<img src='+hostum+'images/accept.png width=15>';
				}
				
				if(form.tel.value=='')
				{
					form.tel.focus();
					document.getElementById('teldiv').innerHTML='<img src='+hostum+'images/error.png width=15>';
					return false;
				}else{
					document.getElementById('teldiv').innerHTML='<img src='+hostum+'images/accept.png width=15>';
				}
				
				if(form.email.value=='')
				{
					form.email.focus();
					document.getElementById('emaildiv').innerHTML='<img src='+hostum+'images/error.png width=15>';
					return false;
				}else{
					document.getElementById('emaildiv').innerHTML='<img src='+hostum+'images/accept.png width=15>';
				}
				var emailat	=form.email.value;
				if(emailat.match('@')==null)
				{
					form.email.focus();
					document.getElementById('emaildiv').innerHTML='<img src='+hostum+'images/error.png width=15>';
					return false;
				}
				
				else
				{
					document.getElementById('emaildiv').innerHTML='<img src='+hostum+'images/accept.png width=15>';
				}
							
			return true;
		}
	function divac()
	{
		if(document.getElementById('gd').style.display=="none")
		{
			document.getElementById('gd').style.display="block";
			
		}
		else
		{
			document.getElementById('gd').style.display="none";
		}
	}

	function transdiv(id, alt)
	{  
			if((document.location.hostname)=='localhost')
			{
				var hostum	='http://'+document.location.hostname+'/host/detaymobilya/';
			}
			else
			{
				var hostum	='http://'+document.location.hostname+'/';
			}
			
		var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
		
		var layer 					= document.createElement('div');
		layer.style.zIndex 			= 499;
		layer.id 					= 'layer';
		layer.style.position 		= 'absolute';
		layer.style.top 			= '0px';
		layer.style.left 			= '0px';
		layer.style.height 			= document.documentElement.scrollHeight + 'px';
		layer.style.width 			= width + 'px';
		layer.style.backgroundColor = 'black';
		layer.style.opacity 		= '.7';
		layer.style.filter 			+= ("progid:DXImageTransform.Microsoft.Alpha(opacity=1)");
		document.body.appendChild(layer);
		
		var div = document.createElement('div');
		div.style.textAlign			= 'right';
		div.style.zIndex 			= 500;
		div.id 						= 'box';
		div.style.position 			= (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed';
		div.style.top 				= '175px';
		div.style.left 				= (width / 1.5) - (400 / 1) + 'px';

		div.style.backgroundColor 	= 'white';
		div.style.border 			= '1px solid silver';
		div.style.padding 			= '15px';
		document.body.appendChild(div);  
		
		
		var a = document.createElement('a');
		a.innerHTML 				= '<b><font size=7 color=black;>X</font></b>';
		a.style.left 				= (width / 1) - (400 / 1) + 'px';
		a.href 						= 'javascript:void(0)';
		a.onclick 					= function() 
		{
		  document.body.removeChild(document.getElementById('layer'));
		  document.body.removeChild(document.getElementById('box'));
		};
		  
		div.appendChild(a);
		var p = document.createElement('p');
		p.innerHTML 				= '<img src='+hostum+'resim.php?id='+id+' alt='+alt+' title='+alt+' border=0 />';
		div.appendChild(p);
	}
	function checkall(frm,sonuc,ifade)
	{
		for (var i = 0; i < frm.elements.length; i++)
		{
			if( frm.elements[i].type == 'checkbox' && frm.elements[i].name.indexOf(ifade)>=0)
			{
				frm.elements[i].checked = sonuc;
			}
		}
	}
	function transbosdiv(baslik)
	{  

		var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
		
		var layer 					= document.createElement('div');
		layer.style.zIndex 			= 499;
		layer.id 					= 'layer';
		layer.style.position 		= 'absolute';
		layer.style.top 			= '0px';
		layer.style.left 			= '0px';
		layer.style.height 			= document.documentElement.scrollHeight + 'px';
		layer.style.width 			= width + 'px';
		layer.style.backgroundColor = 'black';
		layer.style.opacity 		= '.7';
		layer.style.filter 			+= ("progid:DXImageTransform.Microsoft.Alpha(opacity=1)");
		document.body.appendChild(layer);  
		
		var div = document.createElement('div');
		div.style.textAlign			= 'right';
		div.style.zIndex 			= 500;
		div.id 						= 'box';
		div.style.position 			= (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed';
		div.style.top 				= '175px';
		div.style.left 				= (width / 1.5) - (400 / 1) + 'px';

		div.style.backgroundColor 	= 'white';
		div.style.border 			= '1px solid silver';
		div.style.padding 			= '15px';
		document.body.appendChild(div);  
		
		
		var a = document.createElement('a');
		a.innerHTML 				= '<b><font size=7 color=black;>X</font></b>';
		a.style.left 				= (width / 1) - (400 / 1) + 'px';
		a.href 						= 'javascript:void(0)';
		a.onclick 					= function() 
		{
		  document.body.removeChild(document.getElementById('layer'));
		  document.body.removeChild(document.getElementById('box'));
		};
		  
		div.appendChild(a);
		var p = document.createElement('p');
		p.innerHTML 				= ''+baslik+'';
		div.appendChild(p);
	}

	function divx(x)
	{
		if(x=='p')
		{
			document.getElementById('parcalar').style.display="block";
			document.getElementById('yorumlar').style.display="none";
		}
		if(x=='y')
		{
			document.getElementById('yorumlar').style.display="block";
			document.getElementById('parcalar').style.display="none";
		}
	}
	function yonlen(url)
	{
		var url;
		document.location.href=''+url+'';
	}
	
	function uresimdiv(id, alt)
	{
		if((document.location.hostname)=='localhost')
		{
			var hostum	='http://'+document.location.hostname+'/host/detaymobilya/';
		}
		else
		{
			var hostum	='http://'+document.location.hostname+'/';
		}
		
		document.getElementById('resimdiv').innerHTML='<img src="'+hostum+'ufakresim.php?id='+id+'" width="150" alt="'+alt+'" title="'+alt+'" style="border: 1px solid silver;" />';
	}
	
	function bresimdiv(id, alt)
	{
		if((document.location.hostname)=='localhost')
		{
			var hostum	='http://'+document.location.hostname+'/host/detaymobilya/';
		}
		else
		{
			var hostum	='http://'+document.location.hostname+'/';
		}
		document.getElementById('resimdiv').innerHTML='<a href="'+hostum+'buyukresim.php?id='+id+'" title="'+alt+'" rel="lightbox"><img src="'+hostum+'buyukresim.php?id='+id+'" alt="'+alt+'" title="'+alt+'" style="border: 1px solid silver; width:450px;" /></a>';
	}
