﻿function EvImageOverChange(name, direction)
{
switch(direction)
{
case 'in':
name.src = "resim/ana2.png";
break;
case 'out':
name.src = "resim/ana3.png";
break;
}
}

function EvImageOverChange2(name, direction)
{
switch(direction)
{
case 'in':
name.src = "resim/foto.png";
break;
case 'out':
name.src = "resim/foto2.png";
break;
}
}
function EvImageOverChange1(name, direction)
{
switch(direction)
{
case 'in':
name.src = "resim/yeni web/web için/sss2-icon.gif";
break;
case 'out':
name.src = "resim/yeni web/web için/sss-icon.gif";
break;
}
}
function EvImageOverChange3(name, direction)
{
switch(direction)
{
case 'in':
name.src = "resim/dir_down_3.gif";
break;
case 'out':
name.src = "resim/dir_down_1.gif";
break;
}
}
function disable_page(bool)
{
var x=document.form1.TextBox4.value;
if(x!='b'){
document.form1.TextBox1.disabled=bool;
document.form1.TextBox2.disabled=bool;
document.form1.TextBox3.disabled=bool;
document.form1.TextBox5.disabled=bool;
document.form1.TextBox6.disabled=bool;
document.form1.DropDownList1.disabled=bool;
document.form1.DropDownList2.disabled=bool;
document.form1.DropDownList3.disabled=bool;
document.form1.DropDownList4.disabled=bool;
document.form1.RadioButton1.disabled=bool;
document.form1.RadioButton2.disabled=bool;
document.form1.TextBox4.value='b';
}
}
function temizle(bool)
{
document.form1.TextBox1.disabled=bool;
document.form1.TextBox2.disabled=bool;
document.form1.TextBox3.disabled=bool;
document.form1.TextBox5.disabled=bool;
document.form1.TextBox6.disabled=bool;
document.form1.TextBox8.disabled=bool;
document.form1.TextBox9.disabled=bool;
document.form1.DropDownList1.disabled=bool;
document.form1.DropDownList2.disabled=bool;
document.form1.DropDownList3.disabled=bool;
document.form1.DropDownList4.disabled=bool;
document.form1.DropDownList5.disabled=bool;
document.form1.RadioButton1.disabled=bool;
document.form1.RadioButton2.disabled=bool;
document.form1.TextBox1.value='';
document.form1.TextBox2.value='';
document.form1.TextBox3.value='';
document.form1.TextBox5.value='';
document.form1.TextBox6.value='';
document.form1.TextBox10.value='';
document.form1.TextBox8.value='';
document.form1.TextBox9.value='';
document.form1.DropDownList1.selectedIndex=0;
document.form1.DropDownList2.selectedIndex=0;
document.form1.DropDownList3.selectedIndex=0;
document.form1.DropDownList4.selectedIndex=0;
document.form1.DropDownList5.selectedIndex=0;
document.form1.RadioButton1.checked=false;
document.form1.RadioButton2.checked=false;
document.form1.TextBox10.focus();
return false;

}

function itemcount(item,a)
{
var x=item.value;
var y=x.length;
if(y<a){boyala(item,"Şifre en az 4 karakter olmalı",1);return false}
else{boyala(item,"",0);return true}
return true
}
function itemcount1(item,a)
{
var x=item.value;
var y=x.length;
if(y<a){boyala(item,"TC Kimlik No en az 11 karakter olmalı",1);return false}
else{boyala(item,"",0);return true}
return true
}
function password(item1,item2)
{
var x=item1.value;
var y=item2.value;
if(x!=y){boyala(item2,"Şifre aynı olmalı",1);return false}
return true
}
function check(item)
{
var x=item.value;
var y=x.length;
if(y<1){boyala(item,"Adınızı giriniz!..",1);return false;}
else{boyala(item,"",0);return true}
return true
}
function check12(item)
{
var x=item.value;
var y=x.length;
if(y<1){boyala(item,"Gizli Soruya cevap veriniz..",1);return false;}
else{boyala(item,"",0);return true}
return true
}

function boyala(textbox,tooltip,durum)
{
if(durum==1)
{

textbox.title=tooltip;
textbox.style.borderStyle="Double";
textbox.style.borderColor="Red";
textbox.focus();
//textbox.select();
}
else if(durum==0)
{

textbox.title="";
textbox.style.borderStyle="";
textbox.style.borderColor="";
}

}


function echeck(str) {

                               var at="@"
                               var dot="."
                               var lat=str.indexOf(at)
                               var lstr=str.length
                               var ldot=str.indexOf(dot)
                               if (str.indexOf(at)==-1){
                                  return false
                               }

                               if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
                                  return false
                               }

                               if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr-1){
                                  return false
                               }

                                if (str.indexOf(at,(lat+1))!=-1){
                                  return false
                                }

                                if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
                                  return false
                                }

                                if (str.indexOf(dot,(lat+2))==-1){
                                  return false
                                }
                               
                                if (str.indexOf(" ")!=-1){
                                  return false
                                }

                                return true                                                                      
                }
function ValidateEmail(emailID){
                
                if (echeck(emailID.value)==false)
                {              
                    boyala(emailID,"Mail Formatı Hatalı",1);
                               return false
                }
                else{boyala(emailID,"",0); return true}
                return true
 }
function AllowNumeric1(e)
  {
      var iKeyCode = 0; 
         if (window.event) 	
         	iKeyCode = window.event.keyCode
         	    else if (e)      
         	       iKeyCode = e.which;  
         	         if (iKeyCode > 47 && iKeyCode < 58)     
         	             return true 
         	                else    
         	                return false;  
         	                      }