
add#primaryfield##record#=function(#primarykey#,gskey){
	var suffix=#primarykey#;
#iterator-fieldlist-getbridgerecordjs#
	var valid=1;
	var offender=null;
	
	//delete the excessive validate rules
#iterator-fieldlist-validate#
	//add more validation rules
	
	if (!valid) return;

#iterator-fieldlist-realvalues#	
	var params=[];
#iterator-fieldlist-parampush#
	ajxpgn('#primaryfield##records#_'+#primarykey#,document.appsettings.codepage+'?cmd=add#primaryfield##record#&#primarykey#='+#primarykey#,0,0,params.join('&'),null,null,null,gskey);
}

del#primaryfield##record#=function(#lookupkey#,#primarykey#,gskey){
	if (!sconfirm('Are you sure you want to unlink this #record#?')) return;
	
	ajxpgn('#primaryfield##records#_'+#primarykey#,document.appsettings.codepage+'?cmd=del#primaryfield##record#&#lookupkey#='+#lookupkey#+'&#primarykey#='+#primarykey#,0,0,null,null,null,null,gskey);
}

