
function $g(){return document.getElementById(arguments[0]);}

function $goster(){$g(arguments[0]).style.display="";}
function $gizle(){$g(arguments[0]).style.display="none";}



function tumunusecbirak(f,c)
{
  if(f.tagName.toLowerCase()=="form"){x=f.elements;}else{x=f.getElementsByTagName("input");}

   for(i=0;i<x.length;i++){
     if(x[i].type=='checkbox'){x[i].checked=c;}
   }
}

function wlow(which1){
	theobject=which1
	lowlighting=setInterval("lowlightit(theobject)",25)
}

function whigh(which1){
	clearInterval(lowlighting)
	which1.filters.alpha.opacity=100
}

function lowlightit(cur1)
{
  try{
	  if (cur1.filters.alpha.opacity>55)
	  cur1.filters.alpha.opacity-=4
  	else if (window.lowlighting)
    clearInterval(lowlighting)
  }
  catch(err){}
}

function sepet_onizleme_sil(id){
	open("?onizleme_sepetten_sil="+id+"&d="+Date(),"gp2323","");
}

function sepeteat(id){
	open("index.php?sepete_ekle="+id+"&d="+Date(),"gp2323","");
}

function sadecerakam(objEvent)
	{ var iKeyCode;
	  iKeyCode = objEvent.keyCode;
	  if(iKeyCode>=48 && iKeyCode<=57) return true;
	  return false;
}

function numarakontrol(objEvent){
	var iKeyCode;
	if(navigator.appName=="Netscape"){
		iKeyCode = objEvent.which;
		if(iKeyCode>=48 && iKeyCode<=57) return true;
		return false;
	}else{
		iKeyCode = objEvent.keyCode;
		if(iKeyCode>=48 && iKeyCode<=57) return true;
		return false;
	}
}

function buyuk_resim(url){
	if(url=="img/fotoyok.gif"){return false;}

  wh="";
  im=new Image();
  im.src=url;

  w=700;
  h=400;

  if(parseInt(im.width,10)>700){wh="width=700";}
  if(parseInt(im.height,10)>400){wh="height=400";}

  d=open('','','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2);
  d.document.body.innerHTML = "<html><body><div align=center><a style='text-decoration:none' href='javascript:void(0)' onclick=\"self.close()\"><img "+wh+" src='"+url+"' onload='' border=0><br><br>[ Kapat ]</a></div></body></html>";
}



function kontrol(f){
	for(var i=0;i<f.elements.length;i++){
	var hata = f.elements[i].getAttribute("hata");
	 if(hata!=""&&hata!=null&&f.elements[i].value==""){
		alert(hata);f.elements[i].focus();
		return false;
	 }
	}
	return true;
}
