function videoEkranKapat(obj){
	var objNesne = document.getElementById(obj);
	if(objNesne){
		if(objNesne.style.display == "none"){
			objNesne.style.display = "";
		}else{
			objNesne.style.display = "none"
		}
	}
}

function flashYaz(adres,w,h,bg,tran,isim){
	document.writeln('<object id="'+isim+'" width="'+w+'" height="'+h+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">');
	document.writeln('<param name="movie" value="'+adres+'"><param name="wmode" value="'+tran+'"><param name="bgcolor" value="'+bg+'">');
	document.writeln('<embed name="'+isim+'" src="'+adres+'" width="'+w+'" height="'+h+'" wmode="' + tran + '" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>');
	document.writeln('</object>');
}

function tabAcBakim(nesne,ids,toplam){
	var i;
	for(i=0;i<toplam;i++){
		if(document.getElementById(nesne + i)){
			document.getElementById(nesne + i).style.display="none";
		}
	}
	if(ids>-1){
		if(document.getElementById(nesne + ids)){
			document.getElementById(nesne + ids).style.display="";
		}
	}
}

function kisaOtoFormGonder(objFrm){
	if(objFrm){
		if(objFrm.txtRefNo.value==""){
			alert("Lütfen aramak istediğiniz ilanın referans numarasını yazınız...");
			document.getElementById("txtRefNo").focus();
			return false;
		}
	}
}

function setLinkGonder(link){
	var links = link.split("||");
	if(links.length>0){
		if(links[0]=="_blank"){
			window.open(links[1]);
		}else{
			location.href=links[1];
		}
	}
}

var forum_dosya_count = 0;
function forum_dosya_ekle(objYer,strName){
	var obj = document.getElementById(objYer);
	if(obj){
		var objBR = document.createElement('br');
		obj.appendChild(objBR);
		
		var input = document.createElement('input');
		input.type = 'file';
		input.name = strName + '[' + forum_dosya_count + ']';
		input.id = strName + '[' + forum_dosya_count + ']';
		input.className = 'textbox';
		input.size = '35';
		obj.appendChild(input);
		
		//obj.innerHTML += '<div><input type="file" name="' + name + (forum_dosya_count + 1) + '" id="' + name + (forum_dosya_count + 1) + '" class="textbox" size="35" /></div>'
		forum_dosya_count += 1;
	}
}
