/********************************** Validation *******************************************************/
function designer_validation()
{
	
    var designer_name = document.getElementById("designer_name").value;
	if(designer_name=='')
	{
		document.getElementById("designer_name_validation_div").innerHTML="* This field is Required.";
		document.getElementById("designer_name").focus();
		return false;
	}
	
	 
	
	
	
}

function designer_validation_clear(str)
{
	if(str!='')
	{
		document.getElementById("designer_name_validation_div").innerHTML="";
	}
	
	
	
	
	
	
}

/********************************** Mainlist Add *******************************************************/
function designer_add(designer_name,status_type,edit_id,action)
{  
//   alert(designer_name);
if((designer_name!=''))
 {
    jQuery.ajax({
		type: "POST",
		url: "designer_entry_db.php",
		data: "designer_name="+designer_name+"&status_type="+status_type+"&edit_id="+edit_id+"&action="+action,
		success: function(msg){jQuery("#desginer_list_div").html(msg);	
		alert(msg);
		window.close();
		window.opener.location.reload(true);
 }
		});
 }
else
{
    designer_validation();
}
}

/********************************** Mainlist Delete *******************************************************/
// function designer_delete(id)
// {
// 	alert(id);
	
// 	if(confirm('Are You Sure! You Want To Delete?'))
// 	{
// 		jQuery.ajax({
// 		type: "POST",
// 		url: "designer_entry_db.php",
// 		data: "id="+id+"&action=delete",
// 		success: function(msg){jQuery("#desginer_list_div").html(msg);
// 		alert(msg);
// 				//window.opener.location.reload(true);

// 	}
// 	});
//     }
// }


