﻿// JScript File 
function favorilereekle(title,url){
    if (window.sidebar) // firefox
    	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
    } 
	else if(document.all)// ie
    	window.external.AddFavorite(url, title);
}

function yorumcuklar(){

document.getElementById('yorumcuklar').style.display='block';
document.getElementById('yorumyazmacik').style.display='none';
document.getElementById('oyunupaylascik').style.display='none';


}

function yorumyazcik(){

document.getElementById('yorumcuklar').style.display='none';
document.getElementById('yorumyazmacik').style.display='block';
document.getElementById('oyunupaylascik').style.display='none';


}


function oyunupaylascik(){

document.getElementById('yorumcuklar').style.display='none';
document.getElementById('yorumyazmacik').style.display='none';
document.getElementById('oyunupaylascik').style.display='block';


}


var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}


function kontrolet(){
var anin = document.getElementById('aramakutusu').value;

if (anin==''|anin=='Lütfen anahtar kelime giriniz'){

alert('Lütfen aranacak kelimeyi giriniz.');
document.getElementById('aramakutusu').focus();
}

else{

var top = document.getElementById('acilirmenu').options[document.getElementById('acilirmenu').selectedIndex];

if (top.value==1){

var mal = '/oyunara/' + anin.replace(" ", "-") + '.html';

window.location.href = mal;

}

else {

window.location.href='/hileara/' + anin.replace(" ", "-") + '.html';

}

}

}

function onEnter( evt, frm ) {
var keyCode = null;

if( evt.which ) {
keyCode = evt.which;
} else if( evt.keyCode ) {
keyCode = evt.keyCode;
}
if( 13 == keyCode ) {
kontrolet();
return false;
}
return true;
}


function kontroleten(){
var anin = document.getElementById('aramakutusu').value;

if (anin==''|anin=='Please enter keyword'){

alert('Please enter keyword');
document.getElementById('aramakutusu').focus();
}

else{

var top = document.getElementById('acilirmenu').options[document.getElementById('acilirmenu').selectedIndex];

if (top.value==1){

var mal = '/searchgame/' + anin.replace(" ", "-") + '.html';

window.location.href = mal;

}

else {

window.location.href='/searchcheat/' + anin.replace(" ", "-") + '.html';

}

}

}



function oyunuyoket(){

document.getElementById('oyunid').style.display='none';



}


function kontroletes(){
var anin = document.getElementById('aramakutusu').value;

if (anin==''|anin=='Por favor, introduzca palabras clave'){

alert('Por favor, introduzca palabras clave');
document.getElementById('aramakutusu').focus();
}

else{

var top = document.getElementById('acilirmenu').options[document.getElementById('acilirmenu').selectedIndex];

if (top.value==1){

var mal = '/searchgamees/' + anin.replace(" ", "-") + '.html';

window.location.href = mal;

}

else {

window.location.href='/searchcheat/' + anin.replace(" ", "-") + '.html';

}

}

}


function onEnteres( evt, frm ) {
var keyCode = null;

if( evt.which ) {
keyCode = evt.which;
} else if( evt.keyCode ) {
keyCode = evt.keyCode;
}
if( 13 == keyCode ) {
kontroletes();
return false;
}
return true;
}

function onEnteren( evt, frm ) {
var keyCode = null;

if( evt.which ) {
keyCode = evt.which;
} else if( evt.keyCode ) {
keyCode = evt.keyCode;
}
if( 13 == keyCode ) {
kontroleten();
return false;
}
return true;
}

function onEnterde( evt, frm ) {
var keyCode = null;

if( evt.which ) {
keyCode = evt.which;
} else if( evt.keyCode ) {
keyCode = evt.keyCode;
}
if( 13 == keyCode ) {
kontroletde();
return false;
}
return true;
}


function kontroletde(){
var anin = document.getElementById('aramakutusu').value;

if (anin==''|anin=='Bitte Stichwort eingeben'){

alert('Bitte Stichwort eingeben');
document.getElementById('aramakutusu').focus();
}

else{

var top = document.getElementById('acilirmenu').options[document.getElementById('acilirmenu').selectedIndex];

if (top.value==1){

var mal = '/searchgamede/' + anin.replace(" ", "-") + '.html';

window.location.href = mal;

}

else {

window.location.href='/searchcheat/' + anin.replace(" ", "-") + '.html';

}

}

}