
	var browserType = navigator.appName;
	var browserVersion = navigator.appVersion;
	var obj = new Object();
	var key = new Object();

	function karakterKontrol(obj)
	{
		var ch;
		key = window.event.keyCode;
		ch = String.fromCharCode(key);
		
		if(obj.name == 'domainTextBox')
		{
			kelime = document.Form1.domainTextBox.value;
			
			if(key == 46 | key == 350 | key == 304 | key == 220 | key == 199 | key == 214 | key == 63 | key == 40 | key == 41 | key == 233 | key == 44 | key == 59)
			{
				event.returnValue = 0;
			}
			else if(key == 34 | key == 288 | key == 43 | key == 39 | key == 94 | key == 37 | key == 47 | key == 42 | key == 61 | key == 60 | key == 62 | key == 58)
			{
				event.returnValue = 0;
			}
			else if(key == 35 | key == 123 | key == 125 | key == 91 | key == 92 | key == 93 | key == 95 | key == 33 | key == 38 | key == 32 | key == 36)
			{
				event.returnValue = 0;
			}
			else if(ch == '&')
				event.returnValue = 0;
			else return true;
		}
	}
	function checkFormDomain(){
		if(document.Form1.domainTextBox.value == '' || document.Form1.domainTextBox.value == null ){
			alert('Sorgulama için lütfen bir alan adı giriniz.');
			document.Form1.domainTextBox.focus();
		}else if(!checkRootDomain()){
			alert('Sorgulama için lütfen bir alan adı uzantısı seçiniz.');
			
		}else if(infoMu() && ikiKarakterdenUzunMu()){
				alert('.info ve .biz alan adları 2 karakterden uzun olmalıdır!');
				document.Form1.domainTextBox.focus();
		}else if(tireYanyana()){
			alert('- işareti yanyana olamaz');
			document.Form1.domainTextBox.focus();
		}else if(tireSondaysa()){
			alert('Alan adının son karakteri - olamaz!');
			document.Form1.domainTextBox.focus();
		}
		else{
			document.Form1.action='whois.asp';
			/*if (navigator.appName.substring(0,8)=='Netscape'){
				document.getElementById('submitButton').style.display = 'none';
				
			}else {
				theObjectReference = eval('document.all' + '.' + 'submitButton' + '.style');
				theObjectReference.display='none';
			}*/
			
			document.Form1.submit();			
		}
		return false;	
	}
	function tireYanyana()
	{
		tireIndex=null;
		kelime = document.Form1.domainTextBox.value;
		for(i=0;i<kelime.length;i++)
		{
			if(kelime.substring(i,i+1) == '-')
			{
				if(tireIndex == null)
					tireIndex = i;
				else if( i == tireIndex+1)
					return true;
				tireIndex = i;
			}
		}
		return false;
	}
	
	function tireSondaysa()
	{
		kelime = document.Form1.domainTextBox.value;
		if(kelime.substring(kelime.length-1,kelime.length) == '-')
			return true;
		else return false;
	}
	
	function ikiKarakterdenUzunMu()
	{
		kelime = document.Form1.domainTextBox.value;
		if(kelime.length<3)
		{return true;}
		return false;
	}
	function infoMu()
	{
		for(var i=0;i<document.Form1.domainRootChk.length;i++){
			if(document.Form1.domainRootChk[i].checked==true && (document.Form1.domainRootChk[i].value=='.info' || document.Form1.domainRootChk[i].value=='.biz')){
				return true;
			}
		}
		return false;
	}
	
	function checkRootDomain(){
		for(var i=0;i<document.Form1.domainRootChk.length;i++){
			if(document.Form1.domainRootChk[i].checked==true){
				return true;
			}
		}
		return false;
	}
	function isAlphaNumericSymbolDomain(ch){
		alert(key);
		if (!(ch >= 'A' && ch <= 'Z') && !(ch >= '0' && ch <= '9') && !(ch >='a' && ch <='z') && ch != " "  && key != 8  && key != 95 && key != 45 && key != 46 ){
			return false;
		}
		return true;
	}