﻿function dothis()
{

	document.getElementById('arama_kriter').style.display='none'; 
	document.getElementById('ay_but2').src='images/asagiok.gif';

}

function TumunuKapat(TheSecili)
{

//	for (i=1;i++;11)
	//	{
					
			document.getElementById('sss1').style.display='none'; 
			document.getElementById('sss2').style.display='none'; 
			document.getElementById('sss3').style.display='none'; 
			document.getElementById('sss4').style.display='none'; 
			document.getElementById('sss5').style.display='none'; 
			document.getElementById('sss6').style.display='none'; 
			document.getElementById('sss7').style.display='none'; 
			document.getElementById('sss8').style.display='none'; 
			document.getElementById('sss9').style.display='none'; 
			document.getElementById('sss10').style.display='none'; 
			document.getElementById('sss11').style.display='none';

			document.getElementById(TheSecili).style.display='inline';
	//	}

}


function ChkForm(TheForm) {

	TheForm.submit();
}


function clear_textbox()
{
if (document.frmAra.q.value == "Web' de ara")
document.frmAra.q.value = "";
} 


function roll(img_name1, img_src1,TheBelgeSayisi)
   {
  
	
	for(var i=0 ;i<TheBelgeSayisi;i++)
	{
   		img_name=img_name1 + "_" + i;
		if (document.getElementById(img_name).attributes!=null)	 
{	 var imageattributes=document.getElementById(img_name).attributes;

		alert(imageattributes.getNamedItem("name").value);
}
		//if (imageattributes.getNamedItem("src").value!=null)
  		//{imageattributes.getNamedItem("src").value = img_src1;}

    }
   }
   
function removeClassName (elem, className) {
	elem.className = elem.className.replace(className, "").trim();
}

function addCSSClass (elem, className) {
	removeClassName (elem, className);
	elem.className = (elem.className + " " + className).trim();
}

String.prototype.trim = function() {
	return this.replace( /^\s+|\s+$/, "" );
}

function stripedTable() {
	if (document.getElementById && document.getElementsByTagName) {  
		var allTables = document.getElementsByTagName('table');
		if (!allTables) { return; }

		for (var i = 0; i < allTables.length; i++) {
			if (allTables[i].className.match(/[\w\s ]*scrollTable[\w\s ]*/)) {
				var trs = allTables[i].getElementsByTagName("tr");
				for (var j = 0; j < trs.length; j++) {
					removeClassName(trs[j], 'alternateRow');
					addCSSClass(trs[j], 'normalRow');
				}
				for (var k = 0; k < trs.length; k += 2) {
					removeClassName(trs[k], 'normalRow');
					addCSSClass(trs[k], 'alternateRow');
				}
			}
		}
	}
}

/* onload state is fired, append onclick action to the table's DIV */
/* container. This allows the HTML document to validate correctly. */
/* addIEonScroll added on 2005-01-28                               */
/* Terence Ordona, portal[AT]imaputz[DOT]com                       */
function addIEonScroll() {
	var thisContainer = document.getElementById('tableContainer');
	if (!thisContainer) { return; }

	var onClickAction = 'toggleSelectBoxes();';
	thisContainer.onscroll = new Function(onClickAction);
}

/* Only WinIE will fire this function. All other browsers scroll the TBODY element and not the DIV */
/* This is to hide the SELECT elements from scrolling over the fixed Header. WinIE only.           */
/* toggleSelectBoxes added on 2005-01-28 */
/* Terence Ordona, portal[AT]imaputz[DOT]com         */
function toggleSelectBoxes() {
	var thisContainer = document.getElementById('tableContainer');
	var thisHeader = document.getElementById('fixedHeader');
	if (!thisContainer || !thisHeader) { return; }

	var selectBoxes = thisContainer.getElementsByTagName('select');
	if (!selectBoxes) { return; }

	for (var i = 0; i < selectBoxes.length; i++) {
		if (thisContainer.scrollTop >= eval(selectBoxes[i].parentNode.offsetTop - thisHeader.offsetHeight)) {
			selectBoxes[i].style.visibility = 'hidden';
		} else {
			selectBoxes[i].style.visibility = 'visible';
		}
	}
} 

window.onload = function() { stripedTable(); addIEonScroll(); }


function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function OpenWin(theURL,winName,features) { // 
  window.open(theURL,winName,features);
}

function PictureBrowser(TheField) {
  OpenWin("/cms/pictures.asp?cmd=b&fld=" + TheField ,"wndPictureBrowser","width=410,height=350,scrollBars=1");
}

function AlbumBrowser(TheField) {
  OpenWin("/cms/albums.asp?cmd=b&fld=" + TheField ,"wndAlbumBrowser","width=260,height=350");
}

function CodeBrowser(TheField,TheStatus,TheKat, TheAltKat) {
  OpenWin("Codes.asp?cmd=b&KatId=" + TheKat + "&AltKatId=" + TheAltKat + "&fStat=" + TheStatus + "&fld=" + TheField ,"wndCodeBrowser","width=410,height=350,scrollBars=1,status=yes");
}
function PdfBrowser(TheField) {
  OpenWin("/cms/pictures.asp?cmd=b&fld=" + TheField + "&k=Pdf" ,"wndPictureBrowser","width=410,height=350,scrollBars=1");
}
function HitArtir(TheRekId) {
	OpenWin("banner_configurasyon.asp?id=" + TheRekId, "wnd", "height=0,width=0,status=yes,toolbar=no,menubar=no,location=no");  

}



function clock() {
  if (!document.layers && !document.all) return;
  var digital = new Date();
  var hours = digital.getHours();
  var minutes = digital.getMinutes();
  var seconds = digital.getSeconds();
  if (minutes <= 9) minutes = "0" + minutes;
  if (seconds <= 9) seconds = "0" + seconds;
  dispTime = hours + ":" + minutes + ":" + seconds;
  if (document.layers) {
    document.layers.pendule.document.write(dispTime);
    document.layers.pendule.document.close();
  }
  else
  if (document.all)
  pendule.innerHTML = dispTime;
  setTimeout("clock()", 1000);
}