function checkGroupChecker(inputname){
        checkGroup = document.getElementsByName(inputname);
        for(cSayac=0; cSayac< checkGroup.length ; cSayac++){
                if(checkGroup[cSayac].checked){
                        return false;
                }
        }
        return true;
}

function submitForm(f){
	var attribute = "1!=1";
		for(i=0;i<f.elements.length;i++){
                input = f.elements[i];
				attribute = "1!=1";
				a = input.getAttribute('alert');
				a = a +' ';
				if(a!=' ' && a!=null+' '){
						if(attribute=="1!=1"){
								if(input.tagName=='SELECT'){
										attribute = "input.selectedIndex==0";
                                }
                                if(input.tagName=='TEXTAREA' || input.type=='text' || input.type=='password' || input.type=='file'){
										attribute = "input.value==''";
                                }

                                if(input.type=='checkbox' || input.type=='radio'){
										attribute = "checkGroupChecker('" + input.name +"')";
                                }
                        }
                        result = false;
                        eval('if('+attribute+' ){result=true;};');
                        //input.alert  \n\r replace edilecek
                        if(result==true){
                                alert(input.getAttribute('alert'));
                                input.focus();
                                input.style.backgroundColor = '#FF0000';
								input.style.color = '#FFFFFF';
                                return false;
                        }else{
							input.style.backgroundColor = '#FFFFFF';
							input.style.color = '#000000';
						}
                }
        }

        for(i=0;i<f.elements.length;i++){
                input = f.elements[i];
                if(input.className=='number') input.value = input.getValue();
                if(input.className=='date') input.value = input.getValue();
        }

        return true;
}
