
function ValidateExt(field_name,allowed_extensions){
val = $('#'+ field_name).val().toLowerCase();
array = allowed_extensions.split(',');
cont = 0 ;
	for ( i = 0 ; i < array.length; i++){
		if (val.indexOf('.' + array[i]) > 0) cont ++ ;
	}
	
	if (cont == 0){
	alert('The File must be ' + array.join(' or ') );	
	$('#'+ field_name).val('');
	} 
}

function Rate(value,  item_id ){
value = parseInt(value);
item_id = parseInt(item_id);
data =  "item_id=" + item_id+"&value="+value;
	if (value > 0  && item_id  > 0 ){
	$.ajax({type: "POST",url: "/includes/rate.php",data: data ,dataType: "script"});	
	}
	return false;	
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
