function listeOver(satir){ 
		satir.style.backgroundColor = '#F2EEF6';
}
function listeOut(satir){ 
		satir.style.backgroundColor = '';
}
function L1(id){
	el = document.getElementById(id);
	el.checked = true;
}
function Amount_onkeypress() {	
	if (window.event.keyCode<48 || window.event.keyCode>57){
	return false;}
}
function Trim(value)
{
	value = value.match(/^\s*(\S+(\s+\S+)*)\s*$/);
	return (value == null) ? "" : value[1];
}
function Only_LetterANDDigit(e) {	
	//alert(window.event.srcElement.value);
	var whichCode = (window.Event) ? e.which : e.keyCode; 
	
	
	if (whichCode <14) return true;  // Tab
	if (whichCode > 47 && whichCode < 58) return true;
	if (whichCode > 96 && whichCode < 123) return true;
	if (whichCode > 64 && whichCode < 91) return true;

	var validChars="üÜðÐýþÞÝçÇöÖ ";

	for (i=0; i<validChars.length; i++)
	{
		if (whichCode==validChars.charCodeAt(i)) return true;
	}
	
	return false;

}
function Only_Digit(e) {	
	//alert(window.event.srcElement.value);
	var whichCode = (window.Event) ? e.which : e.keyCode;
	
	if (whichCode == 13) return true;  // Enter
	if (whichCode > 57 ){
	return false;}
	if (whichCode < 48 && whichCode > 13){ 
	return false;}
}
function replace2(s, from1, to1) {
	var p,str;
	str=s;
	p = str.indexOf(from1);
	while (p > -1) {
		str=str.substring(0, p) + to1 + str.substring(p+from1.length);
		p = str.indexOf(from1);
	}
	return str;
}
function toggle(id)
{
	el = document.getElementById(id);
	var display = el.style.display ? '' : 'none';
	el.style.display = display;
}
function selectTemizle2(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	objCheckBoxes.options[0].selected = CheckValue;
}
function selectTemizle(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.options.length;
	for(var i = 0; i < countCheckBoxes; i++)
		objCheckBoxes.options[i].selected = CheckValue;
}
function checkTemizle(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}
function degerTemizle(FormName, FieldName)
{
	if(!document.forms[FormName])
		return;
	var objField = document.forms[FormName].elements[FieldName];
	if(!objField)
		return;
	objField.value="";
}
