	function createCookie(c_name,c_value,expDays)	{
	var exp = new Date();
	exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
	document.cookie = c_name+ '=' + escape(c_value) + ";expires=" + exp + '; path=/; domain=.kimindir.com';	
	}

	function installSearchEngine() {
	 createCookie('kimindirsearch','hide','365');
	 if (window.external && ("AddSearchProvider" in window.external)) {
	   // Firefox 2 and IE 7, OpenSearch
	   window.external.AddSearchProvider("http://kimindir.com/whois.xml");
	 }
	 textOnOff('texton');
	}

	function textOnOff() {
	for (var i=0; i < arguments.length; i++) {
		var item = document.getElementById(arguments[i]);
		if (arguments[i]=='texton') {
			item.style.display = 'none';
		} else { 
			item.className= "texton";
		}
	}
	}

	function getSearchCookie(c_name) {
	if (document.cookie.length>0) {
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1) { 
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) {
				c_end=document.cookie.length;
			}
			return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return null;
	}


	function show_searchbox(){
		if (window.external && ("AddSearchProvider" in window.external)) {
			cookie = getSearchCookie('kimindirsearch');
			if (cookie!='hide'){
				document.getElementById('texton').style.display = 'block';
			}
		}
	}

	function focus(){
		document.getElementById('arama').focus();
		show_searchbox();
	}

	function send(){
		val = document.getElementById('arama').value;
		frm = document.dmn;

		if (val=='stats')
		{
			val = 'stats.com';
		}

		document.location.href = "/" + val;
		return false;
	}

