//Javascript seciliyse fonksiyonu
//Versiyon 1.0.1
//Yazar yedincisenol | yedincisenol.com | o@yedincisenol.com
//Yardim,Güncelleme serpito.com

       function seciliyse(bu,anahtar,deger,yeninput,nereye){
        var adi=bu.name;
        var adet=bu.options.length;
         if(anahtar=='text') var secili=bu.options[bu.selectedIndex].text; else var secili=bu.options[bu.selectedIndex].value;
        for(var i=0; i<=adet; i++){
            if(secili==deger) {
                i=adet+1; var yeninp = document.createElement('input');
                yeninp.setAttribute('name',yeninput);
                yeninp.setAttribute('id',yeninput);
                if(varmi=!document.getElementById(yeninput)) document.getElementById(nereye).insertBefore(yeninp,null);
            }
            if((i==adet) && (secili!=adet)) {
                if(document.getElementById(yeninput)) document.getElementById(nereye).removeChild(document.getElementById(yeninput));
            }
        }
    }